00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef SUNDANCE_INTEGRALGROUP_H
00032 #define SUNDANCE_INTEGRALGROUP_H
00033
00034 #include "SundanceDefs.hpp"
00035 #include "SundanceElementIntegral.hpp"
00036 #include "SundanceEvalVector.hpp"
00037 #include "SundanceMultipleDeriv.hpp"
00038 #include "SundanceIntegrationCellSpecifier.hpp"
00039
00040
00041
00042 namespace Sundance
00043 {
00044 using namespace Teuchos;
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 class IntegralGroup
00058 {
00059 public:
00060
00061 IntegralGroup(const Array<RCP<ElementIntegral> >& integrals,
00062 const Array<int>& resultIndices,
00063 int verb);
00064
00065
00066 IntegralGroup(const Array<int>& testID,
00067 const Array<int>& testBlock,
00068 const Array<int>& mvIndices,
00069 const Array<RCP<ElementIntegral> >& integrals,
00070 const Array<int>& resultIndices,
00071 const Array<MultipleDeriv>& derivs,
00072 int verb);
00073
00074
00075 IntegralGroup(const Array<int>& testID,
00076 const Array<int>& testBlock,
00077 const Array<int>& unkID,
00078 const Array<int>& unkBlock,
00079 const Array<RCP<ElementIntegral> >& integrals,
00080 const Array<int>& resultIndices,
00081 const Array<MultipleDeriv>& derivs,
00082 int verb);
00083
00084
00085
00086 bool isTwoForm() const {return order_==2;}
00087
00088
00089 bool isOneForm() const {return order_==1;}
00090
00091
00092 bool isZeroForm() const {return order_==0;}
00093
00094
00095
00096 int nTestNodes() const {return nTestNodes_;}
00097
00098
00099
00100 int nUnkNodes() const {return nUnkNodes_;}
00101
00102
00103 const Array<int>& testID() const {return testID_;}
00104
00105
00106 const Array<int>& unkID() const {return unkID_;}
00107
00108
00109 const Array<int>& testBlock() const {return testBlock_;}
00110
00111
00112 const Array<int>& unkBlock() const {return unkBlock_;}
00113
00114
00115 const Array<int>& mvIndices() const {return mvIndices_;}
00116
00117
00118
00119 IntegrationCellSpecifier usesMaximalCofacets() const
00120 {return requiresMaximalCofacet_;}
00121
00122
00123 const Array<int>& termUsesMaximalCofacets() const
00124 {return termUsesMaximalCofacets_;}
00125
00126
00127 const BasisFamily & getTestBasis() const { return integrals_[0]->getTestBasis(); }
00128
00129
00130 const BasisFamily & getUnknownBasis() const { return integrals_[0]->getUnknownBasis(); }
00131
00132
00133 bool evaluate(const CellJacobianBatch& JTrans,
00134 const CellJacobianBatch& JVol,
00135 const Array<int>& isLocalFlag,
00136 const Array<int>& facetNum,
00137 const RCP<Array<int> >& cellLIDs,
00138 const Array<RCP<EvalVector> >& vectorCoeffs,
00139 const Array<double>& constantCoeffs,
00140 RCP<Array<double> >& A) const ;
00141
00142
00143
00144 int integrationVerb() const {return integrationVerb_;}
00145
00146
00147 int transformVerb() const {return transformVerb_;}
00148
00149
00150 const Array<MultipleDeriv>& derivs() const
00151 {return derivs_;}
00152
00153
00154
00155 private:
00156
00157 int findIntegrationVerb(const Array<RCP<ElementIntegral> >& integrals) const ;
00158
00159 int findTransformVerb(const Array<RCP<ElementIntegral> >& integrals) const ;
00160
00161 int integrationVerb_;
00162
00163
00164 int transformVerb_;
00165
00166
00167 int order_;
00168
00169
00170 int nTestNodes_;
00171
00172
00173 int nUnkNodes_;
00174
00175
00176 Array<int> testID_;
00177
00178
00179 Array<int> unkID_;
00180
00181
00182 Array<int> testBlock_;
00183
00184
00185 Array<int> unkBlock_;
00186
00187
00188 Array<int> mvIndices_;
00189
00190
00191 Array<RCP<ElementIntegral> > integrals_;
00192
00193
00194 Array<int> resultIndices_;
00195
00196
00197 Array<int> termUsesMaximalCofacets_;
00198
00199
00200 IntegrationCellSpecifier requiresMaximalCofacet_;
00201
00202
00203 Array<MultipleDeriv> derivs_;
00204 };
00205
00206
00207 }
00208
00209
00210 #endif