Skip to content

applyBoundary on Fields with background set #430

Description

@ZedThree

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions