Escript  Revision_4320
finley/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 
17 #ifndef INC_FINLEY_NODEFILE
18 #define INC_FINLEY_NODEFILE
19 
20 #define MAX_numDim 3
21 
22 #include "Finley.h"
23 #include "NodeMapping.h"
24 #include "escript/DataC.h"
25 #include "paso/Distribution.h"
26 #include "paso/Coupler.h"
27 #include "esysUtils/Esys_MPI.h"
28 
30  Esys_MPIInfo *MPIInfo; /* MPI information */
31 
32  dim_t numNodes; /* number of nodes */
33  dim_t numDim; /* spatial dimension */
34  index_t *Id; /* Id[i] is the id number of node i. It needs to be unique. */
35  index_t *Tag; /* Tag[i] is the tag of node i. */
36  index_t *tagsInUse; /* array of tags which are actually used */
37  dim_t numTagsInUse; /* number of tags used */
38 
39  index_t* globalDegreesOfFreedom; /* globalDegreesOfFreedom[i] is the global degree of freedom assigned to node i */
40  /* this index is used to consider periodic boundary conditions by assigning */
41  /* the same degreesOfFreedom to the same node */
42  double *Coordinates; /* Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of the */
43  /* node i. */
44  index_t *globalReducedDOFIndex; /* assigns each local node a global unique Id in a dense labeling of reduced DOF*/
45  /* value <0 indicates that the DOF is not used */
46  index_t *globalReducedNodesIndex; /* assigns each local node a global unique Id in a dense labeling */
47  /* value <0 indicates that the DOF is not used */
48  index_t *globalNodesIndex; /* assigns each local reduced node a global unique Id in a dense labeling */
49 
50 
55 
60 
63 
64  /* these are the packed versions of Id */
68 
69 
70  int status; /* the status counts the updates done on the node coordinates */
71  /* the value of status is increased by 1 when the node coordinates are updated.*/
72 };
73 
75 
76 
77 
87 
92 
93 /* returns the number of target */
98 
99 /* returns the mapping from local nodes to a target */
104 /* returns the mapping from target to the local nodes */
109 
117 
118 
123 
126 dim_t Finley_NodeFile_createDenseNodeLabeling(Finley_NodeFile* in, index_t* node_distribution, const index_t* dof_distribution);
129 void Finley_NodeFile_assignMPIRankToDOFs(Finley_NodeFile* in,Esys_MPI_rank* mpiRankOfDOF, index_t *distribution);
140 
141 /* ===================== */
145 
146 #endif
147