chombo-discharge
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Physics::ItoKMC::ItoKMCStreamerTagger< S > Class Template Reference

CellTagger for the ItoKMC module that refines on the ionization coefficient and field curvature. More...

#include <CD_ItoKMCStreamerTagger.H>

Inheritance diagram for Physics::ItoKMC::ItoKMCStreamerTagger< S >:
Inheritance graph
[legend]
Collaboration diagram for Physics::ItoKMC::ItoKMCStreamerTagger< S >:
Collaboration graph
[legend]

Public Member Functions

 ItoKMCStreamerTagger () noexcept
 Constructor. Must subsequently call the define function.
 
 ItoKMCStreamerTagger (const RefCountedPtr< ItoKMCPhysics > &a_physics, const RefCountedPtr< S > &a_timeStepper, const RefCountedPtr< AmrMesh > &a_amr) noexcept
 Full constructor.
 
virtual ~ItoKMCStreamerTagger () noexcept
 Destructor.
 
virtual void parseOptions () noexcept override
 Parse class options.
 
virtual void parseRuntimeOptions () noexcept override
 Parse runtime-configurable class options.
 
- Public Member Functions inherited from Physics::ItoKMC::ItoKMCFieldTagger< S >
 ItoKMCFieldTagger () noexcept
 Weak constructor. User MUST subsequently call define.
 
virtual ~ItoKMCFieldTagger () noexcept
 Destructor.
 
virtual void computeTagFields () const noexcept override
 Compute tagging fields.
 
- Public Member Functions inherited from Physics::ItoKMC::ItoKMCTagger< S >
 ItoKMCTagger ()
 Weak constructor. User MUST subsequently call the define function.
 
 ItoKMCTagger (const RefCountedPtr< ItoKMCPhysics > &a_physics, const RefCountedPtr< S > &a_timeStepper, const RefCountedPtr< AmrMesh > &a_amr) noexcept
 Full constructor.
 
virtual ~ItoKMCTagger () noexcept
 Destructor.
 
virtual void define (const RefCountedPtr< ItoKMCPhysics > &a_physics, const RefCountedPtr< S > &a_timeStepper, const RefCountedPtr< AmrMesh > &a_amr) noexcept
 Define function.
 
virtual int getNumberOfPlotVariables () const noexcept override
 Get number of plot variables that will be written to file (by Driver).
 
virtual Vector< std::stringgetPlotVariableNames () const noexcept override
 Get plot variable names.
 
virtual void writePlotData (LevelData< EBCellFAB > &a_output, int &a_icomp, const std::string &a_outputRealm, const int a_level) const noexcept override
 Write plot data.
 
virtual void regrid () noexcept override
 Regrid this class. Note that there is no preRegrid method.
 
virtual bool tagCells (EBAMRTags &a_tags) noexcept override
 Tag cells for refinement and coarsening.
 
virtual void setPhase (const phase::which_phase a_phase) noexcept
 Set the phase where we do the tagging.
 
virtual Vector< EBAMRCellData > & getTagFields () noexcept
 Get the tagging fields (mutable reference).
 
- Public Member Functions inherited from CellTagger
 CellTagger ()
 Weak constructor (does nothing)
 
virtual ~CellTagger ()
 Destructor (does nothing).
 
virtual void preRegrid () noexcept
 Pre-regrid function for cell-tagger.
 
virtual void prePlot () const noexcept
 Perform pre-plotting operations (if necessary)
 
virtual int getBuffer () const
 Get tag buffer.
 

Protected Member Functions

virtual Vector< RealcomputeTagFields (const RealVect &a_pos, const Real a_time, const Real a_dx, const RealVect &a_E, const Real a_minE, const Real a_maxE, const RealVect &a_gradE, const Real a_minGradE, const Real a_maxGradE) const noexcept override
 Compute per-cell tagging fields from the electric field and its gradient.
 
virtual bool coarsenCell (const RealVect &a_pos, const Real a_time, const Real a_dx, const int a_lvl, const Vector< Real > &a_tagFields, const Vector< RealVect > &a_gradTagFields) const noexcept override
 Determine if a particular cell should be coarsened.
 
