13#ifndef CD_ITOKMCTAGGERIMPLEM_H
14#define CD_ITOKMCTAGGERIMPLEM_H
22#include <CD_NamespaceHeader.H>
24using namespace Physics::ItoKMC;
29 CH_TIME(
"ItoKMCTagger::ItoKMCTagger");
32 pout() <<
"ItoKMCTagger::ItoKMCTagger" <<
endl;
62 CH_TIME(
"ItoKMCTagger::define");
63 if (m_verbosity > 5) {
64 pout() << m_name +
"::define" <<
endl;
77 CH_TIME(
"ItoKMCTagger::regrid");
84 if (m_numTagFields > 0) {
86 m_tagFields.resize(m_numTagFields);
87 m_gradTagFields.resize(m_numTagFields);
89 for (
int i = 0;
i < m_numTagFields;
i++) {
100 CH_TIME(
"ItoKMCTagger::setPhase");
101 if (m_verbosity > 5) {
102 pout() << m_name +
"::setPhase" <<
endl;
112 CH_TIME(
"ItoKMCTagger::getNumberOfPlotVariables");
117 return m_plotData ? m_numTagFields : 0;
124 CH_TIME(
"ItoKMCTagger::getPlotVariableNames");
132 for (
int i = 0;
i < m_numTagFields;
i++) {
144 CH_TIME(
"ItoKMCTagger::getTagFields");
159 const int a_level)
const noexcept
161 CH_TIME(
"ItoKMCTagger::writePlotData");
162 if (m_verbosity > 5) {
163 pout() << m_name +
"::writePlotData" <<
endl;
169 this->computeTagFields();
171 for (
int i = 0;
i < m_numTagFields;
i++) {
190 CH_TIME(
"ItoKMCTagger::tagCells");
191 if (m_verbosity > 5) {
192 pout() << m_name +
"::tagCells" <<
endl;
205 if (m_numTagFields > 0) {
206 this->computeTagFields();
216#pragma omp parallel for schedule(runtime) reduction(max : gotNewTags)
232 for (
int i = 0;
i < m_numTagFields;
i++) {
260 if (
cpy1.numPts() != 0 ||
cpy2.numPts() != 0) {
284 CH_TIME(
"ItoKMCTagger::refineCellsBox");
285 if (m_verbosity > 5) {
286 pout() <<
"ItoKMCTagger::refineCellsBox" <<
endl;
294 for (
int i = 0;
i < m_numTagFields;
i++) {
308 for (
int i = 0;
i < m_numTagFields;
i++) {
328 if (this->insideTagBox(
pos)) {
333 for (
int i = 0;
i < m_numTagFields;
i++) {
357#include <CD_NamespaceFooter.H>
Agglomeration of useful data operations.
Declaration of the Physics::ItoKMC::ItoKMCTagger abstract CellTagger.
static void setCoveredValue(EBAMRCellData &a_lhs, const EBAMRCellData &a_coveredMask, const int a_comp, const Real a_value)
Set value in covered cells. Does specified component.
Definition CD_DataOps.cpp:2655
ItoKMCTagger()
Weak constructor. User MUST subsequently call the define function.
Definition CD_ItoKMCTaggerImplem.H:27
virtual void setPhase(const phase::which_phase a_phase) noexcept
Set the phase where we do the tagging.
Definition CD_ItoKMCTaggerImplem.H:98
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
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
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 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 void regrid() noexcept override
Regrid this class. Note that there is no preRegrid method.
Definition CD_ItoKMCTaggerImplem.H:75
static const std::string Primal
Identifier for perimal realm.
Definition CD_Realm.H:39
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:38
phase::which_phase m_phase
Phase where this solver lives.
Definition CD_TracerParticleSolver.H:367
TracerParticleSolver()
Default constructor.
Definition CD_TracerParticleSolverImplem.H:26
std::string m_realm
Realm where this solver lives.
Definition CD_TracerParticleSolver.H:352
int m_verbosity
Verbosity level.
Definition CD_TracerParticleSolver.H:387
RefCountedPtr< AmrMesh > m_amr
Handle to AMR mesh.
Definition CD_TracerParticleSolver.H:327
virtual void allocate()
Allocate storage for this solver.
Definition CD_TracerParticleSolverImplem.H:195
std::string m_name
Solver name.
Definition CD_TracerParticleSolver.H:357
ALWAYS_INLINE void loop(const Box &a_computeBox, Functor &&kernel)
Launch a C++ kernel over a regular grid with compile-time per-dimension strides.
Definition CD_BoxLoopsImplem.H:39
RealVect position(Location::Cell a_location, const VolIndex &a_vof, const EBISBox &a_ebisbox, const Real &a_dx)
Compute the position (ignoring the "origin) of a Vof.
Definition CD_LocationImplem.H:21
Real max(const Real &a_input) noexcept
Get the maximum of the input, reduced over MPI ranks (in the Chombo communicator)
Definition CD_ParallelOpsImplem.H:177
which_phase
Enumeration of supported phases.
Definition CD_MultiFluidIndexSpace.H:38
@ gas
Gas phase.
Definition CD_MultiFluidIndexSpace.H:39