From 1601a84756408d69f4e1b6db087f2d2608da8e3c Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Fri, 1 Nov 2024 15:12:23 -0700 Subject: [PATCH] FFT: use layout provided by amrex --- ExampleCodes/FFT/Basic/main.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ExampleCodes/FFT/Basic/main.cpp b/ExampleCodes/FFT/Basic/main.cpp index 16ead218..34834389 100644 --- a/ExampleCodes/FFT/Basic/main.cpp +++ b/ExampleCodes/FFT/Basic/main.cpp @@ -132,12 +132,7 @@ int main (int argc, char* argv[]) } // create storage for the FFT - Box cdomain = geom.Domain(); - cdomain.setBig(0,cdomain.length(0)/2); - Geometry cgeom(cdomain, real_box, CoordSys::cartesian, is_periodic); - auto cba = amrex::decompose(cdomain, ParallelContext::NProcsSub(), - {AMREX_D_DECL(true,true,false)}); - DistributionMapping cdm(cba); + auto const& [cba, cdm] = my_fft.getSpectralDataLayout(); FabArray > > phi_fft(cba, cdm, 1, 0); // we will copy the real and imaginary parts of the FFT to this MultiFab @@ -175,6 +170,10 @@ int main (int argc, char* argv[]) Real time = 0.; int step = 0; + Box cdomain = geom.Domain(); + cdomain.setBig(0,cdomain.length(0)/2); + Geometry cgeom(cdomain, real_box, CoordSys::cartesian, is_periodic); + // arguments // 1: name of plotfile // 2: MultiFab containing data to plot