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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6651 - (hide annotations)
Wed Feb 7 02:12:08 2018 UTC (21 months, 1 week ago) by jfenwick
File MIME type: text/plain
File size: 11705 byte(s)
Make everyone sad by touching all the files

Copyright dates update

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26