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 #ifndef SUNDANCE_MAPBUNDLE_H
00032 #define SUNDANCE_MAPBUNDLE_H
00033
00034 #include "SundanceDefs.hpp"
00035 #include "SundanceLocalDOFMap.hpp"
00036 #include "SundanceIntegrationCellSpecifier.hpp"
00037
00038 namespace Sundance
00039 {
00040 using namespace Teuchos;
00041
00042 class DOFMapBase;
00043 class StdFwkEvalMediator;
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066 class MapBundle
00067 {
00068 public:
00069
00070 MapBundle(
00071 const Array<RCP<DOFMapBase> >& dofMap,
00072 const Array<RCP<Array<int> > >& isBCIndex,
00073 const Array<int>& lowestLocalIndex,
00074 bool partitionBCs,
00075 int verb
00076 );
00077
00078
00079
00080
00081 void buildLocalDOFMaps(
00082 const RCP<StdFwkEvalMediator>& mediator,
00083 IntegrationCellSpecifier intCellSpec,
00084 const Array<Set<int> >& requiredFuncs,
00085 int verbosity) ;
00086
00087
00088
00089
00090 RCP<const Array<int> > workSet(int block, bool useCofacets) const ;
00091
00092
00093
00094
00095 const RCP<DOFMapBase>& dofMap(int b) const {return dofMap_[b];}
00096
00097
00098
00099
00100 const RCP<Array<int> >& isBCIndex(int b) const
00101 {return isBCIndex_[b];}
00102
00103
00104
00105
00106 int lowestLocalIndex(int b) const {return lowestLocalIndex_[b];}
00107
00108
00109 int nCells() const ;
00110
00111
00112
00113
00114
00115 const RCP<LocalDOFMap>& chooseMap(
00116 int block, bool useCofacets) const ;
00117
00118
00119
00120
00121 const RCP<const MapStructure>& mapStruct(
00122 int block,
00123 bool useCofacetCells) const
00124 {
00125 const RCP<const LocalDOFMap>& choice = chooseMap(block, useCofacetCells);
00126 return choice->mapStruct(block);
00127 }
00128
00129
00130
00131
00132 const Array<int>& localDOFs(
00133 int block,
00134 bool useCofacetCells,
00135 int chunk) const
00136 {
00137 const RCP<const LocalDOFMap>& choice = chooseMap(block, useCofacetCells);
00138 return choice->localDOFs(block)[chunk];
00139 }
00140
00141
00142
00143
00144 int nNodesInChunk(
00145 int block,
00146 bool useCofacetCells,
00147 int chunk) const
00148 {
00149 const RCP<const LocalDOFMap>& choice = chooseMap(block, useCofacetCells);
00150 return choice->nLocalNodesPerChunk(block)[chunk];
00151 }
00152
00153
00154
00155
00156 int verb() const {return verb_;}
00157
00158 private:
00159 int verb_;
00160 Array<RCP<DOFMapBase> > dofMap_;
00161 Array<RCP<Array<int> > > isBCIndex_;
00162 Array<int> lowestLocalIndex_;
00163
00164
00165
00166 RCP<LocalDOFMap> localDOFMap_;
00167
00168 RCP<LocalDOFMap> cofacetLocalDOFMap_;
00169 };
00170
00171
00172
00173 }
00174
00175
00176
00177 #endif