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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2748 - (hide annotations)
Tue Nov 17 07:32:59 2009 UTC (9 years, 9 months ago) by gross
File MIME type: text/plain
File size: 7097 byte(s)
Macro elements are implemented now. VTK writer for macro elements still needs testing.
1 jgs 82
2 ksteube 1312 /*******************************************************
3 ksteube 1811 *
4 jfenwick 2548 * Copyright (c) 2003-2009 by University of Queensland
5 ksteube 1811 * Earth Systems Science Computational Center (ESSCC)
6     * http://www.uq.edu.au/esscc
7     *
8     * Primary Business: Queensland, Australia
9     * Licensed under the Open Software License version 3.0
10     * http://www.opensource.org/licenses/osl-3.0.php
11     *
12     *******************************************************/
13 ksteube 1312
14 ksteube 1811
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 gross 2748 #include "ReferenceElementSets.h"
21 robwdcock 682 #include "escript/DataC.h"
22 jgs 82
23 bcumming 730 #ifdef PASO_MPI
24     #include "paso/Paso_MPI.h"
25     #endif
26    
27 gross 2748
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 2748 Finley_ShapeFunction* BasisFunctions; /* basis function used */
32     dim_t numQuadTotal; /* total number of quadrature nodes used to calculate jacobeans = numSub * BasisFunctions->numQuadNodes*/
33     dim_t numSides; /* number of sides (=1 normal, =2 contact) */
34     index_t* offsets; /* offset to sides (borrowed reference) */
35     dim_t numSub; /* number of subelements */
36     dim_t numShapesTotal; /* total number of shape functions = BasisFunctions->numShapes * numSides */
37     index_t* node_selection; /* local node selection list of length numSub * numShapesTotal (borrowed reference) */
38     dim_t numElements; /* number of elements */
39 gross 777 double* volume; /* local volume */
40     double* DSDX; /* derivatives of shape functions in global coordinates at quadrature points*/
41 gross 776 };
42    
43     typedef struct Finley_ElementFile_Jacobeans Finley_ElementFile_Jacobeans;
44    
45 jgs 82 struct Finley_ElementFile {
46 bcumming 730 Paso_MPIInfo *MPIInfo;
47 ksteube 1312 Paso_MPI_rank *Owner;
48 jgs 82
49 gross 2748 Finley_ReferenceElementSet *referenceElementSet; /* the reference element to be used */
50 jgs 82
51 jgs 123 dim_t numElements; /* number of elements. */
52    
53     index_t *Id; /* Id[i] is the id nmber of
54 gross 2748 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 jgs 82
63 gross 2748 index_t *Tag; /* Tag[i] is the tag of element i. */
64 jgs 82
65 gross 1716 index_t *tagsInUse; /* array of tags which are actually used */
66     dim_t numTagsInUse; /* number of tags used */
67    
68    
69 gross 2748 dim_t numNodes; /* number of nodes per element */
70 ksteube 1312 index_t *Nodes; /* Nodes[INDEX(k, i, numNodes)]
71 gross 2748 is the k-the node in the
72     i-the element. note that
73     in the way the nodes are
74     ordered Nodes[INDEX(k, i, numNodes)
75     is k-the node of element i
76     when refering to the
77     linear version of the
78     mesh. */
79 jgs 123 index_t minColor; /* minimum color */
80     index_t maxColor; /* maximum color */
81 gross 2748 index_t *Color; /* assigns each element a color. elements with the same color
82     are don't share a node so they can be processed simultaneously
83     at anytime Color must provide a valid value. In any case one can set
84     Color[e]=e for all e */
85     index_t order; /* order of the element integration scheme*/
86     index_t reduced_order; /* order of the reduced element integration scheme*/
87 gross 532
88 gross 2748 Finley_ElementFile_Jacobeans* jacobeans; /* jacobeans of the shape function used for solution approximation */
89     Finley_ElementFile_Jacobeans* jacobeans_reducedS; /* jacobeans of the shape function used for solution approximation for reduced order of shape function*/
90     Finley_ElementFile_Jacobeans* jacobeans_reducedQ; /* jacobeans of the shape function used for solution approximation for reduced integration order*/
91     Finley_ElementFile_Jacobeans* jacobeans_reducedS_reducedQ; /* jacobeans of the shape function used for solution approximation for reduced integration order and reduced order of shape function*/
92 gross 776
93 jgs 82 };
94    
95     typedef struct Finley_ElementFile Finley_ElementFile;
96 gross 2748 Finley_ElementFile* Finley_ElementFile_alloc(Finley_ReferenceElementSet* referenceElementSet, Paso_MPIInfo *MPIInfo);
97 ksteube 1312 void Finley_ElementFile_free(Finley_ElementFile*);
98     void Finley_ElementFile_allocTable(Finley_ElementFile*,dim_t);
99     void Finley_ElementFile_freeTable(Finley_ElementFile*);
100     void Finley_ElementFile_setElementDistribution(Finley_ElementFile* in, dim_t* distribution);
101     dim_t Finley_ElementFile_getGlobalNumElements(Finley_ElementFile* in);
102     dim_t Finley_ElementFile_getMyNumElements(Finley_ElementFile* in);
103     index_t Finley_ElementFile_getFirstElement(Finley_ElementFile* in);
104     void Finley_ElementFile_distributeByRankOfDOF(Finley_ElementFile* self, Paso_MPI_rank* mpiRankOfDOF, index_t *Id);
105 bcumming 730
106 ksteube 1312 void Finley_ElementFile_createColoring(Finley_ElementFile* in,dim_t numNodes,dim_t* degreeOfFreedom);
107     void Finley_ElementFile_optimizeOrdering(Finley_ElementFile** in);
108 jgs 123 void Finley_ElementFile_setNodeRange(dim_t*,dim_t*,Finley_ElementFile*);
109     void Finley_ElementFile_relableNodes(dim_t*,dim_t,Finley_ElementFile*);
110 ksteube 1770 void Finley_ElementFile_markNodes(dim_t*,dim_t,dim_t,Finley_ElementFile*,dim_t);
111 jgs 123 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 ksteube 1312 void Finley_ElementFile_markDOFsConnectedToRange(index_t* mask,index_t offset,index_t marker,index_t firstDOF,index_t lastDOF,index_t *dofIndex,Finley_ElementFile*in ,bool_t useLinear);
115    
116 gross 2748 void Finley_ElementFile_setTags(Finley_ElementFile* ,const int, escriptDataC*);
117     Finley_ElementFile_Jacobeans* Finley_ElementFile_Jacobeans_alloc(Finley_ShapeFunction* );
118 gross 776 void Finley_ElementFile_Jacobeans_dealloc(Finley_ElementFile_Jacobeans*);
119     Finley_ElementFile_Jacobeans* Finley_ElementFile_borrowJacobeans(Finley_ElementFile*, Finley_NodeFile*, bool_t, bool_t);
120 gross 1716 void Finley_ElementFile_setTagsInUse(Finley_ElementFile* in);
121 jgs 82
122 gross 776
123 jgs 82 #endif /* #ifndef INC_FINLEY_ELEMENTFILE */
124    

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26