If a Field3D has background set, then the boundary conditions may not be applied correctly, e.g. here:
if(background != NULL) {
// Apply boundary to the total of this and background
Field3D tot = *this + (*background);
tot.applyBoundary(init);
*this = tot - (*background);
} else {
tot.bndry_op is empty, so no boundaries get applied. I think this is only important for applyBoundary(bool init) and applyBoundary(BoutReal t). The solution is just to add tot.copyBoundary(*this).
If a
Field3Dhasbackgroundset, then the boundary conditions may not be applied correctly, e.g. here:tot.bndry_opis empty, so no boundaries get applied. I think this is only important forapplyBoundary(bool init)andapplyBoundary(BoutReal t). The solution is just to addtot.copyBoundary(*this).