Chombo + EB  3.2
AdvectDiffuseUtils.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 _ADVECTDIFFUSEUTILS_H_
12 #define _ADVECTDIFFUSEUTILS_H_
13 
14 #include <cmath>
15 
16 #include "AMR.H"
18 #include "AdvectTestIBC.H"
19 #include "AdvectionFunctions.H"
20 #include "memtrack.H"
21 #include "parstream.H"
22 
23 #include "NamespaceHeader.H"
24 
25 ///
26 /**
27  */
28 extern void
30  Real& a_dx);
31 
32 ///
33 /**
34 **/
35 extern Real
36 dtgNorm(const Vector< LevelData<FArrayBox>* >& a_src,
37  const Vector< DisjointBoxLayout >& a_grids,
38  const Vector<int>& a_refRatio,
39  const ProblemDomain& a_coarseDom,
40  const int& a_comp,
41  const int& a_pval);
42 
43 ///
44 /**
45 **/
46 extern void
47 compareError(Vector<Real>& a_orders,
48  const Vector< LevelData<FArrayBox>* >& a_errorFine,
49  const Vector< LevelData<FArrayBox>* >& a_errorCoar,
50  const Vector< DisjointBoxLayout >& a_gridsFine,
51  const Vector< DisjointBoxLayout >& a_gridsCoar,
52  const Vector<int>& a_refRat,
53  const ProblemDomain& a_coarseDom,
54  int a_testverbosity);
55 
56 
57 ///
58 /**
59  */
60 extern void
62  const Vector< LevelData<FArrayBox>* >& a_solnCoar,
63  const Vector< DisjointBoxLayout >& a_gridsCoar,
64  const ProblemDomain& a_level0DomainCoar,
65  const Vector< LevelData<FArrayBox>* >& a_solnFine,
66  const Vector< DisjointBoxLayout >& a_gridsFine,
67  const ProblemDomain& a_level0DomainFine,
68  const Vector<int>& a_refRat);
69 ///
70 /**
71 **/
72 extern void
73 coarsenBoxes(Vector< Vector<Box> >& a_boxesCoar,
74  const Vector<Vector<Box> >& a_boxesFine,
75  int a_refToCoar);
76 ///
77 /*****/
78 extern void
79 getBoxes(Vector<Vector<Box> >& a_boxes,
80  Vector<int>& a_refRat,
81  const Box& a_domain);
82 
83 ///
84 /**
85  */
86 extern void
88 
89 ///
90 /**
91  */
92 extern void
94 
95 ///
96 /**
97  */
98 extern void
100  AdvectionVelocityFunction& a_velFunc,
101  AdvectPhysics & a_advPhys);
102 
103 ///
104 /**
105  */
106 extern void
108 
109 ///
110 /**
111  */
112 extern void
113 defineAMR(AMR& a_amr,
115  const ProblemDomain& a_prob_domain,
116  const Vector<int>& a_refRat);
117 
118 ///
119 /**
120  */
121 extern void
122 setupAMRForAMRRun(AMR& a_amr);
123 
124 /****/
125 
126 #include "NamespaceFooter.H"
127 
128 #endif
Real(* AdvectionVelocityFunction)(const RealVect &a_point, const int &a_velComp)
Velocity function interface.
Definition: AdvectionFunctions.H:23
A reference-counting handle class.
Definition: RefCountedPtr.H:173
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
one dimensional dynamic array
Definition: Vector.H:53
void compareError(Vector< Real > &a_orders, const Vector< LevelData< FArrayBox > * > &a_errorFine, const Vector< LevelData< FArrayBox > * > &a_errorCoar, const Vector< DisjointBoxLayout > &a_gridsFine, const Vector< DisjointBoxLayout > &a_gridsCoar, const Vector< int > &a_refRat, const ProblemDomain &a_coarseDom, int a_testverbosity)
void getAdvectTestIBC(RefCountedPtr< AdvectTestIBC > &a_advPhys)
void getAMRLADFactory(RefCountedPtr< AMRLevelAdvectDiffuseFactory > &a_fact, AdvectionVelocityFunction &a_velFunc, AdvectPhysics &a_advPhys)
void getBoxes(Vector< Vector< Box > > &a_boxes, Vector< int > &a_refRat, const Box &a_domain)
void coarsenBoxes(Vector< Vector< Box > > &a_boxesCoar, const Vector< Vector< Box > > &a_boxesFine, int a_refToCoar)
void getProblemDomain(ProblemDomain &a_domain)
double Real
Definition: REAL.H:33
void getAdvectionVelocityFunction(AdvectionVelocityFunction &a_velFunc)
Framework for Berger-Oliger timestepping for AMR.
Definition: AMR.H:53
void makeFinestDomain(ProblemDomain &a_domain, Real &a_dx)
A class derived from GodunovPhysics for simple advection-diffusion problems.
Definition: AdvectPhysics.H:22
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
void setupAMRForAMRRun(AMR &a_amr)
void defineAMR(AMR &a_amr, RefCountedPtr< AMRLevelAdvectDiffuseFactory > &a_fact, const ProblemDomain &a_prob_domain, const Vector< int > &a_refRat)
Real dtgNorm(const Vector< LevelData< FArrayBox > * > &a_src, const Vector< DisjointBoxLayout > &a_grids, const Vector< int > &a_refRatio, const ProblemDomain &a_coarseDom, const int &a_comp, const int &a_pval)
void getErrorFromCoarseAndFine(Vector< LevelData< FArrayBox > * > &a_errorCoar, const Vector< LevelData< FArrayBox > * > &a_solnCoar, const Vector< DisjointBoxLayout > &a_gridsCoar, const ProblemDomain &a_level0DomainCoar, const Vector< LevelData< FArrayBox > * > &a_solnFine, const Vector< DisjointBoxLayout > &a_gridsFine, const ProblemDomain &a_level0DomainFine, const Vector< int > &a_refRat)