WarpX
Loading...
Searching...
No Matches
PEC_Insulator Class Reference

#include <PEC_Insulator.H>

Public Member Functions

 PEC_Insulator ()
 
void ApplyPEC_InsulatortoEfield (std::array< amrex::MultiFab *, 3 > Efield, amrex::Array< FieldBoundaryType, 3 > const &field_boundary_lo, amrex::Array< FieldBoundaryType, 3 > const &field_boundary_hi, amrex::IntVect const &ng_fieldgather, amrex::Geometry const &geom, int lev, PatchType patch_type, amrex::Vector< amrex::IntVect > const &ref_ratios, amrex::Real time, bool split_pml_field=false)
 Apply either the PEC or insulator boundary condition on the boundary and in the guard cells. In the PEC, the nodal fields (in a Yee mesh) are made even relative to the boundary, the non-nodal fields are made odd. In the insulator, the tangential fields are set to the value if specified, otherwise unchanged, and the normal fields extrapolated from the valid cells.
 
void ApplyPEC_InsulatortoBfield (std::array< amrex::MultiFab *, 3 > Bfield, amrex::Array< FieldBoundaryType, 3 > const &field_boundary_lo, amrex::Array< FieldBoundaryType, 3 > const &field_boundary_hi, amrex::IntVect const &ng_fieldgather, amrex::Geometry const &geom, int lev, PatchType patch_type, amrex::Vector< amrex::IntVect > const &ref_ratios, amrex::Real time)
 Apply either the PEC or insulator boundary condition on the boundary and in the guard cells. In the PEC, the nodal fields (in a Yee mesh) are made even relative to the boundary, the non-nodal fields are made odd. In the insulator, the tangential fields are set to the value if specified, otherwise unchanged, and the normal fields extrapolated from the valid cells.
 
void ZeroParallelFieldInConductor (std::array< amrex::MultiFab *, 3 > field, amrex::Array< FieldBoundaryType, 3 > const &field_boundary_lo, amrex::Array< FieldBoundaryType, 3 > const &field_boundary_hi, amrex::IntVect const &ng_fieldgather, amrex::Geometry const &geom, int lev, PatchType patch_type, amrex::Vector< amrex::IntVect > const &ref_ratios)
 Zeros the parallel fields on the boundary When the E field is being set, the field is zeroed everywhere, in both insulator and conductor. When the B field id being set, the field is zeroed only in the conductor.
 
void ZeroParallelScalarInConductor (amrex::MultiFab *scalar, amrex::Array< FieldBoundaryType, 3 > const &field_boundary_lo, amrex::Array< FieldBoundaryType, 3 > const &field_boundary_hi, amrex::Geometry const &geom, int lev, PatchType patch_type, amrex::Vector< amrex::IntVect > const &ref_ratios)
 Zeros the scalar on the boundary When the E field is being set, the scalar is zeroed everywhere, in both insulator and conductor. When the B field id being set, the scalar is zeroed only in the conductor.
 
void ApplyPEC_InsulatortoField (std::array< amrex::MultiFab *, 3 > field, amrex::Array< FieldBoundaryType, 3 > const &field_boundary_lo, amrex::Array< FieldBoundaryType, 3 > const &field_boundary_hi, amrex::IntVect const &ng_fieldgather, amrex::Geometry const &geom, int lev, PatchType patch_type, amrex::Vector< amrex::IntVect > const &ref_ratios, amrex::Real time, bool split_pml_field, bool E_like, bool only_zero_parallel_field, amrex::Vector< int > const &set_Fx_lo, amrex::Vector< int > const &set_Fy_lo, amrex::Vector< int > const &set_Fz_lo, amrex::Vector< int > const &set_Fx_hi, amrex::Vector< int > const &set_Fy_hi, amrex::Vector< int > const &set_Fz_hi, amrex::Vector< amrex::ParserExecutor< 3 > > const &Fx_parsers_lo, amrex::Vector< amrex::ParserExecutor< 3 > > const &Fy_parsers_lo, amrex::Vector< amrex::ParserExecutor< 3 > > const &Fz_parsers_lo, amrex::Vector< amrex::ParserExecutor< 3 > > const &Fx_parsers_hi, amrex::Vector< amrex::ParserExecutor< 3 > > const &Fy_parsers_hi, amrex::Vector< amrex::ParserExecutor< 3 > > const &Fz_parsers_hi)
 The work routine applying the boundary condition.
 
int IsESet (int idim, int iside) const
 
