WarpX
Functions
PEC Namespace Reference

Functions

void ApplyPECtoEfield (std::array< amrex::MultiFab *, 3 > Efield, const amrex::Vector< FieldBoundaryType > &field_boundary_lo, const amrex::Vector< FieldBoundaryType > &field_boundary_hi, const amrex::IntVect &ng_fieldgather, const amrex::Geometry &geom, int lev, PatchType patch_type, const amrex::Vector< amrex::IntVect > &ref_ratios, bool split_pml_field=false)
 Sets the tangential electric field at the PEC boundary to zero. The guard cell values are set equal and opposite to the valid cell field value at the respective mirror locations. More...
 
void ApplyPECtoBfield (std::array< amrex::MultiFab *, 3 > Bfield, const amrex::Vector< FieldBoundaryType > &field_boundary_lo, const amrex::Vector< FieldBoundaryType > &field_boundary_hi, const amrex::IntVect &ng_fieldgather, const amrex::Geometry &geom, int lev, PatchType patch_type, const amrex::Vector< amrex::IntVect > &ref_ratios)
 Sets the normal component of the magnetic field at the PEC boundary to zero. The guard cell values are set equal and opposite to the valid cell field value at the respective mirror locations. More...
 
void ApplyReflectiveBoundarytoRhofield (amrex::MultiFab *rho, const amrex::Vector< FieldBoundaryType > &field_boundary_lo, const amrex::Vector< FieldBoundaryType > &field_boundary_hi, const amrex::Vector< ParticleBoundaryType > &particle_boundary_lo, const amrex::Vector< ParticleBoundaryType > &particle_boundary_hi, const amrex::Geometry &geom, int lev, PatchType patch_type, const amrex::Vector< amrex::IntVect > &ref_ratios)
 Reflects charge density deposited over the PEC boundary back into the simulation domain. More...
 
void ApplyReflectiveBoundarytoJfield (amrex::MultiFab *Jx, amrex::MultiFab *Jy, amrex::MultiFab *Jz, const amrex::Vector< FieldBoundaryType > &field_boundary_lo, const amrex::Vector< FieldBoundaryType > &field_boundary_hi, const amrex::Vector< ParticleBoundaryType > &particle_boundary_lo, const amrex::Vector< ParticleBoundaryType > &particle_boundary_hi, const amrex::Geometry &geom, int lev, PatchType patch_type, const amrex::Vector< amrex::IntVect > &ref_ratios)
 Reflects current density deposited over the PEC boundary back into the simulation domain. More...
 
void ApplyPECtoElectronPressure (amrex::MultiFab *Pefield, const amrex::Vector< FieldBoundaryType > &field_boundary_lo, const amrex::Vector< FieldBoundaryType > &field_boundary_hi, const amrex::Geometry &geom, int lev, PatchType patch_type, const amrex::Vector< amrex::IntVect > &ref_ratios)
 Apply the PEC boundary to the electron pressure field. More...
 

Function Documentation

◆ ApplyPECtoBfield()

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

Sets the normal component of the magnetic field at the PEC boundary to zero. The guard cell values are set equal and opposite to the valid cell field value at the respective mirror locations.

Parameters
[in,out]BfieldBoundary values of normal Bfield are set to zero.
[in]field_boundary_loBoundary types of the "low" field boundaries
[in]field_boundary_hiBoundary types of the "high" field boundaries
[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

◆ ApplyPECtoEfield()

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

Sets the tangential electric field at the PEC boundary to zero. The guard cell values are set equal and opposite to the valid cell field value at the respective mirror locations.

Parameters
[in,out]EfieldBoundary values of tangential Efield are set to zero
[in]field_boundary_loBoundary types of the "low" boundaries
[in]field_boundary_hiBoundary types of the "high" boundaries
[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]split_pml_fieldwhether pml the multifab is the regular Efield or split pml field

◆ ApplyPECtoElectronPressure()

void PEC::ApplyPECtoElectronPressure ( amrex::MultiFab Pefield,
const amrex::Vector< FieldBoundaryType > &  field_boundary_lo,
const amrex::Vector< FieldBoundaryType > &  field_boundary_hi,
const amrex::Geometry geom,
int  lev,
PatchType  patch_type,
const amrex::Vector< amrex::IntVect > &  ref_ratios 
)

Apply the PEC boundary to the electron pressure field.

Parameters
[in,out]PefieldMultifab containing the electron pressure
[in]field_boundary_loBoundary types of the "low" field boundaries
[in]field_boundary_hiBoundary types of the "high" field boundaries
[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

◆ ApplyReflectiveBoundarytoJfield()

void PEC::ApplyReflectiveBoundarytoJfield ( amrex::MultiFab Jx,
amrex::MultiFab Jy,
amrex::MultiFab Jz,
const amrex::Vector< FieldBoundaryType > &  field_boundary_lo,
const amrex::Vector< FieldBoundaryType > &  field_boundary_hi,
const amrex::Vector< ParticleBoundaryType > &  particle_boundary_lo,
const amrex::Vector< ParticleBoundaryType > &  particle_boundary_hi,
const amrex::Geometry geom,
int  lev,
PatchType  patch_type,
const amrex::Vector< amrex::IntVect > &  ref_ratios 
)

Reflects current density deposited over the PEC boundary back into the simulation domain.

Parameters
[in,out]Jx,Jy,JzMultifabs containing the current density
[in]field_boundary_loBoundary types of the "low" field boundaries
[in]field_boundary_hiBoundary types of the "high" field boundaries
[in]particle_boundary_loBoundary types of the "low" particle boundaries
[in]particle_boundary_hiBoundary types of the "high" particle boundaries
[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

◆ ApplyReflectiveBoundarytoRhofield()

void PEC::ApplyReflectiveBoundarytoRhofield ( amrex::MultiFab rho,
const amrex::Vector< FieldBoundaryType > &  field_boundary_lo,
const amrex::Vector< FieldBoundaryType > &  field_boundary_hi,
const amrex::Vector< ParticleBoundaryType > &  particle_boundary_lo,
const amrex::Vector< ParticleBoundaryType > &  particle_boundary_hi,
const amrex::Geometry geom,
int  lev,
PatchType  patch_type,
const amrex::Vector< amrex::IntVect > &  ref_ratios 
)

Reflects charge density deposited over the PEC boundary back into the simulation domain.

Sets the rho field value in cells close to and inside a PEC boundary. The charge density deposited in the guard cells are either reflected back into the simulation domain (if a reflecting particle boundary is used), or the opposite charge density is deposited back in the domain to capture the effect of an image charge. The charge density on the PEC boundary is set to 0 while values in the guard cells are set equal and opposite to their mirror location inside the domain - representing image charges.

Parameters
[in,out]rhoMultifab containing the charge density
[in]field_boundary_loBoundary types of the "low" field boundaries
[in]field_boundary_hiBoundary types of the "high" field boundaries
[in]particle_boundary_loBoundary types of the "low" particle boundaries
[in]particle_boundary_hiBoundary types of the "high" particle boundaries
[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