Skip to content

Commit

Permalink
Invalidate whole field for CHECK=4
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwoerer committed Dec 4, 2023
1 parent 37e20c0 commit e27e1bb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/field/field2d.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ Field2D& Field2D::allocate() {
ny = fieldmesh->LocalNy;
}
data.reallocate(nx * ny);
#if CHECK > 2
#if CHECK > 3
*this = BoutNaN;
#elif CHECK > 2
invalidateGuards(*this);
#endif
} else {
Expand Down
4 changes: 3 additions & 1 deletion src/field/field3d.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ Field3D& Field3D::allocate() {
nz = fieldmesh->LocalNz;
}
data.reallocate(nx * ny * nz);
#if CHECK > 2
#if CHECK > 3
*this = BoutNaN;
#elif CHECK > 2
invalidateGuards(*this);
#endif
} else {
Expand Down
4 changes: 3 additions & 1 deletion src/field/fieldperp.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ FieldPerp& FieldPerp::allocate() {
nz = fieldmesh->LocalNz;
}
data.reallocate(nx * nz);
#if CHECK > 2
#if CHECK > 3
*this = BoutNaN;
#elif CHECK > 2
invalidateGuards(*this);
#endif
} else {
Expand Down

0 comments on commit e27e1bb

Please sign in to comment.