virtual bool refineCell (const RealVect &a_pos, const Real a_time, const Real a_dx, const int a_lvl, const Vector< Real > &a_tagFields, const Vector< RealVect > &a_gradTagFields) const noexcept override
 Determine if a particular cell should be refined.
 
- Protected Member Functions inherited from Physics::ItoKMC::ItoKMCFieldTagger< S >
virtual void allocateStorage () const noexcept
 Allocate memory for scratch, electric field, and gradient of electric field.
 
virtual void deallocateStorage () const noexcept
 Deallocate memory.
 
virtual void computeElectricField (EBAMRCellData &a_E, EBAMRCellData &a_gradE) const noexcept
 Compute the electric field and its gradient magnitude.
 
- Protected Member Functions inherited from Physics::ItoKMC::ItoKMCTagger< S >
virtual void tagCellsBox (DenseIntVectSet &a_refinedCells, DenseIntVectSet &a_coarsenedCells, const Vector< EBCellFAB * > &a_tagFields, const Vector< EBCellFAB * > &a_gradTagFields, const int a_lvl, const DataIndex a_dit, const Box a_box, const EBISBox &a_ebisbox, const Real a_time, const Real a_dx, const RealVect a_probLo) const noexcept
 Per-box refinement tagging routine.
 
- Protected Member Functions inherited from CellTagger
bool insideTagBox (const RealVect &a_pos) const
 Check if a point is inside a tagging box.
 
int getManualRefinementLevel (const RealVect &a_pos) const
 Get the specified level for this position when doing manual refinement.
 
virtual void parseTagBoxes ()
 Parse boxes.
 
virtual void parseRefinementBoxes ()
 Parse refinement boxes.
 
virtual void parseBuffer ()
 Parse refinement buffer.
 
virtual void parseVerbosity ()
 Parse the verbosity from the input file or command line.
 

Protected Attributes

Real m_coarsenCurvature
 Threshold for coarsening based on curvature.
 
Real m_refineCurvature
 Threshold for refinement based on curvature.
 
Real m_refineAlpha
 Threshold for ionization refinement.
 
Real m_coarsenAlpha
 Threshold for ionization coarsening.
 
int m_maxCoarsenLevel
 Set coarsening level.
 
- Protected Attributes inherited from Physics::ItoKMC::ItoKMCFieldTagger< S >
EBAMRCellData m_scratch
 Scratch storage.
 
EBAMRCellData m_E
 Storage for the electric field E.
 
EBAMRCellData m_gradE
 Storage for grad(|E|)
 
- Protected Attributes inherited from Physics::ItoKMC::ItoKMCTagger< S >
bool m_isDefined
 Defined or not.
 
bool m_plotData
 Plot data or not.
 
std::string m_realm
 Realm where data is allocated.
 
phase::which_phase m_phase
 Phase where data is allocated.
 
RefCountedPtr< ItoKMCPhysicsm_physics
 Physics implementation.
 
RefCountedPtr< Sm_timeStepper
 Time stepper.
 
RefCountedPtr< AmrMeshm_amr
 AmrMesh. Needed for allocating memory and things like that.
 
int m_numTagFields
 Number of tagging fields.
 
Vector< EBAMRCellDatam_tagFields
 Tagging fields.
 
Vector< EBAMRCellDatam_gradTagFields
 Gradient of tagging fields.
 
- Protected Attributes inherited from CellTagger
std::string m_name
 Cell tagger class name (default is CellTagger).
 
int m_verbosity
 Class verbosity.
 
int m_buffer
 Tag buffer. Grow tags by this amount (finest level only)
 
Vector< RealBoxm_tagBoxes
 Boxes that can be used to restrict tagging.
 
std::vector< std::pair< RealBox, int > > m_refBoxes
 Refinement boxes for adding manual refinement.
 

Detailed Description

template<typename S>
class Physics::ItoKMC::ItoKMCStreamerTagger< S >

