/[escript]/trunk-mpi-branch/finley/src/NodeFile.h
ViewVC logotype

Contents of /trunk-mpi-branch/finley/src/NodeFile.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1120 - (show annotations)
Tue May 1 01:17:46 2007 UTC (13 years, 1 month ago) by ksteube
File MIME type: text/plain
File size: 6375 byte(s)
MPI branch now runs simplesolve.py with both useMPI=yes and useMPI=no

1 /*
2 ************************************************************
3 * Copyright 2006 by ACcESS MNRF *
4 * *
5 * http://www.access.edu.au *
6 * Primary Business: Queensland, Australia *
7 * Licensed under the Open Software License version 3.0 *
8 * http://www.opensource.org/licenses/osl-3.0.php *
9 * *
10 ************************************************************
11 */
12
13 /* Version: $Id$ */
14
15 #ifndef INC_FINLEY_NODEFILE
16 #define INC_FINLEY_NODEFILE
17
18 #define MAX_numDim 3
19
20 #include "Finley.h"
21 #include "escript/DataC.h"
22
23 #include "Distribution.h"
24 #include "./paso/CommBuffer.h"
25
26 struct Finley_NodeFile {
27 Paso_MPIInfo *MPIInfo; /* MPI information */
28 Finley_NodeDistribution *degreeOfFreedomDistribution; /* information about the distribution of degrees of freedom
29 on this subdomain and over other subdomains */
30 Finley_NodeDistribution *reducedDegreeOfFreedomDistribution;
31 Paso_CommBuffer *CommBuffer;
32 Paso_CommBuffer *reducedCommBuffer;
33
34 index_t *Dom; /* flags whether a node references an internal/boundary/external DOF. Is one of
35 either NODE_INTERNAL, NODE_BOUNDARY or NODE_EXTERNAL, as defined in
36 Mesh.h */
37 index_t isPrepared; /* UNKNOWN, UNPREPARED, PREPAED to indicate that the Nodes are ready for calculation */
38 dim_t numNodes; /* number of nodes */
39 dim_t numDim; /* spatial dimension */
40 index_t *Id; /* Id[i] is the id number of node i. this number is not really
41 used but useful when the nodes are
42 relabled. see also Finley_resolveNodeIds. */
43 /* in the entire code the term 'node id' refers to i but nor to Id[i] */
44 /* if not explicitly stated otherwise. */
45 index_t *Tag; /* Tag[i] is the tag of node i. */
46 double *Coordinates; /* Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of the */
47 /* node i. */
48 index_t* degreeOfFreedom; /* degreeOfFreedom[i] is the degree of freedom assigned to node i */
49 /* this index is used to consider periodic boundary conditions by assigning */
50 /* the same degreeOfFreedom to the same node */
51 index_t* degreeOfFreedomId; /* the ids of the degreeOfFreedom */
52 /* the following data are set by Finley_NodeFile_preparNodes */
53 dim_t numDegreesOfFreedom; /* number of degrees of freedom in the mesh (<=numNodes)*/
54 /* notice that numDegreesOfFreedom=max(degreeOfFreedom[:]) */
55 index_t* reducedDegreeOfFreedom; /* reducedDegreeOfFreedom[i] is the degree of freedom in the reduced version of the mesh */
56 /* assigned to node i. reducedDegreeOfFreedom[i]<0 indicates that the node is not appearing */
57 /* as a degree of freedom in the reduced version of the mesh. */
58 index_t* reducedDegreeOfFreedomId; /* the ids of the reducedDegreeOfFreedom */
59 dim_t reducedNumDegreesOfFreedom; /* number of degrees of freedom in the reduced version of the mesh */
60 /* notice that reducedNumDegreesOfFreedom=max(reducedDegreeOfFreedom[:]) */
61 /* this information is used by interfaces to postprocessing tools that can deal with linear elements only: */
62 dim_t reducedNumNodes; /* returnes the number of nodes in the mesh when looking at the corners */
63 /* of elements only */
64 index_t *toReduced; /* toReduced[i] is the node id in the reduced mesh. if toReduced[i]<0 it means that the node does not appear in the reduced mesh */
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 };
71
72
73
74 typedef struct Finley_NodeFile Finley_NodeFile;
75
76 #ifdef PASO_MPI
77 Finley_NodeFile* Finley_NodeFile_alloc(dim_t, Paso_MPIInfo *MPIInfo);
78 void Finley_NodeFile_allocTable(Finley_NodeFile*,dim_t);
79 #else
80 Finley_NodeFile* Finley_NodeFile_alloc(dim_t numDim);
81 void Finley_NodeFile_allocTable(Finley_NodeFile*,dim_t);
82 #endif
83
84 /* Finley_NodeFile * Finley_NodeFile_alloc(dim_t); */
85 void Finley_NodeFile_dealloc(Finley_NodeFile*);
86 void Finley_NodeFile_setIdRange(index_t*,index_t*,Finley_NodeFile*);
87 void Finley_NodeFile_scatter(index_t*,Finley_NodeFile*,Finley_NodeFile*);
88 void Finley_NodeFile_gather(index_t*,Finley_NodeFile*,Finley_NodeFile*);
89 void Finley_NodeFile_setCoordinates(Finley_NodeFile*,escriptDataC*);
90 void Finley_NodeFile_copyTable(dim_t,Finley_NodeFile*,dim_t,dim_t,Finley_NodeFile*);
91 void Finley_NodeFile_setTags(Finley_NodeFile*,const int,escriptDataC*);
92 void Finley_NodeFile_deallocTable(Finley_NodeFile*);
93
94 #endif
95
96 /*
97 * $Log$
98 * Revision 1.3 2005/09/15 03:44:23 jgs
99 * Merge of development branch dev-02 back to main trunk on 2005-09-15
100 *
101 * Revision 1.2.2.1 2005/09/07 06:26:20 gross
102 * the solver from finley are put into the standalone package paso now
103 *
104 * Revision 1.2 2005/07/08 04:07:55 jgs
105 * Merge of development branch back to main trunk on 2005-07-08
106 *
107 * Revision 1.1.1.1.2.1 2005/06/29 02:34:54 gross
108 * some changes towards 64 integers in finley
109 *
110 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
111 * initial import of project esys2
112 *
113 * Revision 1.2 2004/07/02 04:21:13 gross
114 * Finley C code has been included
115 *
116 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
117 * Initial version of eys using boost-python.
118 *
119 *
120 */

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26