Chombo + EB + MF  3.2
EdgeQuadrature.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 _EDGEQUADRATURE_H_
12 #define _EDGEQUADRATURE_H_
13 
14 #include <utility>
15 using std::pair;
16 
17 #include "REAL.H"
18 #include "RealVect.H"
19 #include "Vector.H"
20 
21 #include "NamespaceHeader.H"
22 
24 {
27 };
28 
29 /// Virtual base class for defining edge-based quadratures
30 /**
31  Note that an "edge" is something which is codimension 2 in the
32  SpaceDim space (in 2D, it's a point, in 3D, it's an edge, and in 4D,
33  it's a face. This API is designed to seamlessly work in any
34  dimensional space, as long as the coefficients have been defined
35  correctly in the derived class.
36 */
38 {
39 public:
40 
41  /**
42  Destructor.
43  */
44  virtual ~EdgeQuadrature()
45  {;}
46 
47  /// returns quadrature coefficients -- intervals are from [-1,1]
48  /** dim1 and dim2 define the directions in which the edge coordinate
49  do not vary. In other words, in 3D, if dir1=0 and dir2=1, then
50  the edge will be constant in x and y, and will vary in z.
51  The elements of the "location" vector in dir1 and dir2 are zeros.
52  */
53  virtual const Vector<QuadratureElement > coefficients(int dir1,
54  int dir2) const =0;
55 
56  /// scale to apply to weight
57  /* this is essentially the length (area, volume, etc) of an edge
58  given interval length a_length and dir1, dir2 the same as in the
59  coefficients function
60  */
61  virtual Real weightMult(const RealVect& a_length,
62  int dir1, int dir2) const = 0;
63 
64  /// make a copy of myself
65  virtual EdgeQuadrature* new_quadrature() const = 0;
66 
67 };
68 
69 #include "NamespaceFooter.H"
70 
71 #endif
RealVect location
Definition: EdgeQuadrature.H:25
Definition: EdgeQuadrature.H:23
double Real
Definition: REAL.H:33
Real weight
Definition: EdgeQuadrature.H:26
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
Virtual base class for defining edge-based quadratures.
Definition: EdgeQuadrature.H:37
virtual ~EdgeQuadrature()
Definition: EdgeQuadrature.H:44