From e852d02ea6c28fe41f0f2d58cb5824783cfbecf9 Mon Sep 17 00:00:00 2001 From: Ann Almgren Date: Sat, 23 Nov 2024 19:13:31 -0800 Subject: [PATCH] compile without FFT --- Source/LinearSolvers/ERF_TerrainPoisson.H | 2 ++ Source/LinearSolvers/ERF_TerrainPoisson.cpp | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/LinearSolvers/ERF_TerrainPoisson.H b/Source/LinearSolvers/ERF_TerrainPoisson.H index b8ca588f6..40fdc95a1 100644 --- a/Source/LinearSolvers/ERF_TerrainPoisson.H +++ b/Source/LinearSolvers/ERF_TerrainPoisson.H @@ -52,7 +52,9 @@ private: amrex::BoxArray m_grids; amrex::DistributionMapping m_dmap; const amrex::MultiFab* m_zphys; +#ifdef ERF_USE_FFT std::unique_ptr> m_2D_fft_precond; +#endif }; #endif diff --git a/Source/LinearSolvers/ERF_TerrainPoisson.cpp b/Source/LinearSolvers/ERF_TerrainPoisson.cpp index b9425c461..7e4b354fe 100644 --- a/Source/LinearSolvers/ERF_TerrainPoisson.cpp +++ b/Source/LinearSolvers/ERF_TerrainPoisson.cpp @@ -188,9 +188,12 @@ Real TerrainPoisson::norm2(MultiFab const& v) void TerrainPoisson::precond(MultiFab& lhs, MultiFab const& rhs) { +#ifdef ERF_USE_FFT if (m_use_precond) { m_2D_fft_precond->solve(lhs, rhs, *m_zphys); - } else { + } else +#endif + { MultiFab::Copy(lhs, rhs, 0, 0, 1, 0); } }