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_NODALDOFMAPHN_H
00032 #define SUNDANCE_NODALDOFMAPHN_H
00033
00034 #include "SundanceDefs.hpp"
00035 #include "SundanceSpatiallyHomogeneousDOFMapBase.hpp"
00036 #include "SundanceCellSet.hpp"
00037 #include "SundanceCellFilter.hpp"
00038 #include "SundanceBasisFamily.hpp"
00039 #include "SundanceObjectWithVerbosity.hpp"
00040 #include "SundanceHNDoFMapBaseHomogeneous.hpp"
00041 #include "SundanceMatrixStore.hpp"
00042
00043 namespace Sundance
00044 {
00045 using namespace Teuchos;
00046
00047
00048
00049
00050 class NodalDOFMapHN : public HNDoFMapBaseHomogeneous
00051 {
00052 public:
00053
00054 NodalDOFMapHN(const Mesh& mesh, int nFuncs,
00055 const CellFilter& maxCellFilter,
00056 int setupVerb);
00057
00058
00059
00060 virtual ~NodalDOFMapHN(){;}
00061
00062
00063 RCP<const MapStructure>
00064 getDOFsForCellBatch(int cellDim,
00065 const Array<int>& cellLID,
00066 const Set<int>& requestedFuncSet,
00067 Array<Array<int> >& dofs,
00068 Array<int>& nNodes,
00069 int verb) const ;
00070
00071
00072
00073
00074
00075
00076
00077
00078 void getTrafoMatrixForCell(
00079 int cellLID,
00080 int funcID,
00081 int& trafoMatrixSize,
00082 bool& doTransform,
00083 Array<double>& transfMatrix ) const;
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093 void getTrafoMatrixForFacet(
00094 int cellDim,
00095 int cellLID,
00096 int facetIndex,
00097 int funcID,
00098 int& trafoMatrixSize,
00099 bool& doTransform,
00100 Array<double>& transfMatrix ) const;
00101
00102
00103
00104 void getDOFsForHNCell(
00105 int cellDim,
00106 int cellLID,
00107 int funcID,
00108 Array<int>& dofs ,
00109 Array<double>& coefs ) const;
00110
00111
00112 RCP<const MapStructure> mapStruct() const
00113 {return structure_;}
00114
00115
00116 int nFuncs() const {return nFuncs_;}
00117
00118 protected:
00119
00120 void init();
00121
00122 void computeOffsets(int localCount) ;
00123
00124 void shareRemoteDOFs(const Array<Array<int> >& remoteNodes);
00125
00126
00127 void getPointLIDsForHN( int pointLID ,
00128 int facetIndex ,
00129 int maxCellIndex ,
00130 Array<int>& glbLIDs ,
00131 Array<double>& coefsArray,
00132 Array<int>& nodeIndex );
00133
00134 CellFilter maxCellFilter_;
00135
00136 int dim_;
00137
00138 int nFuncs_;
00139
00140 int nElems_;
00141
00142 int nNodes_;
00143
00144 int nNodesPerElem_;
00145
00146 int nFacets_;
00147
00148 Array<int> elemDofs_;
00149
00150 Array<int> nodeDofs_;
00151
00152 RCP<const MapStructure> structure_;
00153
00154
00155 Array<bool> hasCellHanging_;
00156
00157
00158 Array<bool> nodeIsHanging_;
00159
00160
00161 Sundance::Map< int , Array<int> > cellsWithHangingDoF_globalDoFs_;
00162
00163
00164 Sundance::Map< int , Array<int> > cells_To_NodeLIDs_;
00165
00166
00167 Sundance::Map< int , Array<int> > hangingNodeLID_to_NodesLIDs_;
00168
00169
00170 Sundance::Map< int , Array<double> > hangindNodeLID_to_Coefs_;
00171
00172
00173 Sundance::Map< int , int > maxCellLIDwithHN_to_TrafoMatrix_;
00174
00175
00176 MatrixStore matrixStore_;
00177
00178
00179 Array<int> facetLID_;
00180
00181 };
00182
00183 }
00184
00185
00186 #endif