chombo-discharge
Public Member Functions | Protected Attributes | List of all members
Physics::CdrPlasma::CdrPlasmaStreamerTagger Class Reference

Class which implements CdrPlasmaFieldTagger and refines cells based on the criterion alpha*dx > threshold or on the curvature of the electric field. More...

#include <CD_CdrPlasmaStreamerTagger.H>

Inheritance diagram for Physics::CdrPlasma::CdrPlasmaStreamerTagger:
Inheritance graph
[legend]
Collaboration diagram for Physics::CdrPlasma::CdrPlasmaStreamerTagger:
Collaboration graph
[legend]

Public Member Functions

 CdrPlasmaStreamerTagger ()=delete
 Disallowed weak constructor.
 
 CdrPlasmaStreamerTagger (const RefCountedPtr< CdrPlasmaPhysics > &a_physics, const RefCountedPtr< CdrPlasmaStepper > &a_timeStepper, const RefCountedPtr< AmrMesh > &a_amr, const RefCountedPtr< ComputationalGeometry > &a_computationalGeometry)
 Full constructor. More...
 
virtual ~CdrPlasmaStreamerTagger ()
 Destructor.
 
virtual void parseOptions () override
 Parse class options.
 
virtual void parseRuntimeOptions () override
 Parse runtime options.
 
virtual Vector< Real > tracer (const RealVect a_pos, const Real a_time, const Real a_dx, const RealVect a_electricField, const Real a_minElectricField, const Real a_maxElectricField, const RealVect a_gradElectricField, const Real a_minGradElectricField, const Real a_maxGradElectricField) const override
 Compute tracer fields. More...
 
virtual bool coarsenCell (const RealVect a_pos, const Real a_time, const Real a_dx, const int a_lvl, const Vector< Real > a_tracers, const Vector< RealVect > a_gradTracers) const override
 Cell-coarsening method. More...
 
virtual bool refineCell (const RealVect a_pos, const Real a_time, const Real a_dx, const int a_lvl, const Vector< Real > a_tracers, const Vector< RealVect > a_gradTracers) const override
 Cell-refinement method. More...
 
- Public Member Functions inherited from Physics::CdrPlasma::CdrPlasmaFieldTagger
 CdrPlasmaFieldTagger ()
 Weak constructor, must subsequently call define.
 
virtual ~CdrPlasmaFieldTagger ()
 Destructor.
 
void computeTracers () const override final
 Compute tracer fields. More...
 
- Public Member Functions inherited from Physics::CdrPlasma::CdrPlasmaTagger
 CdrPlasmaTagger ()
 Weak constructor. Must subsequently call define.
 
 CdrPlasmaTagger (const RefCountedPtr< CdrPlasmaPhysics > &a_physics, const RefCountedPtr< CdrPlasmaStepper > &a_timeStepper, const RefCountedPtr< AmrMesh > &a_amr, const RefCountedPtr< ComputationalGeometry > &a_computationalGeometry)
 Full constructor. Leaves object in usable state. More...
 
virtual ~CdrPlasmaTagger ()
 Destructor.
 
void define (const RefCountedPtr< CdrPlasmaPhysics > &a_physics, const RefCountedPtr< CdrPlasmaStepper > &a_timeStepper, const RefCountedPtr< AmrMesh > &a_amr, const RefCountedPtr< ComputationalGeometry > &a_computationalGeometry)
 Define function constructor. Leaves object in usable state. More...
 
virtual void prePlot () const noexcept override
 Pre-plot magic for Driver.
 
virtual void preRegrid () noexcept override
 Perform pre-regrid operations.
 
virtual void regrid () override final
 Regrid method – used for reallocating storage for the tracer fields.
 
virtual bool tagCells (EBAMRTags &a_tags) override final
 Tag cells for refinement. More...
 
virtual int getNumberOfPlotVariables () const override final
 Get number of plot variables. This is fetched by Driver and can be used.
 
virtual Vector< std::string > getPlotVariableNames () const override final
 Get plot variable names.
 
virtual void writePlotData (LevelData< EBCellFAB > &a_output, int &a_icomp, const std::string a_outputRealm, const int a_level) const override final
 Write plot data. More...
 
- Public Member Functions inherited from CellTagger
 CellTagger ()
 Weak constructor (does nothing)
 
virtual ~CellTagger ()
 Destructor (does nothing).
 
virtual int getBuffer () const
 Get tag buffer. More...
 

Protected Attributes

Real m_coarCurv
 Threshold for coarsening based on curvature.
 
Real m_refiCurv
 Threshold for refinement based on curvature.
 
Real m_refiAlpha
 Threshold for refinement based on Townsend ionization coefficient.
 
Real m_coarAlpha
 Threshold for refinement based on Townsend ionization coefficient.
 
int m_maxCoarsenLevel
 Set coarsening level.
 
- Protected Attributes inherited from Physics::CdrPlasma::CdrPlasmaFieldTagger
EBAMRCellData m_scratch
 Scratch storage.
 
EBAMRCellData m_electricField
 Storage for electric field.
 
EBAMRCellData m_gradElectricField
 Storage for electric field.
 
- Protected Attributes inherited from Physics::CdrPlasma::CdrPlasmaTagger
std::string m_realm
 Realm where this cell tagger allocates its data.
 
phase::which_phase m_phase
 Phase where this cell tagger allocates its data.
 
RefCountedPtr< CdrPlasmaPhysicsm_physics
 Plasma physics.
 
