18 #include <CD_Decorations.H>
20 #include <CD_NamespaceHeader.H>
57 const Vector<ProblemDomain>& a_domains,
58 const int a_tanGhosts);
69 const LevelData<EBCellFAB>& a_cellData,
70 const ProblemDomain& a_domain,
71 const int a_tanGhosts);
100 const Vector<ProblemDomain>& a_domains,
101 const int a_tanGhosts,
102 const Interval& a_faceVars,
103 const Interval& a_cellVars,
121 const LevelData<EBCellFAB>& a_cellData,
122 const ProblemDomain& a_domain,
123 const int a_tanGhosts,
124 const Interval& a_faceVars,
125 const Interval& a_cellVars,
147 const LevelData<EBFluxFAB>& a_fluxData,
148 const ProblemDomain& a_domain);
159 axby(LevelData<EBCellFAB>& a_lhs,
160 const LevelData<EBCellFAB>& a_x,
161 const LevelData<EBCellFAB>& a_y,
163 const Real a_b) noexcept;
172 compute(
EBAMRCellData& a_data,
const std::function<Real(
const Real a_cellValue)>& a_func) noexcept;
181 compute(LevelData<EBCellFAB>& a_data,
const std::function<Real(
const Real a_cellValue)>& a_func) noexcept;
202 dotProduct(LevelData<MFCellFAB>& a_result,
const LevelData<MFCellFAB>& a_data1,
const LevelData<MFCellFAB>& a_data2);
222 dotProduct(LevelData<EBCellFAB>& a_result,
const LevelData<EBCellFAB>& a_data1,
const LevelData<EBCellFAB>& a_data2);
232 dotProduct(EBCellFAB& a_result,
const EBCellFAB& a_data1,
const EBCellFAB& a_data2,
const Box& a_box);
258 filterSmooth(LevelData<EBCellFAB>& a_data,
const Real a_alpha,
const int a_stride,
const bool a_zeroEB) noexcept;
276 incr(LevelData<MFCellFAB>& a_lhs,
const LevelData<MFCellFAB>& a_rhs,
const Real a_scale) noexcept;
294 incr(LevelData<EBCellFAB>& a_lhs,
const LevelData<EBCellFAB>& a_rhs,
const Real& a_scale) noexcept;
312 incr(LevelData<EBFluxFAB>& a_lhs,
const LevelData<EBFluxFAB>& a_rhs,
const Real& a_scale);
321 incr(EBFluxFAB& a_lhs,
const EBFluxFAB& a_rhs,
const Real& a_scale);
339 incr(LevelData<BaseIVFAB<Real>>& a_lhs,
const LevelData<BaseIVFAB<Real>>& a_rhs,
const Real& a_scale);
357 incr(LevelData<DomainFluxIFFAB>& a_lhs,
const LevelData<DomainFluxIFFAB>& a_rhs,
const Real& a_scale);
377 incr(LevelData<EBCellFAB>& a_lhs,
const LevelData<BaseIVFAB<Real>>& a_rhs,
const Real a_scale);
397 incr(LevelData<BaseIVFAB<Real>>& a_lhs,
const LevelData<EBCellFAB>& a_rhs,
const Real a_scale);
430 template <
typename T>
452 divide(LevelData<EBCellFAB>& a_lhs,
const LevelData<EBCellFAB>& a_rhs,
const int a_lhsComp,
const int a_rhsComp);
468 divideByScalar(LevelData<EBCellFAB>& a_lhs,
const LevelData<EBCellFAB>& a_rhs);
487 divideFallback(LevelData<EBCellFAB>& a_numerator,
const LevelData<EBCellFAB>& a_denominator,
const Real a_fallback);
507 const LevelData<EBCellFAB>& a_denominator,
508 const LevelData<EBCellFAB>& a_fallback);
526 floor(LevelData<EBCellFAB>& a_lhs,
const Real a_value);
544 floor(LevelData<BaseIVFAB<Real>>& a_lhs,
const Real a_value);
562 roof(LevelData<EBCellFAB>& a_lhs,
const Real a_value);
580 roof(LevelData<BaseIVFAB<Real>>& a_lhs,
const Real a_value);
598 max(LevelData<EBCellFAB>& a_data,
const LevelData<EBCellFAB>& a_data1,
const LevelData<EBCellFAB>& a_data2);
619 getMaxMin(Real& a_max, Real& a_min, LevelData<EBCellFAB>& a_data,
const int a_comp);
640 getMaxMin(Real& a_max, Real& a_min, LevelData<EBFluxFAB>& a_data,
const int a_comp) noexcept;
650 getMaxMin(Vector<Real>& a_max, Vector<Real>& a_min, Vector<EBAMRCellData>& a_data);
669 getMaxMinNorm(Real& a_max, Real& a_min, LevelData<EBCellFAB>& data);
688 getMaxMinNorm(Real& a_max, Real& a_min, LevelData<BaseIVFAB<Real>>& data);
704 invert(LevelData<EBFluxFAB>& a_data);
721 kappaSum(Real& a_mass,
const LevelData<EBCellFAB>& a_lhs,
const int a_comp = 0);
735 kappaScale(LevelData<EBCellFAB>& a_data) noexcept;
749 kappaScale(LevelData<MFCellFAB>& a_data) noexcept;
774 multiply(LevelData<EBCellFAB>& a_lhs,
const LevelData<EBCellFAB>& a_rhs);
792 multiply(LevelData<EBFluxFAB>& a_lhs,
const LevelData<EBFluxFAB>& a_rhs);
810 multiply(LevelData<BaseIVFAB<Real>>& a_lhs,
const LevelData<BaseIVFAB<Real>>& a_rhs);
828 multiplyScalar(LevelData<EBCellFAB>& a_lhs,
const LevelData<EBCellFAB>& a_rhs);
846 multiplyScalar(LevelData<BaseIVFAB<Real>>& a_lhs,
const LevelData<BaseIVFAB<Real>>& a_rhs);
856 norm(
const LevelData<EBCellFAB>& a_data,
const int a_p,
const int a_comp = 0);
880 plus(LevelData<EBCellFAB>& a_lhs,
881 const LevelData<EBCellFAB>& a_rhs,
884 const int a_numComp);
900 scale(LevelData<MFCellFAB>& a_lhs,
const Real& a_scale) noexcept;
916 scale(LevelData<MFFluxFAB>& a_lhs,
const Real& a_scale);
940 scale(LevelData<EBCellFAB>& a_lhs,
const Real a_scale) noexcept;
956 scale(LevelData<EBFluxFAB>& a_lhs,
const Real a_scale);
964 scale(LevelData<BaseIVFAB<Real>>& a_lhs,
const Real& a_scale);
982 setCoveredValue(LevelData<EBCellFAB>& a_lhs,
const int a_comp,
const Real a_value);
1016 setCoveredValue(LevelData<EBFluxFAB>& a_lhs,
const int a_comp,
const Real a_value) noexcept;
1032 setCoveredValue(LevelData<EBFluxFAB>& a_lhs,
const Real a_value) noexcept;
1054 const std::function<Real(
const RealVect)>& a_function,
1055 const RealVect a_probLo,
1056 const Vector<Real>& a_dx,
1069 setValue(LevelData<MFCellFAB>& a_lhs,
1070 const std::function<Real(
const RealVect)>& a_function,
1071 const RealVect a_probLo,
1086 const std::function<Real(
const RealVect)>& a_function,
1087 const RealVect a_probLo,
1088 const Vector<Real>& a_dx,
1101 setValue(LevelData<EBCellFAB>& a_lhs,
1102 const std::function<Real(
const RealVect)>& a_function,
1103 const RealVect a_probLo,
1118 const std::function<Real(
const RealVect)>& a_function,
1119 const RealVect a_probLo,
1120 const Vector<Real>& a_dx,
1133 setValue(LevelData<EBFluxFAB>& a_lhs,
1134 const std::function<Real(
const RealVect)>& a_function,
1135 const RealVect a_probLo,
1150 const std::function<Real(
const RealVect)>& a_function,
1151 const RealVect a_probLo,
1152 const Vector<Real>& a_dx,
1165 setValue(LevelData<BaseIVFAB<Real>>& a_lhs,
1166 const std::function<Real(
const RealVect)>& a_function,
1167 const RealVect a_probLo,
1182 const std::function<RealVect(
const RealVect)>& a_function,
1183 const RealVect a_probLo,
1184 const Vector<Real>& a_dx);
1196 setValue(LevelData<EBCellFAB>& a_lhs,
1197 const std::function<RealVect(
const RealVect)>& a_function,
1198 const RealVect a_probLo,
1223 setValue(LevelData<EBCellFAB>& a_lhs,
const Real a_value,
const int a_comp);
1231 setValue(LevelData<EBCellFAB>& a_lhs,
const Real a_value);
1239 setValue(LevelData<EBFluxFAB>& a_lhs,
const Real a_value);
1247 setValue(LevelData<BaseIVFAB<Real>>& a_lhs,
const Real a_value);
1279 setValue(LevelData<MFCellFAB>& a_lhs,
const Real& a_value) noexcept;
1295 setValue(LevelData<MFFluxFAB>& a_lhs,
const Real& a_value);
1311 setValue(LevelData<MFBaseIVFAB>& a_lhs,
const Real& a_value);
1327 setValue(LevelData<DomainFluxIFFAB>& a_lhs,
const Real a_value);
1382 vectorLength(LevelData<EBCellFAB>& a_lhs,
const LevelData<EBCellFAB>& a_rhs);
1392 vectorLength(EBCellFAB& a_lhs,
const EBCellFAB& a_rhs,
const Box& box);
1410 vectorLength2(LevelData<EBCellFAB>& a_lhs,
const LevelData<EBCellFAB>& a_rhs);
1419 vectorLength2(EBCellFAB& a_lhs,
const EBCellFAB& a_rhs,
const Box& box);
1429 computeMinValidBox(RealVect& a_lo, RealVect& a_hi,
const RealVect a_normal,
const RealVect a_centroid);
1439 allCornersInsideEb(
const Vector<RealVect>& a_corners,
const RealVect a_normal,
const RealVect a_centroid);
1448 shiftCorners(Vector<RealVect>& a_corners,
const RealVect& a_distance);
1451 #include <CD_NamespaceFooter.H>
Declaration of averaging methods.
Average
Various averaging methods.
Definition: CD_Average.H:24
Implementation of CD_DataOps.H.
Class for holding data across EBAMR hierarchies.
Declaration of a class that allocates irregular data holders over the interface between two phases.
Agglomeration of useful data operations.
Definition: CD_DataOps.H:28
static void averageCellVelocityToFaceVelocity(EBAMRFluxData &a_faceData, const EBAMRCellData &a_cellData, const Vector< ProblemDomain > &a_domains, const int a_tanGhosts)
Routine which computes the average of a cell-centered quantity on faces for the normal component only...
Definition: CD_DataOps.cpp:27
static void scale(MFAMRCellData &a_lhs, const Real &a_scale) noexcept
Scale data by factor.
Definition: CD_DataOps.cpp:2384
static void averageFaceToCell(EBAMRCellData &a_cellData, const EBAMRFluxData &a_fluxData, const Vector< ProblemDomain > &a_domains)
Average all components of face centered data to cell centers.
Definition: CD_DataOps.cpp:369
static void divideFallback(EBAMRCellData &a_numerator, const EBAMRCellData &a_denominator, const Real a_fallback)
Divide data. If the denominator is zero, set the value to a fallback option.
Definition: CD_DataOps.cpp:1303
static void volumeScale(EBAMRCellData &a_data, const Vector< Real > &a_dx)
Scale data by dx^SpaceDim.
Definition: CD_DataOps.cpp:2132
static void vectorLength(EBAMRCellData &a_lhs, const EBAMRCellData &a_rhs)
Compute the vector length of a data holder. Sets a_lhs = |a_rhs| where a_rhs contains SpaceDim compon...
Definition: CD_DataOps.cpp:3396
static void getMaxMinNorm(Real &a_max, Real &a_min, EBAMRCellData &data)
Get maximum and minimum value of normed data.
Definition: CD_DataOps.cpp:1783
static void compute(EBAMRCellData &a_data, const std::function< Real(const Real a_cellValue)> &a_func) noexcept
Compute a new value given the old cell value.
Definition: CD_DataOps.cpp:480
static void floor(EBAMRCellData &a_lhs, const Real a_value)
Floor values in data holder. This sets all values below a_value to a_value.
Definition: CD_DataOps.cpp:1380
static void squareRoot(EBAMRFluxData &a_lhs)
Compute the square root of the input data.
Definition: CD_DataOps.cpp:3275
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 filterSmooth(EBAMRCellData &a_data, const Real a_alpha, const int a_stride, const bool a_zeroEB) noexcept
Apply a convolved filter phi = alpha * phi_i + 0.5*(1-alpha) * [phi_(i+s) + phi_(i-s)] in each direct...
Definition: CD_DataOps.cpp:660
static void divide(EBAMRCellData &a_lhs, const EBAMRCellData &a_rhs, const int a_lhsComp, const int a_rhsComp)
Divide one data holder by another. Does specified components.
Definition: CD_DataOps.cpp:1160
static void max(EBAMRCellData &a_data, const EBAMRCellData &a_data1, const EBAMRCellData &a_data2)
Make a_data = max(a_data1, a_data2)
Definition: CD_DataOps.cpp:1576
static void setInvalidValue(EBAMRCellData &a_lhs, const Vector< int > &a_refRat, const Real a_value)
Set value in cells that are covered by a finer grid.
Definition: CD_DataOps.cpp:2649
static void computeMinValidBox(RealVect &a_lo, RealVect &a_hi, const RealVect a_normal, const RealVect a_centroid)
Compute the tightest possible valid box around a cut-cell volume.
Definition: CD_DataOps.cpp:3567
static void getMaxMin(Real &max, Real &min, EBAMRCellData &a_data, const int a_comp)
Get maximum and minimum value of specified component.
Definition: CD_DataOps.cpp:1637
static void shiftCorners(Vector< RealVect > &a_corners, const RealVect &a_distance)
Shift pointes by a specified distance.
Definition: CD_DataOps.cpp:3651
static void divideByScalar(EBAMRCellData &a_lhs, const EBAMRCellData &a_rhs)
Divide all components in a data holder by a scalar value.
Definition: CD_DataOps.cpp:1196
static void multiply(EBAMRCellData &a_lhs, const EBAMRCellData &a_rhs)
Multiply data holder by another data holder.
Definition: CD_DataOps.cpp:2142
static void kappaScale(EBAMRCellData &a_data) noexcept
Scale data by volume fraction.
Definition: CD_DataOps.cpp:2044
static void invert(EBFluxFAB &a_data)
Invert data.
static void sum(Real &a_value)
Compute the sum of the input value.
Definition: CD_DataOps.cpp:3258
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 setCoveredValue(EBAMRCellData &a_lhs, const int a_comp, const Real a_value)
Set value in covered cells. Does specified component.
Definition: CD_DataOps.cpp:2538
static void dotProduct(MFAMRCellData &a_result, const MFAMRCellData &a_data1, const MFAMRCellData &a_data2)
Compote the cell-wise dot product between two data holders.
Definition: CD_DataOps.cpp:533
static void roof(EBAMRCellData &a_lhs, const Real a_value)
Roof values in data holder. This sets all values above a_value to a_value.
Definition: CD_DataOps.cpp:1478
static bool allCornersInsideEb(const Vector< RealVect > &a_corners, const RealVect a_normal, const RealVect a_centroid)
Check if all corners/points are inside an EB.
Definition: CD_DataOps.cpp:3634
static void invert(EBAMRFluxData &a_data)
Invert data.
Definition: CD_DataOps.cpp:1933
static Real norm(const LevelData< EBCellFAB > &a_data, const int a_p, const int a_comp=0)
Compute specified norm of data.
Definition: CD_DataOps.cpp:2316
static void plus(EBAMRCellData &a_lhs, const EBAMRCellData &a_rhs, const int a_srcComp, const int a_dstComp, const int a_numComp)
General addition operator for adding together data. The user can choose which components to add.
Definition: CD_DataOps.cpp:852
static void kappaSum(Real &a_mass, const LevelData< EBCellFAB > &a_lhs, const int a_comp=0)
Compute the kappa-weighted sum of the input data. Assumes one component.
Definition: CD_DataOps.cpp:2000
static void averageCellToFace(EBAMRFluxData &a_faceData, const EBAMRCellData &a_cellData, const Vector< ProblemDomain > &a_domains)
Average all components of the cell-centered data to faces.
Definition: CD_DataOps.cpp:153
static void vectorLength2(EBAMRCellData &a_lhs, const EBAMRCellData &a_rhs)
Compute the squared vector length of a data holder. Sets a_lhs = |a_rhs|^2 where a_rhs contains Space...
Definition: CD_DataOps.cpp:3483
static void copy(MFAMRCellData &a_dst, const MFAMRCellData &a_src)
Copy data from one data holder to another.
Definition: CD_DataOps.cpp:1118
static void multiplyScalar(EBAMRCellData &a_lhs, const EBAMRCellData &a_rhs)
Multiply data holder by another data holder.
Definition: CD_DataOps.cpp:2239
static void axby(LevelData< EBCellFAB > &a_lhs, const LevelData< EBCellFAB > &a_x, const LevelData< EBCellFAB > &a_y, const Real a_a, const Real a_b) noexcept
Compute lhs = a * x + b * y.
Definition: CD_DataOps.cpp:460
Class for holding BaseIVFAB<T> on the interface between two phases.
Definition: CD_MFInterfaceFAB.H:30
Real min(const Real &a_input) noexcept
Get the minimum of the input, reduced over MPI ranks (in the Chombo communicator)
Definition: CD_ParallelOpsImplem.H:58