chombo-discharge
Loading...
Searching...
No Matches
RefinementBoxTagger Class Reference

Cell tagger that only refines the boxes given as RefinementBoxTagger.ref_box* in the input file. More...

#include <CD_RefinementBoxTagger.H>

Inheritance diagram for RefinementBoxTagger:
Collaboration diagram for RefinementBoxTagger:

Public Member Functions

 RefinementBoxTagger ()=delete
 Disallowed default constructor.
 RefinementBoxTagger (const RefCountedPtr< AmrMesh > &a_amr, const std::string &a_realm) noexcept
 Constructor.
virtual ~RefinementBoxTagger () noexcept
 Destructor.
virtual void parseOptions () override
 Parse the verbosity, the refinement boxes and the buffer.
virtual void regrid () override
 Nothing to regrid: the tagger holds no mesh data.
virtual bool tagCells (EBAMRTags &a_tags) override
 Tag every cell whose center lies in a refinement box that asks for a finer level.
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.
virtual void prePlot () const noexcept
 Perform pre-plotting operations (if necessary).
virtual int getNumberOfPlotVariables () const
 Get number of plot variables that will be written to file (by Driver).
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.
virtual int getBuffer () const
 Get tag buffer.

Protected Attributes

RefCountedPtr< AmrMesh > m_amr
 AMR mesh.
std::string m_realm
 Realm whose grids are tagged.
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< RealBox > m_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 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.

Detailed Description

Cell tagger that only refines the boxes given as RefinementBoxTagger.ref_box* in the input file.

This gives static refinement where neither geometric refinement nor a physics tagger applies, e.g. on a geometry without embedded boundaries. A cell is tagged on level lvl if its center lies in a refinement box that asks for a level finer than lvl. The box edges are included (CellTagger::getManualRefinementLevel), but an edge that coincides exactly with a cell center is decided by floating-point rounding, so place the edges between cell centers. The boxes, and the tag buffer, are parsed as in CellTagger.

Constructor & Destructor Documentation

◆ RefinementBoxTagger()

RefinementBoxTagger::RefinementBoxTagger ( const RefCountedPtr< AmrMesh > & a_amr,
const std::string & a_realm )
noexcept

Constructor.

Parameters
[in]a_amrAMR mesh
[in]a_realmRealm whose grids are tagged

Member Function Documentation

◆ parseOptions()

void RefinementBoxTagger::parseOptions ( )
overridevirtual

Parse the verbosity, the refinement boxes and the buffer.

Implements CellTagger.

◆ regrid()

void RefinementBoxTagger::regrid ( )
overridevirtual

Nothing to regrid: the tagger holds no mesh data.

Implements CellTagger.

◆ tagCells()

bool RefinementBoxTagger::tagCells ( EBAMRTags & a_tags)
overridevirtual

Tag every cell whose center lies in a refinement box that asks for a finer level.

Parameters
[in,out]a_tagsCell tags on each level
Returns
True if any cell was tagged.

Implements CellTagger.


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