boutproject/BOUT-dev — pull request #11 by d7919 (2014-06-24 16:29:49+00:00)
Title: Bad behaviour fix for FieldGroup operator overload

Improving overload of operator+ so that it doesn't modify either of the FieldGroup objects involved but simply returns a new FieldGroup. Previously writing C=A+B [with A, B and C FieldGroup instances] would modify the contents of A and then set C equal to this so that A and C are identical. The new behaviour ensures that A is not modified but that C contains the contents of both A and B (note it doesn't yet check for duplicate entries).