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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26