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

Class for tagging cells in the DischargeInception module. More...

#include <CD_DischargeInceptionTagger.H>

Inheritance diagram for Physics::DischargeInception::DischargeInceptionTagger:
Inheritance graph
[legend]
Collaboration diagram for Physics::DischargeInception::DischargeInceptionTagger:
Collaboration graph
[legend]

Public Member Functions

 DischargeInceptionTagger ()=delete
 Disallowed constructor.
 
 DischargeInceptionTagger (const DischargeInceptionTagger &)=delete
 Disallowed constructor.
 
 DischargeInceptionTagger (const DischargeInceptionTagger &&)=delete
 Disallowed constructor.
 
 DischargeInceptionTagger (const RefCountedPtr< AmrMesh > &a_amrMesh, const EBAMRCellData *const a_electricField, const std::function< Real(const Real E, const RealVect x)> &a_alphaEff, const phase::which_phase a_phase=phase::gas)
 Full constructor. More...
 
virtual ~DischargeInceptionTagger ()
 Destructor.
 
virtual void parseOptions () override final
 Parse options.
 
virtual void regrid () override final
 Parse options.
 
virtual bool tagCells (EBAMRTags &a_tags) override final
 Tag cells for refinement. More...
 
virtual int getNumberOfPlotVariables () const override
 Get number of plot variables that will be written to file (by Driver). More...
 
virtual void writePlotData (EBAMRCellData &a_output, Vector< std::string > &a_plotVariableNames, int &a_icomp) const
 Write plot data. More...
 
- 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 parseRuntimeOptions ()
 Parse runtime class options. More...
 
virtual void prePlot () const noexcept
 Perform pre-plotting operations (if necessary)
 
virtual Vector< std::string > getPlotVariableNames () const
 Get plot variable names.
 
virtual void writePlotData (LevelData< EBCellFAB > &a_output, int &a_icomp, const std::string a_outputRealm, const int a_level) const
 Write plot data. More...
 
virtual int getBuffer () const
 Get tag buffer. More...
 

Protected Member Functions

virtual void computeTracerField () const noexcept
 Compute alpha_eff*dx at max voltage.
 
- 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...
 

Protected Attributes

RefCountedPtr< AmrMeshm_amr
 AmrMesh reference.
 
const EBAMRCellDatam_electricField
 Pointer to electric field.
 
EBAMRCellData m_tracerField
 Tracer field. Will be populated with |grad(E)|*dx/|E|.
 
std::function< Real(const Real &E, const RealVect x)> m_alphaEff
 Ionization coefficient.
 
phase::which_phase m_phase
 Phase.
 
std::string m_realm
 Realm.
 
Real m_refAlpha
 Curvature refinement factor.
 
Real m_maxVoltage
 Max voltage.
 
bool m_plot
 Plot tracer field or not.
 
- 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

Class for tagging cells in the DischargeInception module.

This flags cells for refinement if alpha_eff * dx > threshold. User must supply the effective ionization coefficient through the constructor.

Constructor & Destructor Documentation

◆ DischargeInceptionTagger()

DischargeInceptionTagger::DischargeInceptionTagger ( const RefCountedPtr< AmrMesh > &  a_amrMesh,
const EBAMRCellData *const  a_electricField,
const std::function< Real(const Real E, const RealVect x)> &  a_alphaEff,
const phase::which_phase  a_phase = phase::gas 
)

Full constructor.

Parameters
[in]a_amrMeshAmr mesh.
[in]a_electricFieldPointer to electric field data.
[in]a_alphaEffIonization coefficient
[in]a_phaseDefault phase.

Member Function Documentation

◆ getNumberOfPlotVariables()

int DischargeInceptionTagger::getNumberOfPlotVariables ( ) const
overridevirtual

Get number of plot variables that will be written to file (by Driver).

Returns
Returns number of plot variables that Driver will write to plot files.

Reimplemented from CellTagger.

◆ tagCells()

bool DischargeInceptionTagger::tagCells ( EBAMRTags a_tags)
finaloverridevirtual

Tag cells for refinement.

This tags based on |grad(E)|*dx/E.

Parameters
[in,out]a_tagsTags on grid levels.

Implements CellTagger.

◆ writePlotData()

void DischargeInceptionTagger::writePlotData ( EBAMRCellData a_output,
Vector< std::string > &  a_plotVariableNames,
int &  a_icomp 
) const
virtual

Write plot data.

Parameters
[in,out]a_outputOutput data holder
[in,out]a_plotVariableNamesPlot variable names
[in,out]a_icompStarting variable in a_output where we begin appending data.

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