Go to the documentation of this file.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
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef SUNDANCE_STDFWKEVALMEDIATOR_H
00043 #define SUNDANCE_STDFWKEVALMEDIATOR_H
00044
00045 #include "SundanceDefs.hpp"
00046 #include "SundanceMesh.hpp"
00047 #include "SundanceAbstractEvalMediator.hpp"
00048 #include "SundanceCellJacobianBatch.hpp"
00049 #include "SundanceIntegralGroup.hpp"
00050 #include "SundanceObjectWithVerbosity.hpp"
00051 #include "SundanceDiscreteFunction.hpp"
00052
00053
00054 namespace Sundance
00055 {
00056 using namespace Teuchos;
00057
00058
00059
00060
00061
00062
00063
00064 class StdFwkEvalMediator : public AbstractEvalMediator,
00065 public Playa::Printable
00066 {
00067 public:
00068
00069 StdFwkEvalMediator(const Mesh& mesh, int cellDim);
00070
00071
00072 virtual ~StdFwkEvalMediator(){;}
00073
00074
00075 void setCellBatch(const RCP<const Array<int> >& cellLID);
00076
00077
00078 void setIntegrationSpec(IntegrationCellSpecifier intCellSpec);
00079
00080
00081
00082 virtual void setCellType(const CellType& cellType,
00083 const CellType& maxCellType,
00084 bool isInternalBdry) ;
00085
00086
00087
00088
00089
00090
00091 const CellJacobianBatch& JVol() const {return *JVol_;}
00092
00093
00094 const CellJacobianBatch& JTrans() const ;
00095
00096
00097
00098
00099
00100 const Array<int>& facetIndices() const {return *facetIndices_;}
00101
00102
00103 const Array<int>& maxCellLIDs() const {return *maxCellLIDs_;}
00104
00105
00106 int cellDim() const {return cellDim_;}
00107
00108
00109 int maxCellDim() const {return mesh_.spatialDim();}
00110
00111
00112 const CellType& cellType() const {return cellType_;}
00113
00114
00115 const CellType& maxCellType() const {return maxCellType_;}
00116
00117
00118 const RCP<const Array<int> >& cellLID() const {return cellLID_;}
00119
00120
00121 const RCP<Array<int> >& cofacetCellLID() const {return maxCellLIDs_;}
00122
00123
00124 IntegrationCellSpecifier integrationCellSpec() const {return intCellSpec_;}
00125
00126
00127 bool cofacetCellsAreReady() const {return cofacetCellsAreReady_;}
00128
00129
00130 bool isInternalBdry() const {return isInternalBdry_;}
00131
00132
00133 bool forbidCofacetIntegrations() const
00134 {return forbidCofacetIntegrations_;}
00135
00136
00137 protected:
00138 const Mesh& mesh() const {return mesh_;}
00139
00140 Mesh& mesh() {return mesh_;}
00141
00142 bool& cacheIsValid() const {return cacheIsValid_;}
00143
00144
00145 void setupFacetTransformations() const ;
00146
00147
00148 Map<const DiscreteFunctionData*, RCP<Array<Array<double> > > >& fCache() const {return fCache_;}
00149
00150 Map<const DiscreteFunctionData*, RCP<Array<Array<double> > > >& dfCache() const {return dfCache_;}
00151
00152 Map<const DiscreteFunctionData*, RCP<Array<Array<double> > > >& localValueCache() const {return localValueCache_;}
00153
00154
00155 Map<const DiscreteFunctionData*, RCP<const MapStructure> >& mapStructCache() const
00156 {return mapStructCache_;}
00157
00158
00159 Map<const DiscreteFunctionData*, bool>& fCacheIsValid() const {return fCacheIsValid_;}
00160
00161 Map<const DiscreteFunctionData*, bool>& dfCacheIsValid() const {return dfCacheIsValid_;}
00162
00163 Map<const DiscreteFunctionData*, bool>& localValueCacheIsValid() const {return localValueCacheIsValid_;}
00164
00165 private:
00166 Mesh mesh_;
00167
00168 int cellDim_;
00169
00170 CellType cellType_;
00171
00172 CellType maxCellType_;
00173
00174 bool isInternalBdry_;
00175
00176 bool forbidCofacetIntegrations_;
00177
00178 RCP<const Array<int> > cellLID_;
00179
00180 mutable IntegrationCellSpecifier intCellSpec_;
00181
00182 mutable RCP<CellJacobianBatch> JVol_;
00183
00184 mutable RCP<CellJacobianBatch> JTrans_;
00185
00186 mutable RCP<Array<int> > facetIndices_;
00187
00188 mutable RCP<Array<int> > maxCellLIDs_;
00189
00190 mutable bool cofacetCellsAreReady_;
00191
00192 mutable bool cacheIsValid_;
00193
00194 mutable bool jCacheIsValid_;
00195
00196
00197
00198
00199 mutable Map<const DiscreteFunctionData*, RCP<Array<Array<double> > > > fCache_;
00200
00201 mutable Map<const DiscreteFunctionData*, RCP<Array<Array<double> > > > dfCache_;
00202
00203 mutable Map<const DiscreteFunctionData*, RCP<Array<Array<double> > > > localValueCache_;
00204
00205 mutable Map<const DiscreteFunctionData*, RCP<const MapStructure> > mapStructCache_;
00206
00207
00208 mutable Map<const DiscreteFunctionData*, bool> fCacheIsValid_;
00209
00210 mutable Map<const DiscreteFunctionData*, bool> dfCacheIsValid_;
00211
00212 mutable Map<const DiscreteFunctionData*, bool> localValueCacheIsValid_;
00213
00214 };
00215 }
00216
00217
00218 #endif