Chombo + EB  3.0
NodeDotProduct.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 // NodeDotProduct.H
12 // petermc, 11 June 2003
13 
14 #ifndef _NODEDOTPRODUCT_H_
15 #define _NODEDOTPRODUCT_H_
16 
17 #include "NodeFArrayBox.H"
18 #include "LevelData.H"
19 #include "IntVectSet.H"
20 #include "NamespaceHeader.H"
21 
22 /// Computes dot product of two sets of data on the same set of grids.
23 /**
24  The dot product computed by this function is the sum over
25  all components and all points of the product
26  of <i>a_dataOne</i> and <i>a_dataTwo</i>,
27  weighted by trapezoidal integration rule weights.
28  */
29 Real DotProductNodes(/// first set of data
30  const BoxLayoutData<NodeFArrayBox>& a_dataOne,
31  /// second set of data
32  const BoxLayoutData<NodeFArrayBox>& a_dataTwo,
33  /// CELL-centered layout, on the nodes of which we calculate the dot product
34  const BoxLayout& a_dblIn);
35 
36 
37 /// Computes dot product of two sets of data on the same set of grids.
38 /**
39  The dot product computed by this function is the sum over
40  the components in <i>a_comps</i> and over all points of the product
41  of <i>a_dataOne</i> and <i>a_dataTwo</i>,
42  weighted by trapezoidal integration rule weights.
43  */
44 Real DotProductNodes(/// first set of data
45  const BoxLayoutData<NodeFArrayBox>& a_dataOne,
46  /// second set of data
47  const BoxLayoutData<NodeFArrayBox>& a_dataTwo,
48  /// CELL-centered layout, on the nodes of which we calculate the dot product
49  const BoxLayout& a_dblIn,
50  /// components over which to take sum
51  const Interval& a_comps);
52 
53 
54 /// Computes dot product of two sets of data on the same set of grids.
55 /**
56  The dot product computed by this function is the sum over
57  the components in a_comps and over all VALID nodes of the product
58  of <i>a_dataOne</i> and <i>a_dataTwo</i>.
59 
60  The <i>a_IVSVext</i> argument is obtained from the calls:<br>
61  <tt>
62  interiorBoundaryNodes(IVSVint, a_dataOne.getBoxes(), a_domain);<br>
63  exteriorBoundaryNodes(a_IVSVext, IVSVint, a_dataOne.getBoxes();
64  </tt>
65  */
66 Real DotProductNodes(/// first set of data
67  const LevelData<NodeFArrayBox>& a_dataOne,
68  /// second set of data
69  const LevelData<NodeFArrayBox>& a_dataTwo,
70  /// physical domain
71  const ProblemDomain& a_domain,
72  /// external boundary nodes
73  const LayoutData< Vector<IntVectSet> >& a_IVSVext,
74  /// components over which to take sum
75  const Interval& a_comps);
76 
77 
78 /// Computes dot product of two sets of data on the same set of grids.
79 /**
80  The dot product computed by this function is the sum over
81  the components in a_comps and over all VALID nodes of the product
82  of <i>a_dataOne</i> and <i>a_dataTwo</i>.
83 
84  The <i>a_IVSVext</i> argument is obtained from the calls:<br>
85  <tt>
86  interiorBoundaryNodes(IVSVint, a_dataOne.getBoxes(), a_domain);<br>
87  exteriorBoundaryNodes(a_IVSVext, IVSVint, a_dataOne.getBoxes();
88  </tt>
89  */
90 Real DotProductNodes(/// first set of data
91  const LevelData<NodeFArrayBox>& a_dataOne,
92  /// second set of data
93  const LevelData<NodeFArrayBox>& a_dataTwo,
94  /// physical domain
95  const Box& a_domain,
96  /// external boundary nodes
97  const LayoutData< Vector<IntVectSet> >& a_IVSVext,
98  /// components over which to take sum
99  const Interval& a_comps);
100 
101 
102 /// Computes dot product of two sets of data on the same set of grids.
103 /**
104  The dot product computed by this function is the sum over
105  all components and all points of the product
106  of <i>a_dataOne</i> and <i>a_dataTwo</i>,
107  weighted by trapezoidal integration rule weights.
108 
109  This function computes exterior boundary nodes. It is more efficient
110  to precompute these boundary-node objects and call the function that
111  takes <i>a_IVSVext</i> as an argument.
112  */
113 Real DotProductNodes(/// first set of data
114  const LevelData<NodeFArrayBox>& a_dataOne,
115  /// second set of data
116  const LevelData<NodeFArrayBox>& a_dataTwo,
117  /// physical domain
118  const ProblemDomain& a_domain,
119  /// components over which to take sum
120  const Interval& a_comps);
121 
122 /// Computes dot product of two sets of data on the same set of grids.
123 /**
124  The dot product computed by this function is the sum over
125  all components and all points of the product
126  of <i>a_dataOne</i> and <i>a_dataTwo</i>,
127  weighted by trapezoidal integration rule weights.
128 
129  This function computes exterior boundary nodes. It is more efficient
130  to precompute these boundary-node objects and call the function that
131  takes <i>a_IVSVext</i> as an argument.
132  */
133 Real DotProductNodes(/// first set of data
134  const LevelData<NodeFArrayBox>& a_dataOne,
135  /// second set of data
136  const LevelData<NodeFArrayBox>& a_dataTwo,
137  /// physical domain
138  const Box& a_domain,
139  /// components over which to take sum
140  const Interval& a_comps);
141 
142 #include "NamespaceFooter.H"
143 #endif
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:130
A not-necessarily-disjoint collective of boxes.
Definition: BoxLayout.H:146
Data that maintains a one-to-one mapping of T to the boxes in a BoxLayout.
Definition: LayoutData.H:46
Real DotProductNodes(const BoxLayoutData< NodeFArrayBox > &a_dataOne, const BoxLayoutData< NodeFArrayBox > &a_dataTwo, const BoxLayout &a_dblIn)
Computes dot product of two sets of data on the same set of grids.
Structure for passing component ranges in code.
Definition: Interval.H:23
double Real
Definition: REAL.H:33
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465