Skip to content

Commit

Permalink
compile without FFT
Browse files Browse the repository at this point in the history
  • Loading branch information
asalmgren committed Nov 24, 2024
1 parent ed5f4a7 commit e852d02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Source/LinearSolvers/ERF_TerrainPoisson.H
Original file line number Diff line number Diff line change
Expand Up @@ -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<amrex::FFT::PoissonTerrainPrecond<amrex::MultiFab>> m_2D_fft_precond;
#endif
};

#endif
5 changes: 4 additions & 1 deletion Source/LinearSolvers/ERF_TerrainPoisson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit e852d02

Please sign in to comment.