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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6009 - (show annotations)
Wed Mar 2 04:13:26 2016 UTC (3 years, 1 month ago) by caltinay
File MIME type: text/plain
File size: 6135 byte(s)
Much needed sync with trunk...

1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2016 by The 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 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16
17 #ifndef __DUDLEY_ELEMENTFILE_H__
18 #define __DUDLEY_ELEMENTFILE_H__
19
20 #include "Dudley.h"
21 #include "NodeFile.h"
22 #include "ElementType.h"
23
24 namespace dudley {
25
26 typedef struct {
27 Dudley_Status_t status; /* status of mesh when jacobians where updated last time */
28 dim_t numDim; /* spatial dimension */
29 dim_t numQuad; /* number of quadrature nodes used to calculate jacobians */
30 dim_t numShapes; /* number of shape functions */
31 dim_t numElements; /* number of elements */
32 double *absD; /* used to compute volume */
33 double quadweight; /* used to compute volume */
34 double *DSDX; /* derivatives of shape functions in global coordinates at quadrature points */
35 } Dudley_ElementFile_Jacobians;
36
37 struct Dudley_ElementFile {
38 escript::JMPI MPIInfo;
39 int *Owner;
40
41 dim_t numElements; /* number of elements. */
42
43 index_t *Id; /* Id[i] is the id nmber of
44 node i. this number is not
45 used but useful when
46 elements are resorted. in
47 the entire code the term
48 'element id' refers to i
49 but nor to Id[i] if not
50 explicitly stated
51 otherwise. */
52
53 index_t *Tag; /* Tag[i] is the tag of element i. */
54
55 index_t *tagsInUse; /* array of tags which are actually used */
56 dim_t numTagsInUse; /* number of tags used */
57
58 dim_t numNodes; /* number of nodes per element */
59 index_t *Nodes; /* Nodes[INDEX(k, i, numNodes)]
60 is the k-the node in the
61 i-the element. note that
62 in the way the nodes are
63 ordered Nodes[INDEX(k, i, numNodes)
64 is k-the node of element i
65 when refering to the
66 linear version of the
67 mesh. */
68 index_t minColor; /* minimum color */
69 index_t maxColor; /* maximum color */
70 index_t *Color; /* assigns each element a color. elements with the same color
71 are don't share a node so they can be processed simultaneously
72 at anytime Color must provide a valid value. In any case one can set
73 Color[e]=e for all e */
74
75 Dudley_ElementFile_Jacobians *jacobians; /* jacobians of the shape function used for solution approximation */
76 Dudley_ElementFile_Jacobians *jacobians_reducedQ; /* jacobians of the shape function used for solution approximation for reduced integration order */
77 dim_t numDim; /* spatial dimension of the domain */
78 dim_t numLocalDim; /* dimension of the element eg 2 for A line in 2D or 3D */
79 Dudley_ElementTypeId etype; /* element type */
80 const char *ename; /* name of element type */
81 dim_t numShapes; /* number of shape functions */
82 };
83
84 typedef struct Dudley_ElementFile Dudley_ElementFile;
85 Dudley_ElementFile *Dudley_ElementFile_alloc(Dudley_ElementTypeId etype, escript::JMPI& MPIInfo);
86 void Dudley_ElementFile_free(Dudley_ElementFile *);
87 void Dudley_ElementFile_allocTable(Dudley_ElementFile *, dim_t);
88 void Dudley_ElementFile_freeTable(Dudley_ElementFile *);
89 void Dudley_ElementFile_setElementDistribution(Dudley_ElementFile * in, dim_t * distribution);
90 dim_t Dudley_ElementFile_getGlobalNumElements(Dudley_ElementFile * in);
91 dim_t Dudley_ElementFile_getMyNumElements(Dudley_ElementFile * in);
92 index_t Dudley_ElementFile_getFirstElement(Dudley_ElementFile * in);
93 void Dudley_ElementFile_distributeByRankOfDOF(Dudley_ElementFile * self, int * mpiRankOfDOF, index_t * Id);
94
95 void Dudley_ElementFile_createColoring(Dudley_ElementFile * in, dim_t numNodes, dim_t * degreeOfFreedom);
96 void Dudley_ElementFile_optimizeOrdering(Dudley_ElementFile ** in);
97 void Dudley_ElementFile_setNodeRange(dim_t *, dim_t *, Dudley_ElementFile *);
98 void Dudley_ElementFile_relableNodes(dim_t *, dim_t, Dudley_ElementFile *);
99 void Dudley_ElementFile_markNodes(dim_t *, dim_t, dim_t, Dudley_ElementFile *, bool);
100 void Dudley_ElementFile_scatter(dim_t *, Dudley_ElementFile *, Dudley_ElementFile *);
101 void Dudley_ElementFile_gather(dim_t *, Dudley_ElementFile *, Dudley_ElementFile *);
102 void Dudley_ElementFile_copyTable(dim_t, Dudley_ElementFile *, dim_t, dim_t, Dudley_ElementFile *);
103 void Dudley_ElementFile_markDOFsConnectedToRange(index_t * mask, index_t offset, index_t marker, index_t firstDOF,
104 index_t lastDOF, index_t * dofIndex, Dudley_ElementFile * in,
105 bool useLinear);
106
107 void Dudley_ElementFile_setTags(Dudley_ElementFile *, const int, const escript::Data *);
108 Dudley_ElementFile_Jacobians *Dudley_ElementFile_Jacobians_alloc(void);
109 void Dudley_ElementFile_Jacobians_dealloc(Dudley_ElementFile_Jacobians *);
110 Dudley_ElementFile_Jacobians *Dudley_ElementFile_borrowJacobians(const Dudley_ElementFile*, const Dudley_NodeFile*, bool);
111 void Dudley_ElementFile_setTagsInUse(Dudley_ElementFile * in);
112
113 } // namespace dudley
114
115 #endif // __DUDLEY_ELEMENTFILE_H__
116

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26