int IsBSet (int idim, int iside) const
 
int IsESet (int idim, int iside, int ifield) const
 
int IsBSet (int idim, int iside, int ifield) const
 

Private Attributes

amrex::Vector< std::unique_ptr< amrex::Parser > > m_insulator_area_lo
 
amrex::Vector< std::unique_ptr< amrex::Parser > > m_insulator_area_hi
 
amrex::Vector< amrex::ParserExecutor< 2 > > m_area_parsers_lo
 
amrex::Vector< amrex::ParserExecutor< 2 > > m_area_parsers_hi
 
amrex::Vector< int > m_set_B_lo = {0, 0, 0}
 
amrex::Vector< int > m_set_B_hi = {0, 0, 0}
 
amrex::Vector< std::unique_ptr< amrex::Parser > > m_parsers_B1_lo
 
amrex::Vector< std::unique_ptr< amrex::Parser > > m_parsers_B2_lo
 
amrex::Vector< std::unique_ptr< amrex::Parser > > m_parsers_B1_hi
 
amrex::Vector< std::unique_ptr< amrex::Parser > > m_parsers_B2_hi
 
amrex::Vector< int > m_set_E_lo = {0, 0, 0}
 
amrex::Vector< int > m_set_E_hi = {0, 0, 0}
 
amrex::Vector< std::unique_ptr< amrex::Parser > > m_parsers_E1_lo
 
amrex::Vector< std::unique_ptr< amrex::Parser > > m_parsers_E2_lo
 
amrex::Vector< std::unique_ptr< amrex::Parser > > m_parsers_E1_hi
 
amrex::Vector< std::unique_ptr< amrex::Parser > > m_parsers_E2_hi
 
amrex::Vector< int > m_set_Bx_lo
 
amrex::Vector< int > m_set_By_lo
 
amrex::Vector< int > m_set_Bz_lo
 
amrex::Vector< int > m_set_Bx_hi
 
amrex::Vector< int > m_set_By_hi
 
amrex::Vector< int > m_set_Bz_hi
 
amrex::Vector< amrex::ParserExecutor< 3 > > m_Bx_parsers_lo
 
amrex::Vector< amrex::ParserExecutor< 3 > > m_By_parsers_lo
 
amrex::Vector< amrex::ParserExecutor< 3 > > m_Bz_parsers_lo
 
amrex::Vector< amrex::ParserExecutor< 3 > > m_Bx_parsers_hi
 
amrex::Vector< amrex::ParserExecutor< 3 > > m_By_parsers_hi
 
amrex::Vector< amrex::ParserExecutor< 3 > > m_Bz_parsers_hi
 
amrex::Vector< int > m_set_Ex_lo
 
amrex::Vector< int > m_set_Ey_lo
 
amrex::Vector< int > m_set_Ez_lo
 
amrex::Vector< int > m_set_Ex_hi
 
amrex::Vector< int > m_set_Ey_hi
 
amrex::Vector< int > m_set_Ez_hi
 
amrex::Vector< amrex::ParserExecutor< 3 > > m_Ex_parsers_lo
 
amrex::Vector< amrex::ParserExecutor< 3 > > m_Ey_parsers_lo
 
amrex::Vector< amrex::ParserExecutor< 3 > > m_Ez_parsers_lo
 
amrex::Vector< amrex::ParserExecutor< 3 > > m_Ex_parsers_hi
 
amrex::Vector< amrex::ParserExecutor< 3 > > m_Ey_parsers_hi
 
amrex::Vector< amrex::ParserExecutor< 3 > > m_Ez_parsers_hi
 

Constructor & Destructor Documentation

◆ PEC_Insulator()

PEC_Insulator::PEC_Insulator ( )

Member Function Documentation

◆ ApplyPEC_InsulatortoBfield()

void PEC_Insulator::ApplyPEC_InsulatortoBfield ( std::array< amrex::MultiFab *, 3 > Bfield,
amrex::Array< FieldBoundaryType, 3 > const & field_boundary_lo,
amrex::Array< FieldBoundaryType, 3 > const & field_boundary_hi,
amrex::IntVect const & ng_fieldgather,
amrex::Geometry const & geom,
int lev,
PatchType patch_type,
amrex::Vector< amrex::IntVect > const & ref_ratios,
amrex::Real time )

Apply either the PEC or insulator boundary condition on the boundary and in the guard cells. In the PEC, the nodal fields (in a Yee mesh) are made even relative to the boundary, the non-nodal fields are made odd. In the insulator, the tangential fields are set to the value if specified, otherwise unchanged, and the normal fields extrapolated from the valid cells.

