Status: The Pspc::System::iterate function currently requires that w_.isSymmetric be true. This enforces an unstated assumption that the iterator will assume symmetry and modify the symmetry-adapted basis coefficients. The Pspg code instead allows us of an grid iterator that uses the rgrid representation. Both codes should allow iterates that do or do note impose symmetry, but should check preconditions that require the fields to be symmetric if a specific iterator requires it.
Proposal: Each iterator should instead impose its own rules about whether it needs the field to be symmetric in both codes. Define isSymmetric_ as a protected member of the Iterator base class which can be set in constructor of each iterator. Add a public isSymmetric() member function. The System::Iterator can then use this to test if the field needs to be symmetric. This condition can also be tested again within the iterator on entry to the solve function.
Status: The Pspc::System::iterate function currently requires that w_.isSymmetric be true. This enforces an unstated assumption that the iterator will assume symmetry and modify the symmetry-adapted basis coefficients. The Pspg code instead allows us of an grid iterator that uses the rgrid representation. Both codes should allow iterates that do or do note impose symmetry, but should check preconditions that require the fields to be symmetric if a specific iterator requires it.
Proposal: Each iterator should instead impose its own rules about whether it needs the field to be symmetric in both codes. Define isSymmetric_ as a protected member of the Iterator base class which can be set in constructor of each iterator. Add a public isSymmetric() member function. The System::Iterator can then use this to test if the field needs to be symmetric. This condition can also be tested again within the iterator on entry to the solve function.