12 #ifndef CD_DataOpsImplem_H
13 #define CD_DataOpsImplem_H
19 #include <CD_NamespaceHeader.H>
25 CH_TIME(
"DataOps::setValue");
27 const DisjointBoxLayout& dbl = a_lhs.disjointBoxLayout();
28 const DataIterator& dit = dbl.dataIterator();
30 const int nbox = dit.size();
32 #pragma omp parallel for schedule(runtime)
33 for (
int mybox = 0; mybox < nbox; mybox++) {
34 const DataIndex& din = dit[mybox];
36 a_lhs[din].setVal(a_value);
44 return ((a_value > 0.0) - (a_value < 0.0));
51 CH_TIME(
"DataOps::copy(EBAMRData)");
53 CH_assert(a_dst.
size() == a_src.
size());
54 CH_assert(a_dstInterv.size() == a_srcInterv.size());
56 for (
int lvl = 0; lvl < a_dst.
size(); lvl++) {
57 CH_assert(a_dst[lvl]->nComp() > a_dstInterv.end());
58 CH_assert(a_src[lvl]->nComp() > a_srcInterv.end());
60 a_src[lvl]->localCopyTo(a_srcInterv, *a_dst[lvl], a_dstInterv);
64 #include <CD_NamespaceFooter.H>
static int sgn(const T a_value)
Sign function. Returns +/- if the value is > 0 or < 0.
Definition: CD_DataOpsImplem.H:42
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 copy(MFAMRCellData &a_dst, const MFAMRCellData &a_src)
Copy data from one data holder to another.
Definition: CD_DataOps.cpp:1118
Default class for holding LevelData<T> data across an EBAMR realm.
Definition: CD_EBAMRData.H:40
int size() const noexcept
Get size of m_data.
Definition: CD_EBAMRDataImplem.H:66
Class for holding BaseIVFAB<T> on the interface between two phases.
Definition: CD_MFInterfaceFAB.H:30