12#ifndef CD_ItoKMCTaggerImplem_H
13#define CD_ItoKMCTaggerImplem_H
21#include <CD_NamespaceHeader.H>
23using namespace Physics::ItoKMC;
28 CH_TIME(
"ItoKMCTagger::ItoKMCTagger");
31 pout() <<
"ItoKMCTagger::ItoKMCTagger" <<
endl;
61 CH_TIME(
"ItoKMCTagger::define");
62 if (m_verbosity > 5) {
63 pout() << m_name +
"::define" <<
endl;
76 CH_TIME(
"ItoKMCTagger::regrid");
83 if (m_numTagFields > 0) {
85 m_tagFields.resize(m_numTagFields);
86 m_gradTagFields.resize(m_numTagFields);
88 for (
int i = 0;
i < m_numTagFields;
i++) {
99 CH_TIME(
"ItoKMCTagger::setPhase");
100 if (m_verbosity > 5) {
101 pout() << m_name +
"::setPhase" <<
endl;
111 CH_TIME(
"ItoKMCTagger::getNumberOfPlotVariables");
116 return m_plotData ? m_numTagFields : 0;
123 CH_TIME(
"ItoKMCTagger::getPlotVariableNames");
131 for (
int i = 0;
i < m_numTagFields;
i++) {
143 CH_TIME(
"ItoKMCTagger::getTagFields");
158 const int a_level)
const noexcept
160 CH_TIME(
"ItoKMCTagger::writePlotData");
161 if (m_verbosity > 5) {
162 pout() << m_name +
"::writePlotData" <<
endl;
168 this->computeTagFields();
170 for (
int i = 0;
i < m_numTagFields;
i++) {
189 CH_TIME(
"ItoKMCTagger::tagCells");
190 if (m_verbosity > 5) {
191 pout() << m_name +
"::tagCells" <<
endl;
204 if (m_numTagFields > 0) {
205 this->computeTagFields();
215#pragma omp parallel for schedule(runtime) reduction(max : gotNewTags)
231 for (
int i = 0;
i < m_numTagFields;
i++) {
259 if (
cpy1.numPts() != 0 ||
cpy2.numPts() != 0) {
283 CH_TIME(
"ItoKMCTagger::refineCellsBox");
284 if (m_verbosity > 5) {
285 pout() <<
"ItoKMCTagger::refineCellsBox" <<
endl;
293 for (
int i = 0;
i < m_numTagFields;
i++) {
307 for (
int i = 0;
i < m_numTagFields;
i++) {
327 if (this->insideTagBox(
pos)) {
332 for (
int i = 0;
i < m_numTagFields;
i++) {
355#include <CD_NamespaceFooter.H>
Agglomeration of useful data operations.
Parent tagger class for ItoKMC.
static void setCoveredValue(EBAMRCellData &a_lhs, const int a_comp, const Real a_value)
Set value in covered cells. Does specified component.
Definition CD_DataOps.cpp:2552
ItoKMCTagger()
Weak constructor. User MUST subsequently call the define function.
Definition CD_ItoKMCTaggerImplem.H:26
virtual void setPhase(const phase::which_phase a_phase) noexcept
Set the phase where we do the tagging.
Definition CD_ItoKMCTaggerImplem.H:97
virtual bool tagCells(EBAMRTags &a_tags) noexcept override
Tag cells for refinement and coarsening.
Definition CD_ItoKMCTaggerImplem.H:187
virtual Vector< EBAMRCellData > & getTagFields() noexcept
Get tag fields. This is data that live on the primal realm and specified input phase.
Definition CD_ItoKMCTaggerImplem.H:141
virtual ~ItoKMCTagger() noexcept
Destructor.
Definition CD_ItoKMCTaggerImplem.H:51
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:271
virtual int getNumberOfPlotVariables() const noexcept override
Get number of plot variables that will be written to file (by Driver).
Definition CD_ItoKMCTaggerImplem.H:109
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:56
virtual Vector< std::string > getPlotVariableNames() const noexcept override
Get plot variable names.
Definition CD_ItoKMCTaggerImplem.H:121
virtual void regrid() noexcept override
Regrid this class. Note that there is no preRegrid method.
Definition CD_ItoKMCTaggerImplem.H:74
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:155
static const std::string Primal
Identifier for perimal realm.
Definition CD_Realm.H:38
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:37
phase::which_phase m_phase
Phase where this solver lives.
Definition CD_TracerParticleSolver.H:360
TracerParticleSolver()
Default constructor.
Definition CD_TracerParticleSolverImplem.H:25
std::string m_realm
Realm where this solver lives.
Definition CD_TracerParticleSolver.H:345
int m_verbosity
Verbosity level.
Definition CD_TracerParticleSolver.H:380
RefCountedPtr< AmrMesh > m_amr
Handle to AMR mesh.
Definition CD_TracerParticleSolver.H:320
virtual void allocate()
Allocate storage for this solver.
Definition CD_TracerParticleSolverImplem.H:194
std::string m_name
Solver name.
Definition CD_TracerParticleSolver.H:350
ALWAYS_INLINE void loop(const Box &a_computeBox, Functor &&kernel, const IntVect &a_stride=IntVect::Unit)
Launch a C++ kernel over a regular grid.
Definition CD_BoxLoopsImplem.H:20
RealVect position(const 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:20
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:176