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

Contents of /trunk/finley/src/ElementFile.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 751 - (show annotations)
Mon Jun 26 01:46:34 2006 UTC (12 years, 9 months ago) by bcumming
File MIME type: text/plain
File size: 5926 byte(s)
Changes relating to the MPI version of escript
The standard OpenMP version of escript is unchanged

- updated data types (Finley_Mesh, Finley_NodeFile, etc) to store meshes
  over multiple MPI processes.
- added CommBuffer code in Paso for communication of Data associated
  with distributed meshes
- updates in Finley and Escript to support distributed data and operations
  on distributed data (such as interpolation).
- construction of RHS in MPI, so that simple explicit schemes (such as
  /docs/examples/wave.py without IO and the Locator) can run in MPI.
- updated mesh generation for first order line, rectangle and brick
  meshes and second order line meshes in MPI.        
- small changes to trunk/SConstruct and trunk/scons/ess_options.py to
  build the MPI version, these changes are turned off by default.

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_ELEMENTFILE
16 #define INC_FINLEY_ELEMENTFILE
17
18 #include "Finley.h"
19 #include "ReferenceElements.h"
20 #include "escript/DataC.h"
21
22 #ifdef PASO_MPI
23 #include "paso/Paso_MPI.h"
24 #include "Distribution.h"
25 #endif
26
27 struct Finley_ElementFile {
28 #ifdef PASO_MPI
29 Paso_MPIInfo *MPIInfo;
30 Finley_ElementDistribution *elementDistribution;
31 #endif
32
33 Finley_RefElement* ReferenceElement; /* the reference element, see
34 Reference element.c */
35
36 Finley_RefElement* LinearReferenceElement; /* the reference element for
37 the linear mesh. it is
38 vital that both are using
39 the same quadrature
40 scheme */
41
42 dim_t numElements; /* number of elements. */
43
44 index_t *Id; /* Id[i] is the id nmber of
45 node i. this number is not
46 used but useful when
47 elements are resorted. in
48 the entire code the term
49 'element id' refers to i
50 but nor to Id[i] if not
51 explicitly stated
52 otherwise. */
53
54 index_t *Tag; /* Tag[i] is the tag of
55 element i. */
56
57 index_t *Nodes; /* Nodes[INDEX(k, i,
58 ReferenceElement.Type.numNodes)
59 is the k-the node in the
60 i-the element. note that
61 in the way the nodes are
62 ordered Nodes[INDEX(k, i,
63 LinearReferenceElement.Type.numNodes)
64 is k-the node of element i
65 when refering to the
66 linear version of the
67 mesh. */
68 index_t minColor; /* minimum color */
69 index_t maxColor; /* maximum color */
70 index_t *Color; /* assigns each element a color. elements with the same color */
71 /* are don't share a node so they can be processed simultaneously */
72 /* at anytime Color must provide a valid value. In any case one can set */
73 /* Color[e]=e for all e */
74 index_t order; /* order of the element */
75
76 bool_t volume_is_valid; /* true if volume and DvDV are valid */
77 double* volume; /* local volume */
78 double* DvDV; /* inverse jacobean of element parametrization at quadrature points*/
79 bool_t DSDV_is_valid; /* true is DSDV is valid */
80 double* DSDV; /* derivatives of shape functions in global coordinates at quadrature points*/
81 bool_t DSLinearDV_is_valid; /* true if DSLinearDV is valid */
82 double* DSLinearDV; /* derivatives of linear shape functions in gloabl coordinates at quadrature points*/
83 bool_t X_is_valid; /* true if X is valid */
84 double* X; /* global coordniates of quadrature points */
85 };
86
87 typedef struct Finley_ElementFile Finley_ElementFile;
88
89 #ifndef PASO_MPI
90 Finley_ElementFile* Finley_ElementFile_alloc(ElementTypeId,dim_t);
91 #else
92 Finley_ElementFile* Finley_ElementFile_alloc( ElementTypeId, dim_t, Paso_MPIInfo* );
93 void Finley_ElementFile_markInternalElementNodes(index_t* mask,index_t offset,Finley_ElementFile* in,bool_t useLinear);
94 void Finley_ElementFile_markBoundaryElementNodes(index_t* mask,index_t offset,Finley_ElementFile* in,bool_t useLinear);
95 void Finley_ElementFile_markInternalElementDOF(index_t* mask,index_t offset,index_t *degreeOfFreedom, Finley_ElementFile* in,bool_t useLinear);
96 void Finley_ElementFile_markBoundaryElementDOF(index_t* mask,index_t offset,index_t *degreeOfFreedom,Finley_ElementFile* in,bool_t useLinear);
97 #endif
98
99 void Finley_ElementFile_dealloc(Finley_ElementFile*);
100 void Finley_ElementFile_setCoordinates(Finley_ElementFile*,escriptDataC*);
101 void Finley_ElementFile_improveColoring(Finley_ElementFile* in,dim_t numNodes,dim_t* degreeOfFreedom);
102 void Finley_ElementFile_optimizeDistribution(Finley_ElementFile** in);
103 void Finley_ElementFile_setNodeRange(dim_t*,dim_t*,Finley_ElementFile*);
104 void Finley_ElementFile_relableNodes(dim_t*,dim_t,Finley_ElementFile*);
105 void Finley_ElementFile_markNodes(dim_t*,dim_t,Finley_ElementFile*,dim_t);
106 void Finley_ElementFile_scatter(dim_t*,Finley_ElementFile*,Finley_ElementFile*);
107 void Finley_ElementFile_gather(dim_t*,Finley_ElementFile*,Finley_ElementFile*);
108 void Finley_ElementFile_copyTable(dim_t,Finley_ElementFile*,dim_t,dim_t,Finley_ElementFile*);
109 void Finley_ElementFile_allocTable(Finley_ElementFile*,dim_t);
110 void Finley_ElementFile_deallocTable(Finley_ElementFile*);
111 void Finley_ElementFile_prepare(Finley_ElementFile** in,dim_t numNodes,dim_t* degreeOfFreedom);
112
113 #endif /* #ifndef INC_FINLEY_ELEMENTFILE */
114
115 /*
116 * $Log$
117 * Revision 1.3 2005/09/15 03:44:21 jgs
118 * Merge of development branch dev-02 back to main trunk on 2005-09-15
119 *
120 * Revision 1.2.2.1 2005/09/07 06:26:18 gross
121 * the solver from finley are put into the standalone package paso now
122 *
123 * Revision 1.2 2005/07/08 04:07:49 jgs
124 * Merge of development branch back to main trunk on 2005-07-08
125 *
126 * Revision 1.1.1.1.2.1 2005/06/29 02:34:49 gross
127 * some changes towards 64 integers in finley
128 *
129 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
130 * initial import of project esys2
131 *
132 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
133 * Initial version of eys using boost-python.
134 *
135 *
136 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26