Chombo + EB  3.2
OneDIntegrator.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 _ONEDINTEGRATOR_H_
12 #define _ONEDINTEGRATOR_H_
13 
14 #include "RealVect.H"
15 #include "ProblemDomain.H"
16 #include "IndexTM.H"
17 #include "EB_TYPEDEFS.H"
18 
19 #include "Notation.H"
20 #include "GeometryService.H"
21 #include "IndexedMoments.H"
22 #include "NamespaceHeader.H"
23 
24 ///base class for integration
26 {
27 public:
29  {; }
30 
31  virtual ~BaseOneDFunc()
32  {; }
33 
34  virtual Real value(const Real& location) const = 0;
35 };
36 
37 ///
38 /**
39  Gives an approximation to the numerical integral of a function over a region
40  */
42 {
43 
44 public:
45 
46  /// Default constructor
48  {
49  }
50 
51  /// Default destructor
52  virtual ~OneDIntegrator()
53  {
54  }
55 
56  ///
57  /**
58  integrate the function over the region dividing the
59  by dividing up the region of integration into
60  bits of fixed size = size/num_bits (midpoint rule)
61  */
63  const Real & a_xstart,
64  const Real & a_xend,
65  const int & a_num_bits
66  ) const;
67 
68 };
69 
70 #include "NamespaceFooter.H"
71 
72 #endif
A reference-counting handle class.
Definition: RefCountedPtr.H:173
base class for integration
Definition: OneDIntegrator.H:25
virtual ~OneDIntegrator()
Default destructor.
Definition: OneDIntegrator.H:52
double Real
Definition: REAL.H:33
virtual Real value(const Real &location) const =0
Real integral(const NodeFArrayBox &a_nfab, const Real a_dx, const Box &a_subbox, const int a_startComp=0, const int a_numComp=1)
Computes integral of a subbox of a NodeFArrayBox.
OneDIntegrator()
Default constructor.
Definition: OneDIntegrator.H:47
Definition: OneDIntegrator.H:41
BaseOneDFunc()
Definition: OneDIntegrator.H:28
virtual ~BaseOneDFunc()
Definition: OneDIntegrator.H:31