Parameters
[in,out]Bfield
[in]field_boundary_lolower field boundary conditions
[in]field_boundary_hiupper field boundary conditions
[in]ng_fieldgathernumber of guard cells used by field gather
[in]geomgeometry object of level "lev"
[in]levlevel of the Multifab
[in]patch_typecoarse or fine
[in]ref_ratiosvector containing the refinement ratios of the refinement levels
[in]timecurrent time of the simulation

◆ ApplyPEC_InsulatortoEfield()

void PEC_Insulator::ApplyPEC_InsulatortoEfield ( std::array< amrex::MultiFab *, 3 > Efield,
amrex::Array< FieldBoundaryType, 3 > const & field_boundary_lo,
amrex::Array< FieldBoundaryType, 3 > const & field_boundary_hi,
amrex::IntVect const & ng_fieldgather,
amrex::Geometry const & geom,
int lev,
PatchType patch_type,
amrex::Vector< amrex::IntVect > const & ref_ratios,
amrex::Real time,
bool split_pml_field = false )

Apply either the PEC or insulator boundary condition on the boundary and in the guard cells. In the PEC, the nodal fields (in a Yee mesh) are made even relative to the boundary, the non-nodal fields are made odd. In the insulator, the tangential fields are set to the value if specified, otherwise unchanged, and the normal fields extrapolated from the valid cells.

Parameters
[in,out]Efield
[in]field_boundary_lolower field boundary conditions
[in]field_boundary_hiupper field boundary conditions
[in]ng_fieldgathernumber of guard cells used by field gather
[in]geomgeometry object of level "lev"
[in]levlevel of the Multifab
[in]patch_typecoarse or fine
[in]ref_ratiosvector containing the refinement ratios of the refinement levels
[in]timecurrent time of the simulation
[in]split_pml_fieldwhether pml the multifab is the regular Efield or split pml field

◆ ApplyPEC_InsulatortoField()

void PEC_Insulator::ApplyPEC_InsulatortoField ( std::array< amrex::MultiFab *, 3 > field,
amrex::Array< FieldBoundaryType, 3 > const & field_boundary_lo,
amrex::Array< FieldBoundaryType, 3 > const & field_boundary_hi,
amrex::IntVect const & ng_fieldgather,
amrex::Geometry const & geom,
int lev,
PatchType patch_type,
amrex::Vector< amrex::IntVect > const & ref_ratios,
amrex::Real time,
bool split_pml_field,
bool E_like,
bool only_zero_parallel_field,
amrex::Vector< int > const & set_Fx_lo,
amrex::Vector< int > const & set_Fy_lo,
amrex::Vector< int > const & set_Fz_lo,
amrex::Vector< int > const & set_Fx_hi,
amrex::Vector< int > const & set_Fy_hi,
amrex::Vector< int > const & set_Fz_hi,
amrex::Vector< amrex::ParserExecutor< 3 > > const & Fx_parsers_lo,
amrex::Vector< amrex::ParserExecutor< 3 > > const & Fy_parsers_lo,
amrex::Vector< amrex::ParserExecutor< 3 > > const & Fz_parsers_lo,
amrex::Vector< amrex::ParserExecutor< 3 > > const & Fx_parsers_hi,
amrex::Vector< amrex::ParserExecutor< 3 > > const & Fy_parsers_hi,
amrex::Vector< amrex::ParserExecutor< 3 > > const & Fz_parsers_hi )

The work routine applying the boundary condition.

Parameters
[in,out]field
[in]field_boundary_lolower field boundary conditions
[in]field_boundary_hiupper field boundary conditions
[in]ng_fieldgathernumber of guard cells used by field gather
[in]geomgeometry object of level "lev"
[in]levlevel of the Multifab
[in]patch_typecoarse or fine
[in]ref_ratiosvector containing the refinement ratios of the refinement levels
[in]timecurrent time of the simulation
[in]split_pml_fieldwhether pml the multifab is the regular Efield or split pml field
[in]E_likewhether the field is E like or B like
[in]only_zero_parallel_fieldonly zero the parallel field on the boundary
[in]set_Fx_lothe flags for the x-field at the lower boundaries
[in]set_Fy_lothe flags for the y-field at the lower boundaries
[in]set_Fz_lothe flags for the z-field at the lower boundaries
[in]set_Fx_hithe flags for the x-field at the upper boundaries
[in]set_Fy_hithe flags for the y-field at the upper boundaries
[in]set_Fz_hithe flags for the z-field at the upper boundaries
[in]Fx_parsers_lothe parsers for the x-field at the lower boundaries
[in]Fy_parsers_lothe parsers for the y-field at the lower boundaries
[in]Fz_parsers_lothe parsers for the z-field at the lower boundaries
[in]Fx_parsers_hithe parsers for the x-field at the upper boundaries
[in]Fy_parsers_hithe parsers for the y-field at the upper boundaries
[in]Fz_parsers_hithe parsers for the z-field at the upper boundaries

