/[escript]/branches/arrayview_from_1695_trunk/finley/src/ElementFile.h
ViewVC logotype

Annotation of /branches/arrayview_from_1695_trunk/finley/src/ElementFile.h

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26