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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 964 - (show annotations)
Tue Feb 13 05:10:26 2007 UTC (12 years, 7 months ago) by gross
File MIME type: text/plain
File size: 6280 byte(s)
The set/getRefVal functions of Data objects have been removed (mainly to avoid later problems with MPI).
Moreover, a faster access to the reference id of samples has been introduced. I don't think that anybody will
profit form this at this stage but it will allow a faster dump of data objects.


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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26