Escript  Revision_4320
dudley/src/NodeFile.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15 
16 #ifndef INC_DUDLEY_NODEFILE
17 #define INC_DUDLEY_NODEFILE
18 
19 #define MAX_numDim 3
20 
21 #include "Dudley.h"
22 #include "NodeMapping.h"
23 #include "escript/DataC.h"
24 #include "paso/Distribution.h"
25 #include "paso/Coupler.h"
26 
28  Esys_MPIInfo *MPIInfo; /* MPI information */
29 
30  dim_t numNodes; /* number of nodes */
31  dim_t numDim; /* spatial dimension */
32  index_t *Id; /* Id[i] is the id number of node i. It need to be unique. */
33  index_t *Tag; /* Tag[i] is the tag of node i. */
34  index_t *tagsInUse; /* array of tags which are actually used */
35  dim_t numTagsInUse; /* number of tags used */
36 
37  index_t *globalDegreesOfFreedom; /* globalDegreesOfFreedom[i] is the global degree of freedom assigned to node i */
38  /* this index is used to consider periodic boundary conditions by assigning */
39  /* the same degreesOfFreedom to the same node */
40  double *Coordinates; /* Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of the */
41  /* node i. */
42  index_t *globalReducedDOFIndex; /* assigns each local node a global unique Id in a dens labeling of reduced DOF */
43  /* value <0 indicates that the DOF is not used */
44  index_t *globalReducedNodesIndex; /* assigns each local node a global unique Id in a dens labeling */
45  /* value <0 indicates that the DOF is not used */
46  index_t *globalNodesIndex; /* assigns each local reduced node a global unique Id in a dens labeling */
47 
52 
57 
60 
61  /* these a the packed versions of Id */
65 
66  int status; /* the status counts the updates done on the node coordinates */
67  /* the value of status is increased by when the node coordinates are updated. */
68 
69 };
70 
72 
73 
83 
88 
89 /* returns the number of target */
94 
95 /* returns the mapping from local nodes to a target */
100 /* returns the mapping from target to the local nodes */
105 
113 
118 
122  const index_t * dof_distribution);
125 void Dudley_NodeFile_assignMPIRankToDOFs(Dudley_NodeFile * in, Esys_MPI_rank * mpiRankOfDOF, index_t * distribution);
129  index_t *, index_t *, dim_t numDim, double *, double *);
133  index_t *, index_t *, dim_t numDim, double *, double *);
138 
139 /* ===================== */
143 
144 #endif