12 #ifndef CD_SurfaceODESolverImplem_H
13 #define CD_SurfaceODESolverImplem_H
17 #include <ParmParse.H>
22 #include <CD_NamespaceHeader.H>
27 CH_TIME(
"SurfaceODESolver::SurfaceODESolver");
29 m_className =
"SurfaceODESolver";
33 this->setVerbosity(-1);
35 this->setPhase(phase::gas);
36 this->setName(m_className);
37 this->setTime(0, 0.0, 0.0);
43 CH_TIME(
"SurfaceODESolver::SurfaceODESolver");
45 pout() <<
m_name +
"::SurfaceODESolver()" << endl;
54 CH_TIME(
"SurfaceODESolver::~SurfaceODESolver");
55 if (m_verbosity > 5) {
56 pout() << m_name +
"::~SurfaceODESolver()" << endl;
64 CH_TIME(
"SurfaceODESolver::parseOptions");
65 if (m_verbosity > 5) {
66 pout() << m_name +
"::parseOptions" << endl;
69 this->parseVerbosity();
71 this->parsePlotVariables();
78 CH_TIME(
"SurfaceODESolver::parseRuntimeOptions");
79 if (m_verbosity > 5) {
80 pout() << m_name +
"::parseRuntimeOptions" << endl;
83 this->parseVerbosity();
85 this->parsePlotVariables();
92 CH_TIME(
"SurfaceODESolver::parseVerbosity");
93 if (m_verbosity > 5) {
94 pout() << m_name +
"::parseVerbosity" << endl;
97 ParmParse pp(m_className.c_str());
99 pp.get(
"verbosity", m_verbosity);
106 CH_TIME(
"SurfaceODESolver::parseRegrid");
107 if (m_verbosity > 5) {
108 pout() << m_name +
"::parseRegrid" << endl;
111 ParmParse pp(m_className.c_str());
114 pp.get(
"regrid", str);
116 if (str ==
"conservative") {
117 m_conservativeRegrid =
true;
119 else if (str ==
"arithmetic") {
120 m_conservativeRegrid =
false;
123 const std::string err =
"SurfaceODESolver<N>::parseRegrid() - argument '" + str +
"' not recognized";
124 MayDay::Error(err.c_str());
132 CH_TIME(
"SurfaceODESolver::parsePlotVariables");
133 if (m_verbosity > 5) {
134 pout() << m_name +
"::parsePlotVariables" << endl;
140 ParmParse pp(m_className.c_str());
142 const int num = pp.countval(
"plt_vars");
145 Vector<std::string> str(num);
146 pp.getarr(
"plt_vars", str, 0, num);
148 for (
int i = 0; i < num; i++) {
149 if (str[i] ==
"phi") {
152 else if (str[i] ==
"rhs") {
163 CH_TIME(
"SurfaceODESolver::setAmr");
164 if (m_verbosity > 5) {
165 pout() << m_name +
"::setAmr" << endl;
168 CH_assert(!(a_amr.isNull()));
177 CH_TIME(
"SurfaceODESolver::setRealm");
178 if (m_verbosity > 5) {
179 pout() << m_name +
"::setRealm" << endl;
189 CH_TIME(
"SurfaceODESolver::setName");
190 if (m_verbosity > 5) {
191 pout() <<
"SurfaceODESolver::setName" << endl;
201 CH_TIME(
"SurfaceODESolver::getRealm");
202 if (m_verbosity > 5) {
203 pout() <<
"SurfaceODESolver::getRealm" << endl;
213 CH_TIME(
"SurfaceODESolver::setPhase");
214 if (m_verbosity > 5) {
215 pout() << m_name +
"::setPhase" << endl;
225 CH_TIME(
"SurfaceODESolver::getPhase");
226 if (m_verbosity > 5) {
227 pout() << m_name +
"::getPhase" << endl;
237 CH_TIME(
"SurfaceODESolver::setVerbosity");
238 if (m_verbosity > 5) {
239 pout() << m_name +
"::setVerbosity" << endl;
242 m_verbosity = a_verbosity;
249 CH_TIME(
"SurfaceODESolver::getVerbosity");
250 if (m_verbosity > 5) {
251 pout() << m_name +
"::getVerbosity" << endl;
261 CH_TIME(
"SurfaceODESolver::setTime");
262 if (m_verbosity > 5) {
263 pout() << m_name +
"::setTime" << endl;
275 CH_TIME(
"SurfaceODESolver::computeMass(int)");
276 if (m_verbosity > 5) {
277 pout() << m_name +
"::computeMass(int)" << endl;
280 return this->computeMass(m_phi, a_comp);
287 CH_TIME(
"SurfaceODESolver::computeMass(EBAMRIVData, int)");
288 if (m_verbosity > 5) {
289 pout() << m_name +
"::computeMass(EBAMRIVData, int)" << endl;
294 for (
int lvl = 0; lvl <= m_amr->getFinestLevel(); lvl++) {
295 const DisjointBoxLayout& dbl = m_amr->getGrids(m_realm)[lvl];
296 const DataIterator& dit = dbl.dataIterator();
297 const EBISLayout& ebisl = m_amr->getEBISLayout(m_realm, m_phase)[lvl];
298 const Real dx = m_amr->getDx()[lvl];
299 const Real dxArea = std::pow(dx, SpaceDim - 1);
301 CH_assert(a_data[lvl]->nComp() > a_comp);
303 const int nbox = dit.size();
305 #pragma omp parallel for schedule(runtime) reduction(+ : dataSum)
306 for (
int mybox = 0; mybox < nbox; mybox++) {
307 const DataIndex& din = dit[mybox];
309 const EBISBox& ebisbox = ebisl[din];
310 const BaseFab<bool>& validCells = (*m_amr->getValidCells(m_realm)[lvl])[din];
311 const BaseIVFAB<Real>& data = (*a_data[lvl])[din];
313 auto irregularKernel = [&](
const VolIndex& vof) ->
void {
314 const IntVect iv = vof.gridIndex();
316 if (validCells(iv)) {
317 dataSum += data(vof, a_comp) * ebisbox.bndryArea(vof) * dxArea;
321 VoFIterator& vofit = (*m_amr->getVofIterator(m_realm, m_phase)[lvl])[din];
334 CH_TIME(
"SurfaceODESolver::getStep");
335 if (m_verbosity > 5) {
336 pout() << m_name +
"::getStep" << endl;
346 CH_TIME(
"SurfaceODESolver::getTime");
347 if (m_verbosity > 5) {
348 pout() << m_name +
"::getTime" << endl;
358 CH_TIME(
"SurfaceODESolver::getDt");
359 if (m_verbosity > 5) {
360 pout() << m_name +
"::getDt" << endl;
370 CH_TIME(
"SurfaceODESolver::setPhi(Real)");
371 if (m_verbosity > 5) {
372 pout() << m_name +
"::setPhi(Real)" << endl;
382 CH_TIME(
"SurfaceODESolver::setPhi(std::array<Real, N>)");
383 if (m_verbosity > 5) {
384 pout() << m_name +
"::setPhi(std::array<Real, N>)" << endl;
387 for (
int i = 0; i < N; i++) {
396 CH_TIME(
"SurfaceODESolver::setPhi(EBAMRIVData)");
397 if (m_verbosity > 5) {
398 pout() << m_name +
"::setPhi(EBAMRIVData)" << endl;
408 CH_TIME(
"SurfaceODESolver::getPhi");
409 if (m_verbosity > 5) {
410 pout() << m_name +
"::getPhi" << endl;
420 CH_TIME(
"SurfaceODESolver::getPhi");
421 if (m_verbosity > 5) {
422 pout() << m_name +
"::getPhi" << endl;
432 CH_TIME(
"SurfaceODESolver::setRHS(Real)");
433 if (m_verbosity > 5) {
434 pout() << m_name +
"::setRHS(Real)" << endl;
444 CH_TIME(
"SurfaceODESolver::setRHS(std::array<Real, N>)");
445 if (m_verbosity > 5) {
446 pout() << m_name +
"::setRHS(std::array<Real, N>)" << endl;
449 for (
int i = 0; i < N; i++) {
458 CH_TIME(
"SurfaceODESolver::setRHS(EBAMRIVData)");
459 if (m_verbosity > 5) {
460 pout() << m_name +
"::setRHS(EBAMRIVData)" << endl;
470 CH_TIME(
"SurfaceODESolver::getRHS");
471 if (m_verbosity > 5) {
472 pout() << m_name +
"::getRHS" << endl;
482 CH_TIME(
"SurfaceODESolver::getRHS");
483 if (m_verbosity > 5) {
484 pout() << m_name +
"::getRHS" << endl;
494 CH_TIME(
"SurfaceODESolver::allocate");
495 if (m_verbosity > 5) {
496 pout() << m_name +
"::allocate" << endl;
499 CH_assert(!(m_amr.isNull()));
501 m_amr->allocate(m_phi, m_realm, m_phase, N);
502 m_amr->allocate(m_rhs, m_realm, m_phase, N);
504 this->defineVoFIterators();
511 CH_TIME(
"SurfaceODESolver::deallocate");
512 if (m_verbosity > 5) {
513 pout() << m_name +
"::deallocate" << endl;
524 CH_TIME(
"SurfaceODESolver::defineVoFIterators");
525 if (m_verbosity > 5) {
526 pout() << m_name +
"::defineVoFIterators" << endl;
529 using LDVoFs = LayoutData<VoFIterator>;
531 CH_assert(!(m_amr.isNull()));
533 const int finestLevel = m_amr->getFinestLevel();
535 m_dielectricVoFs.resize(1 + finestLevel);
536 m_electrodeVoFs.resize(1 + finestLevel);
538 for (
int lvl = 0; lvl <= finestLevel; lvl++) {
539 const DisjointBoxLayout& dbl = m_amr->getGrids(m_realm)[lvl];
540 const DataIterator& dit = dbl.dataIterator();
541 const EBISLayout& ebisl = m_amr->getEBISLayout(m_realm, m_phase)[lvl];
542 const MFLevelGrid& mflg = *m_amr->getMFLevelGrid(m_realm)[lvl];
544 m_dielectricVoFs[lvl] = RefCountedPtr<LDVoFs>(
new LDVoFs(dbl));
545 m_electrodeVoFs[lvl] = RefCountedPtr<LDVoFs>(
new LDVoFs(dbl));
547 const int nbox = dit.size();
549 #pragma omp parallel for schedule(runtime)
550 for (
int mybox = 0; mybox < nbox; mybox++) {
551 const DataIndex& din = dit[mybox];
553 const Box& cellBox = dbl[din];
554 const EBISBox& ebisBox = ebisl[din];
555 const EBGraph& ebGraph = ebisBox.getEBGraph();
557 VoFIterator& dielectricVoFIt = (*m_dielectricVoFs[lvl])[din];
558 VoFIterator& electrodeVoFIt = (*m_electrodeVoFs[lvl])[din];
561 IntVectSet electrodeIVS = ebisBox.getIrregIVS(cellBox) - dielectricIVS;
563 dielectricVoFIt.define(dielectricIVS, ebGraph);
564 electrodeVoFIt.define(electrodeIVS, ebGraph);
573 CH_TIME(
"SurfaceODESolver::registerOperators");
574 if (m_verbosity > 5) {
575 pout() << m_name +
"::registerOperators" << endl;
578 CH_assert(!(m_amr.isNull()));
580 m_amr->registerOperator(s_eb_coar_ave, m_realm, m_phase);
587 CH_TIME(
"SurfaceODESolver::registerOperators");
588 if (m_verbosity > 5) {
589 pout() << m_name +
"::registerOperators" << endl;
592 CH_assert(!(m_amr.isNull()));
594 m_amr->allocate(m_cache, m_realm, m_phase, N);
605 CH_TIME(
"SurfaceODESolver::regrid");
606 if (m_verbosity > 5) {
607 pout() << m_name +
"::registerOperators" << endl;
613 : EBCoarseToFineInterp::Type::PWC;
615 m_amr->interpToNewGrids(m_phi, m_cache, m_phase, a_lmin, a_oldFinestLevel, a_newFinestLevel, interpType);
624 CH_TIME(
"SurfaceODESolver::resetElectrodes");
625 if (m_verbosity > 5) {
626 pout() << m_name +
"::resetElectrodes" << endl;
629 this->resetElectrodes(m_phi, a_value);
636 CH_TIME(
"SurfaceODESolver::resetElectrodes(EBAMRIVData)");
637 if (m_verbosity > 5) {
638 pout() << m_name +
"::resetElectrodes(EBAMRIVData)" << endl;
641 for (
int lvl = 0; lvl <= m_amr->getFinestLevel(); lvl++) {
642 const DisjointBoxLayout& dbl = m_amr->getGrids(m_realm)[lvl];
643 const DataIterator& dit = dbl.dataIterator();
645 const int nbox = dit.size();
647 #pragma omp parallel for schedule(runtime)
648 for (
int mybox = 0; mybox < nbox; mybox++) {
649 const DataIndex& din = dit[mybox];
651 BaseIVFAB<Real>& phi = (*a_phi[lvl])[din];
652 VoFIterator& vofit = (*m_electrodeVoFs[lvl])[din];
654 auto kernel = [&](
const VolIndex& vof) ->
void {
655 for (
int comp = 0; comp < N; comp++) {
656 phi(vof, comp) = a_value;
669 CH_TIME(
"SurfaceODESolver::resetDielectrics");
670 if (m_verbosity > 5) {
671 pout() << m_name +
"::resetDielectrics" << endl;
674 this->resetDielectrics(m_phi, a_value);
681 CH_TIME(
"SurfaceODESolver::resetDielectrics(EBAMRIVData)");
682 if (m_verbosity > 5) {
683 pout() << m_name +
"::resetDielectrics(EBAMRIVData)" << endl;
686 for (
int lvl = 0; lvl <= m_amr->getFinestLevel(); lvl++) {
687 const DisjointBoxLayout& dbl = m_amr->getGrids(m_realm)[lvl];
688 const DataIterator& dit = dbl.dataIterator();
690 const int nbox = dit.size();
692 #pragma omp parallel for schedule(runtime)
693 for (
int mybox = 0; mybox < nbox; mybox++) {
694 const DataIndex& din = dit[mybox];
696 BaseIVFAB<Real>& phi = (*a_phi[lvl])[din];
697 VoFIterator& vofit = (*m_dielectricVoFs[lvl])[din];
699 auto kernel = [&](
const VolIndex& vof) ->
void {
700 for (
int comp = 0; comp < N; comp++) {
701 phi(vof, comp) = a_value;
715 CH_TIME(
"SurfaceODESolver::writeCheckpointLevel");
716 if (m_verbosity > 5) {
717 pout() << m_name +
"::writeCheckpointLevel" << endl;
720 const std::string
id =
"SurfaceODESolver::" + m_name +
"::phi";
722 CH_assert(!(m_amr.isNull()));
727 m_amr->allocate(scratch, m_realm, m_phase, N);
732 write(a_handle, *scratch[a_level],
id);
742 CH_TIME(
"SurfaceODESolver::readCheckpointLevel");
743 if (m_verbosity > 5) {
744 pout() << m_name +
"::readCheckpointLevel" << endl;
747 const std::string
id =
"SurfaceODESolver::" + m_name +
"::phi";
749 CH_assert(!(m_amr.isNull()));
755 m_amr->allocate(scratch, m_realm, m_phase, N);
757 read<EBCellFAB>(a_handle, *scratch[a_level],
id, m_amr->getGrids(m_realm)[a_level], Interval(0, N - 1),
false);
768 CH_TIME(
"SurfaceODESolver::writePlotFile");
769 if (m_verbosity > 5) {
770 pout() << m_name +
"::writePlotFile" << endl;
773 const int numPlotVars = this->getNumberOfPlotVariables();
775 if (numPlotVars > 0) {
776 const Vector<std::string> plotVarNames = this->getPlotVariableNames();
778 CH_assert(plotVarNames.size() == numPlotVars);
779 CH_assert(!(m_amr.isNull()));
782 m_amr->allocate(output, m_realm, m_phase, numPlotVars);
784 for (
int lvl = 0; lvl <= m_amr->getFinestLevel(); lvl++) {
786 this->writePlotData(*output[lvl], icomp, m_realm, lvl);
791 sprintf(filename,
"%s.step%07d.%dd.hdf5", m_name.c_str(), m_step, SpaceDim);
792 std::string fname(filename);
795 Vector<LevelData<EBCellFAB>*> outputPtr;
796 m_amr->alias(outputPtr, output);
799 constexpr
int numPlotGhost = 0;
801 DischargeIO::writeEBHDF5(fname,
803 m_amr->getGrids(m_realm),
807 m_amr->getRefinementRatios(),
811 m_amr->getFinestLevel() + 1,
821 const std::string a_outputRealm,
822 const int a_level)
const noexcept
824 CH_TIME(
"SurfaceODESolver::writePlotData");
825 if (m_verbosity > 5) {
826 pout() << m_name +
"::writePlotData" << endl;
829 CH_assert(a_level >= 0);
830 CH_assert(a_level <= m_amr->getFinestLevel());
834 LevelData<EBCellFAB> scratch;
835 m_amr->allocate(scratch, m_realm, m_phase, a_level, N);
842 const Interval srcInterv(0, N - 1);
843 const Interval dstInterv(a_comp, a_comp + N - 1);
845 m_amr->copyData(a_output, scratch, a_level, a_outputRealm, m_realm, dstInterv, srcInterv);
847 a_output.exchange(dstInterv);
857 const Interval srcInterv(0, N - 1);
858 const Interval dstInterv(a_comp, a_comp + N - 1);
860 m_amr->copyData(a_output, scratch, a_level, a_outputRealm, m_realm, dstInterv, srcInterv);
862 a_output.exchange(dstInterv);
872 CH_TIME(
"SurfaceODESolver::getNumberOfPlotVariables");
873 if (m_verbosity > 5) {
874 pout() << m_name +
"::getNumberOfPlotVariables" << endl;
894 CH_TIME(
"SurfaceODESolver::getPlotVariableNames");
895 if (m_verbosity > 5) {
896 pout() << m_name +
"::getPlotVariablesNames" << endl;
899 Vector<std::string> plotVarNames;
902 for (
int i = 0; i < N; i++) {
904 plotVarNames.push_back(m_name +
" phi-" + std::to_string(i));
907 plotVarNames.push_back(m_name +
" phi");
913 for (
int i = 0; i < N; i++) {
915 plotVarNames.push_back(m_name +
" rhs-" + std::to_string(i));
918 plotVarNames.push_back(m_name +
" rhs");
926 #include <CD_NamespaceFooter.H>
Silly, but useful functions that override standard Chombo HDF5 IO.
Declaration of a cut-cell ODE solver.
static void setValue(LevelData< MFInterfaceFAB< T >> &a_lhs, const T &a_value)
Set value in an MFInterfaceFAB data holder.
Definition: CD_DataOpsImplem.H:23
static void incr(MFAMRCellData &a_lhs, const MFAMRCellData &a_rhs, const Real a_scale) noexcept
Function which increments data in the form a_lhs = a_lhs + a_rhs*a_scale for all components.
Definition: CD_DataOps.cpp:787
static void copy(MFAMRCellData &a_dst, const MFAMRCellData &a_src)
Copy data from one data holder to another.
Definition: CD_DataOps.cpp:1118
Type
Type of interpolation methods supported. PWC = Piecewise constant, ignoring the embedded boundary....
Definition: CD_EBCoarseToFineInterp.H:42
Wrapper class for holding multifluid EBLevelGrids.
Definition: CD_MFLevelGrid.H:29
virtual IntVectSet interfaceRegion(const Box &a_box, const DataIndex &a_dit, const int a_phase1=0, const int a_phase2=1) const
Get interface region between two phases.
Definition: CD_MFLevelGrid.cpp:98
static const std::string Primal
Identifier for perimal realm.
Definition: CD_Realm.H:47
Surface ODE solver.
Definition: CD_SurfaceODESolver.H:28
virtual void setName(const std::string a_name) noexcept
Set the solver name.
Definition: CD_SurfaceODESolverImplem.H:187
virtual int getVerbosity() const noexcept
Get verbosity.
Definition: CD_SurfaceODESolverImplem.H:247
virtual EBAMRIVData & getRHS()
Get internal state.
Definition: CD_SurfaceODESolverImplem.H:468
void parseVerbosity() noexcept
Parse verbosity.
Definition: CD_SurfaceODESolverImplem.H:90
virtual EBAMRIVData & getPhi() noexcept
Get internal state.
Definition: CD_SurfaceODESolverImplem.H:406
virtual void setRHS(const Real a_rhs)
Convenience function for setting m_rhs.
Definition: CD_SurfaceODESolverImplem.H:430
virtual phase::which_phase getPhase() const noexcept
Get phase.
Definition: CD_SurfaceODESolverImplem.H:223
virtual void setRealm(const std::string a_realm) noexcept
Set the realm.
Definition: CD_SurfaceODESolverImplem.H:175
std::string m_name
Solver name.
Definition: CD_SurfaceODESolver.H:405
virtual void resetElectrodes(const Real a_value) noexcept
Reset m_phi on electrode cells.
Definition: CD_SurfaceODESolverImplem.H:622
virtual int getStep() const noexcept
Get current time step.
Definition: CD_SurfaceODESolverImplem.H:332
virtual void parseOptions() noexcept
Parse solver options.
Definition: CD_SurfaceODESolverImplem.H:62
void parsePlotVariables() noexcept
Parse plot variables.
Definition: CD_SurfaceODESolverImplem.H:130
virtual void setPhase(const phase::which_phase a_phase) noexcept
Set phase.
Definition: CD_SurfaceODESolverImplem.H:211
virtual void setAmr(const RefCountedPtr< AmrMesh > &a_amrMesh) noexcept
Set the amr object.
Definition: CD_SurfaceODESolverImplem.H:161
SurfaceODESolver()
Default constructor. Must subsequently set AmrMesh.
Definition: CD_SurfaceODESolverImplem.H:25
void parseRegrid() noexcept
Parse regrid method.
Definition: CD_SurfaceODESolverImplem.H:104
virtual void allocate() noexcept
Allocate internal storage for this class.
Definition: CD_SurfaceODESolverImplem.H:492
virtual Real getDt() const noexcept
Get last time step.
Definition: CD_SurfaceODESolverImplem.H:356
std::string getRealm() const noexcept
Get the realm where the solver is registered.
Definition: CD_SurfaceODESolverImplem.H:199
RefCountedPtr< AmrMesh > m_amr
AMR; needed for grid stuff.
Definition: CD_SurfaceODESolver.H:435
virtual void preRegrid(const int a_lbase, const int a_oldFinestLevel) noexcept
Pre-regrid function.
Definition: CD_SurfaceODESolverImplem.H:585
virtual ~SurfaceODESolver()
Destructor (does nothing).
Definition: CD_SurfaceODESolverImplem.H:52
virtual Real getTime() const noexcept
Get current time.
Definition: CD_SurfaceODESolverImplem.H:344
virtual void setVerbosity(const int a_verbosity) noexcept
Set verbosity.
Definition: CD_SurfaceODESolverImplem.H:235
virtual void writePlotData(LevelData< EBCellFAB > &a_output, int &a_comp, const std::string a_outputRealm, const int a_level) const noexcept
Write output data to a_output.
Definition: CD_SurfaceODESolverImplem.H:819
virtual void setPhi(const Real a_phi)
Convenience function for setting m_phi.
Definition: CD_SurfaceODESolverImplem.H:368
virtual Real computeMass(const int a_comp=0) const noexcept
Compute the total mass for component a_comp in m_phi.
Definition: CD_SurfaceODESolverImplem.H:273
virtual Vector< std::string > getPlotVariableNames() const noexcept
Get output plot names.
Definition: CD_SurfaceODESolverImplem.H:892
virtual void regrid(const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) noexcept
Regrid function.
Definition: CD_SurfaceODESolverImplem.H:603
virtual void registerOperators() noexcept
Register operators.
Definition: CD_SurfaceODESolverImplem.H:571
int m_verbosity
Solver verbosity.
Definition: CD_SurfaceODESolver.H:466
virtual void deallocate() noexcept
Deallocate internal storage.
Definition: CD_SurfaceODESolverImplem.H:509
virtual void parseRuntimeOptions() noexcept
Parse runtime solver options.
Definition: CD_SurfaceODESolverImplem.H:76
virtual void writePlotFile() const noexcept
Write a plot file.
Definition: CD_SurfaceODESolverImplem.H:766
virtual void setTime(const int a_step, const Real a_time, const Real a_dt) noexcept
Set the time.
Definition: CD_SurfaceODESolverImplem.H:259
void defineVoFIterators() noexcept
Define iterators for iterating over cell subsets.
Definition: CD_SurfaceODESolverImplem.H:522
virtual int getNumberOfPlotVariables() const noexcept
Get number of variables to be plotted.
Definition: CD_SurfaceODESolverImplem.H:870
virtual void resetDielectrics(const Real a_value) noexcept
Reset m_phi on dielectric cells.
Definition: CD_SurfaceODESolverImplem.H:667
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
Real sum(const Real &a_value) noexcept
Compute the sum across all MPI ranks.
Definition: CD_ParallelOpsImplem.H:353