From c60f2fbb2405568edd607984574874bffd50dcf0 Mon Sep 17 00:00:00 2001 From: mayani_s Date: Thu, 18 Jun 2026 10:01:23 +0200 Subject: [PATCH] add periodic bool for layout --- test/maxwell/TestNonStandardFDTDSolver.cpp | 7 +++++-- test/maxwell/TestNonStandardFDTDSolver_convergence.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/test/maxwell/TestNonStandardFDTDSolver.cpp b/test/maxwell/TestNonStandardFDTDSolver.cpp index ccb9f413e..5c7567659 100644 --- a/test/maxwell/TestNonStandardFDTDSolver.cpp +++ b/test/maxwell/TestNonStandardFDTDSolver.cpp @@ -55,6 +55,9 @@ int main(int argc, char* argv[]) { std::array isParallel; isParallel.fill(true); + // periodic layout + bool isAllPeriodic = true; + // unit box ippl::Vector extents{scalar(1), scalar(1), scalar(1)}; ippl::Vector hx; @@ -65,7 +68,7 @@ int main(int argc, char* argv[]) { ippl::UniformCartesian mesh(owned, hx, origin); // all parallel layout, standard domain, normal axis order - ippl::FieldLayout<3> layout(MPI_COMM_WORLD, owned, isParallel); + ippl::FieldLayout<3> layout(MPI_COMM_WORLD, owned, isParallel, isAllPeriodic); // Define the source and field types SourceField source(mesh, layout); @@ -215,4 +218,4 @@ int main(int argc, char* argv[]) { << Kokkos::sqrt(sum_error / sum_norm) << "\n"; } ippl::finalize(); -} \ No newline at end of file +} diff --git a/test/maxwell/TestNonStandardFDTDSolver_convergence.cpp b/test/maxwell/TestNonStandardFDTDSolver_convergence.cpp index ae9305037..e3b74953b 100644 --- a/test/maxwell/TestNonStandardFDTDSolver_convergence.cpp +++ b/test/maxwell/TestNonStandardFDTDSolver_convergence.cpp @@ -47,6 +47,9 @@ void compute_convergence(char direction, unsigned int np, std::string fname) { std::array isParallel; isParallel.fill(true); + // periodic layout + bool isAllPeriodic = true; + // unit box ippl::Vector hx; for (unsigned d = 0; d < 3; d++) { @@ -56,7 +59,7 @@ void compute_convergence(char direction, unsigned int np, std::string fname) { ippl::UniformCartesian mesh(owned, hx, origin); // all parallel layout, standard domain, normal axis order - ippl::FieldLayout<3> layout(MPI_COMM_WORLD, owned, isParallel); + ippl::FieldLayout<3> layout(MPI_COMM_WORLD, owned, isParallel, isAllPeriodic); // Define the source and field types SourceField source(mesh, layout); @@ -187,4 +190,4 @@ int main(int argc, char* argv[]) { } } ippl::finalize(); -} \ No newline at end of file +}