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:157
int MPI_Status
Definition: EsysMPI.h:47
void gather(const index_t *index, const NodeFile *in)
Definition: NodeFile_gather.cpp:77
double real_t
type of all real-valued scalars in escript
Definition: DataTypes.h:52
dim_t numTargets
size of map (number of target nodes, e.g. DOF, reduced DOF, etc.)
Definition: dudley/src/NodeMapping.h:96
escript::Distribution_ptr nodesDistribution
MPI distribution of nodes.
Definition: dudley/src/NodeFile.h:164
Definition: DudleyException.h:26
int numDim
number of spatial dimensions
Definition: dudley/src/NodeFile.h:146
void assign(const index_t *theTarget, dim_t nNodes, index_t unused)
Definition: dudley/src/NodeMapping.h:45
Definition: dudley/src/NodeFile.h:40
void createNodeMappings(const IndexVector &dofDistribution, const IndexVector &nodeDistribution)
Definition: NodeFile_createMappings.cpp:224
void createDOFMappingAndCoupling()
Definition: NodeFile_createMappings.cpp:29
index_t index_t_min()
Returns the minimum finite value for the index_t type.
Definition: DataTypes.h:72
#define INDEX2(_X1_, _X2_, _N1_)
Definition: index.h:23
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:27
dim_t getNumTargets() const
returns the number of target nodes (number of items in the map array)
Definition: dudley/src/NodeMapping.h:87
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:52
#define MPI_SUM
Definition: EsysMPI.h:54
dim_t createDenseDOFLabeling()
Definition: NodeFile_createDenseLabelings.cpp:22
Definition: SharedComponents.h:41
escript::JMPI MPIInfo
MPI information.
Definition: dudley/src/NodeFile.h:144
std::pair< index_t, index_t > getGlobalIdRange() const
Definition: dudley/src/NodeFile.cpp:157
bool checkResult(int res, int &mres, const JMPI &info)
Everyone puts in their error code and everyone gets the largest one.
Definition: EsysMPI.cpp:110
NodeMapping nodesMapping
Definition: dudley/src/NodeFile.h:131
std::pair< index_t, index_t > getGlobalDOFRange() const
Definition: dudley/src/NodeFile.cpp:162
Definition: dudley/src/NodeMapping.h:28
int status
Definition: dudley/src/NodeFile.h:177
Definition: Distribution.h:33
#define MPI_INT
Definition: EsysMPI.h:48
index_t index_t_max()
Returns the maximum finite value for the index_t type.
Definition: DataTypes.h:81
#define MPI_MAX
Definition: EsysMPI.h:56
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:186
dim_t numNodes
size of target (number of FEM nodes)
Definition: dudley/src/NodeMapping.h:90
index_t dim_t
Definition: DataTypes.h:66
NodeMapping degreesOfFreedomMapping
Definition: dudley/src/NodeFile.h:132
void gather_global(const index_t *index, const NodeFile *in)
Definition: NodeFile_gather.cpp:85
dim_t createDenseNodeLabeling(IndexVector &nodeDistribution, const IndexVector &dofDistribution)
An exception class for assertions within escript.
Definition: EsysException.h:70
index_t * target
target[i] defines the target of FEM node i=0,...,numNodes
Definition: dudley/src/NodeMapping.h:93
boost::shared_ptr< SharedComponents > SharedComponents_ptr
Definition: SharedComponents.h:36
#define MPI_DOUBLE
Definition: EsysMPI.h:49
index_t * map
maps the target nodes back to the FEM nodes: target[map[i]]=i
Definition: dudley/src/NodeMapping.h:99
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:61
NodeMapping()
Definition: dudley/src/NodeMapping.h:29
escript::Distribution_ptr dofDistribution
MPI distribution of degrees of freedom.
Definition: dudley/src/NodeFile.h:167
index_t * Id
Id[i] is the unique ID number of FEM node i.
Definition: dudley/src/NodeFile.h:148
int * Tag
Tag[i] is the tag of node i.
Definition: dudley/src/NodeFile.h:150
dim_t numNodes
number of nodes
Definition: dudley/src/NodeFile.h:135
bool shipString(const char *src, char **dest, MPI_Comm &comm)
Definition: EsysMPI.cpp:164
index_t * degreesOfFreedomId
Definition: dudley/src/NodeFile.h:173
#define ESYS_ASSERT(a, b)
EsysAssert is a MACRO that will throw an exception if the boolean condition specified is false.
Definition: Assert.h:79
double * Coordinates
Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of node i.
Definition: dudley/src/NodeFile.h:159
An exception class that signals an invalid argument value.
Definition: EsysException.h:100
void clear()
resets both map and target
Definition: dudley/src/NodeMapping.h:32
index_t * globalNodesIndex
assigns each local node a global unique ID in a dense labeling
Definition: dudley/src/NodeFile.h:161
std::vector< index_t > IndexVector
Definition: DataTypes.h:64