17 #ifndef __FINLEY_NODEFILE_H__ 18 #define __FINLEY_NODEFILE_H__ 25 #include <escript/Distribution.h> 28 #include <paso/Coupler.h> 30 #ifdef ESYS_HAVE_TRILINOS 31 #include <trilinoswrap/types.h> 52 void allocTable(
dim_t numNodes);
59 inline index_t getFirstNode()
const;
60 inline index_t getLastNode()
const;
61 inline dim_t getGlobalNumNodes()
const;
62 inline const index_t* borrowGlobalNodesIndex()
const;
64 inline index_t getFirstReducedNode()
const;
65 inline index_t getLastReducedNode()
const;
66 inline index_t getGlobalNumReducedNodes()
const;
67 inline const index_t* borrowGlobalReducedNodesIndex()
const;
70 inline dim_t getNumNodes()
const;
73 inline dim_t getNumReducedNodes()
const;
76 inline dim_t getNumDegreesOfFreedom()
const;
79 inline dim_t getNumReducedDegreesOfFreedom()
const;
82 inline dim_t getNumDegreesOfFreedomTargets()
const;
85 inline dim_t getNumReducedDegreesOfFreedomTargets()
const;
87 inline const IndexVector& borrowReducedNodesTarget()
const;
88 inline const IndexVector& borrowDegreesOfFreedomTarget()
const;
89 inline const IndexVector& borrowNodesTarget()
const;
90 inline const IndexVector& borrowReducedDegreesOfFreedomTarget()
const;
92 inline const index_t* borrowTargetReducedNodes()
const;
93 inline const index_t* borrowTargetDegreesOfFreedom()
const;
96 inline const index_t* borrowTargetNodes()
const;
97 inline const index_t* borrowTargetReducedDegreesOfFreedom()
const;
99 inline void updateTagList();
103 dim_t createDenseDOFLabeling();
108 dim_t createDenseReducedLabeling(
const std::vector<short>& reducedMask,
111 void createNodeMappings(
const IndexVector& indexReducedNodes,
116 void assignMPIRankToDOFs(std::vector<int>& mpiRankOfDOF,
135 std::pair<index_t,index_t> getDOFRange()
const;
138 std::pair<index_t,index_t> getGlobalIdRange()
const;
139 std::pair<index_t,index_t> getGlobalDOFRange()
const;
140 std::pair<index_t,index_t> getGlobalNodeIDIndexRange()
const;
143 void createDOFMappingAndCoupling(
bool reduced);
190 #ifdef ESYS_HAVE_PASO 194 #ifdef ESYS_HAVE_TRILINOS 195 esys_trilinos::const_TrilinosMap_ptr trilinosRowMap;
196 esys_trilinos::const_TrilinosMap_ptr trilinosReducedRowMap;
197 esys_trilinos::const_TrilinosMap_ptr trilinosColMap;
198 esys_trilinos::const_TrilinosMap_ptr trilinosReducedColMap;
217 return nodesDistribution->getFirstComponent();
222 return nodesDistribution->getLastComponent();
225 inline dim_t NodeFile::getGlobalNumNodes()
const 227 return nodesDistribution->getGlobalNumComponents();
230 inline const index_t* NodeFile::borrowGlobalNodesIndex()
const 232 return globalNodesIndex;
235 inline index_t NodeFile::getFirstReducedNode()
const 237 return reducedNodesDistribution->getFirstComponent();
240 inline index_t NodeFile::getLastReducedNode()
const 242 return reducedNodesDistribution->getLastComponent();
245 inline dim_t NodeFile::getGlobalNumReducedNodes()
const 247 return reducedNodesDistribution->getGlobalNumComponents();
250 inline const index_t* NodeFile::borrowGlobalReducedNodesIndex()
const 252 return globalReducedNodesIndex;
255 inline dim_t NodeFile::getNumNodes()
const 260 inline dim_t NodeFile::getNumReducedNodes()
const 262 return reducedNodesMapping.getNumTargets();
265 inline dim_t NodeFile::getNumDegreesOfFreedom()
const 267 return degreesOfFreedomDistribution->getMyNumComponents();
270 inline dim_t NodeFile::getNumReducedDegreesOfFreedom()
const 272 return reducedDegreesOfFreedomDistribution->getMyNumComponents();
275 inline dim_t NodeFile::getNumDegreesOfFreedomTargets()
const 277 return degreesOfFreedomMapping.getNumTargets();
280 inline dim_t NodeFile::getNumReducedDegreesOfFreedomTargets()
const 282 return reducedDegreesOfFreedomMapping.getNumTargets();
287 return nodesMapping.map;
290 inline const IndexVector& NodeFile::borrowReducedNodesTarget()
const 292 return reducedNodesMapping.map;
295 inline const IndexVector& NodeFile::borrowDegreesOfFreedomTarget()
const 297 return degreesOfFreedomMapping.map;
300 inline const IndexVector& NodeFile::borrowReducedDegreesOfFreedomTarget()
const 302 return reducedDegreesOfFreedomMapping.map;
305 inline const index_t* NodeFile::borrowTargetNodes()
const 307 return &nodesMapping.target[0];
310 inline const index_t* NodeFile::borrowTargetReducedNodes()
const 312 return &reducedNodesMapping.target[0];
315 inline const index_t* NodeFile::borrowTargetDegreesOfFreedom()
const 317 return °reesOfFreedomMapping.target[0];
320 inline const index_t* NodeFile::borrowTargetReducedDegreesOfFreedom()
const 322 return &reducedDegreesOfFreedomMapping.target[0];
325 inline void NodeFile::updateTagList()
333 #endif // __FINLEY_NODEFILE_H__ index_t * degreesOfFreedomId
Definition: finley/src/NodeFile.h:203
index_t * Id
Id[i] is the unique ID number of FEM node i.
Definition: finley/src/NodeFile.h:163
escript::Distribution_ptr nodesDistribution
MPI distribution of nodes.
Definition: finley/src/NodeFile.h:185
NodeMapping nodesMapping
Definition: finley/src/NodeFile.h:145
std::vector< int > tagsInUse
vector of tags which are actually used
Definition: finley/src/NodeFile.h:167
int numDim
number of spatial dimensions
Definition: finley/src/NodeFile.h:161
int status
Definition: finley/src/NodeFile.h:208
escript::Distribution_ptr degreesOfFreedomDistribution
Definition: finley/src/NodeFile.h:187
Definition: AbstractContinuousDomain.cpp:22
escript::Distribution_ptr reducedDegreesOfFreedomDistribution
Definition: finley/src/NodeFile.h:188
boost::shared_ptr< Distribution > Distribution_ptr
Definition: Distribution.h:24
NodeMapping degreesOfFreedomMapping
Definition: finley/src/NodeFile.h:146
std::vector< index_t > IndexVector
Definition: DataTypes.h:62
index_t * globalReducedNodesIndex
Definition: finley/src/NodeFile.h:180
boost::shared_ptr< JMPI_ > JMPI
Definition: EsysMPI.h:71
index_t * globalDegreesOfFreedom
Definition: finley/src/NodeFile.h:172
escript::Distribution_ptr reducedNodesDistribution
Definition: finley/src/NodeFile.h:186
A suite of factory methods for creating various finley domains.
Definition: finley/src/Assemble.h:31
index_t * reducedNodesId
Definition: finley/src/NodeFile.h:202
void setValuesInUse(const int *values, dim_t numValues, std::vector< int > &valuesInUse, escript::JMPI mpiinfo)
Definition: dudley/src/Util.cpp:215
index_t * globalReducedDOFIndex
Definition: finley/src/NodeFile.h:177
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:59
Definition: finley/src/NodeMapping.h:29
Data represents a collection of datapoints.
Definition: Data.h:63
Definition: finley/src/NodeFile.h:40
index_t * reducedDegreesOfFreedomId
Definition: finley/src/NodeFile.h:204
escript::JMPI MPIInfo
MPI information.
Definition: finley/src/NodeFile.h:159
void gather(int len, const index_t *index, int numData, const double *in, double *out)
Definition: dudley/src/Util.cpp:43
boost::shared_ptr< Connector > Connector_ptr
Definition: Coupler.h:37
NodeMapping reducedNodesMapping
Definition: finley/src/NodeFile.h:156
NodeMapping reducedDegreesOfFreedomMapping
Definition: finley/src/NodeFile.h:147
dim_t numNodes
number of nodes
Definition: finley/src/NodeFile.h:150
double * Coordinates
Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of node i.
Definition: finley/src/NodeFile.h:174
int * Tag
Tag[i] is the tag of node i.
Definition: finley/src/NodeFile.h:165
index_t * globalNodesIndex
assigns each local node a global unique ID in a dense labeling
Definition: finley/src/NodeFile.h:182
index_t dim_t
Definition: DataTypes.h:64