/[escript]/trunk/finley/src/Assemble.h
ViewVC logotype

Contents of /trunk/finley/src/Assemble.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6939 - (show annotations)
Mon Jan 20 03:37:18 2020 UTC (9 months, 1 week ago) by uqaeller
File MIME type: text/plain
File size: 11781 byte(s)
Updated the copyright header.


1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2020 by The University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Apache License, version 2.0
9 * http://www.apache.org/licenses/LICENSE-2.0
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-2017 by Centre for Geoscience Computing (GeoComp)
14 * Development from 2019 by School of Earth and Environmental Sciences
15 **
16 *****************************************************************************/
17
18 /****************************************************************************
19
20 Assemblage routines: header file
21
22 *****************************************************************************/
23
24 #ifndef __FINLEY_ASSEMBLE_H__
25 #define __FINLEY_ASSEMBLE_H__
26
27 #include "Finley.h"
28 #include "ElementFile.h"
29 #include "NodeFile.h"
30 #include <escript/AbstractSystemMatrix.h>
31
32 namespace finley {
33
34 struct AssembleParameters
35 {
36 AssembleParameters(const NodeFile* nodes, const ElementFile* ef,
37 escript::ASM_ptr sm, escript::Data& rhs,
38 bool reducedOrder);
39
40 /// element file these parameters apply to
41 const ElementFile* elements;
42 /// system matrix to be updated
43 escript::ASM_ptr S;
44 /// right-hand side to be updated
45 escript::Data& F;
46 /// total number of quadrature nodes = numQuadSub * numQuadSub
47 int numQuadTotal;
48 /// number of quadrature nodes per subelements
49 int numQuadSub;
50 /// number of sides
51 int numSides;
52 /// number of sub-elements
53 int numSub;
54 /// number of spatial dimensions
55 int numDim;
56 /// leading dimension of element node table
57 int NN;
58 /// number of elements
59 dim_t numElements;
60
61 int numEqu;
62 const index_t* row_DOF;
63 index_t row_DOF_UpperBound;
64 ElementFile_Jacobians* row_jac;
65 const int* row_node;
66 int row_numShapesTotal;
67 int row_numShapes;
68 int numComp;
69 const index_t* col_DOF;
70 index_t col_DOF_UpperBound;
71 ElementFile_Jacobians* col_jac;
72 const int* col_node;
73 int col_numShapesTotal;
74 int col_numShapes;
75 };
76
77
78 /// Entry point for PDE assembly. Checks arguments, populates an
79 /// AssembleParameters structure and calls appropriate method for the actual
80 /// work.
81 void Assemble_PDE(const NodeFile* nodes, const ElementFile* elements,
82 escript::ASM_ptr S, escript::Data& F,
83 const escript::Data& A, const escript::Data& B,
84 const escript::Data& C, const escript::Data& D,
85 const escript::Data& X, const escript::Data& Y);
86
87 template<typename Scalar>
88 void Assemble_PDE_Points(const AssembleParameters& p,
89 const escript::Data& d_dirac,
90 const escript::Data& y_dirac);
91
92 void Assemble_PDE_Single_1D(const AssembleParameters& p,
93 const escript::Data& A, const escript::Data& B,
94 const escript::Data& C, const escript::Data& D,
95 const escript::Data& X, const escript::Data& Y);
96
97 template<typename Scalar>
98 void Assemble_PDE_Single_2D(const AssembleParameters& p,
99 const escript::Data& A, const escript::Data& B,
100 const escript::Data& C, const escript::Data& D,
101 const escript::Data& X, const escript::Data& Y);
102
103 template<typename Scalar>
104 void Assemble_PDE_Single_3D(const AssembleParameters& p,
105 const escript::Data& A, const escript::Data& B,
106 const escript::Data& C, const escript::Data& D,
107 const escript::Data& X, const escript::Data& Y);
108
109 template<typename Scalar>
110 void Assemble_PDE_Single_C(const AssembleParameters& p, const escript::Data& D,
111 const escript::Data& Y);
112
113 void Assemble_PDE_System_1D(const AssembleParameters& p,
114 const escript::Data& A, const escript::Data& B,
115 const escript::Data& C, const escript::Data& D,
116 const escript::Data& X, const escript::Data& Y);
117
118 template<typename Scalar>
119 void Assemble_PDE_System_2D(const AssembleParameters& p,
120 const escript::Data& A, const escript::Data& B,
121 const escript::Data& C, const escript::Data& D,
122 const escript::Data& X, const escript::Data& Y);
123
124 template<typename Scalar>
125 void Assemble_PDE_System_3D(const AssembleParameters& p,
126 const escript::Data& A, const escript::Data& B,
127 const escript::Data& C, const escript::Data& D,
128 const escript::Data& X, const escript::Data& Y);
129
130 template<typename Scalar>
131 void Assemble_PDE_System_C(const AssembleParameters& p, const escript::Data& D,
132 const escript::Data& Y);
133
134 template<typename Scalar = double>
135 void Assemble_addToSystemMatrix(escript::ASM_ptr S, int NN_Equa,
136 const index_t* Nodes_Equa, int num_Equa, int NN_Sol,
137 const index_t* Nodes_Sol, int num_Sol, const Scalar* array);
138
139 void Assemble_LumpedSystem(const NodeFile* nodes, const ElementFile* elements,
140 escript::Data& lumpedMat, const escript::Data& D,
141 bool useHRZ);
142
143 /// averages data
144 template<typename Scalar>
145 void Assemble_AverageElementData(const ElementFile* elements,
146 escript::Data& out, const escript::Data& in);
147
148 /// copies data between different types of elements
149 template<typename Scalar>
150 void Assemble_CopyElementData(const ElementFile* elements, escript::Data& out,
151 const escript::Data& in);
152
153 /// copies data between different types of nodal representations
154 template<typename Scalar>
155 void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
156 const escript::Data& in);
157
158 /// copies node coordinates into expanded Data object `x`
159 void Assemble_NodeCoordinates(const NodeFile* nodes, escript::Data& x);
160
161 /// calculates the normal vector at quadrature points on face elements
162 void Assemble_getNormal(const NodeFile* nodes, const ElementFile* elements,
163 escript::Data& normals);
164
165 /// calculates the minimum distance between two vertices of elements and
166 /// assigns the value to each quadrature point in `size`
167 void Assemble_getSize(const NodeFile* nodes, const ElementFile* elements,
168 escript::Data& size);
169
170 /// Assemblage of Jacobians: calculates the gradient of nodal data at
171 /// quadrature points
172 template<typename Scalar>
173 void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
174 escript::Data& gradient, const escript::Data& data);
175
176 /// integrates data on quadrature points
177 template<typename Scalar>
178 void Assemble_integrate(const NodeFile* nodes, const ElementFile* elements,
179 const escript::Data& data, Scalar* integrals);
180
181 /// interpolates nodal data in a data array onto elements (=integration points)
182 template<typename Scalar>
183 void Assemble_interpolate(const NodeFile* nodes, const ElementFile* elements,
184 const escript::Data& data, escript::Data& output);
185
186 void Assemble_jacobians_1D(const double* coordinates, int numQuad,
187 const double* QuadWeights, int numShape,
188 dim_t numElements, int numNodes, const index_t* nodes,
189 const double* DSDv, int numTest, const double* DTDv,
190 double* dTdX, double* volume, const index_t* elementId);
191
192 void Assemble_jacobians_2D(const double* coordinates, int numQuad,
193 const double* QuadWeights, int numShape,
194 dim_t numElements, int numNodes, const index_t* nodes,
195 const double* DSDv, int numTest, const double* DTDv,
196 double* dTdX, double* volume, const index_t* elementId);
197
198 void Assemble_jacobians_2D_M1D_E1D(const double* coordinates, int numQuad,
199 const double* QuadWeights, int numShape,
200 dim_t numElements, int numNodes, const index_t* nodes,
201 const double* DSDv, int numTest, const double* DTDv,
202 double* dTdX, double* volume, const index_t* elementId);
203
204 void Assemble_jacobians_2D_M1D_E1D_C(const double* coordinates, int numQuad,
205 const double* QuadWeights, int numShape,
206 dim_t numElements, int numNodes, const index_t* nodes,
207 const double* DSDv, int numTest, const double* DTDv,
208 double* dTdX, double* volume, const index_t* elementId);
209
210 void Assemble_jacobians_2D_M1D_E2D(const double* coordinates, int numQuad,
211 const double* QuadWeights, int numShape,
212 dim_t numElements, int numNodes, const index_t* nodes,
213 const double* DSDv, int numTest, const double* DTDv,
214 double* dTdX, double* volume, const index_t* elementId);
215
216 void Assemble_jacobians_2D_M1D_E2D_C(const double* coordinates, int numQuad,
217 const double* QuadWeights, int numShape,
218 dim_t numElements, int numNodes, const index_t* nodes,
219 const double* DSDv, int numTest, const double* DTDv,
220 double* dTdX, double* volume, const index_t* elementId);
221
222 void Assemble_jacobians_3D(const double* coordinates, int numQuad,
223 const double* QuadWeights, int numShape,
224 dim_t numElements, int numNodes, const index_t* nodes,
225 const double* DSDv, int numTest, const double* DTDv,
226 double* dTdX, double* volume, const index_t* elementId);
227
228 void Assemble_jacobians_3D_M2D_E2D(const double* coordinates, int numQuad,
229 const double* QuadWeights, int numShape,
230 dim_t numElements, int numNodes, const index_t* nodes,
231 const double* DSDv, int numTest, const double* DTDv,
232 double* dTdX, double* volume, const index_t* elementId);
233
234 void Assemble_jacobians_3D_M2D_E2D_C(const double* coordinates, int numQuad,
235 const double* QuadWeights, int numShape,
236 dim_t numElements, int numNodes, const index_t* nodes,
237 const double* DSDv, int numTest, const double* DTDv,
238 double* dTdX, double* volume, const index_t* elementId);
239
240 void Assemble_jacobians_3D_M2D_E3D(const double* coordinates, int numQuad,
241 const double* QuadWeights, int numShape,
242 dim_t numElements, int numNodes, const index_t* nodes,
243 const double* DSDv, int numTest, const double* DTDv,
244 double* dTdX, double* volume, const index_t* elementId);
245
246 void Assemble_jacobians_3D_M2D_E3D_C(const double* coordinates, int numQuad,
247 const double* QuadWeights, int numShape,
248 dim_t numElements, int numNodes, const index_t* nodes,
249 const double* DSDv, int numTest, const double* DTDv,
250 double* dTdX, double* volume, const index_t* elementId);
251
252 } // namespace finley
253
254 #endif // __FINLEY_ASSEMBLE_H__
255

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26