CellTagger for the ItoKMC module that refines on the ionization coefficient and field curvature.

Refinement is triggered when \( \alpha \cdot \Delta x \) exceeds a user-specified threshold or when the normalised curvature of |E| exceeds another threshold. Coarsening uses the same fields with separate (lower) thresholds.

Constructor & Destructor Documentation

◆ ItoKMCStreamerTagger()

template<typename S >
ItoKMCStreamerTagger::ItoKMCStreamerTagger ( const RefCountedPtr< ItoKMCPhysics > &  a_physics,
const RefCountedPtr< S > &  a_timeStepper,
const RefCountedPtr< AmrMesh > &  a_amr 
)
noexcept

Full constructor.

Parameters
[in]a_physicsPhysics implementation.
[in]a_timeStepperTime integrator.
[in]a_amrReference to AmrMesh

Member Function Documentation

◆ coarsenCell()

template<typename S >
bool ItoKMCStreamerTagger::coarsenCell ( const RealVect a_pos,
const Real  a_time,
const Real  a_dx,
const int  a_lvl,
const Vector< Real > &  a_tagFields,
const Vector< RealVect > &  a_gradTagFields 
) const
overrideprotectedvirtualnoexcept

Determine if a particular cell should be coarsened.

Parameters
[in]a_posPhysical position.
[in]a_timeCurrent simulation time.
[in]a_dxGrid resolution.
[in]a_lvlGrid level.
[in]a_tagFieldsCell tagging field values.
[in]a_gradTagFieldsGradient of cell tagging fields.
Returns
True if the cell should be coarsened.

Implements Physics::ItoKMC::ItoKMCFieldTagger< S >.

◆ computeTagFields()

template<typename S >
Vector< Real > ItoKMCStreamerTagger::computeTagFields ( const RealVect a_pos,
const Real  a_time,
const Real  a_dx,
const RealVect a_E,
const Real  a_minE,
const Real  a_maxE,
const RealVect a_gradE,
const Real  a_minGradE,
const Real  a_maxGradE 
) const
overrideprotectedvirtualnoexcept

Compute per-cell tagging fields from the electric field and its gradient.

Parameters
[in]a_posPhysical coordinates.
[in]a_timeCurrent simulation time.
[in]a_dxGrid resolution.
[in]a_EElectric field vector at this cell.
[in]a_minEMinimum |E| over the domain.
[in]a_maxEMaximum |E| over the domain.
[in]a_gradEgrad(|E|) at this cell.
[in]a_minGradEMinimum |grad(|E|)| over the domain.
[in]a_maxGradEMaximum |grad(|E|)| over the domain.
Returns
Per-cell tagging fields [normalised curvature, normalised alpha*dx].

Implements Physics::ItoKMC::ItoKMCFieldTagger< S >.

◆ parseOptions()

template<typename S >
void ItoKMCStreamerTagger::parseOptions ( )
overridevirtualnoexcept

Parse class options.

Implements Physics::ItoKMC::ItoKMCFieldTagger< S >.

◆ parseRuntimeOptions()

template<typename S >
void ItoKMCStreamerTagger::parseRuntimeOptions ( )
overridevirtualnoexcept

Parse runtime-configurable class options.

Implements Physics::ItoKMC::ItoKMCFieldTagger< S >.

◆ refineCell()

template<typename S >
bool ItoKMCStreamerTagger::refineCell ( const RealVect a_pos,
const Real  a_time,
const Real  a_dx,
const int  a_lvl,
const Vector< Real > &  a_tagFields,
const Vector< RealVect > &  a_gradTagFields 
) const
overrideprotectedvirtualnoexcept

Determine if a particular cell should be refined.

Parameters
[in]a_posPhysical position.
[in]a_timeCurrent simulation time.
[in]a_dxGrid resolution.
[in]a_lvlGrid level.
[in]a_tagFieldsCell tagging field values.
[in]a_gradTagFieldsGradient of cell tagging fields.
Returns
True if the cell should be refined.

Implements Physics::ItoKMC::ItoKMCFieldTagger< S >.


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