Chombo + EB + MF  3.2
FourthOrderMappedCFInterpStencil.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 _FOURTHORDERMAPPEDCFINTERPSTENCIL_H_
12 #define _FOURTHORDERMAPPEDCFINTERPSTENCIL_H_
13 
14 #include "FArrayBox.H"
15 #include "IntVect.H"
16 #include "Vector.H"
17 
18 #include "NamespaceHeader.H"
19 
20 /// Class to manage coarse-to-fine spatial interpolation to all fine cells within a single particular coarse cell
21 
22 /**
23  */
25 {
26 public:
27  /// Default constructor
28  /**
29  Object requires define() to be called before all other functions.
30  */
32 
33  /// Full constructor
34  FourthOrderMappedCFInterpStencil(/// in range -(a_degree-1):(a_degree-1), specifies displacement to boundary in each dimension
35  const IntVect& a_bdryOffset,
36  /// max degree of polynomials
37  int a_degree = 3,
38  /// dimensions that are fixed, not interpolated
39  Interval a_fixedDims = Interval() )
40  {
41  define(a_bdryOffset, a_degree, a_fixedDims);
42  }
43 
44  /// Destructor
45  /**
46  Destroys all objects created by define(). Passed in data references
47  of define() are left alone.
48  */
50 
51  /// Actual constructor.
52  /**
53  Set up object.
54  */
55  void define(/// in range -(a_degree-1):(a_degree-1), specifies displacement to boundary in each dimension
56  const IntVect& a_bdryOffset,
57  /// max degree of polynomials
58  int a_degree = 3,
59  /// dimensions that are fixed, not interpolated
60  Interval a_fixedDims = Interval() );
61 
62  const Vector<int>& indices() const
63  { return m_indices; }
64 
65  const Vector<int>& indicesFull() const
66  { return m_indicesFull; }
67 
68  const Vector<IntVect>& cells() const
69  { return m_stencilCells; }
70 
71  const Vector<Real>& avgPowers() const
72  { return m_avgPowers; }
73 
74 protected:
75 
76  /// max degree of polynomials
77  int m_degree;
78 
79  /// dimensions that are fixed, not interpolated
81 
82  /// number of dimensions that are interpolated: SpaceDim - m_fixedDims.size()
84 
85  /// displacement from domain boundary in each dimension, in range -(a_degree-1):(a_degree-1)
87 
88  /// number of coarse cells in the stencil
90 
91  /// number of nonzero powers
93 
94  /// length m_stencilSize, lists stencil cells
96 
97  /// length m_stencilSize*(SpaceDim-m_fixedDims.size()), lists indices of stencil cells, grouped by cell
99 
100  /// length m_stencilSize*SpaceDim, lists indices of stencil cells, grouped by cell
102 
103  /// length m_stencilSize*m_numNonzeroPowers, lists averages of <(x-x0)^p>j for stencil cells j, grouped by cell
105 
106  /// whether define() has been called
107  bool m_defined;
108 
109 private:
110 
111  // Copy and assignment not allowed
112  void operator=(const FourthOrderMappedCFInterpStencil& a_input);
114 };
115 
116 #include "NamespaceFooter.H"
117 
118 #endif
const Vector< Real > & avgPowers() const
Definition: FourthOrderMappedCFInterpStencil.H:71
const Vector< int > & indices() const
Definition: FourthOrderMappedCFInterpStencil.H:62
IntVect m_bdryOffset
displacement from domain boundary in each dimension, in range -(a_degree-1):(a_degree-1) ...
Definition: FourthOrderMappedCFInterpStencil.H:86
Vector< IntVect > m_stencilCells
length m_stencilSize, lists stencil cells
Definition: FourthOrderMappedCFInterpStencil.H:95
Vector< int > m_indicesFull
length m_stencilSize*SpaceDim, lists indices of stencil cells, grouped by cell
Definition: FourthOrderMappedCFInterpStencil.H:101
void define(const IntVect &a_bdryOffset, int a_degree=3, Interval a_fixedDims=Interval())
Actual constructor.
int m_numNonzeroPowers
number of nonzero powers
Definition: FourthOrderMappedCFInterpStencil.H:92
Class to manage coarse-to-fine spatial interpolation to all fine cells within a single particular coa...
Definition: FourthOrderMappedCFInterpStencil.H:24
FourthOrderMappedCFInterpStencil()
Default constructor.
Structure for passing component ranges in code.
Definition: Interval.H:23
Interval m_fixedDims
dimensions that are fixed, not interpolated
Definition: FourthOrderMappedCFInterpStencil.H:80
Vector< int > m_indices
length m_stencilSize*(SpaceDim-m_fixedDims.size()), lists indices of stencil cells, grouped by cell
Definition: FourthOrderMappedCFInterpStencil.H:98
bool m_defined
whether define() has been called
Definition: FourthOrderMappedCFInterpStencil.H:107
int m_stencilSize
number of coarse cells in the stencil
Definition: FourthOrderMappedCFInterpStencil.H:89
int m_nInterpDims
number of dimensions that are interpolated: SpaceDim - m_fixedDims.size()
Definition: FourthOrderMappedCFInterpStencil.H:83
const Vector< int > & indicesFull() const
Definition: FourthOrderMappedCFInterpStencil.H:65
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
void operator=(const FourthOrderMappedCFInterpStencil &a_input)
int m_degree
max degree of polynomials
Definition: FourthOrderMappedCFInterpStencil.H:77
Vector< Real > m_avgPowers
length m_stencilSize*m_numNonzeroPowers, lists averages of <(x-x0)^p>j for stencil cells j...
Definition: FourthOrderMappedCFInterpStencil.H:104
FourthOrderMappedCFInterpStencil(const IntVect &a_bdryOffset, int a_degree=3, Interval a_fixedDims=Interval())
Full constructor.
Definition: FourthOrderMappedCFInterpStencil.H:34
~FourthOrderMappedCFInterpStencil()
Destructor.
const Vector< IntVect > & cells() const
Definition: FourthOrderMappedCFInterpStencil.H:68