From 2f8384c5fade4c8de65497e5cef22ea7d20e29ba Mon Sep 17 00:00:00 2001 From: David Bold Date: Mon, 17 Nov 2025 12:54:30 +0100 Subject: [PATCH] applyParallelBoundary can be a no-op for non-fci --- src/field/field3d.cxx | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/src/field/field3d.cxx b/src/field/field3d.cxx index 0d2bc0694e..4c5ffa9748 100644 --- a/src/field/field3d.cxx +++ b/src/field/field3d.cxx @@ -478,7 +478,12 @@ void Field3D::applyParallelBoundary() { TRACE("Field3D::applyParallelBoundary()"); checkData(*this); - ASSERT1(hasParallelSlices()); + if (isFci()) { + ASSERT1(hasParallelSlices()); + } + if (!hasParallelSlices()) { + return; + } // Apply boundary to this field for (const auto& bndry : getBoundaryOpPars()) { @@ -491,7 +496,12 @@ void Field3D::applyParallelBoundary(BoutReal t) { TRACE("Field3D::applyParallelBoundary(t)"); checkData(*this); - ASSERT1(hasParallelSlices()); + if (isFci()) { + ASSERT1(hasParallelSlices()); + } + if (!hasParallelSlices()) { + return; + } // Apply boundary to this field for (const auto& bndry : getBoundaryOpPars()) { @@ -504,7 +514,12 @@ void Field3D::applyParallelBoundary(const std::string& condition) { TRACE("Field3D::applyParallelBoundary(condition)"); checkData(*this); - ASSERT1(hasParallelSlices()); + if (isFci()) { + ASSERT1(hasParallelSlices()); + } + if (!hasParallelSlices()) { + return; + } /// Get the boundary factory (singleton) BoundaryFactory* bfact = BoundaryFactory::getInstance(); @@ -523,7 +538,12 @@ void Field3D::applyParallelBoundary(const std::string& region, TRACE("Field3D::applyParallelBoundary(region, condition)"); checkData(*this); - ASSERT1(hasParallelSlices()); + if (isFci()) { + ASSERT1(hasParallelSlices()); + } + if (!hasParallelSlices()) { + return; + } /// Get the boundary factory (singleton) BoundaryFactory* bfact = BoundaryFactory::getInstance(); @@ -545,7 +565,12 @@ void Field3D::applyParallelBoundary(const std::string& region, TRACE("Field3D::applyParallelBoundary(region, condition, f)"); checkData(*this); - ASSERT1(hasParallelSlices()); + if (isFci()) { + ASSERT1(hasParallelSlices()); + } + if (!hasParallelSlices()) { + return; + } /// Get the boundary factory (singleton) BoundaryFactory* bfact = BoundaryFactory::getInstance();