/[escript]/branches/domexper/dudley/src/ElementFile.h
ViewVC logotype

Annotation of /branches/domexper/dudley/src/ElementFile.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3210 - (hide annotations)
Mon Sep 27 04:13:19 2010 UTC (8 years, 7 months ago) by jfenwick
File MIME type: text/plain
File size: 6415 byte(s)


1 jgs 82
2 ksteube 1312 /*******************************************************
3 ksteube 1811 *
4 jfenwick 2881 * Copyright (c) 2003-2010 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 jfenwick 3082 #ifndef INC_DUDLEY_ELEMENTFILE
16     #define INC_DUDLEY_ELEMENTFILE
17 jgs 82
18 jfenwick 3082 #include "Dudley.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 jfenwick 3086 struct Dudley_ElementFile_Jacobeans {
29     Dudley_Status_t status; /* status of mesh when jacobeans where updated last time */
30 gross 781 dim_t numDim; /* spatial dimension */
31 jfenwick 3207 // Dudley_ShapeFunction* BasisFunctions; /* basis function used */
32 jfenwick 3205 // dim_t numQuadTotal; /* total number of quadrature nodes used to calculate jacobeans */
33     dim_t numQuad;
34 jfenwick 3204 dim_t numShapes;
35     // dim_t numShapesTotal; /* total number of shape functions = BasisFunctions->numShapes */
36 gross 2748 dim_t numElements; /* number of elements */
37 jfenwick 3187 double* absD; /* used to compute volume */
38     double quadweight; /* used to compute volume */
39 gross 777 double* DSDX; /* derivatives of shape functions in global coordinates at quadrature points*/
40 gross 776 };
41    
42 jfenwick 3086 typedef struct Dudley_ElementFile_Jacobeans Dudley_ElementFile_Jacobeans;
43 gross 776
44 jfenwick 3086 struct Dudley_ElementFile {
45 bcumming 730 Paso_MPIInfo *MPIInfo;
46 ksteube 1312 Paso_MPI_rank *Owner;
47 jgs 82
48 jfenwick 3086 Dudley_ReferenceElementSet *referenceElementSet; /* the reference element to be used */
49 jgs 82
50 jgs 123 dim_t numElements; /* number of elements. */
51    
52     index_t *Id; /* Id[i] is the id nmber of
53 gross 2748 node i. this number is not
54     used but useful when
55     elements are resorted. in
56     the entire code the term
57     'element id' refers to i
58     but nor to Id[i] if not
59     explicitly stated
60     otherwise. */
61 jgs 82
62 gross 2748 index_t *Tag; /* Tag[i] is the tag of element i. */
63 jgs 82
64 gross 1716 index_t *tagsInUse; /* array of tags which are actually used */
65     dim_t numTagsInUse; /* number of tags used */
66    
67    
68 gross 2748 dim_t numNodes; /* number of nodes per element */
69 ksteube 1312 index_t *Nodes; /* Nodes[INDEX(k, i, numNodes)]
70 gross 2748 is the k-the node in the
71     i-the element. note that
72     in the way the nodes are
73     ordered Nodes[INDEX(k, i, 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 2748 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 532
85 jfenwick 3086 Dudley_ElementFile_Jacobeans* jacobeans; /* jacobeans of the shape function used for solution approximation */
86     Dudley_ElementFile_Jacobeans* jacobeans_reducedQ; /* jacobeans of the shape function used for solution approximation for reduced integration order*/
87 jfenwick 3210 dim_t numDim; /* spatial dimension of the domain */
88     dim_t numLocalDim; /* dimension of the element eg 2 for A line in 2D or 3D */
89     ElementTypeId etype;
90     dim_t numShapes;
91 jgs 82 };
92    
93 jfenwick 3086 typedef struct Dudley_ElementFile Dudley_ElementFile;
94     Dudley_ElementFile* Dudley_ElementFile_alloc(Dudley_ReferenceElementSet* referenceElementSet, Paso_MPIInfo *MPIInfo);
95     void Dudley_ElementFile_free(Dudley_ElementFile*);
96     void Dudley_ElementFile_allocTable(Dudley_ElementFile*,dim_t);
97     void Dudley_ElementFile_freeTable(Dudley_ElementFile*);
98     void Dudley_ElementFile_setElementDistribution(Dudley_ElementFile* in, dim_t* distribution);
99     dim_t Dudley_ElementFile_getGlobalNumElements(Dudley_ElementFile* in);
100     dim_t Dudley_ElementFile_getMyNumElements(Dudley_ElementFile* in);
101     index_t Dudley_ElementFile_getFirstElement(Dudley_ElementFile* in);
102     void Dudley_ElementFile_distributeByRankOfDOF(Dudley_ElementFile* self, Paso_MPI_rank* mpiRankOfDOF, index_t *Id);
103 bcumming 730
104 jfenwick 3086 void Dudley_ElementFile_createColoring(Dudley_ElementFile* in,dim_t numNodes,dim_t* degreeOfFreedom);
105     void Dudley_ElementFile_optimizeOrdering(Dudley_ElementFile** in);
106     void Dudley_ElementFile_setNodeRange(dim_t*,dim_t*,Dudley_ElementFile*);
107     void Dudley_ElementFile_relableNodes(dim_t*,dim_t,Dudley_ElementFile*);
108     void Dudley_ElementFile_markNodes(dim_t*,dim_t,dim_t,Dudley_ElementFile*,dim_t);
109     void Dudley_ElementFile_scatter(dim_t*,Dudley_ElementFile*,Dudley_ElementFile*);
110     void Dudley_ElementFile_gather(dim_t*,Dudley_ElementFile*,Dudley_ElementFile*);
111     void Dudley_ElementFile_copyTable(dim_t,Dudley_ElementFile*,dim_t,dim_t,Dudley_ElementFile*);
112     void Dudley_ElementFile_markDOFsConnectedToRange(index_t* mask,index_t offset,index_t marker,index_t firstDOF,index_t lastDOF,index_t *dofIndex,Dudley_ElementFile*in ,bool_t useLinear);
113 ksteube 1312
114 jfenwick 3086 void Dudley_ElementFile_setTags(Dudley_ElementFile* ,const int, escriptDataC*);
115     Dudley_ElementFile_Jacobeans* Dudley_ElementFile_Jacobeans_alloc(Dudley_ShapeFunction* );
116     void Dudley_ElementFile_Jacobeans_dealloc(Dudley_ElementFile_Jacobeans*);
117 jfenwick 3206 Dudley_ElementFile_Jacobeans* Dudley_ElementFile_borrowJacobeans(Dudley_ElementFile*, Dudley_NodeFile*, bool_t);
118 jfenwick 3086 void Dudley_ElementFile_setTagsInUse(Dudley_ElementFile* in);
119 jgs 82
120 gross 776
121 jfenwick 3086 #endif /* #ifndef INC_DUDLEY_ELEMENTFILE */
122 jgs 82

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26