Go to the documentation of this file.
18 #ifndef __DUDLEY_NODEFILE_H__
19 #define __DUDLEY_NODEFILE_H__
24 #include <escript/Distribution.h>
27 #include <paso/Coupler.h>
29 #ifdef ESYS_HAVE_TRILINOS
30 #include <trilinoswrap/types.h>
116 #ifdef ESYS_HAVE_TRILINOS
118 esys_trilinos::const_TrilinosGraph_ptr getTrilinosGraph()
const {
137 #ifdef ESYS_HAVE_TRILINOS
138 esys_trilinos::const_TrilinosGraph_ptr m_graph;
169 #ifdef ESYS_HAVE_PASO
247 #endif // __DUDLEY_NODEFILE_H__
index_t * globalDegreesOfFreedom
Definition: dudley/src/NodeFile.h:156
void updateTagList()
Definition: finley/src/NodeFile.h:325
IndexPair getFlaggedMinMaxInt(dim_t N, const index_t *values, index_t ignore)
Definition: finley/src/Util.cpp:330
int MPI_Status
Definition: EsysMPI.h:44
int getNumDataPointsPerSample() const
Return the number of data points per sample.
Definition: Data.h:543
NodeFile(int nDim, escript::JMPI MPIInfo)
Definition: finley/src/NodeFile.cpp:116
bool isComplex() const
True if components of this data are stored as complex.
Definition: Data.cpp:1164
void gather(const index_t *index, const NodeFile *in)
Definition: NodeFile_gather.cpp:76
index_t * globalReducedNodesIndex
Definition: finley/src/NodeFile.h:180
double real_t
type of all real-valued scalars in escript
Definition: DataTypes.h:76
dim_t numTargets
size of map (number of target nodes, e.g. DOF, reduced DOF, etc.)
Definition: dudley/src/NodeMapping.h:121
escript::Distribution_ptr nodesDistribution
MPI distribution of nodes.
Definition: dudley/src/NodeFile.h:163
int numDim
number of spatial dimensions
Definition: dudley/src/NodeFile.h:145
dim_t createDenseDOFLabeling()
Definition: finley/src/NodeFile.cpp:537
void assign(const std::vector< index_t > &theTarget, index_t unused)
Definition: finley/src/NodeMapping.h:66
#define DUDLEY_INITIAL_STATUS
Definition: Dudley.h:79
Definition: dudley/src/NodeFile.h:38
std::pair< index_t, index_t > getGlobalIdRange() const
Definition: finley/src/NodeFile.cpp:238
index_t * globalDegreesOfFreedom
Definition: finley/src/NodeFile.h:172
boost::shared_ptr< Distribution > Distribution_ptr
Definition: Distribution.h:37
void createNodeMappings(const IndexVector &dofDistribution, const IndexVector &nodeDistribution)
Definition: NodeFile_createMappings.cpp:236
void setCoordinates(const escript::Data &newX)
Definition: dudley/src/NodeFile.cpp:184
void createDOFMappingAndCoupling()
Definition: NodeFile_createMappings.cpp:41
std::pair< index_t, index_t > getGlobalDOFRange() const
Definition: finley/src/NodeFile.cpp:243
#define INDEX2(_X1_, _X2_, _N1_)
Definition: index.h:22
const index_t * borrowTargetDegreesOfFreedom() const
returns the mapping from local degrees of freedom to a target
Definition: dudley/src/NodeFile.h:233
void assignMPIRankToDOFs(std::vector< int > &mpiRankOfDOF, const IndexVector &distribution)
Definition: finley/src/NodeFile.cpp:450
int * Tag
Tag[i] is the tag of node i.
Definition: finley/src/NodeFile.h:165
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:1988
IndexPair getMinMaxInt(int dim, dim_t N, const index_t *values)
Definition: dudley/src/Util.cpp:184
void clear()
resets both map and target.
Definition: finley/src/NodeMapping.h:57
escript::Distribution_ptr nodesDistribution
MPI distribution of nodes.
Definition: finley/src/NodeFile.h:185
#define MPI_SUM
Definition: EsysMPI.h:51
dim_t getNumNodes() const
returns the number of FEM nodes (on this rank)
Definition: dudley/src/NodeFile.h:203
dim_t createDenseDOFLabeling()
Definition: NodeFile_createDenseLabelings.cpp:34
index_t * reducedNodesId
Definition: finley/src/NodeFile.h:202
index_t * globalReducedDOFIndex
Definition: finley/src/NodeFile.h:177
dim_t numNodes
number of nodes
Definition: finley/src/NodeFile.h:150
void print() const
Definition: dudley/src/NodeFile.cpp:120
Definition: SharedComponents.h:53
escript::JMPI MPIInfo
MPI information.
Definition: dudley/src/NodeFile.h:143
NodeMapping reducedNodesMapping
Definition: finley/src/NodeFile.h:156
std::pair< index_t, index_t > getGlobalIdRange() const
Definition: dudley/src/NodeFile.cpp:169
void updateTagList()
Definition: dudley/src/NodeFile.h:238
void setTags(int newTag, const escript::Data &mask)
set tags to newTag where mask > 0
Definition: dudley/src/NodeFile.cpp:213
bool checkResult(int res, int &mres, const JMPI &info)
Everyone puts in their error code and everyone gets the largest one.
Definition: EsysMPI.cpp:122
int getDataPointSize() const
Return the size of the data point. It is the product of the data point shape dimensions.
Definition: Data.cpp:1364
index_t getLastNode() const
Definition: dudley/src/NodeFile.h:188
void gather(const index_t *index, const NodeFile *in)
Definition: finley/src/NodeFile.cpp:333
void createDOFMappingAndCoupling(bool reduced)
Definition: finley/src/NodeFile.cpp:784
NodeMapping nodesMapping
Definition: dudley/src/NodeFile.h:130
std::pair< index_t, index_t > getGlobalNodeIDIndexRange() const
Definition: finley/src/NodeFile.cpp:248
std::pair< index_t, index_t > getGlobalDOFRange() const
Definition: dudley/src/NodeFile.cpp:174
Definition: dudley/src/NodeMapping.h:39
int status
Definition: dudley/src/NodeFile.h:176
std::pair< index_t, index_t > getGlobalNodeIDIndexRange() const
Definition: dudley/src/NodeFile.cpp:179
std::vector< index_t > target
target[i] defines the target of FEM node i=0,...,numNodes-1
Definition: finley/src/NodeMapping.h:107
static std::pair< index_t, index_t > getGlobalRange(dim_t n, const index_t *id, escript::JMPI mpiInfo)
Definition: finley/src/NodeFile.cpp:42
Definition: Distribution.h:44
#define MPI_INT
Definition: EsysMPI.h:45
NodeMapping reducedDegreesOfFreedomMapping
Definition: finley/src/NodeFile.h:147
void copyTable(index_t offset, index_t idOffset, index_t dofOffset, const NodeFile *in)
Definition: dudley/src/NodeFile.cpp:137
#define MPI_MAX
Definition: EsysMPI.h:53
const index_t * borrowDegreesOfFreedomTarget() const
returns the mapping from target to the local degrees of freedom
Definition: dudley/src/NodeFile.h:223
void freeTable()
empties the node table and frees all memory
Definition: dudley/src/NodeFile.cpp:102
const index_t * borrowNodesTarget() const
returns the mapping from target to the local nodes
Definition: dudley/src/NodeFile.h:218
void createNodeMappings(const IndexVector &indexReducedNodes, const IndexVector &dofDistribution, const IndexVector &nodeDistribution)
Definition: finley/src/NodeFile.cpp:1016
int getNumSamples() const
Return the number of samples.
Definition: Data.h:532
dim_t getNumDegreesOfFreedomTargets() const
returns the number of degrees of freedom targets (own and shared)
Definition: dudley/src/NodeFile.h:213
double * Coordinates
Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of node i.
Definition: finley/src/NodeFile.h:174
A suite of factory methods for creating 2D and 3D dudley domains.
Definition: dudley/src/Assemble.h:32
Data represents a collection of datapoints.
Definition: Data.h:63
void assignMPIRankToDOFs(int *mpiRankOfDOF, const IndexVector &distribution)
Definition: dudley/src/NodeFile.cpp:232
index_t dim_t
Definition: DataTypes.h:90
boost::shared_ptr< JMPI_ > JMPI
Definition: EsysMPI.h:71
NodeMapping degreesOfFreedomMapping
Definition: dudley/src/NodeFile.h:131
const index_t * borrowTargetNodes() const
returns the mapping from local nodes to a target
Definition: dudley/src/NodeFile.h:228
dim_t createDenseReducedLabeling(const std::vector< short > &reducedMask, bool useNodes)
Definition: finley/src/NodeFile.cpp:714
std::vector< int > tagsInUse
vector of tags which are actually used
Definition: dudley/src/NodeFile.h:151
IndexPair getMinMaxInt(int dim, dim_t N, const index_t *values)
Definition: finley/src/Util.cpp:303
void gather_global(const index_t *index, const NodeFile *in)
Definition: NodeFile_gather.cpp:84
~NodeFile()
destructor
Definition: finley/src/NodeFile.cpp:134
escript::JMPI MPIInfo
MPI information.
Definition: finley/src/NodeFile.h:159
dim_t prepareLabeling(const std::vector< short > &mask, IndexVector &buffer, IndexVector &distribution, bool useNodes)
Definition: finley/src/NodeFile.cpp:476
void freeTable()
empties the node table and frees all memory
Definition: finley/src/NodeFile.cpp:174
std::vector< index_t > map
maps the target nodes back to the FEM nodes: target[map[i]]=i
Definition: finley/src/NodeMapping.h:109
dim_t createDenseNodeLabeling(IndexVector &nodeDistribution, const IndexVector &dofDistribution)
An exception class for assertions within escript.
Definition: EsysException.h:71
index_t * target
target[i] defines the target of FEM node i=0,...,numNodes
Definition: dudley/src/NodeMapping.h:118
index_t * Id
Id[i] is the unique ID number of FEM node i.
Definition: finley/src/NodeFile.h:163
dim_t createDenseNodeLabeling(IndexVector &nodeDistribution, const IndexVector &dofDistribution)
Definition: finley/src/NodeFile.cpp:600
NodeMapping nodesMapping
Definition: finley/src/NodeFile.h:145
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:89
int status
Definition: finley/src/NodeFile.h:208
void setCoordinates(const escript::Data &newX)
copies the array newX into this->coordinates
Definition: finley/src/NodeFile.cpp:254
boost::shared_ptr< SharedComponents > SharedComponents_ptr
Definition: SharedComponents.h:48
void print() const
Definition: finley/src/NodeFile.cpp:208
static std::pair< index_t, index_t > getGlobalRange(dim_t n, const index_t *id, escript::JMPI mpiInfo)
Definition: dudley/src/NodeFile.cpp:36
NodeFile(int nDim, escript::JMPI MPIInfo)
Definition: dudley/src/NodeFile.cpp:56
index_t getFirstNode() const
Definition: dudley/src/NodeFile.h:183
dim_t getGlobalNumNodes() const
Definition: dudley/src/NodeFile.h:193
escript::Distribution_ptr reducedDegreesOfFreedomDistribution
Definition: finley/src/NodeFile.h:188
void setValuesInUse(const int *values, dim_t numValues, std::vector< int > &valuesInUse, escript::JMPI mpiinfo)
Definition: dudley/src/Util.cpp:249
#define MPI_DOUBLE
Definition: EsysMPI.h:46
std::pair< index_t, index_t > getDOFRange() const
Definition: dudley/src/NodeFile.cpp:158
void allocTable(dim_t numNodes)
allocates the node table within this node file to hold numNodes nodes.
Definition: dudley/src/NodeFile.cpp:75
dim_t prepareLabeling(const std::vector< short > &mask, IndexVector &buffer, IndexVector &distribution, bool useNodes)
escript::Distribution_ptr degreesOfFreedomDistribution
Definition: finley/src/NodeFile.h:187
index_t * map
maps the target nodes back to the FEM nodes: target[map[i]]=i
Definition: dudley/src/NodeMapping.h:124
std::pair< index_t, index_t > getDOFRange() const
Definition: finley/src/NodeFile.cpp:227
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:85
escript::Distribution_ptr dofDistribution
MPI distribution of degrees of freedom.
Definition: dudley/src/NodeFile.h:166
Definition: finley/src/NodeFile.h:40
Definition: AbstractContinuousDomain.cpp:23
index_t * reducedDegreesOfFreedomId
Definition: finley/src/NodeFile.h:204
NodeMapping degreesOfFreedomMapping
Definition: finley/src/NodeFile.h:146
index_t * globalNodesIndex
assigns each local node a global unique ID in a dense labeling
Definition: finley/src/NodeFile.h:182
index_t * Id
Id[i] is the unique ID number of FEM node i.
Definition: dudley/src/NodeFile.h:147
int * Tag
Tag[i] is the tag of node i.
Definition: dudley/src/NodeFile.h:149
escript::Distribution_ptr reducedNodesDistribution
Definition: finley/src/NodeFile.h:186
boost::shared_ptr< Connector > Connector_ptr
Definition: Coupler.h:50
dim_t numNodes
number of nodes
Definition: dudley/src/NodeFile.h:134
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:63
index_t * degreesOfFreedomId
Definition: finley/src/NodeFile.h:203
Definition: escriptcore/src/IndexList.h:28
const index_t * borrowGlobalNodesIndex() const
Definition: dudley/src/NodeFile.h:198
void scatter(const index_t *index, const NodeFile *in)
Definition: finley/src/NodeFile.cpp:322
void gather_global(const index_t *index, const NodeFile *in)
Definition: finley/src/NodeFile.cpp:341
bool shipString(const char *src, char **dest, MPI_Comm &comm)
Definition: EsysMPI.cpp:176
std::vector< int > tagsInUse
vector of tags which are actually used
Definition: finley/src/NodeFile.h:167
index_t * degreesOfFreedomId
Definition: dudley/src/NodeFile.h:172
~NodeFile()
destructor
Definition: dudley/src/NodeFile.cpp:70
A suite of factory methods for creating various finley domains.
Definition: finley/src/Assemble.h:32
void setTags(int newTag, const escript::Data &mask)
set tags to newTag where mask > 0
Definition: finley/src/NodeFile.cpp:279
#define FINLEY_INITIAL_STATUS
Definition: Finley.h:91
int numDim
number of spatial dimensions
Definition: finley/src/NodeFile.h:161
#define ESYS_ASSERT(a, b)
EsysAssert is a MACRO that will throw an exception if the boolean condition specified is false.
Definition: Assert.h:78
std::vector< index_t > packMask(const std::vector< short > &mask)
Definition: finley/src/Util.cpp:357
dim_t getNumDegreesOfFreedom() const
returns the number of degrees of freedom (on this rank)
Definition: dudley/src/NodeFile.h:208
void allocTable(dim_t numNodes)
allocates the node table within this node file to hold numNodes nodes.
Definition: finley/src/NodeFile.cpp:139
double * Coordinates
Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of node i.
Definition: dudley/src/NodeFile.h:158
An exception class that signals an invalid argument value.
Definition: EsysException.h:101
void copyTable(index_t offset, index_t idOffset, index_t dofOffset, const NodeFile *in)
Definition: finley/src/NodeFile.cpp:297
index_t * globalNodesIndex
assigns each local node a global unique ID in a dense labeling
Definition: dudley/src/NodeFile.h:160
std::vector< index_t > IndexVector
Definition: DataTypes.h:88
dim_t getNumTargets() const
returns the number of target nodes (number of items in the map array)
Definition: finley/src/NodeMapping.h:104