◆ IsBSet() [1/2]

int PEC_Insulator::IsBSet ( int idim,
int iside ) const
inline

◆ IsBSet() [2/2]

int PEC_Insulator::IsBSet ( int idim,
int iside,
int ifield ) const

◆ IsESet() [1/2]

int PEC_Insulator::IsESet ( int idim,
int iside ) const
inline

◆ IsESet() [2/2]

int PEC_Insulator::IsESet ( int idim,
int iside,
int ifield ) const

◆ ZeroParallelFieldInConductor()

void PEC_Insulator::ZeroParallelFieldInConductor ( std::array< amrex::MultiFab *, 3 > field,
amrex::Array< FieldBoundaryType, 3 > const & field_boundary_lo,
amrex::Array< FieldBoundaryType, 3 > const & field_boundary_hi,
amrex::IntVect const & ng_fieldgather,
amrex::Geometry const & geom,
int lev,
PatchType patch_type,
amrex::Vector< amrex::IntVect > const & ref_ratios )

Zeros the parallel fields on the boundary When the E field is being set, the field is zeroed everywhere, in both insulator and conductor. When the B field id being set, the field is zeroed only in the conductor.

Parameters
[in,out]field
[in]field_boundary_lolower field boundary conditions
[in]field_boundary_hiupper field boundary conditions
[in]ng_fieldgathernumber of guard cells used by field gather
[in]geomgeometry object of level "lev"
[in]levlevel of the Multifab
[in]patch_typecoarse or fine
[in]ref_ratiosvector containing the refinement ratios of the refinement levels

◆ ZeroParallelScalarInConductor()

void PEC_Insulator::ZeroParallelScalarInConductor ( amrex::MultiFab * scalar,
amrex::Array< FieldBoundaryType, 3 > const & field_boundary_lo,
amrex::Array< FieldBoundaryType, 3 > const & field_boundary_hi,
amrex::Geometry const & geom,
int lev,
PatchType patch_type,
amrex::Vector< amrex::IntVect > const & ref_ratios )

Zeros the scalar on the boundary When the E field is being set, the scalar is zeroed everywhere, in both insulator and conductor. When the B field id being set, the scalar is zeroed only in the conductor.

Parameters
[in,out]scalar
[in]field_boundary_lolower field boundary conditions
[in]field_boundary_hiupper field boundary conditions
[in]geomgeometry object of level "lev"
[in]levlevel of the Multifab
[in]patch_typecoarse or fine
[in]ref_ratiosvector containing the refinement ratios of the refinement levels

Member Data Documentation

◆ m_area_parsers_hi

amrex::Vector<amrex::ParserExecutor<2> > PEC_Insulator::m_area_parsers_hi
private

◆ m_area_parsers_lo

amrex::Vector<amrex::ParserExecutor<2> > PEC_Insulator::m_area_parsers_lo
private

◆ m_Bx_parsers_hi

amrex::Vector<amrex::ParserExecutor<3> > PEC_Insulator::m_Bx_parsers_hi
private

◆ m_Bx_parsers_lo

amrex::Vector<amrex::ParserExecutor<3> > PEC_Insulator::m_Bx_parsers_lo
private

◆ m_By_parsers_hi

amrex::Vector<amrex::ParserExecutor<3> > PEC_Insulator::m_By_parsers_hi
private

◆ m_By_parsers_lo

amrex::Vector<amrex::ParserExecutor<3> > PEC_Insulator::m_By_parsers_lo
private

◆ m_Bz_parsers_hi

amrex::Vector<amrex::ParserExecutor<3> > PEC_Insulator::m_Bz_parsers_hi
private

◆ m_Bz_parsers_lo

amrex::Vector<amrex::ParserExecutor<3> > PEC_Insulator::m_Bz_parsers_lo
private

◆ m_Ex_parsers_hi

