diff --git a/src/mesh/parallel/fci.cxx b/src/mesh/parallel/fci.cxx index d85f7df1e4..825eb1dfca 100644 --- a/src/mesh/parallel/fci.cxx +++ b/src/mesh/parallel/fci.cxx @@ -256,7 +256,7 @@ FCIMap::FCIMap(Mesh& mesh, int offset_, BoundaryRegionPar* boundary, bool zperio Field3D FCIMap::integrate(Field3D &f) const { TRACE("FCIMap::integrate"); - ASSERT3(&map_mesh == f.getMesh()); + ASSERT1(&map_mesh == f.getMesh()); // Cell centre values Field3D centre = interp->interpolate(f); @@ -316,6 +316,10 @@ Field3D FCIMap::integrate(Field3D &f) const { void FCITransform::calcYUpDown(Field3D& f) { TRACE("FCITransform::calcYUpDown"); + // Only have forward_map/backward_map for CELL_CENTRE, so can only deal with + // CELL_CENTRE inputs + ASSERT1(f.getLocation() == CELL_CENTRE); + // Ensure that yup and ydown are different fields f.splitYupYdown(); @@ -328,6 +332,10 @@ void FCITransform::calcYUpDown(Field3D& f) { void FCITransform::integrateYUpDown(Field3D& f) { TRACE("FCITransform::integrateYUpDown"); + // Only have forward_map/backward_map for CELL_CENTRE, so can only deal with + // CELL_CENTRE inputs + ASSERT1(f.getLocation() == CELL_CENTRE); + // Ensure that yup and ydown are different fields f.splitYupYdown(); diff --git a/src/mesh/parallel/fci.hxx b/src/mesh/parallel/fci.hxx index 37a87a96e6..5d987c20e0 100644 --- a/src/mesh/parallel/fci.hxx +++ b/src/mesh/parallel/fci.hxx @@ -58,7 +58,7 @@ public: BoutMask corner_boundary_mask; Field3D interpolate(Field3D& f) const { - ASSERT3(&map_mesh == f.getMesh()); + ASSERT1(&map_mesh == f.getMesh()); return interp->interpolate(f); } diff --git a/src/mesh/parallel/shiftedmetric.cxx b/src/mesh/parallel/shiftedmetric.cxx index d6171fc117..e02fc0ba7e 100644 --- a/src/mesh/parallel/shiftedmetric.cxx +++ b/src/mesh/parallel/shiftedmetric.cxx @@ -146,6 +146,7 @@ const Field3D ShiftedMetric::fromFieldAligned(const Field3D &f) { const Field3D ShiftedMetric::shiftZ(const Field3D &f, const arr3Dvec &phs) const { ASSERT1(&mesh == f.getMesh()); + ASSERT1(f.getLocation() == CELL_CENTRE); // only have zShift for CELL_CENTRE, so can only deal with CELL_CENTRE inputs if(mesh.LocalNz == 1) return f; // Shifting makes no difference @@ -187,6 +188,9 @@ void ShiftedMetric::shiftZ(const BoutReal* in, const Array& phs, void ShiftedMetric::calcYUpDown(Field3D& f) { + ASSERT1(&mesh == f.getMesh()); + ASSERT1(f.getLocation() == CELL_CENTRE); // only have zShift for CELL_CENTRE, so can only deal with CELL_CENTRE inputs + auto results = shiftZ(f, parallel_slice_phases); ASSERT3(results.size() == parallel_slice_phases.size()); @@ -248,6 +252,7 @@ ShiftedMetric::shiftZ(const Field3D& f, //Old approach retained so we can still specify a general zShift const Field3D ShiftedMetric::shiftZ(const Field3D &f, const Field2D &zangle) const { ASSERT1(&mesh == f.getMesh()); + ASSERT1(f.getLocation() == zangle.getLocation()); if(mesh.LocalNz == 1) return f; // Shifting makes no difference