ESScript  Revision_4488
dudley/src/ElementFile.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15 
16 #ifndef INC_DUDLEY_ELEMENTFILE
17 #define INC_DUDLEY_ELEMENTFILE
18 
19 #include "Dudley.h"
20 #include "NodeFile.h"
21 #include "ElementType.h"
22 #include "escript/DataC.h"
23 
24 #ifdef ESYS_MPI
25 #include "esysUtils/Esys_MPI.h"
26 #endif
27 
28 typedef struct {
29  Dudley_Status_t status; /* status of mesh when jacobeans where updated last time */
30  dim_t numDim; /* spatial dimension */
31  dim_t numQuad; /* number of quadrature nodes used to calculate jacobeans */
32  dim_t numShapes; /* number of shape functions */
33  dim_t numElements; /* number of elements */
34  double *absD; /* used to compute volume */
35  double quadweight; /* used to compute volume */
36  double *DSDX; /* derivatives of shape functions in global coordinates at quadrature points */
38 
42 
43  dim_t numElements; /* number of elements. */
44 
45  index_t *Id; /* Id[i] is the id nmber of
46  node i. this number is not
47  used but useful when
48  elements are resorted. in
49  the entire code the term
50  'element id' refers to i
51  but nor to Id[i] if not
52  explicitly stated
53  otherwise. */
54 
55  index_t *Tag; /* Tag[i] is the tag of element i. */
56 
57  index_t *tagsInUse; /* array of tags which are actually used */
58  dim_t numTagsInUse; /* number of tags used */
59 
60  dim_t numNodes; /* number of nodes per element */
61  index_t *Nodes; /* Nodes[INDEX(k, i, numNodes)]
62  is the k-the node in the
63  i-the element. note that
64  in the way the nodes are
65  ordered Nodes[INDEX(k, i, numNodes)
66  is k-the node of element i
67  when refering to the
68  linear version of the
69  mesh. */
70  index_t minColor; /* minimum color */
71  index_t maxColor; /* maximum color */
72  index_t *Color; /* assigns each element a color. elements with the same color
73  are don't share a node so they can be processed simultaneously
74  at anytime Color must provide a valid value. In any case one can set
75  Color[e]=e for all e */
76 
77  Dudley_ElementFile_Jacobeans *jacobeans; /* jacobeans of the shape function used for solution approximation */
78  Dudley_ElementFile_Jacobeans *jacobeans_reducedQ; /* jacobeans of the shape function used for solution approximation for reduced integration order */
79  dim_t numDim; /* spatial dimension of the domain */
80  dim_t numLocalDim; /* dimension of the element eg 2 for A line in 2D or 3D */
81  Dudley_ElementTypeId etype; /* element type */
82  const char *ename; /* name of element type */
83  dim_t numShapes; /* number of shape functions */
84 };
85 
96 
105 void Dudley_ElementFile_markDOFsConnectedToRange(index_t * mask, index_t offset, index_t marker, index_t firstDOF,
106  index_t lastDOF, index_t * dofIndex, Dudley_ElementFile * in,
107  bool_t useLinear);
108 
114 
115 #endif /* #ifndef INC_DUDLEY_ELEMENTFILE */