RefCountedPtr< CdrPlasmaStepperm_timeStepper
 Time stepper.
 
RefCountedPtr< AmrMeshm_amr
 AmrMesh. Needed for computing tracer stuff.
 
RefCountedPtr< ComputationalGeometrym_computationalGeometry
 Computational geometry. Not needed but useful to have.
 
int m_numTracers
 Number of tracer fields.
 
Vector< EBAMRCellDatam_tracers
 Tracer fields.
 
Vector< EBAMRCellDatam_gradTracers
 Gradient of tracer 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.
 

Additional Inherited Members

- Protected Member Functions inherited from Physics::CdrPlasma::CdrPlasmaFieldTagger
virtual void allocateStorage () const
 Allocate memory for electric field and scratch.
 
virtual void deallocateStorage () const
 Deallocate memory for electric field and scratch.
 
virtual void computeElectricField (EBAMRCellData &a_electricField, EBAMRCellData &a_gradientElectricField) const
 Compute electric field onto the input data holders. More...
 
- Protected Member Functions inherited from Physics::CdrPlasma::CdrPlasmaTagger
virtual void refineCellsBox (DenseIntVectSet &a_refinedCells, const Vector< EBCellFAB * > &a_tracers, const Vector< EBCellFAB * > &a_gradTracers, 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)
 Per-box refinement method. More...
 
virtual void coarsenCellsBox (DenseIntVectSet &a_coarsenedCells, const Vector< EBCellFAB * > &a_tracers, const Vector< EBCellFAB * > &a_gradTracers, 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)
 Per-box coarsening method. More...
 
- Protected Member Functions inherited from CellTagger
bool insideTagBox (const RealVect a_pos) const
 Check if a point is inside a tagging box. More...
 
int getManualRefinementLevel (const RealVect a_pos) const
 Get the specified level for this position when doing manual refinement.
 
virtual void parseTagBoxes ()
 Parse boxes. More...
 
virtual void parseRefinementBoxes ()
 Parse refinement boxes.
 
virtual void parseBuffer ()
 Parse refinement buffer. More...
 
virtual void parseVerbosity ()
 Parse the verbosity from the input file or command line. More...
 

Detailed Description

Class which implements CdrPlasmaFieldTagger and refines cells based on the criterion alpha*dx > threshold or on the curvature of the electric field.

Constructor & Destructor Documentation

◆ CdrPlasmaStreamerTagger()

CdrPlasmaStreamerTagger::CdrPlasmaStreamerTagger ( const RefCountedPtr< CdrPlasmaPhysics > &  a_physics,
const RefCountedPtr< CdrPlasmaStepper > &  a_timeStepper,
const RefCountedPtr< AmrMesh > &  a_amr,
const RefCountedPtr< ComputationalGeometry > &  a_computationalGeometry 
)

Full constructor.

Parameters
[in]a_physicsReference to CdrPlasmaPhysics.
[in]a_timeStepperReference to the TimeStepper being used.
[in]a_amrReference to AmrMesh.
[in]a_computationalGeometryComputational geometry

Member Function Documentation

◆ coarsenCell()

bool CdrPlasmaStreamerTagger::coarsenCell ( const RealVect  a_pos,
const Real  a_time,
const Real  a_dx,
const int  a_lvl,
const Vector< Real >  a_tracers,
const Vector< RealVect >  a_gradTracers 
) const
overridevirtual

Cell-coarsening method.

Parameters
[in]a_posPhysical position
[in]a_timeCurrent time
[in]a_dxGrid resolution
[in]a_lvlGrid level
[in]a_tracersTracer fields
[in]a_gradTracersGradient of tracer fields
Returns
Return true if the cell should be coarsened and false otherwise.

Implements Physics::CdrPlasma::CdrPlasmaFieldTagger.

◆ refineCell()

bool CdrPlasmaStreamerTagger::refineCell ( const RealVect  a_pos,
const Real  a_time,
const Real  a_dx,
const int  a_lvl,
const Vector< Real >  a_tracers,
const Vector< RealVect >  a_gradTracers 
) const
overridevirtual

Cell-refinement method.

Parameters
[in]a_posPhysical position
[in]a_timeCurrent time
[in]a_dxGrid resolution
[in]a_lvlGrid level
[in]a_tracersTracer fields
[in]a_gradTracersGradient of tracer fields
Returns
True if the cell should be refined and false otherwise.

Implements Physics::CdrPlasma::CdrPlasmaFieldTagger.

◆ tracer()

Vector< Real > CdrPlasmaStreamerTagger::tracer ( const RealVect  a_pos,
const Real  a_time,
const Real  a_dx,
const RealVect  a_electricField,
const Real  a_minElectricField,
const Real  a_maxElectricField,
const RealVect  a_gradElectricField,
const Real  a_minGradElectricField,
const Real  a_maxGradElectricField 
) const
overridevirtual

Compute tracer fields.

Parameters
[in]a_posPhysical coordinates
[in]a_timeTime
[in]a_electricFieldElectric field (in SI units)
[in]a_minElectricFieldMinimum value of electric field
[in]a_maxElectricFieldMaximum value of electric field
[in]a_gradElectricFieldGradient of |E|, i.e. grad(|E|)
[in]a_minGradElectricFieldMaximum value of |grad(|E|)|
[in]a_maxGradElectricFieldMaximum value of |grad(|E|)|
Returns
This should return a Vector of values whose length is equal to the number of tracer fields the subclasses uses.

Implements Physics::CdrPlasma::CdrPlasmaFieldTagger.


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