Skip to content

Commit

Permalink
Use GetPML Method for F,G Nodal Flags
Browse files Browse the repository at this point in the history
  • Loading branch information
EZoni committed Nov 4, 2021
1 parent be48db4 commit 07df630
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 13 additions & 2 deletions Source/Python/WarpXWrappers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,19 @@ extern "C"
WARPX_GET_LOVECTS_PML_SCALAR(warpx_getGfieldCPLoVects_PML, GetG_cp)
WARPX_GET_LOVECTS_PML_SCALAR(warpx_getGfieldFPLoVects_PML, GetG_fp)

int* warpx_getF_pml_nodal_flag() {return getFieldNodalFlagData( WarpX::GetInstance().getPML(0).GetF_fp() );}
int* warpx_getG_pml_nodal_flag() {return getFieldNodalFlagData( WarpX::GetInstance().getPML(0).GetG_fp() );}
int* warpx_getF_pml_nodal_flag()
{
auto * pml = WarpX::GetInstance().GetPML(0);
if (!pml) return nullptr;
return getFieldNodalFlagData(pml->GetF_fp());
}

int* warpx_getG_pml_nodal_flag()
{
auto * pml = WarpX::GetInstance().GetPML(0);
if (!pml) return nullptr;
return getFieldNodalFlagData(pml->GetG_fp());
}

amrex::ParticleReal** warpx_getParticleStructs(
const char* char_species_name, int lev,
Expand Down
2 changes: 0 additions & 2 deletions Source/WarpX.H
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,6 @@ public:
const amrex::MultiFab& getEfield_avg_cp (int lev, int direction) {return *Efield_avg_cp[lev][direction];}
const amrex::MultiFab& getBfield_avg_cp (int lev, int direction) {return *Bfield_avg_cp[lev][direction];}

PML& getPML(int lev) {return *pml[lev];}

bool DoPML () const {return do_pml;}

/** get low-high-low-high-... vector for each direction indicating if mother grid PMLs are enabled */
Expand Down

0 comments on commit 07df630

Please sign in to comment.