|
chombo-discharge
|
Abstract Class which implements CellTagger for the CDR plasma physics module. More...
#include <CD_CdrPlasmaTagger.H>


Public Member Functions | |
| 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. | |
| 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. | |
| virtual void | computeTracers () const =0 |
| Compute tracer fields. | |
| virtual void | parseOptions () override=0 |
| Parse class options – must be implemented by user. | |
| 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. | |
| 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. | |
Public Member Functions inherited from CellTagger | |
| CellTagger () | |
| Weak constructor (does nothing) | |
| virtual | ~CellTagger () |
| Destructor (does nothing). | |
| virtual void | parseRuntimeOptions () |
| Parse runtime class options. | |
| virtual int | getBuffer () const |
| Get tag buffer. | |
Protected Attributes | |
| 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< CdrPlasmaPhysics > | m_physics |
| Plasma physics. | |
| RefCountedPtr< CdrPlasmaStepper > | m_timeStepper |
| Time stepper. | |
| RefCountedPtr< AmrMesh > | m_amr |
| AmrMesh. Needed for computing tracer stuff. | |
| RefCountedPtr< ComputationalGeometry > | m_computationalGeometry |
| Computational geometry. Not needed but useful to have. | |
| int | m_numTracers |
| Number of tracer fields. | |
| Vector< EBAMRCellData > | m_tracers |
| Tracer fields. | |
| Vector< EBAMRCellData > | m_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< 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. | |
Abstract Class which implements CellTagger for the CDR plasma physics module.
This class exposes a number of mesh data holders which can be used for flagging cells for refinement. It is only meant to be used as an interface, providing the user access to solver data and physics through the constructor. From that, users can fetch the necessary data from the solvers (or the physics class) and more easily use the data to flag cells for refinement and coarsening.
This class uses 'tracer fields' for flagging cells for refinement and coarsening. It is up to the user to compute these fields by implementing the routine CdrPlasmaTagger::computeTracerFields. These fields can then be used in the other routines CdrPlasmaTagger::refineCell and CdrPlasmaTagger::coarsenCell
| CdrPlasmaTagger::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.
| [in] | a_physics | Reference to CdrPlasmaPhysics. |
| [in] | a_timeStepper | Reference to the TimeStepper being used. |
| [in] | a_amr | Reference to AmrMesh. |
| [in] | a_computationalGeometry | Computational geometry |
|
protectedpure virtual |
Coarsen a cell based on a tracer field.
| [in] | a_pos | Physical position |
| [in] | a_time | Current time |
| [in] | a_dx | Grid resolution |
| [in] | a_lvl | Grid level |
| [in] | a_tracers | Tracer fields |
| [in] | a_gradTracers | Gradient of tracer fields |
Implemented in Physics::CdrPlasma::CdrPlasmaStreamerTagger, and Physics::CdrPlasma::CdrPlasmaFieldTagger.
|
protectedvirtual |
Per-box coarsening method.
Iterates through all cells and check if they need coarsening.
| [out] | a_coarsenedCells | Cells flagged for coarsening. |
| [in] | a_tracers | Tracer fields on this grid patch. |
| [in] | a_gradTracers | Gradient of tracer fields on this grid patch. |
| [in] | a_lvl | Grid level |
| [in] | a_dit | Grid index |
| [in] | a_box | Cell centered box |
| [in] | a_ebisbox | EBIS box |
| [in] | a_time | Current time |
| [in] | a_dx | Grid resolution |
| [in] | a_probLo | Lower-left corner of simulation domain. |
Compute tracer fields.
This should fill m_tracers – user must implement it.
Implemented in Physics::CdrPlasma::CdrPlasmaFieldTagger.
| void CdrPlasmaTagger::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.
| [in] | a_physics | Reference to CdrPlasmaPhysics. |
| [in] | a_timeStepper | Reference to the TimeStepper being used. |
| [in] | a_amr | Reference to AmrMesh. |
| [in] | a_computationalGeometry | Computational geometry |
|
finaloverridevirtual |
Get number of plot variables. This is fetched by Driver and can be used.
Reimplemented from CellTagger.
|
finaloverridevirtual |
Get plot variable names.
Reimplemented from CellTagger.
Parse class options – must be implemented by user.
Implements CellTagger.
Implemented in Physics::CdrPlasma::CdrPlasmaStreamerTagger, and Physics::CdrPlasma::CdrPlasmaFieldTagger.
|
overridevirtualnoexcept |
Pre-plot magic for Driver.
Reimplemented from CellTagger.
|
overridevirtualnoexcept |
Perform pre-regrid operations.
Reimplemented from CellTagger.
|
protectedpure virtual |
Refine a cell based on a tracer field.
| [in] | a_pos | Physical position |
| [in] | a_time | Current time |
| [in] | a_dx | Grid resolution |
| [in] | a_lvl | Grid level |
| [in] | a_tracers | Tracer fields |
| [in] | a_gradTracers | Gradient of tracer fields |
Implemented in Physics::CdrPlasma::CdrPlasmaStreamerTagger, and Physics::CdrPlasma::CdrPlasmaFieldTagger.
|
protectedvirtual |
Per-box refinement method.
Iterates through all cells and check if they need refinement.
| [out] | a_refinedCells | Cells flagged for refinement |
| [in] | a_tracers | Tracer fields on this grid patch. |
| [in] | a_gradTracers | Gradient of tracer fields on this grid patch. |
| [in] | a_lvl | Grid level |
| [in] | a_dit | Grid index |
| [in] | a_box | Cell centered box |
| [in] | a_ebisbox | EBIS box |
| [in] | a_time | Current time |
| [in] | a_dx | Grid resolution |
| [in] | a_probLo | Lower-left corner of simulation domain. |
|
finaloverridevirtual |
Regrid method – used for reallocating storage for the tracer fields.
Implements CellTagger.
Tag cells for refinement.
| [in,out] | a_tags | Tags on grid levels |
EBAMRTags is a data-type Vector<RefCountedPtr<LayoutData<DenseIntVectSet> > >. The vector indicates the grid level, the LayoutData indicates data ownership (in much the same way as LevelData. The DenseIntVectSet is essentially an IntVectSet restricted to the patch (i.e. one cannot add IntVects that are outside the patch). This function cells for refinement or coarsening. The user's responsibility is to add (or remove) tags from a_tags.
Implements CellTagger.
|
finaloverridevirtual |
Write plot data.
| [in,out] | a_output | Output data holder |
| [in,out] | a_icomp | Starting variable in a_output where we begin appending data. πaram[in] a_outputRealm Realm where a_output lives |
| [in] | a_level | Grid level |
Reimplemented from CellTagger.