Go to the documentation of this file.
17 #ifndef __DUDLEY_NODEFILE_H__
18 #define __DUDLEY_NODEFILE_H__
23 #include <escript/Distribution.h>
26 #include <paso/Coupler.h>
28 #ifdef ESYS_HAVE_TRILINOS
29 #include <trilinoswrap/types.h>
115 #ifdef ESYS_HAVE_TRILINOS
117 esys_trilinos::const_TrilinosGraph_ptr getTrilinosGraph()
const {
136 #ifdef ESYS_HAVE_TRILINOS
137 esys_trilinos::const_TrilinosGraph_ptr m_graph;
168 #ifdef ESYS_HAVE_PASO
246 #endif // __DUDLEY_NODEFILE_H__
index_t * globalDegreesOfFreedom
Definition: dudley/src/NodeFile.h:155
void updateTagList()
Definition: finley/src/NodeFile.h:324
IndexPair getFlaggedMinMaxInt(dim_t N, const index_t *values, index_t ignore)
Definition: finley/src/Util.cpp:327
int MPI_Status
Definition: EsysMPI.h:43
int getNumDataPointsPerSample() const
Return the number of data points per sample.
Definition: Data.h:530
NodeFile(int nDim, escript::JMPI MPIInfo)
Definition: finley/src/NodeFile.cpp:114
bool isComplex() const
True if components of this data are stored as complex.
Definition: Data.cpp:1163
void gather(const index_t *index, const NodeFile *in)
Definition: NodeFile_gather.cpp:75
index_t * globalReducedNodesIndex
Definition: finley/src/NodeFile.h:179
double real_t
type of all real-valued scalars in escript
Definition: DataTypes.h:73
Definition: finley/src/NodeMapping.h:40
dim_t numTargets
size of map (number of target nodes, e.g. DOF, reduced DOF, etc.)
Definition: dudley/src/NodeMapping.h:118
escript::Distribution_ptr nodesDistribution
MPI distribution of nodes.
Definition: dudley/src/NodeFile.h:162
int numDim
number of spatial dimensions
Definition: dudley/src/NodeFile.h:144
dim_t createDenseDOFLabeling()
Definition: finley/src/NodeFile.cpp:535
void assign(const std::vector< index_t > &theTarget, index_t unused)
Definition: finley/src/NodeMapping.h:63
#define DUDLEY_INITIAL_STATUS
Definition: Dudley.h:77
Definition: dudley/src/NodeFile.h:37
std::pair< index_t, index_t > getGlobalIdRange() const
Definition: finley/src/NodeFile.cpp:236
index_t * globalDegreesOfFreedom
Definition: finley/src/NodeFile.h:171
boost::shared_ptr< Distribution > Distribution_ptr
Definition: Distribution.h:35
void createNodeMappings(const IndexVector &dofDistribution, const IndexVector &nodeDistribution)
Definition: NodeFile_createMappings.cpp:234
void setCoordinates(const escript::Data &newX)
Definition: dudley/src/NodeFile.cpp:182
void createDOFMappingAndCoupling()
Definition: NodeFile_createMappings.cpp:39
std::pair< index_t, index_t > getGlobalDOFRange() const
Definition: finley/src/NodeFile.cpp:241
#define INDEX2(_X1_, _X2_, _N1_)
Definition: index.h:21
const index_t * borrowTargetDegreesOfFreedom() const
returns the mapping from local degrees of freedom to a target
Definition: dudley/src/NodeFile.h:232
void assignMPIRankToDOFs(std::vector< int > &mpiRankOfDOF, const IndexVector &distribution)
Definition: finley/src/NodeFile.cpp:448
int * Tag
Tag[i] is the tag of node i.
Definition: finley/src/NodeFile.h:164
const DataTypes::real_t * getSampleDataRO(DataTypes::RealVectorType::size_type sampleNo, DataTypes::real_t dummy=0) const
Return the sample data for the given sample no. Please do not use this unless you NEED to access samp...
Definition: Data.h:1975
IndexPair getMinMaxInt(int dim, dim_t N, const index_t *values)
Definition: dudley/src/Util.cpp:181
void clear()
resets both map and target.
Definition: finley/src/NodeMapping.h:54
escript::Distribution_ptr nodesDistribution
MPI distribution of nodes.
Definition: finley/src/NodeFile.h:184
#define MPI_SUM
Definition: EsysMPI.h:50
dim_t getNumNodes() const
returns the number of FEM nodes (on this rank)
Definition: dudley/src/NodeFile.h:202
dim_t createDenseDOFLabeling()
Definition: NodeFile_createDenseLabelings.cpp:32
index_t * reducedNodesId
Definition: finley/src/NodeFile.h:201
index_t * globalReducedDOFIndex
Definition: finley/src/NodeFile.h:176
dim_t numNodes
number of nodes
Definition: finley/src/NodeFile.h:149
void print() const
Definition: dudley/src/NodeFile.cpp:118
Definition: SharedComponents.h:51
escript::JMPI MPIInfo
MPI information.
Definition: dudley/src/NodeFile.h:142
NodeMapping reducedNodesMapping
Definition: finley/src/NodeFile.h:155
std::pair< index_t, index_t > getGlobalIdRange() const
Definition: dudley/src/NodeFile.cpp:167
void updateTagList()
Definition: dudley/src/NodeFile.h:237
void setTags(int newTag, const escript::Data &mask)
set tags to newTag where mask > 0
Definition: dudley/src/NodeFile.cpp:211
bool checkResult(int res, int &mres, const JMPI &info)
Everyone puts in their error code and everyone gets the largest one.
Definition: EsysMPI.cpp:120
int getDataPointSize() const
Return the size of the data point. It is the product of the data point shape dimensions.
Definition: Data.cpp:1363
index_t getLastNode() const
Definition: dudley/src/NodeFile.h:187
void gather(const index_t *index, const NodeFile *in)
Definition: finley/src/NodeFile.cpp:331
void createDOFMappingAndCoupling(bool reduced)
Definition: finley/src/NodeFile.cpp:782
NodeMapping nodesMapping
Definition: dudley/src/NodeFile.h:129
std::pair< index_t, index_t > getGlobalNodeIDIndexRange() const
Definition: finley/src/NodeFile.cpp:246
std::pair< index_t, index_t > getGlobalDOFRange() const
Definition: dudley/src/NodeFile.cpp:172
Definition: dudley/src/NodeMapping.h:37
int status
Definition: dudley/src/NodeFile.h:175
std::pair< index_t, index_t > getGlobalNodeIDIndexRange() const
Definition: dudley/src/NodeFile.cpp:177
std::vector< index_t > target
target[i] defines the target of FEM node i=0,...,numNodes-1
Definition: finley/src/NodeMapping.h:104
static std::pair< index_t, index_t > getGlobalRange(dim_t n, const index_t *id, escript::JMPI mpiInfo)
Definition: finley/src/NodeFile.cpp:40
Definition: Distribution.h:42
#define MPI_INT
Definition: EsysMPI.h:44
NodeMapping reducedDegreesOfFreedomMapping
Definition: finley/src/NodeFile.h:146
void copyTable(index_t offset, index_t idOffset, index_t dofOffset, const NodeFile *in)
Definition: dudley/src/NodeFile.cpp:135
#define MPI_MAX
Definition: EsysMPI.h:52
const index_t * borrowDegreesOfFreedomTarget() const
returns the mapping from target to the local degrees of freedom
Definition: dudley/src/NodeFile.h:222
void freeTable()
empties the node table and frees all memory
Definition: dudley/src/NodeFile.cpp:100
dim_t getNumNodes() const
returns the number of FEM nodes (on this rank)
Definition: finley/src/NodeFile.h:254
const index_t * borrowNodesTarget() const
returns the mapping from target to the local nodes
Definition: dudley/src/NodeFile.h:217
void createNodeMappings(const IndexVector &indexReducedNodes, const IndexVector &dofDistribution, const IndexVector &nodeDistribution)
Definition: finley/src/NodeFile.cpp:1014
int getNumSamples() const
Return the number of samples.
Definition: Data.h:519
dim_t getNumDegreesOfFreedomTargets() const
returns the number of degrees of freedom targets (own and shared)
Definition: dudley/src/NodeFile.h:212
double * Coordinates
Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of node i.
Definition: finley/src/NodeFile.h:173
A suite of factory methods for creating 2D and 3D dudley domains.
Definition: dudley/src/Assemble.h:31
Data represents a collection of datapoints.
Definition: Data.h:62
void assignMPIRankToDOFs(int *mpiRankOfDOF, const IndexVector &distribution)
Definition: dudley/src/NodeFile.cpp:230
index_t dim_t
Definition: DataTypes.h:87
boost::shared_ptr< JMPI_ > JMPI
Definition: EsysMPI.h:70
NodeMapping degreesOfFreedomMapping
Definition: dudley/src/NodeFile.h:130
const index_t * borrowTargetNodes() const
returns the mapping from local nodes to a target
Definition: dudley/src/NodeFile.h:227
dim_t createDenseReducedLabeling(const std::vector< short > &reducedMask, bool useNodes)
Definition: finley/src/NodeFile.cpp:712
std::vector< int > tagsInUse
vector of tags which are actually used
Definition: dudley/src/NodeFile.h:150
IndexPair getMinMaxInt(int dim, dim_t N, const index_t *values)
Definition: finley/src/Util.cpp:300
void gather_global(const index_t *index, const NodeFile *in)
Definition: NodeFile_gather.cpp:83
~NodeFile()
destructor
Definition: finley/src/NodeFile.cpp:132
escript::JMPI MPIInfo
MPI information.
Definition: finley/src/NodeFile.h:158
dim_t prepareLabeling(const std::vector< short > &mask, IndexVector &buffer, IndexVector &distribution, bool useNodes)
Definition: finley/src/NodeFile.cpp:474
void freeTable()
empties the node table and frees all memory
Definition: finley/src/NodeFile.cpp:172
std::vector< index_t > map
maps the target nodes back to the FEM nodes: target[map[i]]=i
Definition: finley/src/NodeMapping.h:106
dim_t createDenseNodeLabeling(IndexVector &nodeDistribution, const IndexVector &dofDistribution)
An exception class for assertions within escript.
Definition: EsysException.h:69
index_t * target
target[i] defines the target of FEM node i=0,...,numNodes
Definition: dudley/src/NodeMapping.h:115
index_t * Id
Id[i] is the unique ID number of FEM node i.
Definition: finley/src/NodeFile.h:162
dim_t createDenseNodeLabeling(IndexVector &nodeDistribution, const IndexVector &dofDistribution)
Definition: finley/src/NodeFile.cpp:598
NodeMapping nodesMapping
Definition: finley/src/NodeFile.h:144
static void gatherEntries(dim_t n, const index_t *index, index_t min_index, index_t max_index, index_t *Id_out, const index_t *Id_in, int *Tag_out, const int *Tag_in, index_t *globalDegreesOfFreedom_out, const index_t *globalDegreesOfFreedom_in, int numDim, double *Coordinates_out, const double *Coordinates_in)
Definition: finley/src/NodeFile.cpp:87
int status
Definition: finley/src/NodeFile.h:207
void setCoordinates(const escript::Data &newX)
copies the array newX into this->coordinates
Definition: finley/src/NodeFile.cpp:252
boost::shared_ptr< SharedComponents > SharedComponents_ptr
Definition: SharedComponents.h:46
void print() const
Definition: finley/src/NodeFile.cpp:206
static std::pair< index_t, index_t > getGlobalRange(dim_t n, const index_t *id, escript::JMPI mpiInfo)
Definition: dudley/src/NodeFile.cpp:34
NodeFile(int nDim, escript::JMPI MPIInfo)
Definition: dudley/src/NodeFile.cpp:54
index_t getFirstNode() const
Definition: dudley/src/NodeFile.h:182
dim_t getGlobalNumNodes() const
Definition: dudley/src/NodeFile.h:192
escript::Distribution_ptr reducedDegreesOfFreedomDistribution
Definition: finley/src/NodeFile.h:187
void setValuesInUse(const int *values, dim_t numValues, std::vector< int > &valuesInUse, escript::JMPI mpiinfo)
Definition: dudley/src/Util.cpp:246
#define MPI_DOUBLE
Definition: EsysMPI.h:45
std::pair< index_t, index_t > getDOFRange() const
Definition: dudley/src/NodeFile.cpp:156
void allocTable(dim_t numNodes)
allocates the node table within this node file to hold numNodes nodes.
Definition: dudley/src/NodeFile.cpp:73
dim_t prepareLabeling(const std::vector< short > &mask, IndexVector &buffer, IndexVector &distribution, bool useNodes)
escript::Distribution_ptr degreesOfFreedomDistribution
Definition: finley/src/NodeFile.h:186
index_t * map
maps the target nodes back to the FEM nodes: target[map[i]]=i
Definition: dudley/src/NodeMapping.h:121
std::pair< index_t, index_t > getDOFRange() const
Definition: finley/src/NodeFile.cpp:225
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:82
escript::Distribution_ptr dofDistribution
MPI distribution of degrees of freedom.
Definition: dudley/src/NodeFile.h:165
Definition: finley/src/NodeFile.h:39
Definition: AbstractContinuousDomain.cpp:22
index_t * reducedDegreesOfFreedomId
Definition: finley/src/NodeFile.h:203
NodeMapping degreesOfFreedomMapping
Definition: finley/src/NodeFile.h:145
index_t * globalNodesIndex
assigns each local node a global unique ID in a dense labeling
Definition: finley/src/NodeFile.h:181
index_t * Id
Id[i] is the unique ID number of FEM node i.
Definition: dudley/src/NodeFile.h:146
int * Tag
Tag[i] is the tag of node i.
Definition: dudley/src/NodeFile.h:148
escript::Distribution_ptr reducedNodesDistribution
Definition: finley/src/NodeFile.h:185
boost::shared_ptr< Connector > Connector_ptr
Definition: Coupler.h:48
dim_t numNodes
number of nodes
Definition: dudley/src/NodeFile.h:133
static void scatterEntries(dim_t n, const index_t *index, index_t min_index, index_t max_index, index_t *Id_out, const index_t *Id_in, int *Tag_out, const int *Tag_in, index_t *globalDegreesOfFreedom_out, const index_t *globalDegreesOfFreedom_in, int numDim, double *Coordinates_out, const double *Coordinates_in)
Definition: finley/src/NodeFile.cpp:61
index_t * degreesOfFreedomId
Definition: finley/src/NodeFile.h:202
Definition: escriptcore/src/IndexList.h:27
const index_t * borrowGlobalNodesIndex() const
Definition: dudley/src/NodeFile.h:197
void scatter(const index_t *index, const NodeFile *in)
Definition: finley/src/NodeFile.cpp:320
void gather_global(const index_t *index, const NodeFile *in)
Definition: finley/src/NodeFile.cpp:339
bool shipString(const char *src, char **dest, MPI_Comm &comm)
Definition: EsysMPI.cpp:174
std::vector< int > tagsInUse
vector of tags which are actually used
Definition: finley/src/NodeFile.h:166
index_t * degreesOfFreedomId
Definition: dudley/src/NodeFile.h:171
~NodeFile()
destructor
Definition: dudley/src/NodeFile.cpp:68
A suite of factory methods for creating various finley domains.
Definition: finley/src/Assemble.h:31
void setTags(int newTag, const escript::Data &mask)
set tags to newTag where mask > 0
Definition: finley/src/NodeFile.cpp:277
#define FINLEY_INITIAL_STATUS
Definition: Finley.h:89
int numDim
number of spatial dimensions
Definition: finley/src/NodeFile.h:160
#define ESYS_ASSERT(a, b)
EsysAssert is a MACRO that will throw an exception if the boolean condition specified is false.
Definition: Assert.h:77
std::vector< index_t > packMask(const std::vector< short > &mask)
Definition: finley/src/Util.cpp:354
dim_t getNumDegreesOfFreedom() const
returns the number of degrees of freedom (on this rank)
Definition: dudley/src/NodeFile.h:207
void allocTable(dim_t numNodes)
allocates the node table within this node file to hold numNodes nodes.
Definition: finley/src/NodeFile.cpp:137
double * Coordinates
Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of node i.
Definition: dudley/src/NodeFile.h:157
An exception class that signals an invalid argument value.
Definition: EsysException.h:99
void clear()
resets both map and target
Definition: dudley/src/NodeMapping.h:54
void copyTable(index_t offset, index_t idOffset, index_t dofOffset, const NodeFile *in)
Definition: finley/src/NodeFile.cpp:295
index_t * globalNodesIndex
assigns each local node a global unique ID in a dense labeling
Definition: dudley/src/NodeFile.h:159
std::vector< index_t > IndexVector
Definition: DataTypes.h:85
dim_t getNumTargets() const
returns the number of target nodes (number of items in the map array)
Definition: finley/src/NodeMapping.h:101