amrex::Vector<amrex::ParserExecutor<3> > PEC_Insulator::m_Ex_parsers_hi
private

◆ m_Ex_parsers_lo

amrex::Vector<amrex::ParserExecutor<3> > PEC_Insulator::m_Ex_parsers_lo
private

◆ m_Ey_parsers_hi

amrex::Vector<amrex::ParserExecutor<3> > PEC_Insulator::m_Ey_parsers_hi
private

◆ m_Ey_parsers_lo

amrex::Vector<amrex::ParserExecutor<3> > PEC_Insulator::m_Ey_parsers_lo
private

◆ m_Ez_parsers_hi

amrex::Vector<amrex::ParserExecutor<3> > PEC_Insulator::m_Ez_parsers_hi
private

◆ m_Ez_parsers_lo

amrex::Vector<amrex::ParserExecutor<3> > PEC_Insulator::m_Ez_parsers_lo
private

◆ m_insulator_area_hi

amrex::Vector<std::unique_ptr<amrex::Parser> > PEC_Insulator::m_insulator_area_hi
private

◆ m_insulator_area_lo

amrex::Vector<std::unique_ptr<amrex::Parser> > PEC_Insulator::m_insulator_area_lo
private

◆ m_parsers_B1_hi

amrex::Vector<std::unique_ptr<amrex::Parser> > PEC_Insulator::m_parsers_B1_hi
private

◆ m_parsers_B1_lo

amrex::Vector<std::unique_ptr<amrex::Parser> > PEC_Insulator::m_parsers_B1_lo
private

◆ m_parsers_B2_hi

amrex::Vector<std::unique_ptr<amrex::Parser> > PEC_Insulator::m_parsers_B2_hi
private

◆ m_parsers_B2_lo

amrex::Vector<std::unique_ptr<amrex::Parser> > PEC_Insulator::m_parsers_B2_lo
private

◆ m_parsers_E1_hi

amrex::Vector<std::unique_ptr<amrex::Parser> > PEC_Insulator::m_parsers_E1_hi
private

◆ m_parsers_E1_lo

amrex::Vector<std::unique_ptr<amrex::Parser> > PEC_Insulator::m_parsers_E1_lo
private

◆ m_parsers_E2_hi

amrex::Vector<std::unique_ptr<amrex::Parser> > PEC_Insulator::m_parsers_E2_hi
private

◆ m_parsers_E2_lo

amrex::Vector<std::unique_ptr<amrex::Parser> > PEC_Insulator::m_parsers_E2_lo
private

◆ m_set_B_hi

amrex::Vector<int> PEC_Insulator::m_set_B_hi = {0, 0, 0}
private

◆ m_set_B_lo

amrex::Vector<int> PEC_Insulator::m_set_B_lo = {0, 0, 0}
private

◆ m_set_Bx_hi

amrex::Vector<int> PEC_Insulator::m_set_Bx_hi
private

◆ m_set_Bx_lo

amrex::Vector<int> PEC_Insulator::m_set_Bx_lo
private

◆ m_set_By_hi

amrex::Vector<int> PEC_Insulator::m_set_By_hi
private

◆ m_set_By_lo

amrex::Vector<int> PEC_Insulator::m_set_By_lo
private

◆ m_set_Bz_hi

amrex::Vector<int> PEC_Insulator::m_set_Bz_hi
private

◆ m_set_Bz_lo

amrex::Vector<int> PEC_Insulator::m_set_Bz_lo
private

◆ m_set_E_hi

amrex::Vector<int> PEC_Insulator::m_set_E_hi = {0, 0, 0}
private

◆ m_set_E_lo

amrex::Vector<int> PEC_Insulator::m_set_E_lo = {0, 0, 0}
private

◆ m_set_Ex_hi

amrex::Vector<int> PEC_Insulator::m_set_Ex_hi
private

◆ m_set_Ex_lo

amrex::Vector<int> PEC_Insulator::m_set_Ex_lo
private

◆ m_set_Ey_hi

amrex::Vector<int> PEC_Insulator::m_set_Ey_hi
private

◆ m_set_Ey_lo

amrex::Vector<int> PEC_Insulator::m_set_Ey_lo
private

◆ m_set_Ez_hi

amrex::Vector<int> PEC_Insulator::m_set_Ez_hi
private

◆ m_set_Ez_lo

amrex::Vector<int> PEC_Insulator::m_set_Ez_lo
private

The documentation for this class was generated from the following files: