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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

1 jgs 82
2 jfenwick 3981 /*****************************************************************************
3 ksteube 1811 *
4 jfenwick 5863 * Copyright (c) 2003-2016 by The University of Queensland
5 jfenwick 3981 * http://www.uq.edu.au
6 ksteube 1811 *
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 jfenwick 3981 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 jfenwick 4657 * Development 2012-2013 by School of Earth Sciences
13     * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 jfenwick 3981 *
15     *****************************************************************************/
16 ksteube 1312
17 caltinay 6009 #ifndef __DUDLEY_ELEMENTFILE_H__
18     #define __DUDLEY_ELEMENTFILE_H__
19 jgs 82
20 jfenwick 3082 #include "Dudley.h"
21 gross 776 #include "NodeFile.h"
22 jfenwick 3220 #include "ElementType.h"
23 jgs 82
24 caltinay 6009 namespace dudley {
25 bcumming 730
26 jfenwick 3231 typedef struct {
27 caltinay 6009 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 gross 776
37 jfenwick 3086 struct Dudley_ElementFile {
38 caltinay 6009 escript::JMPI MPIInfo;
39     int *Owner;
40 jgs 82
41 caltinay 6009 dim_t numElements; /* number of elements. */
42 jgs 82
43 caltinay 6009 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 jgs 82
53 caltinay 6009 index_t *Tag; /* Tag[i] is the tag of element i. */
54 gross 1716
55 caltinay 6009 index_t *tagsInUse; /* array of tags which are actually used */
56     dim_t numTagsInUse; /* number of tags used */
57 gross 1716
58 caltinay 6009 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 gross 532
75 caltinay 6009 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 jgs 82 };
83    
84 jfenwick 3086 typedef struct Dudley_ElementFile Dudley_ElementFile;
85 caltinay 6009 Dudley_ElementFile *Dudley_ElementFile_alloc(Dudley_ElementTypeId etype, escript::JMPI& MPIInfo);
86 jfenwick 3224 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 caltinay 6009 void Dudley_ElementFile_distributeByRankOfDOF(Dudley_ElementFile * self, int * mpiRankOfDOF, index_t * Id);
94 bcumming 730
95 jfenwick 3224 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 jfenwick 4521 void Dudley_ElementFile_markNodes(dim_t *, dim_t, dim_t, Dudley_ElementFile *, bool);
100 jfenwick 3224 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 caltinay 6009 index_t lastDOF, index_t * dofIndex, Dudley_ElementFile * in,
105     bool useLinear);
106 ksteube 1312
107 jfenwick 5480 void Dudley_ElementFile_setTags(Dudley_ElementFile *, const int, const escript::Data *);
108 caltinay 6009 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 jfenwick 3224 void Dudley_ElementFile_setTagsInUse(Dudley_ElementFile * in);
112 jgs 82
113 caltinay 6009 } // 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