Chombo + EB + MF  3.2
MFArith.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _MFARITH_H_
12 #define _MFARITH_H_
13 
14 #include "EBArith.H"
15 
16 #include "MFCellFAB.H"
17 #include "EBISLayout.H"
18 #include "NamespaceHeader.H"
19 ///
20 /**
21  class to encapsulate the common arithmetic operations
22  for mffabs
23  */
24 class MFArith
25 {
26 public:
27  ///
28  /**
29  */
30  static int orderScript(int icomp, int inorm, int ncomp);
31  ///
32  /**
33  */
34  static void
35  compareError(Vector<Real>& a_orders,
36  const Vector< LevelData<MFCellFAB>* >& a_errorFine,
37  const Vector< LevelData<MFCellFAB>* >& a_errorCoar,
38  const Vector< DisjointBoxLayout >& a_gridsFine,
39  const Vector< DisjointBoxLayout >& a_gridsCoar,
40  const Vector< Vector<EBISLayout> >& a_ebislvFine,
41  const Vector< Vector<EBISLayout> >& a_ebislvCoar,
42  const Vector<int>& a_refRat,
43  const Box& a_coarseDom,
44  int a_testverbosity);
45 
46  ///
47  /** return l-p norm of a_src.
48  if p==0, v
49  norm returned is Max(abs(a_src)) over
50  uncovered regions. otherwise,
51  returns 1/vol(sum(volfrac*a_src(iv,comp)**p)^(1/p))
52  of component comp of a_src
53  weighted by local volume fraction and
54  also returns volume of uncovered regions.
55  Only uncovered regions count here.
56  The data must have the same layout as a_layout with
57  the possible exception of ghost cells.
58 
59  int pmode = -2; //norm = (1/v)(sum(phi dv)) ---no absolute values and multiply kappa as you go
60  int pmode = -1; //norm = (1/v)(sum(phi dv)) ---no absolute values and assume kappa already multiplied in
61 
62  */
63  static
64  Real
65  norm(const Vector< LevelData<MFCellFAB>* >& a_data,
66  const Vector< DisjointBoxLayout > & a_layout,
67  const Vector< Vector<EBISLayout> >& a_ebislv,
68  const Vector< int >& a_refRatio,
69  const int& a_comp,
70  const int& a_p,
72 
73  static
74  Real
76  const Vector< DisjointBoxLayout >& a_grids,
77  const Vector< Vector<EBISLayout> >& a_ebislv,
78  const ProblemDomain& a_coarDomain,
79  const Vector<int>& a_refRatio,
80  const int& a_coarBoundaryExclusion,
81  const int& a_comp,
82  const int& a_pval,
84 
85  static
86  void
87  normByPhase(Vector<Real>& a_phaseNorms,
88  const Vector< LevelData<MFCellFAB>* >& a_data,
89  const Vector< DisjointBoxLayout > & a_layout,
90  const Vector< Vector<EBISLayout> >& a_ebislv,
91  const Vector< int >& a_refRatio,
92  const int& a_comp,
93  const int& a_p,
95 
96 };
97 
98 #include "NamespaceFooter.H"
99 #endif
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
static void normByPhase(Vector< Real > &a_phaseNorms, const Vector< LevelData< MFCellFAB > * > &a_data, const Vector< DisjointBoxLayout > &a_layout, const Vector< Vector< EBISLayout > > &a_ebislv, const Vector< int > &a_refRatio, const int &a_comp, const int &a_p, EBNormType::NormMode=EBNormType::OverBoth)
static Real norm(const Vector< LevelData< MFCellFAB > * > &a_data, const Vector< DisjointBoxLayout > &a_layout, const Vector< Vector< EBISLayout > > &a_ebislv, const Vector< int > &a_refRatio, const int &a_comp, const int &a_p, EBNormType::NormMode=EBNormType::OverBoth)
double Real
Definition: REAL.H:33
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
static Real normBoundaryExcluded(const Vector< LevelData< MFCellFAB > * > &a_src, const Vector< DisjointBoxLayout > &a_grids, const Vector< Vector< EBISLayout > > &a_ebislv, const ProblemDomain &a_coarDomain, const Vector< int > &a_refRatio, const int &a_coarBoundaryExclusion, const int &a_comp, const int &a_pval, EBNormType::NormMode=EBNormType::OverBoth)
static int orderScript(int icomp, int inorm, int ncomp)
Definition: MFArith.H:24
Definition: EBArith.H:54
NormMode
Definition: EBArith.H:50
static void compareError(Vector< Real > &a_orders, const Vector< LevelData< MFCellFAB > * > &a_errorFine, const Vector< LevelData< MFCellFAB > * > &a_errorCoar, const Vector< DisjointBoxLayout > &a_gridsFine, const Vector< DisjointBoxLayout > &a_gridsCoar, const Vector< Vector< EBISLayout > > &a_ebislvFine, const Vector< Vector< EBISLayout > > &a_ebislvCoar, const Vector< int > &a_refRat, const Box &a_coarseDom, int a_testverbosity)