chombo-discharge
Loading...
Searching...
No Matches
CD_ItoKMCTagger.H
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
13#ifndef CD_ITOKMCTAGGER_H
14#define CD_ITOKMCTAGGER_H
15
16// Our includes
17#include <CD_CellTagger.H>
18#include <CD_ItoKMCStepper.H>
19#include <CD_ItoKMCPhysics.H>
20#include <CD_NamespaceHeader.H>
21
22namespace Physics {
23 namespace ItoKMC {
24
31 template <typename S>
32 class ItoKMCTagger : public CellTagger
33 {
34 public:
39
48 const RefCountedPtr<AmrMesh>& a_amr) noexcept;
49
53 virtual ~ItoKMCTagger() noexcept;
54
61 virtual void
64 const RefCountedPtr<AmrMesh>& a_amr) noexcept;
65
70 virtual int
71 getNumberOfPlotVariables() const noexcept override;
72
78 getPlotVariableNames() const noexcept override;
79
87 virtual void
89 int& a_icomp,
91 const int a_level) const noexcept override;
92
96 virtual void
98
102 virtual void
104
108 virtual void
110
114 virtual void
116
122 virtual bool
124
129 virtual void
130 setPhase(const phase::which_phase a_phase) noexcept;
131
138
139 protected:
144
149
153 std::string m_realm;
154
158 phase::which_phase m_phase;
159
164
169
174
179
184
189
204 virtual void
209 const int a_lvl,
216
227 virtual bool
231 const int a_lvl,
234
245 virtual bool
249 const int a_lvl,
252 };
253 } // namespace ItoKMC
254} // namespace Physics
255
256#include <CD_NamespaceFooter.H>
257
259
260#endif
Declaration of a base class for tagging cells across an AMR hierarchy.
Vector< RefCountedPtr< LayoutData< DenseIntVectSet > > > EBAMRTags
Declaration of cell tags.
Definition CD_EBAMRTags.H:24
Declaration of the Physics::ItoKMC::ItoKMCPhysics abstract base class.
Declaration of the Physics::ItoKMC::ItoKMCStepper abstract TimeStepper.
Implementation of CD_ItoKMCTagger.H.
Class for handling spatial operations.
Definition CD_AmrMesh.H:43
Base class for tagging cells across an AMR hierarchy.
Definition CD_CellTagger.H:32
Abstract base class coupling Kinetic Monte Carlo chemistry to Ito/CDR plasma solvers.
Definition CD_ItoKMCPhysics.H:84
Abstract CellTagger for the Ito-KMC-Poisson physics module.
Definition CD_ItoKMCTagger.H:33
ItoKMCTagger()
Weak constructor. User MUST subsequently call the define function.
Definition CD_ItoKMCTaggerImplem.H:27
virtual void parseOptions() override=0
Parse class options.
RefCountedPtr< S > m_timeStepper
Time stepper.
Definition CD_ItoKMCTagger.H:168
virtual void setPhase(const phase::which_phase a_phase) noexcept
Set the phase where we do the tagging.
Definition CD_ItoKMCTaggerImplem.H:98
virtual void computeTagFields() const noexcept=0
Compute tagging fields.
virtual bool tagCells(EBAMRTags &a_tags) noexcept override
Tag cells for refinement and coarsening.
Definition CD_ItoKMCTaggerImplem.H:188
virtual Vector< EBAMRCellData > & getTagFields() noexcept
Get the tagging fields (mutable reference).
Definition CD_ItoKMCTaggerImplem.H:142
virtual ~ItoKMCTagger() noexcept
Destructor.
Definition CD_ItoKMCTaggerImplem.H:52
virtual void tagCellsBox(DenseIntVectSet &a_refinedCells, DenseIntVectSet &a_coarsenedCells, const Vector< EBCellFAB * > &a_tagFields, const Vector< EBCellFAB * > &a_gradTagFields, 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) const noexcept
Per-box refinement tagging routine.
Definition CD_ItoKMCTaggerImplem.H:272
bool m_plotData
Plot data or not.
Definition CD_ItoKMCTagger.H:148
bool m_isDefined
Defined or not.
Definition CD_ItoKMCTagger.H:143
virtual void writePlotData(LevelData< EBCellFAB > &a_output, int &a_icomp, const std::string &a_outputRealm, const int a_level) const noexcept override
Write plot data.
Definition CD_ItoKMCTaggerImplem.H:156
Vector< EBAMRCellData > m_tagFields
Tagging fields.
Definition CD_ItoKMCTagger.H:183
int m_numTagFields
Number of tagging fields.
Definition CD_ItoKMCTagger.H:178
RefCountedPtr< ItoKMCPhysics > m_physics
Physics implementation.
Definition CD_ItoKMCTagger.H:163
virtual int getNumberOfPlotVariables() const noexcept override
Get number of plot variables that will be written to file (by Driver).
Definition CD_ItoKMCTaggerImplem.H:110
virtual bool coarsenCell(const RealVect &a_pos, const Real a_time, const Real a_dx, const int a_lvl, const Vector< Real > &a_tagFields, const Vector< RealVect > &a_gradTagFields) const noexcept=0
Determine if a particular cell should be coarsened or not.
virtual void define(const RefCountedPtr< ItoKMCPhysics > &a_physics, const RefCountedPtr< S > &a_timeStepper, const RefCountedPtr< AmrMesh > &a_amr) noexcept
Define function.
Definition CD_ItoKMCTaggerImplem.H:57
virtual Vector< std::string > getPlotVariableNames() const noexcept override
Get plot variable names.
Definition CD_ItoKMCTaggerImplem.H:122
virtual bool refineCell(const RealVect &a_pos, const Real a_time, const Real a_dx, const int a_lvl, const Vector< Real > &a_tagFields, const Vector< RealVect > &a_gradTagFields) const noexcept=0
Determine if a particular cell should be refined or not.
RefCountedPtr< AmrMesh > m_amr
AmrMesh. Needed for allocating memory and things like that.
Definition CD_ItoKMCTagger.H:173
virtual void parseRuntimeOptions() override=0
Parse run-time configurable class options.
virtual void regrid() noexcept override
Regrid this class. Note that there is no preRegrid method.
Definition CD_ItoKMCTaggerImplem.H:75
phase::which_phase m_phase
Phase where data is allocated.
Definition CD_ItoKMCTagger.H:158
std::string m_realm
Realm where data is allocated.
Definition CD_ItoKMCTagger.H:153
Vector< EBAMRCellData > m_gradTagFields
Gradient of tagging fields.
Definition CD_ItoKMCTagger.H:188
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:38
TracerParticleSolver()
Default constructor.
Definition CD_TracerParticleSolverImplem.H:26
Namespace containing physics models for use with chombo-discharge.
Definition CD_AdvectionDiffusion.H:16
Phase names namespace.
Definition CD_MultiFluidIndexSpace.H:28