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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3144 - (show annotations)
Fri Sep 3 00:49:02 2010 UTC (8 years, 7 months ago) by jfenwick
File MIME type: text/plain
File size: 6641 byte(s)
row_node, col_node (Assemble params), node_selection 
removed
1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2010 by University of Queensland
5 * 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
14
15 #ifndef INC_DUDLEY_ELEMENTFILE
16 #define INC_DUDLEY_ELEMENTFILE
17
18 #include "Dudley.h"
19 #include "NodeFile.h"
20 #include "ReferenceElementSets.h"
21 #include "escript/DataC.h"
22
23 #ifdef PASO_MPI
24 #include "paso/Paso_MPI.h"
25 #endif
26
27
28 struct Dudley_ElementFile_Jacobeans {
29 Dudley_Status_t status; /* status of mesh when jacobeans where updated last time */
30 dim_t numDim; /* spatial dimension */
31 Dudley_ShapeFunction* BasisFunctions; /* basis function used */
32 dim_t numQuadTotal; /* total number of quadrature nodes used to calculate jacobeans = numSub * BasisFunctions->numQuadNodes*/
33 index_t* offsets; /* offset to sides (borrowed reference) */
34 dim_t numShapesTotal; /* total number of shape functions = BasisFunctions->numShapes * numSides */
35 dim_t numElements; /* number of elements */
36 double* volume; /* local volume */
37 double* DSDX; /* derivatives of shape functions in global coordinates at quadrature points*/
38 };
39
40 typedef struct Dudley_ElementFile_Jacobeans Dudley_ElementFile_Jacobeans;
41
42 struct Dudley_ElementFile {
43 Paso_MPIInfo *MPIInfo;
44 Paso_MPI_rank *Owner;
45
46 Dudley_ReferenceElementSet *referenceElementSet; /* the reference element to be used */
47
48 dim_t numElements; /* number of elements. */
49
50 index_t *Id; /* Id[i] is the id nmber of
51 node i. this number is not
52 used but useful when
53 elements are resorted. in
54 the entire code the term
55 'element id' refers to i
56 but nor to Id[i] if not
57 explicitly stated
58 otherwise. */
59
60 index_t *Tag; /* Tag[i] is the tag of element i. */
61
62 index_t *tagsInUse; /* array of tags which are actually used */
63 dim_t numTagsInUse; /* number of tags used */
64
65
66 dim_t numNodes; /* number of nodes per element */
67 index_t *Nodes; /* Nodes[INDEX(k, i, 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, numNodes)
72 is k-the node of element i
73 when refering to the
74 linear version of the
75 mesh. */
76 index_t minColor; /* minimum color */
77 index_t maxColor; /* maximum color */
78 index_t *Color; /* assigns each element a color. elements with the same color
79 are don't share a node so they can be processed simultaneously
80 at anytime Color must provide a valid value. In any case one can set
81 Color[e]=e for all e */
82
83 Dudley_ElementFile_Jacobeans* jacobeans; /* jacobeans of the shape function used for solution approximation */
84 Dudley_ElementFile_Jacobeans* jacobeans_reducedS; /* jacobeans of the shape function used for solution approximation for reduced order of shape function*/
85 Dudley_ElementFile_Jacobeans* jacobeans_reducedQ; /* jacobeans of the shape function used for solution approximation for reduced integration order*/
86 Dudley_ElementFile_Jacobeans* jacobeans_reducedS_reducedQ; /* jacobeans of the shape function used for solution approximation for reduced integration order and reduced order of shape function*/
87
88 };
89
90 typedef struct Dudley_ElementFile Dudley_ElementFile;
91 Dudley_ElementFile* Dudley_ElementFile_alloc(Dudley_ReferenceElementSet* referenceElementSet, Paso_MPIInfo *MPIInfo);
92 void Dudley_ElementFile_free(Dudley_ElementFile*);
93 void Dudley_ElementFile_allocTable(Dudley_ElementFile*,dim_t);
94 void Dudley_ElementFile_freeTable(Dudley_ElementFile*);
95 void Dudley_ElementFile_setElementDistribution(Dudley_ElementFile* in, dim_t* distribution);
96 dim_t Dudley_ElementFile_getGlobalNumElements(Dudley_ElementFile* in);
97 dim_t Dudley_ElementFile_getMyNumElements(Dudley_ElementFile* in);
98 index_t Dudley_ElementFile_getFirstElement(Dudley_ElementFile* in);
99 void Dudley_ElementFile_distributeByRankOfDOF(Dudley_ElementFile* self, Paso_MPI_rank* mpiRankOfDOF, index_t *Id);
100
101 void Dudley_ElementFile_createColoring(Dudley_ElementFile* in,dim_t numNodes,dim_t* degreeOfFreedom);
102 void Dudley_ElementFile_optimizeOrdering(Dudley_ElementFile** in);
103 void Dudley_ElementFile_setNodeRange(dim_t*,dim_t*,Dudley_ElementFile*);
104 void Dudley_ElementFile_relableNodes(dim_t*,dim_t,Dudley_ElementFile*);
105 void Dudley_ElementFile_markNodes(dim_t*,dim_t,dim_t,Dudley_ElementFile*,dim_t);
106 void Dudley_ElementFile_scatter(dim_t*,Dudley_ElementFile*,Dudley_ElementFile*);
107 void Dudley_ElementFile_gather(dim_t*,Dudley_ElementFile*,Dudley_ElementFile*);
108 void Dudley_ElementFile_copyTable(dim_t,Dudley_ElementFile*,dim_t,dim_t,Dudley_ElementFile*);
109 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);
110
111 void Dudley_ElementFile_setTags(Dudley_ElementFile* ,const int, escriptDataC*);
112 Dudley_ElementFile_Jacobeans* Dudley_ElementFile_Jacobeans_alloc(Dudley_ShapeFunction* );
113 void Dudley_ElementFile_Jacobeans_dealloc(Dudley_ElementFile_Jacobeans*);
114 Dudley_ElementFile_Jacobeans* Dudley_ElementFile_borrowJacobeans(Dudley_ElementFile*, Dudley_NodeFile*, bool_t, bool_t);
115 void Dudley_ElementFile_setTagsInUse(Dudley_ElementFile* in);
116
117
118 #endif /* #ifndef INC_DUDLEY_ELEMENTFILE */
119

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26