00001 #ifdef CH_LANG_CC 00002 /* 00003 * _______ __ 00004 * / ___/ / ___ __ _ / / ___ 00005 * / /__/ _ \/ _ \/ V \/ _ \/ _ \ 00006 * \___/_//_/\___/_/_/_/_.__/\___/ 00007 * Please refer to Copyright.txt, in Chombo's root directory. 00008 */ 00009 #endif 00010 00011 // NodeDotProduct.H 00012 // petermc, 11 June 2003 00013 00014 #ifndef _NODEDOTPRODUCT_H_ 00015 #define _NODEDOTPRODUCT_H_ 00016 00017 #include "NodeFArrayBox.H" 00018 #include "LevelData.H" 00019 #include "IntVectSet.H" 00020 #include "NamespaceHeader.H" 00021 00022 /// Computes dot product of two sets of data on the same set of grids. 00023 /** 00024 The dot product computed by this function is the sum over 00025 all components and all points of the product 00026 of <i>a_dataOne</i> and <i>a_dataTwo</i>, 00027 weighted by trapezoidal integration rule weights. 00028 */ 00029 Real DotProductNodes(/// first set of data 00030 const BoxLayoutData<NodeFArrayBox>& a_dataOne, 00031 /// second set of data 00032 const BoxLayoutData<NodeFArrayBox>& a_dataTwo, 00033 /// CELL-centered layout, on the nodes of which we calculate the dot product 00034 const BoxLayout& a_dblIn); 00035 00036 00037 /// Computes dot product of two sets of data on the same set of grids. 00038 /** 00039 The dot product computed by this function is the sum over 00040 the components in <i>a_comps</i> and over all points of the product 00041 of <i>a_dataOne</i> and <i>a_dataTwo</i>, 00042 weighted by trapezoidal integration rule weights. 00043 */ 00044 Real DotProductNodes(/// first set of data 00045 const BoxLayoutData<NodeFArrayBox>& a_dataOne, 00046 /// second set of data 00047 const BoxLayoutData<NodeFArrayBox>& a_dataTwo, 00048 /// CELL-centered layout, on the nodes of which we calculate the dot product 00049 const BoxLayout& a_dblIn, 00050 /// components over which to take sum 00051 const Interval& a_comps); 00052 00053 00054 /// Computes dot product of two sets of data on the same set of grids. 00055 /** 00056 The dot product computed by this function is the sum over 00057 the components in a_comps and over all VALID nodes of the product 00058 of <i>a_dataOne</i> and <i>a_dataTwo</i>. 00059 00060 The <i>a_IVSVext</i> argument is obtained from the calls:<br> 00061 <tt> 00062 interiorBoundaryNodes(IVSVint, a_dataOne.getBoxes(), a_domain);<br> 00063 exteriorBoundaryNodes(a_IVSVext, IVSVint, a_dataOne.getBoxes(); 00064 </tt> 00065 */ 00066 Real DotProductNodes(/// first set of data 00067 const LevelData<NodeFArrayBox>& a_dataOne, 00068 /// second set of data 00069 const LevelData<NodeFArrayBox>& a_dataTwo, 00070 /// physical domain 00071 const ProblemDomain& a_domain, 00072 /// external boundary nodes 00073 const LayoutData< Vector<IntVectSet> >& a_IVSVext, 00074 /// components over which to take sum 00075 const Interval& a_comps); 00076 00077 00078 /// Computes dot product of two sets of data on the same set of grids. 00079 /** 00080 The dot product computed by this function is the sum over 00081 the components in a_comps and over all VALID nodes of the product 00082 of <i>a_dataOne</i> and <i>a_dataTwo</i>. 00083 00084 The <i>a_IVSVext</i> argument is obtained from the calls:<br> 00085 <tt> 00086 interiorBoundaryNodes(IVSVint, a_dataOne.getBoxes(), a_domain);<br> 00087 exteriorBoundaryNodes(a_IVSVext, IVSVint, a_dataOne.getBoxes(); 00088 </tt> 00089 */ 00090 Real DotProductNodes(/// first set of data 00091 const LevelData<NodeFArrayBox>& a_dataOne, 00092 /// second set of data 00093 const LevelData<NodeFArrayBox>& a_dataTwo, 00094 /// physical domain 00095 const Box& a_domain, 00096 /// external boundary nodes 00097 const LayoutData< Vector<IntVectSet> >& a_IVSVext, 00098 /// components over which to take sum 00099 const Interval& a_comps); 00100 00101 00102 /// Computes dot product of two sets of data on the same set of grids. 00103 /** 00104 The dot product computed by this function is the sum over 00105 all components and all points of the product 00106 of <i>a_dataOne</i> and <i>a_dataTwo</i>, 00107 weighted by trapezoidal integration rule weights. 00108 00109 This function computes exterior boundary nodes. It is more efficient 00110 to precompute these boundary-node objects and call the function that 00111 takes <i>a_IVSVext</i> as an argument. 00112 */ 00113 Real DotProductNodes(/// first set of data 00114 const LevelData<NodeFArrayBox>& a_dataOne, 00115 /// second set of data 00116 const LevelData<NodeFArrayBox>& a_dataTwo, 00117 /// physical domain 00118 const ProblemDomain& a_domain, 00119 /// components over which to take sum 00120 const Interval& a_comps); 00121 00122 /// Computes dot product of two sets of data on the same set of grids. 00123 /** 00124 The dot product computed by this function is the sum over 00125 all components and all points of the product 00126 of <i>a_dataOne</i> and <i>a_dataTwo</i>, 00127 weighted by trapezoidal integration rule weights. 00128 00129 This function computes exterior boundary nodes. It is more efficient 00130 to precompute these boundary-node objects and call the function that 00131 takes <i>a_IVSVext</i> as an argument. 00132 */ 00133 Real DotProductNodes(/// first set of data 00134 const LevelData<NodeFArrayBox>& a_dataOne, 00135 /// second set of data 00136 const LevelData<NodeFArrayBox>& a_dataTwo, 00137 /// physical domain 00138 const Box& a_domain, 00139 /// components over which to take sum 00140 const Interval& a_comps); 00141 00142 #include "NamespaceFooter.H" 00143 #endif