diff options
author | 2020-12-11 09:16:54 -0800 | |
---|---|---|
committer | 2020-12-11 09:16:54 -0800 | |
commit | 3fde18912506bbfeeeaacc255f0c8a66ab2e2a05 (patch) | |
tree | 7d330e5ffc1fc8a540fd7d3a3bdee1072b7a1d2e /Source/Diagnostics/FullDiagnostics.cpp | |
parent | a7ba409b4cd0ce437d06f39fe6918745bf4407d5 (diff) | |
download | WarpX-3fde18912506bbfeeeaacc255f0c8a66ab2e2a05.tar.gz WarpX-3fde18912506bbfeeeaacc255f0c8a66ab2e2a05.tar.zst WarpX-3fde18912506bbfeeeaacc255f0c8a66ab2e2a05.zip |
PSATD Runtime Control (#1300)
* Docs: PSATD Runtime Option
* Tests: PSATD Runtime Option
Add new runtime option to PSATD regression test matrix.
* PICMI: PSATD runtime option
* Source: PSATD Runtime Option
Diffstat (limited to 'Source/Diagnostics/FullDiagnostics.cpp')
-rw-r--r-- | Source/Diagnostics/FullDiagnostics.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/Diagnostics/FullDiagnostics.cpp b/Source/Diagnostics/FullDiagnostics.cpp index 6f214b4d7..d00720a54 100644 --- a/Source/Diagnostics/FullDiagnostics.cpp +++ b/Source/Diagnostics/FullDiagnostics.cpp @@ -393,13 +393,15 @@ FullDiagnostics::InitializeFieldFunctors (int lev) m_all_field_functors[lev][comp] = std::make_unique<CellCenterFunctor>(warpx.get_pointer_current_fp(lev, 2), lev, m_crse_ratio); } else if ( m_varnames[comp] == "rho" ){ if ( WarpX::do_back_transformed_diagnostics ) { -#ifdef WARPX_USE_PSATD - // rho_new is stored in component 1 of rho_fp when using PSATD - amrex::MultiFab* rho_new = new amrex::MultiFab(*warpx.get_pointer_rho_fp(lev), amrex::make_alias, 1, 1); - m_all_field_functors[lev][comp] = std::make_unique<CellCenterFunctor>(rho_new, lev, m_crse_ratio); -#else - m_all_field_functors[lev][comp] = std::make_unique<CellCenterFunctor>(warpx.get_pointer_rho_fp(lev), lev, m_crse_ratio); -#endif + if ( WarpX::maxwell_solver_id == MaxwellSolverAlgo::PSATD ) { + // rho_new is stored in component 1 of rho_fp when using PSATD + amrex::MultiFab *rho_new = new amrex::MultiFab(*warpx.get_pointer_rho_fp(lev), amrex::make_alias, + 1, 1); + m_all_field_functors[lev][comp] = std::make_unique<CellCenterFunctor>(rho_new, lev, m_crse_ratio); + } else { + m_all_field_functors[lev][comp] = std::make_unique<CellCenterFunctor>(warpx.get_pointer_rho_fp(lev), + lev, m_crse_ratio); + } } else { // Initialize rho functor to dump total rho |