chombo-discharge
CD_DataOps.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2021 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 #ifndef CD_DataOps_H
13 #define CD_DataOps_H
14 
15 // Our includes
16 #include <CD_Average.H>
17 #include <CD_EBAMRData.H>
18 #include <CD_Decorations.H>
19 #include <CD_MFInterfaceFAB.H>
20 #include <CD_NamespaceHeader.H>
21 
27 class DataOps
28 {
29 public:
35  template <typename T>
36  static void
37  setValue(LevelData<MFInterfaceFAB<T>>& a_lhs, const T& a_value);
38 
43  template <typename T>
44  static int
45  sgn(const T a_value);
46 
54  static void
56  const EBAMRCellData& a_cellData,
57  const Vector<ProblemDomain>& a_domains,
58  const int a_tanGhosts);
59 
67  static void
68  averageCellVelocityToFaceVelocity(LevelData<EBFluxFAB>& a_faceData,
69  const LevelData<EBCellFAB>& a_cellData,
70  const ProblemDomain& a_domain,
71  const int a_tanGhosts);
72 
81  static void
82  averageCellToFace(EBAMRFluxData& a_faceData, const EBAMRCellData& a_cellData, const Vector<ProblemDomain>& a_domains);
83 
97  static void
98  averageCellToFace(EBAMRFluxData& a_faceData,
99  const EBAMRCellData& a_cellData,
100  const Vector<ProblemDomain>& a_domains,
101  const int a_tanGhosts,
102  const Interval& a_faceVars,
103  const Interval& a_cellVars,
104  const Average& a_average);
105 
119  static void
120  averageCellToFace(LevelData<EBFluxFAB>& a_faceData,
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,
126  const Average& a_average);
127 
135  static void
136  averageFaceToCell(EBAMRCellData& a_cellData, const EBAMRFluxData& a_fluxData, const Vector<ProblemDomain>& a_domains);
137 
145  static void
146  averageFaceToCell(LevelData<EBCellFAB>& a_cellData,
147  const LevelData<EBFluxFAB>& a_fluxData,
148  const ProblemDomain& a_domain);
149 
158  static void
159  axby(LevelData<EBCellFAB>& a_lhs,
160  const LevelData<EBCellFAB>& a_x,
161  const LevelData<EBCellFAB>& a_y,
162  const Real a_a,
163  const Real a_b) noexcept;
164 
171  static void
172  compute(EBAMRCellData& a_data, const std::function<Real(const Real a_cellValue)>& a_func) noexcept;
173 
180  static void
181  compute(LevelData<EBCellFAB>& a_data, const std::function<Real(const Real a_cellValue)>& a_func) noexcept;
182 
190  static void
191  dotProduct(MFAMRCellData& a_result, const MFAMRCellData& a_data1, const MFAMRCellData& a_data2);
192 
201  static void
202  dotProduct(LevelData<MFCellFAB>& a_result, const LevelData<MFCellFAB>& a_data1, const LevelData<MFCellFAB>& a_data2);
203 
211  static void
212  dotProduct(EBAMRCellData& a_result, const EBAMRCellData& a_data1, const EBAMRCellData& a_data2);
213 
221  static void
222  dotProduct(LevelData<EBCellFAB>& a_result, const LevelData<EBCellFAB>& a_data1, const LevelData<EBCellFAB>& a_data2);
223 
231  static void
232  dotProduct(EBCellFAB& a_result, const EBCellFAB& a_data1, const EBCellFAB& a_data2, const Box& a_box);
233 
244  static void
245  filterSmooth(EBAMRCellData& a_data, const Real a_alpha, const int a_stride, const bool a_zeroEB) noexcept;
246 
257  static void
258  filterSmooth(LevelData<EBCellFAB>& a_data, const Real a_alpha, const int a_stride, const bool a_zeroEB) noexcept;
259 
266  static void
267  incr(MFAMRCellData& a_lhs, const MFAMRCellData& a_rhs, const Real a_scale) noexcept;
268 
275  static void
276  incr(LevelData<MFCellFAB>& a_lhs, const LevelData<MFCellFAB>& a_rhs, const Real a_scale) noexcept;
277 
284  static void
285  incr(EBAMRCellData& a_lhs, const EBAMRCellData& a_rhs, const Real& a_scale) noexcept;
286 
293  static void
294  incr(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs, const Real& a_scale) noexcept;
295 
302  static void
303  incr(EBAMRFluxData& a_lhs, const EBAMRFluxData& a_rhs, const Real& a_scale);
304 
311  static void
312  incr(LevelData<EBFluxFAB>& a_lhs, const LevelData<EBFluxFAB>& a_rhs, const Real& a_scale);
313 
320  static void
321  incr(EBFluxFAB& a_lhs, const EBFluxFAB& a_rhs, const Real& a_scale);
322 
329  static void
330  incr(EBAMRIVData& a_lhs, const EBAMRIVData& a_rhs, const Real& a_scale);
331 
338  static void
339  incr(LevelData<BaseIVFAB<Real>>& a_lhs, const LevelData<BaseIVFAB<Real>>& a_rhs, const Real& a_scale);
340 
347  static void
348  incr(EBAMRIFData& a_lhs, const EBAMRIFData& a_rhs, const Real& a_scale);
349 
356  static void
357  incr(LevelData<DomainFluxIFFAB>& a_lhs, const LevelData<DomainFluxIFFAB>& a_rhs, const Real& a_scale);
358 
366  static void
367  incr(EBAMRCellData& a_lhs, const EBAMRIVData& a_rhs, const Real a_scale);
368 
376  static void
377  incr(LevelData<EBCellFAB>& a_lhs, const LevelData<BaseIVFAB<Real>>& a_rhs, const Real a_scale);
378 
386  static void
387  incr(EBAMRIVData& a_lhs, const EBAMRCellData& a_rhs, const Real a_scale);
388 
396  static void
397  incr(LevelData<BaseIVFAB<Real>>& a_lhs, const LevelData<EBCellFAB>& a_rhs, const Real a_scale);
398 
404  static void
405  copy(MFAMRCellData& a_dst, const MFAMRCellData& a_src);
406 
412  static void
413  copy(EBAMRCellData& a_dst, const EBAMRCellData& a_src);
414 
420  static void
421  copy(EBAMRIVData& a_dst, const EBAMRIVData& a_src);
422 
430  template <typename T>
431  static void
432  copy(EBAMRData<T>& a_dst, const EBAMRData<T>& a_src, const Interval a_dstInterv, const Interval a_srcInterv);
433 
441  static void
442  divide(EBAMRCellData& a_lhs, const EBAMRCellData& a_rhs, const int a_lhsComp, const int a_rhsComp);
443 
451  static void
452  divide(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs, const int a_lhsComp, const int a_rhsComp);
453 
459  static void
460  divideByScalar(EBAMRCellData& a_lhs, const EBAMRCellData& a_rhs);
461 
467  static void
468  divideByScalar(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs);
469 
476  static void
477  divideFallback(EBAMRCellData& a_numerator, const EBAMRCellData& a_denominator, const Real a_fallback);
478 
486  static void
487  divideFallback(LevelData<EBCellFAB>& a_numerator, const LevelData<EBCellFAB>& a_denominator, const Real a_fallback);
488 
495  static void
496  divideFallback(EBAMRCellData& a_numerator, const EBAMRCellData& a_denominator, const EBAMRCellData& a_fallback);
497 
505  static void
506  divideFallback(LevelData<EBCellFAB>& a_numerator,
507  const LevelData<EBCellFAB>& a_denominator,
508  const LevelData<EBCellFAB>& a_fallback);
509 
516  static void
517  floor(EBAMRCellData& a_lhs, const Real a_value);
518 
525  static void
526  floor(LevelData<EBCellFAB>& a_lhs, const Real a_value);
527 
534  static void
535  floor(EBAMRIVData& a_lhs, const Real a_value);
536 
543  static void
544  floor(LevelData<BaseIVFAB<Real>>& a_lhs, const Real a_value);
545 
552  static void
553  roof(EBAMRCellData& a_lhs, const Real a_value);
554 
561  static void
562  roof(LevelData<EBCellFAB>& a_lhs, const Real a_value);
563 
570  static void
571  roof(EBAMRIVData& a_lhs, const Real a_value);
572 
579  static void
580  roof(LevelData<BaseIVFAB<Real>>& a_lhs, const Real a_value);
581 
588  static void
589  max(EBAMRCellData& a_data, const EBAMRCellData& a_data1, const EBAMRCellData& a_data2);
590 
597  static void
598  max(LevelData<EBCellFAB>& a_data, const LevelData<EBCellFAB>& a_data1, const LevelData<EBCellFAB>& a_data2);
599 
608  static void
609  getMaxMin(Real& max, Real& min, EBAMRCellData& a_data, const int a_comp);
610 
618  static void
619  getMaxMin(Real& a_max, Real& a_min, LevelData<EBCellFAB>& a_data, const int a_comp);
620 
629  static void
630  getMaxMin(Real& a_max, Real& a_min, EBAMRFluxData& a_data, const int a_comp) noexcept;
631 
639  static void
640  getMaxMin(Real& a_max, Real& a_min, LevelData<EBFluxFAB>& a_data, const int a_comp) noexcept;
641 
649  static void
650  getMaxMin(Vector<Real>& a_max, Vector<Real>& a_min, Vector<EBAMRCellData>& a_data);
651 
659  static void
660  getMaxMinNorm(Real& a_max, Real& a_min, EBAMRCellData& data);
661 
668  static void
669  getMaxMinNorm(Real& a_max, Real& a_min, LevelData<EBCellFAB>& data);
670 
678  static void
679  getMaxMinNorm(Real& a_max, Real& a_min, EBAMRIVData& data);
680 
687  static void
688  getMaxMinNorm(Real& a_max, Real& a_min, LevelData<BaseIVFAB<Real>>& data);
689 
695  static void
696  invert(EBAMRFluxData& a_data);
697 
703  static void
704  invert(LevelData<EBFluxFAB>& a_data);
705 
711  static void
712  invert(EBFluxFAB& a_data);
713 
720  static void
721  kappaSum(Real& a_mass, const LevelData<EBCellFAB>& a_lhs, const int a_comp = 0);
722 
727  static void
728  kappaScale(EBAMRCellData& a_data) noexcept;
729 
734  static void
735  kappaScale(LevelData<EBCellFAB>& a_data) noexcept;
736 
741  static void
742  kappaScale(MFAMRCellData& a_data) noexcept;
743 
748  static void
749  kappaScale(LevelData<MFCellFAB>& a_data) noexcept;
750 
755  static void
756  volumeScale(EBAMRCellData& a_data, const Vector<Real>& a_dx);
757 
764  static void
765  multiply(EBAMRCellData& a_lhs, const EBAMRCellData& a_rhs);
766 
773  static void
774  multiply(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs);
775 
782  static void
783  multiply(EBAMRFluxData& a_lhs, const EBAMRFluxData& a_rhs);
784 
791  static void
792  multiply(LevelData<EBFluxFAB>& a_lhs, const LevelData<EBFluxFAB>& a_rhs);
793 
800  static void
801  multiply(EBAMRIVData& a_lhs, const EBAMRIVData& a_rhs);
802 
809  static void
810  multiply(LevelData<BaseIVFAB<Real>>& a_lhs, const LevelData<BaseIVFAB<Real>>& a_rhs);
811 
818  static void
819  multiplyScalar(EBAMRCellData& a_lhs, const EBAMRCellData& a_rhs);
820 
827  static void
828  multiplyScalar(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs);
829 
836  static void
837  multiplyScalar(EBAMRIVData& a_lhs, const EBAMRIVData& a_rhs);
838 
845  static void
846  multiplyScalar(LevelData<BaseIVFAB<Real>>& a_lhs, const LevelData<BaseIVFAB<Real>>& a_rhs);
847 
855  static Real
856  norm(const LevelData<EBCellFAB>& a_data, const int a_p, const int a_comp = 0);
857 
867  static void
868  plus(EBAMRCellData& a_lhs, const EBAMRCellData& a_rhs, const int a_srcComp, const int a_dstComp, const int a_numComp);
869 
879  static void
880  plus(LevelData<EBCellFAB>& a_lhs,
881  const LevelData<EBCellFAB>& a_rhs,
882  const int a_srcComp,
883  const int a_dstComp,
884  const int a_numComp);
885 
891  static void
892  scale(MFAMRCellData& a_lhs, const Real& a_scale) noexcept;
893 
899  static void
900  scale(LevelData<MFCellFAB>& a_lhs, const Real& a_scale) noexcept;
901 
907  static void
908  scale(MFAMRFluxData& a_lhs, const Real& a_scale);
909 
915  static void
916  scale(LevelData<MFFluxFAB>& a_lhs, const Real& a_scale);
917 
923  static void
924  scale(EBAMRIVData& a_lhs, const Real& a_scale);
925 
931  static void
932  scale(EBAMRCellData& a_lhs, const Real a_scale) noexcept;
933 
939  static void
940  scale(LevelData<EBCellFAB>& a_lhs, const Real a_scale) noexcept;
941 
947  static void
948  scale(EBAMRFluxData& a_lhs, const Real a_scale);
949 
955  static void
956  scale(LevelData<EBFluxFAB>& a_lhs, const Real a_scale);
957 
963  static void
964  scale(LevelData<BaseIVFAB<Real>>& a_lhs, const Real& a_scale);
965 
972  static void
973  setCoveredValue(EBAMRCellData& a_lhs, const int a_comp, const Real a_value);
974 
981  static void
982  setCoveredValue(LevelData<EBCellFAB>& a_lhs, const int a_comp, const Real a_value);
983 
989  static void
990  setCoveredValue(EBAMRCellData& a_lhs, const Real a_value);
991 
997  static void
998  setCoveredValue(LevelData<EBCellFAB>& a_lhs, const Real a_value);
999 
1006  static void
1007  setCoveredValue(EBAMRFluxData& a_lhs, const int a_comp, const Real a_value) noexcept;
1008 
1015  static void
1016  setCoveredValue(LevelData<EBFluxFAB>& a_lhs, const int a_comp, const Real a_value) noexcept;
1017 
1023  static void
1024  setCoveredValue(EBAMRFluxData& a_lhs, const Real a_value) noexcept;
1025 
1031  static void
1032  setCoveredValue(LevelData<EBFluxFAB>& a_lhs, const Real a_value) noexcept;
1033 
1040  static void
1041  setInvalidValue(EBAMRCellData& a_lhs, const Vector<int>& a_refRat, const Real a_value);
1042 
1052  static void
1053  setValue(MFAMRCellData& a_lhs,
1054  const std::function<Real(const RealVect)>& a_function,
1055  const RealVect a_probLo,
1056  const Vector<Real>& a_dx,
1057  const int a_comp);
1058 
1068  static void
1069  setValue(LevelData<MFCellFAB>& a_lhs,
1070  const std::function<Real(const RealVect)>& a_function,
1071  const RealVect a_probLo,
1072  const Real a_dx,
1073  const int a_comp);
1074 
1084  static void
1085  setValue(EBAMRCellData& a_lhs,
1086  const std::function<Real(const RealVect)>& a_function,
1087  const RealVect a_probLo,
1088  const Vector<Real>& a_dx,
1089  const int a_comp);
1090 
1100  static void
1101  setValue(LevelData<EBCellFAB>& a_lhs,
1102  const std::function<Real(const RealVect)>& a_function,
1103  const RealVect a_probLo,
1104  const Real a_dx,
1105  const int a_comp);
1106 
1116  static void
1117  setValue(EBAMRFluxData& a_lhs,
1118  const std::function<Real(const RealVect)>& a_function,
1119  const RealVect a_probLo,
1120  const Vector<Real>& a_dx,
1121  const int a_comp);
1122 
1132  static void
1133  setValue(LevelData<EBFluxFAB>& a_lhs,
1134  const std::function<Real(const RealVect)>& a_function,
1135  const RealVect a_probLo,
1136  const Real a_dx,
1137  const int a_comp);
1138 
1148  static void
1149  setValue(EBAMRIVData& a_lhs,
1150  const std::function<Real(const RealVect)>& a_function,
1151  const RealVect a_probLo,
1152  const Vector<Real>& a_dx,
1153  const int a_comp);
1154 
1164  static void
1165  setValue(LevelData<BaseIVFAB<Real>>& a_lhs,
1166  const std::function<Real(const RealVect)>& a_function,
1167  const RealVect a_probLo,
1168  const Real a_dx,
1169  const int a_comp);
1170 
1180  static void
1181  setValue(EBAMRCellData& a_lhs,
1182  const std::function<RealVect(const RealVect)>& a_function,
1183  const RealVect a_probLo,
1184  const Vector<Real>& a_dx);
1185 
1195  static void
1196  setValue(LevelData<EBCellFAB>& a_lhs,
1197  const std::function<RealVect(const RealVect)>& a_function,
1198  const RealVect a_probLo,
1199  const Real a_dx);
1200 
1206  static void
1207  setValue(EBAMRCellData& a_lhs, const Real& a_value);
1208 
1214  static void
1215  setValue(EBAMRCellData& a_lhs, const Real a_value, const int a_comp);
1216 
1222  static void
1223  setValue(LevelData<EBCellFAB>& a_lhs, const Real a_value, const int a_comp);
1224 
1230  static void
1231  setValue(LevelData<EBCellFAB>& a_lhs, const Real a_value);
1232 
1238  static void
1239  setValue(LevelData<EBFluxFAB>& a_lhs, const Real a_value);
1240 
1246  static void
1247  setValue(LevelData<BaseIVFAB<Real>>& a_lhs, const Real a_value);
1248 
1254  static void
1255  setValue(EBAMRFluxData& a_lhs, const Real& a_value);
1256 
1262  static void
1263  setValue(EBAMRIVData& a_lhs, const Real& a_value);
1264 
1270  static void
1271  setValue(MFAMRCellData& a_lhs, const Real& a_value) noexcept;
1272 
1278  static void
1279  setValue(LevelData<MFCellFAB>& a_lhs, const Real& a_value) noexcept;
1280 
1286  static void
1287  setValue(MFAMRFluxData& a_lhs, const Real& a_value);
1288 
1294  static void
1295  setValue(LevelData<MFFluxFAB>& a_lhs, const Real& a_value);
1296 
1302  static void
1303  setValue(MFAMRIVData& a_lhs, const Real& a_value);
1304 
1310  static void
1311  setValue(LevelData<MFBaseIVFAB>& a_lhs, const Real& a_value);
1312 
1318  static void
1319  setValue(EBAMRIFData& a_lhs, const Real a_value);
1320 
1326  static void
1327  setValue(LevelData<DomainFluxIFFAB>& a_lhs, const Real a_value);
1328 
1333  static void
1334  sum(Real& a_value);
1335 
1341  static void
1342  squareRoot(EBAMRFluxData& a_lhs);
1343 
1349  static void
1350  squareRoot(LevelData<EBFluxFAB>& a_lhs);
1351 
1356  static void
1357  squareRoot(MFAMRCellData& a_data);
1358 
1363  static void
1364  squareRoot(LevelData<MFCellFAB>& a_data);
1365 
1372  static void
1373  vectorLength(EBAMRCellData& a_lhs, const EBAMRCellData& a_rhs);
1374 
1381  static void
1382  vectorLength(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs);
1383 
1391  static void
1392  vectorLength(EBCellFAB& a_lhs, const EBCellFAB& a_rhs, const Box& box);
1393 
1400  static void
1401  vectorLength2(EBAMRCellData& a_lhs, const EBAMRCellData& a_rhs);
1402 
1409  static void
1410  vectorLength2(LevelData<EBCellFAB>& a_lhs, const LevelData<EBCellFAB>& a_rhs);
1411 
1418  static void
1419  vectorLength2(EBCellFAB& a_lhs, const EBCellFAB& a_rhs, const Box& box);
1420 
1428  static void
1429  computeMinValidBox(RealVect& a_lo, RealVect& a_hi, const RealVect a_normal, const RealVect a_centroid);
1430 
1438  static bool
1439  allCornersInsideEb(const Vector<RealVect>& a_corners, const RealVect a_normal, const RealVect a_centroid);
1440 
1447  static void
1448  shiftCorners(Vector<RealVect>& a_corners, const RealVect& a_distance);
1449 };
1450 
1451 #include <CD_NamespaceFooter.H>
1452 
1453 #include <CD_DataOpsImplem.H>
1454 
1455 #endif
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