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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6939 - (hide annotations)
Mon Jan 20 03:37:18 2020 UTC (3 days, 10 hours ago) by uqaeller
File MIME type: text/plain
File size: 11781 byte(s)
Updated the copyright header.


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