aboutsummaryrefslogtreecommitdiff
path: root/Source/BoundaryConditions/PML.cpp
diff options
context:
space:
mode:
authorGravatar Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> 2022-11-07 20:30:31 -0800
committerGravatar GitHub <noreply@github.com> 2022-11-07 20:30:31 -0800
commitbf535730cb6c170394da8375887b3ae57ad6ecf5 (patch)
treede7b2122acbc7e40d5f97c11afa779be689985c9 /Source/BoundaryConditions/PML.cpp
parentada6fc49cf16f40d1764d3a95c8338126360f329 (diff)
downloadWarpX-bf535730cb6c170394da8375887b3ae57ad6ecf5.tar.gz
WarpX-bf535730cb6c170394da8375887b3ae57ad6ecf5.tar.zst
WarpX-bf535730cb6c170394da8375887b3ae57ad6ecf5.zip
Allow `None` for Maxwell solver (#3504)
* Add "None" as an option for the Maxwell solver * fixed some of the reasons for failing CI tests * no longer pass `do_electrostatic` to `GuardCellManager` * renamed `MaxwellSolverAlgo` to `ElectromagneticSolverAlgo` * rename `do_electrostatic` to `electrostatic_solver_id` * rename `maxwell_solver_id` to `electromagnetic_solver_id` * changes requested during PR review * remove `do_no_deposit` from tests without field evolution * Fix doc-string in `GuardCellManager.H` Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
Diffstat (limited to 'Source/BoundaryConditions/PML.cpp')
-rw-r--r--Source/BoundaryConditions/PML.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/BoundaryConditions/PML.cpp b/Source/BoundaryConditions/PML.cpp
index 76dbd3fde..5ba9ac2cd 100644
--- a/Source/BoundaryConditions/PML.cpp
+++ b/Source/BoundaryConditions/PML.cpp
@@ -598,7 +598,7 @@ PML::PML (const int lev, const BoxArray& grid_ba, const DistributionMapping& gri
IntVect nge = IntVect(AMREX_D_DECL(2, 2, 2));
IntVect ngb = IntVect(AMREX_D_DECL(2, 2, 2));
int ngf_int = 0;
- if (WarpX::maxwell_solver_id == MaxwellSolverAlgo::CKC) ngf_int = std::max( ngf_int, 1 );
+ if (WarpX::electromagnetic_solver_id == ElectromagneticSolverAlgo::CKC) ngf_int = std::max( ngf_int, 1 );
IntVect ngf = IntVect(AMREX_D_DECL(ngf_int, ngf_int, ngf_int));
if (do_moving_window) {
@@ -610,7 +610,7 @@ PML::PML (const int lev, const BoxArray& grid_ba, const DistributionMapping& gri
ngf[WarpX::moving_window_dir] = std::max(ngf[WarpX::moving_window_dir], rr);
}
- if (WarpX::maxwell_solver_id == MaxwellSolverAlgo::PSATD) {
+ if (WarpX::electromagnetic_solver_id == ElectromagneticSolverAlgo::PSATD) {
// Increase the number of guard cells, in order to fit the extent
// of the stencil for the spectral solver
int ngFFt_x = do_nodal ? nox_fft : nox_fft/2;
@@ -701,9 +701,9 @@ PML::PML (const int lev, const BoxArray& grid_ba, const DistributionMapping& gri
pml_edge_lengths[2] = std::make_unique<MultiFab>(amrex::convert( ba,
WarpX::GetInstance().getEfield_fp(0,2).ixType().toIntVect() ), dm, WarpX::ncomps, max_guard_EB );
- if (WarpX::maxwell_solver_id == MaxwellSolverAlgo::Yee ||
- WarpX::maxwell_solver_id == MaxwellSolverAlgo::CKC ||
- WarpX::maxwell_solver_id == MaxwellSolverAlgo::ECT) {
+ if (WarpX::electromagnetic_solver_id == ElectromagneticSolverAlgo::Yee ||
+ WarpX::electromagnetic_solver_id == ElectromagneticSolverAlgo::CKC ||
+ WarpX::electromagnetic_solver_id == ElectromagneticSolverAlgo::ECT) {
auto const eb_fact = fieldEBFactory();
@@ -736,7 +736,7 @@ PML::PML (const int lev, const BoxArray& grid_ba, const DistributionMapping& gri
sigba_fp = std::make_unique<MultiSigmaBox>(ba, dm, grid_ba_reduced, geom->CellSize(),
IntVect(ncell), IntVect(delta), single_domain_box, v_sigma_sb);
- if (WarpX::maxwell_solver_id == MaxwellSolverAlgo::PSATD) {
+ if (WarpX::electromagnetic_solver_id == ElectromagneticSolverAlgo::PSATD) {
#ifndef WARPX_USE_PSATD
amrex::ignore_unused(lev, dt, J_in_time, rho_in_time);
# if(AMREX_SPACEDIM!=3)
@@ -765,7 +765,7 @@ PML::PML (const int lev, const BoxArray& grid_ba, const DistributionMapping& gri
if (cgeom)
{
- if (WarpX::maxwell_solver_id != MaxwellSolverAlgo::PSATD) {
+ if (WarpX::electromagnetic_solver_id != ElectromagneticSolverAlgo::PSATD) {
nge = IntVect(AMREX_D_DECL(1, 1, 1));
ngb = IntVect(AMREX_D_DECL(1, 1, 1));
}
@@ -858,7 +858,7 @@ PML::PML (const int lev, const BoxArray& grid_ba, const DistributionMapping& gri
sigba_cp = std::make_unique<MultiSigmaBox>(cba, cdm, grid_cba_reduced, cgeom->CellSize(),
cncells, cdelta, single_domain_box, v_sigma_sb);
- if (WarpX::maxwell_solver_id == MaxwellSolverAlgo::PSATD) {
+ if (WarpX::electromagnetic_solver_id == ElectromagneticSolverAlgo::PSATD) {
#ifndef WARPX_USE_PSATD
amrex::ignore_unused(dt);
WARPX_ALWAYS_ASSERT_WITH_MESSAGE(false,