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

Annotation of /trunk/finley/src/NodeFile.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 782 - (hide annotations)
Tue Jul 18 00:47:47 2006 UTC (13 years, 4 months ago) by bcumming
File MIME type: text/plain
File size: 6123 byte(s)
Large number of changes to Finley for meshing in MPI.

- optimisation and neatening up of rectcanglular mesh generation code
- first and second order 1D, 2D and 3D rectangular meshes are now
  available in finley and escript using MPI.
- reduced meshes now generated in MPI, and interpolation to and from 
  reduced data types now supported.  

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26