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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 730 - (show annotations)
Mon May 15 04:03:49 2006 UTC (13 years, 5 months ago) by bcumming
File MIME type: text/plain
File size: 5399 byte(s)


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 #endif
94
95 void Finley_ElementFile_dealloc(Finley_ElementFile*);
96 void Finley_ElementFile_setCoordinates(Finley_ElementFile*,escriptDataC*);
97 void Finley_ElementFile_improveColoring(Finley_ElementFile* in,dim_t numNodes,dim_t* degreeOfFreedom);
98 void Finley_ElementFile_optimizeDistribution(Finley_ElementFile** in);
99 void Finley_ElementFile_setNodeRange(dim_t*,dim_t*,Finley_ElementFile*);
100 void Finley_ElementFile_relableNodes(dim_t*,dim_t,Finley_ElementFile*);
101 void Finley_ElementFile_markNodes(dim_t*,dim_t,Finley_ElementFile*,dim_t);
102 void Finley_ElementFile_scatter(dim_t*,Finley_ElementFile*,Finley_ElementFile*);
103 void Finley_ElementFile_gather(dim_t*,Finley_ElementFile*,Finley_ElementFile*);
104 void Finley_ElementFile_copyTable(dim_t,Finley_ElementFile*,dim_t,dim_t,Finley_ElementFile*);
105 void Finley_ElementFile_allocTable(Finley_ElementFile*,dim_t);
106 void Finley_ElementFile_deallocTable(Finley_ElementFile*);
107 void Finley_ElementFile_prepare(Finley_ElementFile** in,dim_t numNodes,dim_t* degreeOfFreedom);
108
109 #endif /* #ifndef INC_FINLEY_ELEMENTFILE */
110
111 /*
112 * $Log$
113 * Revision 1.3 2005/09/15 03:44:21 jgs
114 * Merge of development branch dev-02 back to main trunk on 2005-09-15
115 *
116 * Revision 1.2.2.1 2005/09/07 06:26:18 gross
117 * the solver from finley are put into the standalone package paso now
118 *
119 * Revision 1.2 2005/07/08 04:07:49 jgs
120 * Merge of development branch back to main trunk on 2005-07-08
121 *
122 * Revision 1.1.1.1.2.1 2005/06/29 02:34:49 gross
123 * some changes towards 64 integers in finley
124 *
125 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
126 * initial import of project esys2
127 *
128 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
129 * Initial version of eys using boost-python.
130 *
131 *
132 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26