Go to the documentation of this file.
17 #ifndef __DUDLEY_NODEMAPPING_H__
18 #define __DUDLEY_NODEMAPPING_H__
53 std::pair<index_t,index_t> range(
55 if (range.first < 0) {
58 numTargets = range.first<=range.second ? range.second+1 : 0;
103 #endif // __DUDLEY_NODEMAPPING_H__
index_t * globalDegreesOfFreedom
Definition: dudley/src/NodeFile.h:155
int MPI_Status
Definition: EsysMPI.h:43
void gather(const index_t *index, const NodeFile *in)
Definition: NodeFile_gather.cpp:75
double real_t
type of all real-valued scalars in escript
Definition: DataTypes.h:73
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
void assign(const index_t *theTarget, dim_t nNodes, index_t unused)
Definition: dudley/src/NodeMapping.h:67
Definition: dudley/src/NodeFile.h:37
void createNodeMappings(const IndexVector &dofDistribution, const IndexVector &nodeDistribution)
Definition: NodeFile_createMappings.cpp:234
void createDOFMappingAndCoupling()
Definition: NodeFile_createMappings.cpp:39
index_t index_t_min()
Returns the minimum finite value for the index_t type.
Definition: DataTypes.h:93
#define INDEX2(_X1_, _X2_, _N1_)
Definition: index.h:21
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, real_t *Coordinates_out, const real_t *Coordinates_in)
Definition: NodeFile_gather.cpp:25
dim_t getNumTargets() const
returns the number of target nodes (number of items in the map array)
Definition: dudley/src/NodeMapping.h:109
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, real_t *Coordinates_out, const real_t *Coordinates_in)
Definition: NodeFile_gather.cpp:50
#define MPI_SUM
Definition: EsysMPI.h:50
dim_t createDenseDOFLabeling()
Definition: NodeFile_createDenseLabelings.cpp:32
Definition: SharedComponents.h:51
escript::JMPI MPIInfo
MPI information.
Definition: dudley/src/NodeFile.h:142
std::pair< index_t, index_t > getGlobalIdRange() const
Definition: dudley/src/NodeFile.cpp:167
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
NodeMapping nodesMapping
Definition: dudley/src/NodeFile.h:129
std::pair< index_t, index_t > getGlobalDOFRange() const
Definition: dudley/src/NodeFile.cpp:172
int status
Definition: dudley/src/NodeFile.h:175
Definition: Distribution.h:42
#define MPI_INT
Definition: EsysMPI.h:44
index_t index_t_max()
Returns the maximum finite value for the index_t type.
Definition: DataTypes.h:102
#define MPI_MAX
Definition: EsysMPI.h:52
A suite of factory methods for creating 2D and 3D dudley domains.
Definition: dudley/src/Assemble.h:31
IndexPair getFlaggedMinMaxInt(dim_t N, const index_t *values, index_t ignore)
Definition: dudley/src/Util.cpp:208
dim_t numNodes
size of target (number of FEM nodes)
Definition: dudley/src/NodeMapping.h:112
index_t dim_t
Definition: DataTypes.h:87
NodeMapping degreesOfFreedomMapping
Definition: dudley/src/NodeFile.h:130
void gather_global(const index_t *index, const NodeFile *in)
Definition: NodeFile_gather.cpp:83
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
boost::shared_ptr< SharedComponents > SharedComponents_ptr
Definition: SharedComponents.h:46
#define MPI_DOUBLE
Definition: EsysMPI.h:45
index_t * map
maps the target nodes back to the FEM nodes: target[map[i]]=i
Definition: dudley/src/NodeMapping.h:121
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:82
NodeMapping()
Definition: dudley/src/NodeMapping.h:51
escript::Distribution_ptr dofDistribution
MPI distribution of degrees of freedom.
Definition: dudley/src/NodeFile.h:165
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
dim_t numNodes
number of nodes
Definition: dudley/src/NodeFile.h:133
bool shipString(const char *src, char **dest, MPI_Comm &comm)
Definition: EsysMPI.cpp:174
index_t * degreesOfFreedomId
Definition: dudley/src/NodeFile.h:171
#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
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
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