|
chombo-discharge
|
Intermediate CdrPlasmaTagger subclass that computes tracer fields from the electric field only. More...
#include <CD_CdrPlasmaFieldTagger.H>


Public Member Functions | |
| CdrPlasmaFieldTagger () | |
| Default constructor. Sets the tagger name. | |
| virtual | ~CdrPlasmaFieldTagger () |
| Destructor. | |
| void | computeTracers () const override final |
| Compute tracer fields from the electric field on the AMR hierarchy. | |
| virtual void | parseOptions () override=0 |
| Parse user-defined options. Must be implemented by subclasses. | |
Public Member Functions inherited from Physics::CdrPlasma::CdrPlasmaTagger | |
| CdrPlasmaTagger () | |
| Default constructor. Sets default realm and phase. | |
| CdrPlasmaTagger (const RefCountedPtr< CdrPlasmaPhysics > &a_physics, const RefCountedPtr< CdrPlasmaStepper > &a_timeStepper, const RefCountedPtr< AmrMesh > &a_amr, const RefCountedPtr< ComputationalGeometry > &a_computationalGeometry) | |
| Full constructor. Leaves the object in a 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. Leaves the object in a usable state. | |
| virtual void | prePlot () const noexcept override |
| Pre-plot hook. Computes tracer fields so they appear in plot output. | |
| virtual void | preRegrid () noexcept override |
| Pre-regrid hook. Clears tracer field storage before the grid changes. | |
| virtual void | regrid () override final |
| Regrid hook. Reallocates tracer field and gradient storage on the new mesh. | |
| virtual bool | tagCells (EBAMRTags &a_tags) override final |
| Flag cells for refinement and coarsening using the tracer-field approach. | |
| virtual int | getNumberOfPlotVariables () const override final |
| Return the number of plot variables (one per tracer field). | |
| virtual Vector< std::string > | getPlotVariableNames () const override final |
| Return the names of the tracer field plot variables. | |
| virtual void | writePlotData (LevelData< EBCellFAB > &a_output, int &a_icomp, const std::string &a_outputRealm, const int a_level) const override final |
| Write tracer field data into the output holder. | |
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 | |
| EBAMRCellData | m_scratch |
| Scratch storage for scalar intermediate quantities. | |
| EBAMRCellData | m_electricField |
| Cell-centered electric field vector (SpaceDim components). | |
| EBAMRCellData | m_gradElectricField |
| Cell-centered gradient of the electric field magnitude, i.e., grad(|E|). | |
Protected Attributes inherited from Physics::CdrPlasma::CdrPlasmaTagger | |
| std::string | m_realm |
| Realm on which tracer field storage is allocated. | |
| phase::which_phase | m_phase |
| Phase on which tracer field storage is allocated. | |
| RefCountedPtr< CdrPlasmaPhysics > | m_physics |
| Plasma kinetics interface. | |
| RefCountedPtr< CdrPlasmaStepper > | m_timeStepper |
| Time stepper providing access to solver data and electric field. | |
| RefCountedPtr< AmrMesh > | m_amr |
| AMR mesh for grid iteration, gradient computation, and interpolation. | |
| RefCountedPtr< ComputationalGeometry > | m_computationalGeometry |
| Computational geometry providing electrode and dielectric information. | |
| int | m_numTracers |
| Number of scalar tracer fields used for tagging decisions. | |
| Vector< EBAMRCellData > | m_tracers |
| Tracer fields on the AMR hierarchy. Allocated and filled by computeTracers(). | |
| Vector< EBAMRCellData > | m_gradTracers |
| Gradients of the tracer fields on the AMR hierarchy. | |
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. | |
Intermediate CdrPlasmaTagger subclass that computes tracer fields from the electric field only.
This class implements computeTracers() by fetching the electric field and its gradient magnitude from the time stepper and calling the pure virtual per-cell tracer() method on every grid cell. Users subclass this and implement tracer(), refineCell(), and coarsenCell() to define their specific tagging criteria based on the local electric field.
|
overrideprotectedpure virtual |
Decide whether a cell should be coarsened based on tracer fields.
| [in] | a_pos | Cell centroid position. |
| [in] | a_time | Current simulation time. |
| [in] | a_dx | Grid cell spacing. |
| [in] | a_lvl | AMR level of this cell. |
| [in] | a_tracers | Tracer field values at this cell. |
| [in] | a_gradTracers | Gradient of tracer fields at this cell. |
Implements Physics::CdrPlasma::CdrPlasmaTagger.
Implemented in Physics::CdrPlasma::CdrPlasmaStreamerTagger.
|
protectedvirtual |
Compute the centroid-centered electric field and its gradient magnitude.
| [out] | a_electricField | Cell-centered electric field vector. |
| [out] | a_gradElectricField | Cell-centered gradient of |E|. |
|
finaloverridevirtual |
Compute tracer fields from the electric field on the AMR hierarchy.
Fetches the cell-centered electric field and its gradient, then calls the per-cell tracer() method on every regular and irregular cell. Tracer fields and their gradients are stored in m_tracers and m_gradTracers.
Implements Physics::CdrPlasma::CdrPlasmaTagger.
Parse user-defined options. Must be implemented by subclasses.
Implements Physics::CdrPlasma::CdrPlasmaTagger.
Implemented in Physics::CdrPlasma::CdrPlasmaStreamerTagger.
|
overrideprotectedpure virtual |
Decide whether a cell should be refined based on tracer fields.
| [in] | a_pos | Cell centroid position. |
| [in] | a_time | Current simulation time. |
| [in] | a_dx | Grid cell spacing. |
| [in] | a_lvl | AMR level of this cell. |
| [in] | a_tracers | Tracer field values at this cell. |
| [in] | a_gradTracers | Gradient of tracer fields at this cell. |
Implements Physics::CdrPlasma::CdrPlasmaTagger.
Implemented in Physics::CdrPlasma::CdrPlasmaStreamerTagger.
|
protectedpure virtual |
Per-cell tracer field evaluation. Must be implemented by subclasses.
| [in] | a_pos | Cell centroid position. |
| [in] | a_time | Current simulation time. |
| [in] | a_dx | Grid cell spacing. |
| [in] | a_electricField | Electric field vector at this cell. |
| [in] | a_minElectricField | Global minimum of |E| over the AMR hierarchy. |
| [in] | a_maxElectricField | Global maximum of |E| over the AMR hierarchy. |
| [in] | a_gradElectricField | Gradient of |E| at this cell. |
| [in] | a_minGradElectricField | Global minimum of |grad(|E|)| over the AMR hierarchy. |
| [in] | a_maxGradElectricField | Global maximum of |grad(|E|)| over the AMR hierarchy. |
Implemented in Physics::CdrPlasma::CdrPlasmaStreamerTagger.