Go to the documentation of this file.
18 #ifndef __DUDLEY_NODEMAPPING_H__
19 #define __DUDLEY_NODEMAPPING_H__
54 std::pair<index_t,index_t> range(
56 if (range.first < 0) {
59 numTargets = range.first<=range.second ? range.second+1 : 0;
104 #endif // __DUDLEY_NODEMAPPING_H__
index_t * globalDegreesOfFreedom
Definition: dudley/src/NodeFile.h:156
int MPI_Status
Definition: EsysMPI.h:44
void gather(const index_t *index, const NodeFile *in)
Definition: NodeFile_gather.cpp:76
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
void assign(const index_t *theTarget, dim_t nNodes, index_t unused)
Definition: dudley/src/NodeMapping.h:70
Definition: dudley/src/NodeFile.h:38
void createNodeMappings(const IndexVector &dofDistribution, const IndexVector &nodeDistribution)
Definition: NodeFile_createMappings.cpp:236
void createDOFMappingAndCoupling()
Definition: NodeFile_createMappings.cpp:41
index_t index_t_min()
Returns the minimum finite value for the index_t type.
Definition: DataTypes.h:96
#define INDEX2(_X1_, _X2_, _N1_)
Definition: index.h:22
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:26
dim_t getNumTargets() const
returns the number of target nodes (number of items in the map array)
Definition: dudley/src/NodeMapping.h:112
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:51
#define MPI_SUM
Definition: EsysMPI.h:51
dim_t createDenseDOFLabeling()
Definition: NodeFile_createDenseLabelings.cpp:34
Definition: SharedComponents.h:53
escript::JMPI MPIInfo
MPI information.
Definition: dudley/src/NodeFile.h:143
std::pair< index_t, index_t > getGlobalIdRange() const
Definition: dudley/src/NodeFile.cpp:169
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
NodeMapping nodesMapping
Definition: dudley/src/NodeFile.h:130
std::pair< index_t, index_t > getGlobalDOFRange() const
Definition: dudley/src/NodeFile.cpp:174
int status
Definition: dudley/src/NodeFile.h:176
Definition: Distribution.h:44
#define MPI_INT
Definition: EsysMPI.h:45
index_t index_t_max()
Returns the maximum finite value for the index_t type.
Definition: DataTypes.h:105
#define MPI_MAX
Definition: EsysMPI.h:53
A suite of factory methods for creating 2D and 3D dudley domains.
Definition: dudley/src/Assemble.h:32
IndexPair getFlaggedMinMaxInt(dim_t N, const index_t *values, index_t ignore)
Definition: dudley/src/Util.cpp:211
dim_t numNodes
size of target (number of FEM nodes)
Definition: dudley/src/NodeMapping.h:115
index_t dim_t
Definition: DataTypes.h:90
NodeMapping degreesOfFreedomMapping
Definition: dudley/src/NodeFile.h:131
void gather_global(const index_t *index, const NodeFile *in)
Definition: NodeFile_gather.cpp:84
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
boost::shared_ptr< SharedComponents > SharedComponents_ptr
Definition: SharedComponents.h:48
#define MPI_DOUBLE
Definition: EsysMPI.h:46
index_t * map
maps the target nodes back to the FEM nodes: target[map[i]]=i
Definition: dudley/src/NodeMapping.h:124
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:85
NodeMapping()
Definition: dudley/src/NodeMapping.h:54
escript::Distribution_ptr dofDistribution
MPI distribution of degrees of freedom.
Definition: dudley/src/NodeFile.h:166
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
dim_t numNodes
number of nodes
Definition: dudley/src/NodeFile.h:134
bool shipString(const char *src, char **dest, MPI_Comm &comm)
Definition: EsysMPI.cpp:176
index_t * degreesOfFreedomId
Definition: dudley/src/NodeFile.h:172
#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
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 clear()
resets both map and target
Definition: dudley/src/NodeMapping.h:57
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