Documentation 6b54b78464
Loading...
Searching...
No Matches
fem_standard_element.hpp
Go to the documentation of this file.
1/*!
2 * \file fem_standard_element.hpp
3 * \brief Headers of the main functions for the FEM standard elements.
4 * The functions are in the <i>fem_standard_element.cpp</i> file.
5 * \author E. van der Weide
6 * \version 8.5.0 "Harrier"
7 *
8 * SU2 Project Website: https://su2code.github.io
9 *
10 * The SU2 Project is maintained by the SU2 Foundation
11 * (http://su2foundation.org)
12 *
13 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
14 *
15 * SU2 is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Lesser General Public
17 * License as published by the Free Software Foundation; either
18 * version 2.1 of the License, or (at your option) any later version.
19 *
20 * SU2 is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
24 *
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
27 */
28
29#pragma once
30
31#include <iostream>
32#include <vector>
33#include <cstdlib>
34
35#include "../CConfig.hpp"
36
37using namespace std;
38
39/*!
40 * \class CFEMStandardElementBase
41 * \brief Base class for a FEM standard element.
42 * \author E. van der Weide
43 * \version 8.5.0 "Harrier"
44 */
46 protected:
47 unsigned short VTK_Type; /*!< \brief Element type using the VTK convention. */
48 unsigned short orderExact; /*!< \brief Polynomial order that must be integrated exactly by the integration rule. */
49 unsigned short nIntegration; /*!< \brief Number of points used in the numerical integration. */
50
51 bool constJacobian; /*!< \brief Whether or not the element has a constant Jacobian. */
52
53 vector<su2double> rIntegration; /*!< \brief r-location of the integration points for this standard element. */
54 vector<su2double>
55 sIntegration; /*!< \brief s-location of the integration points for this standard element, if needed. */
56 vector<su2double>
57 tIntegration; /*!< \brief t-location of the integration points for this standard element, if needed. */
58 vector<su2double> wIntegration; /*!< \brief The weights of the integration points for this standard element. */
59
60 public:
61 /*!
62 * \brief Constructor. Nothing to be done.
63 */
65
66 /*!
67 * \brief Destructor. Nothing to be done, because the vectors are deleted automatically.
68 */
69 virtual ~CFEMStandardElementBase() = default;
70
71 protected:
72 /*!
73 * \brief Alternative constructor.
74 * \param[in] val_VTK_Type - Type of the element using the VTK convention.
75 * \param[in] val_nPoly - Polynomial degree of the element.
76 * \param[in] val_constJac - Whether or not the Jacobians are constant.
77 * \param[in] config - Object, which contains the input parameters.
78 * \param[in] val_orderExact - The order of the polynomials that must be integrated
79 exactly by the integration rule. If 0, it will
80 be determined from the polynomial degree and the
81 parameters in config.
82 */
83 CFEMStandardElementBase(unsigned short val_VTK_Type, unsigned short val_nPoly, bool val_constJac, CConfig* config,
84 unsigned short val_orderExact);
85
86 public:
87 /*!
88 * \brief Function, which makes available the type of the element.
89 * \return The type of the element using the VTK convention.
90 */
91 inline unsigned short GetVTK_Type(void) const { return VTK_Type; }
92
93 /*!
94 * \brief Function, which makes available the weights in the integration points.
95 * \return The const pointer to data, which stores the weights in the integration points.
96 */
97 inline const su2double* GetWeightsIntegration(void) const { return wIntegration.data(); }
98
99 /*!
100 * \brief Static function, which makes available the number of DOFs for an element
101 corresponding to the arguments.
102 * \param[in] VTK_Type - Type of the element using the VTK convention.
103 * \param[in] nPoly - Polynomial degree of the element.
104 * \param[in] typeErrorMessage - Default argument used to write a good error message.
105 * \return The number of DOFs
106 */
107 static unsigned short GetNDOFsStatic(unsigned short VTK_Type, unsigned short nPoly,
108 unsigned long typeErrorMessage = 0);
109
110 /*!
111 * \brief Function, which makes available the number of integration points for this standard element.
112 * \return The number of integration points of this standard element.
113 */
114 inline unsigned short GetNIntegration(void) const { return nIntegration; }
115
116 /*!
117 * \brief Function, which makes available the polynomial order that must be integrated exactly.
118 * \return The polynomial order that must be integrated exactly.
119 */
120 inline unsigned short GetOrderExact(void) const { return orderExact; }
121
122 /*!
123 * \brief Static function, which computes the inverse of the given square matrix.
124 * \param[in] n - Number of rows/columns of the square matrix A.
125 * \param[in,out] A - On input the square matrix to be inverted. On output the inverse.
126 */
127 static void InverseMatrix(unsigned short n, vector<su2double>& A);
128
129 /*!
130 * \brief Function, which computes the gradient of the Vandermonde matrix for a standard 1D edge.
131 * \param[in] nDOFs - Number of DOFs, which in 1D is the polynomial degree + 1.
132 * \param[in] r - Parametric coordinates for which the gradient of the Vandermonde matrix must be computed.
133 * \param[out] VDr - Matrix to store the gradient of the Vandermonde matrix in all r-locations.
134 */
135 void GradVandermonde1D(unsigned short nDOFs, const vector<su2double>& r, vector<su2double>& VDr);
136
137 /*!
138 * \brief Function, which computes the Vandermonde matrix for a standard 1D edge.
139 * \param[in] nDOFs - Number of DOFs, which in 1D is the polynomial degree + 1.
140 * \param[in] r - Parametric coordinates for which the Vandermonde matrix must be computed.
141 * \param[out] V - Matrix to store the Vandermonde matrix in all r-locations.
142 */
143 void Vandermonde1D(unsigned short nDOFs, const vector<su2double>& r, vector<su2double>& V);
144
145 protected:
146 /*!
147 * \brief Function, which checks if the sum of the given derivatives of the
148 Lagrangian interpolation functions is 0 in the points.
149 * \param[in] nPoints - Number of points to be checked.
150 * \param[in] nDOFs - Number of DOFs of the element.
151 * \param[in] dLagBasisPoints - Values of the derivatives of the Lagrangian
152 interpolation functions in the given points.
153 */
154 void CheckSumDerivativesLagrangianBasisFunctions(const unsigned short nPoints, const unsigned short nDOFs,
155 const vector<su2double>& dLagBasisPoints);
156
157 /*!
158 * \brief Function, which checks if the sum of the given Lagrangian interpolation
159 functions is 1 in the points.
160 * \param[in] nPoints - Number of points to be checked.
161 * \param[in] nDOFs - Number of DOFs of the element.
162 * \param[in,out] lagBasisPoints - Values of the Lagrangian interpolation
163 functions in the given points.
164 */
165 void CheckSumLagrangianBasisFunctions(const unsigned short nPoints, const unsigned short nDOFs,
166 vector<su2double>& lagBasisPoints);
167
168 /*!
169 * \brief Function, which copies the data of the given object into the current object.
170 * \param[in] other - Object, whose data is copied.
171 */
172 void Copy(const CFEMStandardElementBase& other);
173
174 /*!
175 * \brief Function, which computes the values of the derivatives of the basis functions
176 of the adjacent elements in the integration points of the face.
177 * \param[in] VTK_TypeElem - Type of the element adjacent to the face using the VTK convention.
178 * \param[in] nPolyElem - Polynomial degree of the element adjacent to the face.
179 * \param[in] swapFaceInElement - Whether or not the connectivity of the face must be swapped
180 to get the desired numbering compared to the numbering used in the
181 corresponding face of the element.
182 * \param[out] nDOFsElem - Number of DOFs of the element adjacent to the face.
183 * \param[out] drLagBasisIntegration - r-derivatives of the basis functions in the integration points
184 of the face.
185 * \param[out] dsLagBasisIntegration - s-derivatives of the basis functions in the integration points
186 of the face.
187 * \param[out] dtLagBasisIntegration - t-derivatives of the basis functions in the integration points
188 of the face.
189 */
190 void DerivativesBasisFunctionsAdjacentElement(unsigned short VTK_TypeElem, unsigned short nPolyElem,
191 const bool swapFaceInElement, unsigned short& nDOFsElem,
192 vector<su2double>& drLagBasisIntegration,
193 vector<su2double>& dsLagBasisIntegration,
194 vector<su2double>& dtLagBasisIntegration);
195
196 /*!
197 * \brief Function, which computes the gradients of the Vandermonde matrix for a standard triangle.
198 * \param[in] nPoly - Polynomial degree of the triangle.
199 * \param[in] nDOFs - Number of DOFs of the triangle.
200 * \param[in] r - Parametric coordinate in r-direction for which the gradient of the Vandermonde matrix must be
201 * computed. \param[in] s - Parametric coordinate in s-direction for which the gradient of the Vandermonde matrix
202 * must be computed. \param[out] VDr - Matrix to store the gradient in r-direction of the Vandermonde matrix in all
203 * r- and s-locations. \param[out] VDs - Matrix to store the gradient in s-direction of the Vandermonde matrix in
204 * all r- and s-locations.
205 */
206 void GradVandermonde2D_Triangle(unsigned short nPoly, unsigned short nDOFs, const vector<su2double>& r,
207 const vector<su2double>& s, vector<su2double>& VDr, vector<su2double>& VDs);
208
209 /*!
210 * \brief Function, which computes the gradients of the Vandermonde matrix for a standard quadrilateral.
211 * \param[in] nPoly - Polynomial degree of the quadrilateral.
212 * \param[in] nDOFs - Number of DOFs of the quadrilateral.
213 * \param[in] r - Parametric coordinate in r-direction for which the gradient of the Vandermonde matrix must be
214 * computed. \param[in] s - Parametric coordinate in s-direction for which the gradient of the Vandermonde matrix
215 * must be computed. \param[out] VDr - Matrix to store the gradient in r-direction of the Vandermonde matrix in all
216 * r- and s-locations. \param[out] VDs - Matrix to store the gradient in s-direction of the Vandermonde matrix in
217 * all r- and s-locations.
218 */
219 void GradVandermonde2D_Quadrilateral(unsigned short nPoly, unsigned short nDOFs, const vector<su2double>& r,
220 const vector<su2double>& s, vector<su2double>& VDr, vector<su2double>& VDs);
221
222 /*!
223 * \brief Function, which computes the gradients of the Vandermonde matrix for a standard tetrahedron.
224 * \param[in] nPoly - Polynomial degree of the tetrahedron.
225 * \param[in] nDOFs - Number of DOFs of the tetrahedron.
226 * \param[in] r - Parametric coordinate in r-direction for which the gradient of the Vandermonde matrix must be
227 * computed. \param[in] s - Parametric coordinate in s-direction for which the gradient of the Vandermonde matrix
228 * must be computed. \param[in] t - Parametric coordinate in t-direction for which the gradient of the
229 * Vandermonde matrix must be computed. \param[out] VDr - Matrix to store the gradient in r-direction of the
230 * Vandermonde matrix in all r-, s- and t-locations. \param[out] VDs - Matrix to store the gradient in s-direction
231 * of the Vandermonde matrix in all r-, s- and t-locations. \param[out] VDt - Matrix to store the gradient in
232 * t-direction of the Vandermonde matrix in all r-, s- and t-locations.
233 */
234 void GradVandermonde3D_Tetrahedron(unsigned short nPoly, unsigned short nDOFs, const vector<su2double>& r,
235 const vector<su2double>& s, const vector<su2double>& t, vector<su2double>& VDr,
236 vector<su2double>& VDs, vector<su2double>& VDt);
237
238 /*!
239 * \brief Function, which computes the gradients of the Vandermonde matrix for a standard pyramid.
240 * \param[in] nPoly - Polynomial degree of the pyramid.
241 * \param[in] nDOFs - Number of DOFs of the pyramid.
242 * \param[in] r - Parametric coordinate in r-direction for which the gradient of the Vandermonde matrix must be
243 * computed. \param[in] s - Parametric coordinate in s-direction for which the gradient of the Vandermonde matrix
244 * must be computed. \param[in] t - Parametric coordinate in t-direction for which the gradient of the
245 * Vandermonde matrix must be computed. \param[out] VDr - Matrix to store the gradient in r-direction of the
246 * Vandermonde matrix in all r-, s- and t-locations. \param[out] VDs - Matrix to store the gradient in s-direction
247 * of the Vandermonde matrix in all r-, s- and t-locations. \param[out] VDt - Matrix to store the gradient in
248 * t-direction of the Vandermonde matrix in all r-, s- and t-locations.
249 */
250 void GradVandermonde3D_Pyramid(unsigned short nPoly, unsigned short nDOFs, const vector<su2double>& r,
251 const vector<su2double>& s, const vector<su2double>& t, vector<su2double>& VDr,
252 vector<su2double>& VDs, vector<su2double>& VDt);
253
254 /*!
255 * \brief Function, which computes the gradients of the Vandermonde matrix for a standard prism.
256 * \param[in] nPoly - Polynomial degree of the prism.
257 * \param[in] nDOFs - Number of DOFs of the prism.
258 * \param[in] r - Parametric coordinate in r-direction for which the gradient of the Vandermonde matrix must be
259 * computed. \param[in] s - Parametric coordinate in s-direction for which the gradient of the Vandermonde matrix
260 * must be computed. \param[in] t - Parametric coordinate in t-direction for which the gradient of the
261 * Vandermonde matrix must be computed. \param[out] VDr - Matrix to store the gradient in r-direction of the
262 * Vandermonde matrix in all r-, s- and t-locations. \param[out] VDs - Matrix to store the gradient in s-direction
263 * of the Vandermonde matrix in all r-, s- and t-locations. \param[out] VDt - Matrix to store the gradient in
264 * t-direction of the Vandermonde matrix in all r-, s- and t-locations.
265 */
266 void GradVandermonde3D_Prism(unsigned short nPoly, unsigned short nDOFs, const vector<su2double>& r,
267 const vector<su2double>& s, const vector<su2double>& t, vector<su2double>& VDr,
268 vector<su2double>& VDs, vector<su2double>& VDt);
269
270 /*!
271 * \brief Function, which computes the gradients of the Vandermonde matrix for a standard hexahedron.
272 * \param[in] nPoly - Polynomial degree of the hexahedron.
273 * \param[in] nDOFs - Number of DOFs of the hexahedron.
274 * \param[in] r - Parametric coordinate in r-direction for which the gradient of the Vandermonde matrix must be
275 * computed. \param[in] s - Parametric coordinate in s-direction for which the gradient of the Vandermonde matrix
276 * must be computed. \param[in] t - Parametric coordinate in t-direction for which the gradient of the
277 * Vandermonde matrix must be computed. \param[out] VDr - Matrix to store the gradient in r-direction of the
278 * Vandermonde matrix in all r-, s- and t-locations. \param[out] VDs - Matrix to store the gradient in s-direction
279 * of the Vandermonde matrix in all r-, s- and t-locations. \param[out] VDt - Matrix to store the gradient in
280 * t-direction of the Vandermonde matrix in all r-, s- and t-locations.
281 */
282 void GradVandermonde3D_Hexahedron(unsigned short nPoly, unsigned short nDOFs, const vector<su2double>& r,
283 const vector<su2double>& s, const vector<su2double>& t, vector<su2double>& VDr,
284 vector<su2double>& VDs, vector<su2double>& VDt);
285
286 /*!
287 * \brief Function, which determines the values of the Lagrangian interpolation
288 functions and its derivatives in the given set of points for a line.
289 * \param[in] nPoly - Polynomial degree of the interpolation functions.
290 * \param[in] rPoints - r-coordinates of the points where the
291 interpolation functions must be evaluated.
292 * \param[out] nDOFs - Number of DOFs of the line element.
293 * \param[out] rDOFs - r-coordinates of the DOFs of the line element.
294 * \param[out] matVandermondeInv- Values of the inverse matrix of Vandermonde matrix
295 * \param[out] lagBasisPoints - Values of the Lagrangian interpolation
296 functions in the given points.
297 * \param[out] drLagBasisPoints - Values of the r-derivatives of the Lagrangian
298 interpolation functions in the given points.
299 */
300 void LagrangianBasisFunctionAndDerivativesLine(const unsigned short nPoly, const vector<su2double>& rPoints,
301 unsigned short& nDOFs, vector<su2double>& rDOFs,
302 vector<su2double>& matVandermondeInv,
303 vector<su2double>& lagBasisPoints,
304 vector<su2double>& drLagBasisPoints);
305
306 /*!
307 * \brief Function, which determines the values of the Lagrangian interpolation
308 functions and its derivatives in the given set of points for a triangle.
309 * \param[in] nPoly - Polynomial degree of the interpolation functions.
310 * \param[in] rPoints - r-coordinates of the points where the
311 interpolation functions must be evaluated.
312 * \param[in] sPoints - s-coordinates of the points where the
313 interpolation functions must be evaluated.
314 * \param[out] nDOFs - Number of DOFs of the triangle.
315 * \param[out] rDOFs - r-coordinates of the DOFs of the triangle.
316 * \param[out] sDOFs - s-coordinates of the DOFs of the triangle.
317 * \param[out] matVandermondeInv- Values of the inverse matrix of Vandermonde matrix
318 * \param[out] lagBasisPoints - Values of the Lagrangian interpolation
319 functions in the given points.
320 * \param[out] drLagBasisPoints - Values of the r-derivatives of the Lagrangian
321 interpolation functions in the given points.
322 * \param[out] dsLagBasisPoints - Values of the s-derivatives of the Lagrangian
323 interpolation functions in the given points.
324 */
326 const unsigned short nPoly, const vector<su2double>& rPoints, const vector<su2double>& sPoints,
327 unsigned short& nDOFs, vector<su2double>& rDOFs, vector<su2double>& sDOFs, vector<su2double>& matVandermondeInv,
328 vector<su2double>& lagBasisPoints, vector<su2double>& drLagBasisPoints, vector<su2double>& dsLagBasisPoints);
329
330 /*!
331 * \brief Function, which determines the values of the Lagrangian interpolation
332 functions and its derivatives in the given set of points for a quadrilateral.
333 * \param[in] nPoly - Polynomial degree of the interpolation functions.
334 * \param[in] rPoints - r-coordinates of the points where the
335 interpolation functions must be evaluated.
336 * \param[in] sPoints - s-coordinates of the points where the
337 interpolation functions must be evaluated.
338 * \param[out] nDOFs - Number of DOFs of the quadrilateral.
339 * \param[out] rDOFs - r-coordinates of the DOFs of the quadrilateral.
340 * \param[out] sDOFs - s-coordinates of the DOFs of the quadrilateral.
341 * \param[out] matVandermondeInv- Values of the inverse matrix of Vandermonde matrix
342 * \param[out] lagBasisPoints - Values of the Lagrangian interpolation
343 functions in the given points.
344 * \param[out] drLagBasisPoints - Values of the r-derivatives of the Lagrangian
345 interpolation functions in the given points.
346 * \param[out] dsLagBasisPoints - Values of the s-derivatives of the Lagrangian
347 interpolation functions in the given points.
348 */
350 const unsigned short nPoly, const vector<su2double>& rPoints, const vector<su2double>& sPoints,
351 unsigned short& nDOFs, vector<su2double>& rDOFs, vector<su2double>& sDOFs, vector<su2double>& matVandermondeInv,
352 vector<su2double>& lagBasisPoints, vector<su2double>& drLagBasisPoints, vector<su2double>& dsLagBasisPoints);
353
354 /*!
355 * \brief Function, which determines the values of the Lagrangian interpolation
356 functions and its derivatives in the given set of points for a tetrahedron.
357 * \param[in] nPoly - Polynomial degree of the interpolation functions.
358 * \param[in] rPoints - r-coordinates of the points where the
359 interpolation functions must be evaluated.
360 * \param[in] sPoints - s-coordinates of the points where the
361 interpolation functions must be evaluated.
362 * \param[in] tPoints - t-coordinates of the points where the
363 interpolation functions must be evaluated.
364 * \param[out] nDOFs - Number of DOFs of the quadrilateral.
365 * \param[out] rDOFs - r-coordinates of the DOFs of the tetrahedron.
366 * \param[out] sDOFs - s-coordinates of the DOFs of the tetrahedron.
367 * \param[out] tDOFs - t-coordinates of the DOFs of the tetrahedron.
368 * \param[out] matVandermondeInv- Values of the inverse matrix of Vandermonde matrix
369 * \param[out] lagBasisPoints - Values of the Lagrangian interpolation
370 functions in the given points.
371 * \param[out] drLagBasisPoints - Values of the r-derivatives of the Lagrangian
372 interpolation functions in the given points.
373 * \param[out] dsLagBasisPoints - Values of the s-derivatives of the Lagrangian
374 interpolation functions in the given points.
375 * \param[out] dtLagBasisPoints - Values of the t-derivatives of the Lagrangian
376 interpolation functions in the given points.
377 */
379 const unsigned short nPoly, const vector<su2double>& rPoints, const vector<su2double>& sPoints,
380 const vector<su2double>& tPoints, unsigned short& nDOFs, vector<su2double>& rDOFs, vector<su2double>& sDOFs,
381 vector<su2double>& tDOFs, vector<su2double>& matVandermondeInv, vector<su2double>& lagBasisPoints,
382 vector<su2double>& drLagBasisPoints, vector<su2double>& dsLagBasisPoints, vector<su2double>& dtLagBasisPoints);
383
384 /*!
385 * \brief Function, which determines the values of the Lagrangian interpolation
386 functions and its derivatives in the given set of points for a pyramid.
387 * \param[in] nPoly - Polynomial degree of the interpolation functions.
388 * \param[in] rPoints - r-coordinates of the points where the
389 interpolation functions must be evaluated.
390 * \param[in] sPoints - s-coordinates of the points where the
391 interpolation functions must be evaluated.
392 * \param[in] tPoints - t-coordinates of the points where the
393 interpolation functions must be evaluated.
394 * \param[out] nDOFs - Number of DOFs of the quadrilateral.
395 * \param[out] rDOFs - r-coordinates of the DOFs of the pyramid.
396 * \param[out] sDOFs - s-coordinates of the DOFs of the pyramid.
397 * \param[out] tDOFs - t-coordinates of the DOFs of the pyramid.
398 * \param[out] matVandermondeInv- Values of the inverse matrix of Vandermonde matrix
399 * \param[out] lagBasisPoints - Values of the Lagrangian interpolation
400 functions in the given points.
401 * \param[out] drLagBasisPoints - Values of the r-derivatives of the Lagrangian
402 interpolation functions in the given points.
403 * \param[out] dsLagBasisPoints - Values of the s-derivatives of the Lagrangian
404 interpolation functions in the given points.
405 * \param[out] dtLagBasisPoints - Values of the t-derivatives of the Lagrangian
406 interpolation functions in the given points.
407 */
409 const unsigned short nPoly, const vector<su2double>& rPoints, const vector<su2double>& sPoints,
410 const vector<su2double>& tPoints, unsigned short& nDOFs, vector<su2double>& rDOFs, vector<su2double>& sDOFs,
411 vector<su2double>& tDOFs, vector<su2double>& matVandermondeInv, vector<su2double>& lagBasisPoints,
412 vector<su2double>& drLagBasisPoints, vector<su2double>& dsLagBasisPoints, vector<su2double>& dtLagBasisPoints);
413
414 /*!
415 * \brief Function, which determines the values of the Lagrangian interpolation
416 functions and its derivatives in the given set of points for a prism.
417 * \param[in] nPoly - Polynomial degree of the interpolation functions.
418 * \param[in] rPoints - r-coordinates of the points where the
419 interpolation functions must be evaluated.
420 * \param[in] sPoints - s-coordinates of the points where the
421 interpolation functions must be evaluated.
422 * \param[in] tPoints - t-coordinates of the points where the
423 interpolation functions must be evaluated.
424 * \param[out] nDOFs - Number of DOFs of the quadrilateral.
425 * \param[out] rDOFs - r-coordinates of the DOFs of the prism.
426 * \param[out] sDOFs - s-coordinates of the DOFs of the prism.
427 * \param[out] tDOFs - t-coordinates of the DOFs of the prism.
428 * \param[out] matVandermondeInv- Values of the inverse matrix of Vandermonde matrix
429 * \param[out] lagBasisPoints - Values of the Lagrangian interpolation
430 functions in the given points.
431 * \param[out] drLagBasisPoints - Values of the r-derivatives of the Lagrangian
432 interpolation functions in the given points.
433 * \param[out] dsLagBasisPoints - Values of the s-derivatives of the Lagrangian
434 interpolation functions in the given points.
435 * \param[out] dtLagBasisPoints - Values of the t-derivatives of the Lagrangian
436 interpolation functions in the given points.
437 */
439 const unsigned short nPoly, const vector<su2double>& rPoints, const vector<su2double>& sPoints,
440 const vector<su2double>& tPoints, unsigned short& nDOFs, vector<su2double>& rDOFs, vector<su2double>& sDOFs,
441 vector<su2double>& tDOFs, vector<su2double>& matVandermondeInv, vector<su2double>& lagBasisPoints,
442 vector<su2double>& drLagBasisPoints, vector<su2double>& dsLagBasisPoints, vector<su2double>& dtLagBasisPoints);
443
444 /*!
445 * \brief Function, which determines the values of the Lagrangian interpolation
446 functions and its derivatives in the given set of points for a hexahedron.
447 * \param[in] nPoly - Polynomial degree of the interpolation functions.
448 * \param[in] rPoints - r-coordinates of the points where the
449 interpolation functions must be evaluated.
450 * \param[in] sPoints - s-coordinates of the points where the
451 interpolation functions must be evaluated.
452 * \param[in] tPoints - t-coordinates of the points where the
453 interpolation functions must be evaluated.
454 * \param[out] nDOFs - Number of DOFs of the quadrilateral.
455 * \param[out] rDOFs - r-coordinates of the DOFs of the hexahedron.
456 * \param[out] sDOFs - s-coordinates of the DOFs of the hexahedron.
457 * \param[out] tDOFs - t-coordinates of the DOFs of the hexahedron.
458 * \param[out] matVandermondeInv- Values of the inverse matrix of Vandermonde matrix
459 * \param[out] lagBasisPoints - Values of the Lagrangian interpolation
460 functions in the given points.
461 * \param[out] drLagBasisPoints - Values of the r-derivatives of the Lagrangian
462 interpolation functions in the given points.
463 * \param[out] dsLagBasisPoints - Values of the s-derivatives of the Lagrangian
464 interpolation functions in the given points.
465 * \param[out] dtLagBasisPoints - Values of the t-derivatives of the Lagrangian
466 interpolation functions in the given points.
467 */
469 const unsigned short nPoly, const vector<su2double>& rPoints, const vector<su2double>& sPoints,
470 const vector<su2double>& tPoints, unsigned short& nDOFs, vector<su2double>& rDOFs, vector<su2double>& sDOFs,
471 vector<su2double>& tDOFs, vector<su2double>& matVandermondeInv, vector<su2double>& lagBasisPoints,
472 vector<su2double>& drLagBasisPoints, vector<su2double>& dsLagBasisPoints, vector<su2double>& dtLagBasisPoints);
473
474 /*!
475 * \brief Function, which carries out a matrix matrix multiplication to obtain
476 data in points and stores the result row major order.
477 * \param[in] nDOFs - Dimension of the matrices. This typically corresponds
478 to the number of DOFs that are considered.
479 * \param[in] nPoints - Dimension of the matrices. This typically corresponds
480 to the number of integration points used.
481 * \param[in] A - First matrix in the matrix matrix product A*B, dimension nPoints X nDOFs.
482 A is stored in column major order.
483 * \param[in] B - Second matrix in the matrix matrix product A*B, dimension nDOFs X nDOFs.
484 B is stored in column major order.
485 * \param[out] C - Result of A*B, dimension nPoints X nDOFs. The result is stored in row
486 major order
487 */
488 void MatMulRowMajor(const unsigned short nDOFs, const unsigned short nPoints, const vector<su2double>& A,
489 const vector<su2double>& B, vector<su2double>& C);
490
491 /*!
492 * \brief Function, which computes the local connectivity of linear subelements of
493 a line, which can be used for plotting.
494 * \param[in] nPoly - Polynomial degree of the line.
495 * \param[out] subConn - The local subconnectivity of a line element.
496 */
497 void SubConnForPlottingLine(const unsigned short nPoly, vector<unsigned short>& subConn);
498
499 /*!
500 * \brief Function, which computes the local connectivity of linear subelements of
501 a quadrilateral, which can be used for plotting.
502 * \param[in] nPoly - Polynomial degree of the quadrilateral.
503 * \param[out] subConn - The local subconnectivity of a triangle element.
504 */
505 void SubConnForPlottingQuadrilateral(const unsigned short nPoly, vector<unsigned short>& subConn);
506
507 /*!
508 * \brief Function, which computes the local connectivity of linear subelements of
509 a triangle, which can be used for plotting.
510 * \param[in] nPoly - Polynomial degree of the triangle.
511 * \param[out] subConn - The local subconnectivity of a triangle element.
512 */
513 void SubConnForPlottingTriangle(const unsigned short nPoly, vector<unsigned short>& subConn);
514
515 /*!
516 * \brief Function, which computes the Vandermonde matrix for a standard triangle.
517 * \param[in] nPoly - Polynomial degree of the triangle.
518 * \param[in] nDOFs - Number of DOFs of the triangle.
519 * \param[in] r - Parametric coordinates in r-direction for which the Vandermonde matrix must be computed.
520 * \param[in] s - Parametric coordinates in s-direction for which the Vandermonde matrix must be computed.
521 * \param[out] V - Matrix to store the Vandermonde matrix in all r- and s-locations.
522 */
523 void Vandermonde2D_Triangle(unsigned short nPoly, unsigned short nDOFs, const vector<su2double>& r,
524 const vector<su2double>& s, vector<su2double>& V);
525
526 /*!
527 * \brief Function, which computes the Vandermonde matrix for a standard quadrilateral.
528 * \param[in] nPoly - Polynomial degree of the quadrilateral.
529 * \param[in] nDOFs - Number of DOFs of the quadrilateral.
530 * \param[in] r - Parametric coordinates in r-direction for which the Vandermonde matrix must be computed.
531 * \param[in] s - Parametric coordinates in s-direction for which the Vandermonde matrix must be computed.
532 * \param[out] V - Matrix to store the Vandermonde matrix in all r- and s-locations.
533 */
534 void Vandermonde2D_Quadrilateral(unsigned short nPoly, unsigned short nDOFs, const vector<su2double>& r,
535 const vector<su2double>& s, vector<su2double>& V);
536
537 /*!
538 * \brief Function, which computes the Vandermonde matrix for a standard tetrahedron.
539 * \param[in] nPoly - Polynomial degree of the tetrahedron.
540 * \param[in] nDOFs - Number of DOFs of the tetrahedron.
541 * \param[in] r - Parametric coordinates in r-direction for which the Vandermonde matrix must be computed.
542 * \param[in] s - Parametric coordinates in s-direction for which the Vandermonde matrix must be computed.
543 * \param[in] t - Parametric coordinates in t-direction for which the Vandermonde matrix must be computed.
544 * \param[out] V - Matrix to store the Vandermonde matrix in all r-, s- and t-locations.
545 */
546 void Vandermonde3D_Tetrahedron(unsigned short nPoly, unsigned short nDOFs, const vector<su2double>& r,
547 const vector<su2double>& s, const vector<su2double>& t, vector<su2double>& V);
548
549 /*!
550 * \brief Function, which computes the Vandermonde matrix for a standard pyramid.
551 * \param[in] nPoly - Polynomial degree of the pyramid.
552 * \param[in] nDOFs - Number of DOFs of the pyramid.
553 * \param[in] r - Parametric coordinates in r-direction for which the Vandermonde matrix must be computed.
554 * \param[in] s - Parametric coordinates in s-direction for which the Vandermonde matrix must be computed.
555 * \param[in] t - Parametric coordinates in t-direction for which the Vandermonde matrix must be computed.
556 * \param[out] V - Matrix to store the Vandermonde matrix in all r-, s- and t-locations.
557 */
558 void Vandermonde3D_Pyramid(unsigned short nPoly, unsigned short nDOFs, const vector<su2double>& r,
559 const vector<su2double>& s, const vector<su2double>& t, vector<su2double>& V);
560
561 /*!
562 * \brief Function, which computes the Vandermonde matrix for a standard prism.
563 * \param[in] nPoly - Polynomial degree of the prism.
564 * \param[in] nDOFs - Number of DOFs of the prism.
565 * \param[in] r - Parametric coordinates in r-direction for which the Vandermonde matrix must be computed.
566 * \param[in] s - Parametric coordinates in s-direction for which the Vandermonde matrix must be computed.
567 * \param[in] t - Parametric coordinates in t-direction for which the Vandermonde matrix must be computed.
568 * \param[out] V - Matrix to store the Vandermonde matrix in all r-, s- and t-locations.
569 */
570 void Vandermonde3D_Prism(unsigned short nPoly, unsigned short nDOFs, const vector<su2double>& r,
571 const vector<su2double>& s, const vector<su2double>& t, vector<su2double>& V);
572
573 /*!
574 * \brief Function, which computes the Vandermonde matrix for a standard hexahedron.
575 * \param[in] nPoly - Polynomial degree of the hexahedron.
576 * \param[in] nDOFs - Number of DOFs of the hexahedron.
577 * \param[in] r - Parametric coordinates in r-direction for which the Vandermonde matrix must be computed.
578 * \param[in] s - Parametric coordinates in s-direction for which the Vandermonde matrix must be computed.
579 * \param[in] t - Parametric coordinates in t-direction for which the Vandermonde matrix must be computed.
580 * \param[out] V - Matrix to store the Vandermonde matrix in all r-, s- and t-locations.
581 */
582 void Vandermonde3D_Hexahedron(unsigned short nPoly, unsigned short nDOFs, const vector<su2double>& r,
583 const vector<su2double>& s, const vector<su2double>& t, vector<su2double>& V);
584
585 /*!
586 * \brief Function, which computes the constant in the penalty terms for a
587 a viscous discretization.
588 * \param[in] VTK_TypeElem - The element type, using the VTK convention,
589 adjacent to the face.
590 * \param[in] nPolyElem - The polynomial degree of the adjacent element.
591 * \return The value of the viscous penalty parameter.
592 */
593 su2double ViscousPenaltyParameter(const unsigned short VTK_TypeElem, const unsigned short nPolyElem) const;
594
595 private:
596 /*!
597 * \brief Function, which determines the 1D Gauss Legendre integration points and weights.
598 * \param[in,out] GLPoints - The location of the Gauss-Legendre integration points.
599 * \param[in,out] GLWeights - The weights of the Gauss-Legendre integration points.
600 */
601 void GaussLegendrePoints1D(vector<su2double>& GLPoints, vector<su2double>& GLWeights);
602
603 /*!
604 * \brief Function, which computes the value of the gradient of the Jacobi polynomial for the given x-coordinate.
605 * \param[in] n - Order of the Jacobi polynomial.
606 * \param[in] alpha - Alpha coefficient of the Jacobi polynomial.
607 * \param[in] beta - Beta coefficient of the Jacobi polynomial.
608 * \param[in] x - Coordinate (-1 <= x <= 1) for which the gradient of the Jacobi polynomial must be evaluated.
609 * \return The value of the gradient of the normalized Jacobi polynomial f order n for the given value of
610 * x.
611 */
612 su2double GradNormJacobi(unsigned short n, unsigned short alpha, unsigned short beta, su2double x);
613
614 /*!
615 * \brief Function, which determines the integration points for a line
616 such that polynomials of orderExact are integrated exactly.
617 */
618 void IntegrationPointsLine(void);
619
620 /*!
621 * \brief Function, which determines the integration points for a triangle
622 such that polynomials of orderExact are integrated exactly.
623 */
624 void IntegrationPointsTriangle(void);
625
626 /*!
627 * \brief Function, which determines the integration points for a quadrilateral
628 such that polynomials of orderExact are integrated exactly.
629 */
630 void IntegrationPointsQuadrilateral(void);
631
632 /*!
633 * \brief Function, which determines the integration points for a tetrahedron
634 such that polynomials of orderExact are integrated exactly.
635 */
636 void IntegrationPointsTetrahedron(void);
637
638 /*!
639 * \brief Function, which determines the integration points for a pyramid
640 such that polynomials of orderExact are integrated exactly.
641 */
642 void IntegrationPointsPyramid(void);
643
644 /*!
645 * \brief Function, which determines the integration points for a prism
646 such that polynomials of orderExact are integrated exactly.
647 */
648 void IntegrationPointsPrism(void);
649
650 /*!
651 * \brief Function, which determines the integration points for a hexahedron
652 such that polynomials of orderExact are integrated exactly.
653 */
654 void IntegrationPointsHexahedron(void);
655
656 /*!
657 * \brief Function, which computes the value of the Jacobi polynomial for the given x-coordinate.
658 * \param[in] n - Order of the Jacobi polynomial.
659 * \param[in] alpha - Alpha coefficient of the Jacobi polynomial.
660 * \param[in] beta - Beta coefficient of the Jacobi polynomial.
661 * \param[in] x - Coordinate (-1 <= x <= 1) for which the Jacobi polynomial must be evaluated.
662 * \return The value of the normalized Jacobi polynomial f order n for the given value of x.
663 */
664 su2double NormJacobi(unsigned short n, unsigned short alpha, unsigned short beta, su2double x);
665};
666
667/*!
668 * \class CFEMStandardElement
669 * \brief Class to define a FEM standard element.
670 * \author E. van der Weide
671 * \version 8.5.0 "Harrier"
672 */
674 private:
675 unsigned short nPoly; /*!< \brief Polynomial degree of the element. */
676 unsigned short nDOFs; /*!< \brief Number of DOFs of the element. */
677
678 unsigned short VTK_Type1; /*!< \brief VTK type for elements of type 1 in subConn1ForPlotting. */
679 unsigned short VTK_Type2; /*!< \brief VTK type for elements of type 2 in subConn2ForPlotting. */
680
681 vector<su2double> rDOFs; /*!< \brief r-location of the DOFs for this standard element. */
682 vector<su2double> sDOFs; /*!< \brief s-location of the DOFs for this standard element, if needed. */
683 vector<su2double> tDOFs; /*!< \brief t-location of the DOFs for this standard element, if needed. */
684
685 vector<su2double> lagBasisIntegration; /*!< \brief Lagrangian basis functions in the integration points. */
686 vector<su2double> lagBasisIntegrationTrans; /*!< \brief Transpose of lagBasisIntegration. It is stored such that
687 in the ADER-DG predictor step the residual is obtained
688 by one matrix multiplication. */
689 vector<su2double> lagBasisSolDOFs; /*!< \brief Lagrangian basis functions in the solution DOFs. Only different
690 from 1 if the polynomial degree of the grid and solution differs. */
691
692 vector<su2double>
693 drLagBasisIntegration; /*!< \brief r-derivatives of the Lagrangian basis functions in the integration points. */
694 vector<su2double>
695 dsLagBasisIntegration; /*!< \brief s-derivatives of the Lagrangian basis functions in the integration points. */
696 vector<su2double>
697 dtLagBasisIntegration; /*!< \brief t-derivatives of the Lagrangian basis functions in the integration points. */
698
699 vector<su2double> matVandermondeInv; /*!< \brief Inverse matrix of Vandermonde matrix in the DOFs for this standard
700 element. This data is needed for the computation of shock sensing. */
701
702 vector<su2double>
703 matBasisIntegration; /*!< \brief Matrix of lagBasisIntegration, drLagBasisIntegration, dsLagBasisIntegration
704 and dtLagBasisIntegration combined for efficiency when using BLAS routines. */
705 vector<su2double> matDerBasisIntTrans; /*!< \brief Matrix of the transpose of the derivative part of
706 matBasisIntegration. It is stored such that the volume residual can be
707 computed in one matrix multiplication. */
708 vector<su2double> matDerBasisSolDOFs; /*!< \brief Matrix of the derivatives of the Lagrangian basis functions in the
709 solution DOFs. Needed to compute the metric terms in the solution DOFs. */
710 vector<su2double> matDerBasisOwnDOFs; /*!< \brief Matrix of the derivatives of the Lagrangian basis functions in the
711 owned DOFs. This differs from matDerBasisSolDOFs when the grid DOFs and the
712 solution DOFs do not coincide. This data is needed for the
713 computation of the derivatives of the metric terms. */
714 vector<su2double> mat2ndDerBasisInt; /*!< \brief Matrix which contains all possible second derivatives of the basis
715 functions in the integration points. As such second derivatives can be
716 computed using one call to the BLAS routines. */
717
718 vector<unsigned short> connFace0; /*!< \brief Local connectivity of face 0 of the element. The numbering of the DOFs
719 is such that the element is to the left of the face. */
720 vector<unsigned short> connFace1; /*!< \brief Local connectivity of face 1 of the element. The numbering of the DOFs
721 is such that the element is to the left of the face. */
722 vector<unsigned short> connFace2; /*!< \brief Local connectivity of face 2 of the element, if present. The numbering
723 of the DOFs is such that the element is to the left of the face. */
724 vector<unsigned short> connFace3; /*!< \brief Local connectivity of face 3 of the element, if present. The numbering
725 of the DOFs is such that the element is to the left of the face. */
726 vector<unsigned short> connFace4; /*!< \brief Local connectivity of face 4 of the element, if present. The numbering
727 of the DOFs is such that the element is to the left of the face. */
728 vector<unsigned short> connFace5; /*!< \brief Local connectivity of face 5 of the element, if present. The numbering
729 of the DOFs is such that the element is to the left of the face. */
730
731 vector<unsigned short> subConn1ForPlotting; /*!< \brief Local subconnectivity of element type 1 of the high order
732 element. Used for plotting. */
733 vector<unsigned short> subConn2ForPlotting; /*!< \brief Local subconnectivity of element type 2 of the high order
734 element. Used for plotting. */
735 public:
736 /*!
737 * \brief Alternative constructor.
738 * \param[in] val_VTK_Type - Type of the element using the VTK convention.
739 * \param[in] val_nPoly - Polynomial degree of the element.
740 * \param[in] val_constJac - Whether or not the Jacobians are constant.
741 * \param[in] config - Object, which contains the input parameters.
742 * \param[in] val_orderExact - Default argument. If specified, it contains the
743 order of the polynomials that must be integrated
744 exactly by the integration rule.
745 * \param[in] rLocSolDOFs - Default argument. If specified, it contains the
746 parametric r location of the solution DOFs.
747 * \param[in] sLocSolDOFs - Default argument. If specified, it contains the
748 parametric s location of the solution DOFs.
749 * \param[in] tLocSolDOFs - Default argument. If specified, it contains the
750 parametric t location of the solution DOFs.
751 */
752 CFEMStandardElement(unsigned short val_VTK_Type, unsigned short val_nPoly, bool val_constJac, CConfig* config,
753 unsigned short val_orderExact = 0, const vector<su2double>* rLocSolDOFs = nullptr,
754 const vector<su2double>* sLocSolDOFs = nullptr, const vector<su2double>* tLocSolDOFs = nullptr);
755 /*!
756 * \brief Copy constructor.
757 * \param[in] other - Object, whose data must be copied.
758 */
760
761 /*!
762 * \brief Assignment operator.
763 * \param[in] other - Object, to which this object must be assigned.
764 * \return The current object, after the member variables were assigned the correct value.
765 */
767 Copy(other);
768 return (*this);
769 }
770
771 /*!
772 * \brief Function, which computes the Lagrangian basis functions for the
773 given parametric coordinates.
774 * \param[in] parCoor - Parametric coordinates for which the basis functions
775 and derivatives must be computed.
776 * \param[out] lagBasis - The values of the Lagrangian basis functions in parCoor.
777 */
778 void BasisFunctionsInPoint(const su2double* parCoor, vector<su2double>& lagBasis);
779 /*!
780 * \brief Function, which computes the Lagrangian basis functions and its
781 derivatives for the given parametric coordinates.
782 * \param[in] parCoor - Parametric coordinates for which the basis functions
783 and derivatives must be computed.
784 * \param[out] lagBasis - The values of the Lagrangian basis functions in parCoor.
785 * \param[out] dLagBasis - The values of the derivatives of the basis functions
786 in parCoor.
787 */
788 void BasisFunctionsAndDerivativesInPoint(const su2double* parCoor, vector<su2double>& lagBasis,
789 vector<vector<su2double> >& dLagBasis);
790
791 /*!
792 * \brief Function, which makes available the values of the basis functions in the integration points.
793 * \return The pointer to data, which stores the basis functions in the integration points.
794 */
795 inline su2double* GetBasisFunctionsIntegration(void) { return lagBasisIntegration.data(); }
796
797 /*!
798 * \brief Function, which makes available the transpose of the basis functions in the integration points.
799 * \return The pointer to data, which stores the transpose matrix of the basis functions.
800 */
801 inline const su2double* GetBasisFunctionsIntegrationTrans(void) const { return lagBasisIntegrationTrans.data(); }
802
803 /*!
804 * \brief Function, which makes available the values of the basis functions in the solution DOFs.
805 * \return The pointer to data, which stores the basis functions in the solution DOFs.
806 */
807 inline const su2double* GetBasisFunctionsSolDOFs(void) const { return lagBasisSolDOFs.data(); }
808
809 /*!
810 * \brief Function, which makes available the r-derivatives of the basis functions in the integration points.
811 * \return The pointer to data, which stores the r-derivatives of the basis functions.
812 */
813 inline su2double* GetDrBasisFunctionsIntegration(void) { return drLagBasisIntegration.data(); }
814
815 /*!
816 * \brief Function, which makes available the s-derivatives of the basis functions in the integration points.
817 * \return The pointer to data, which stores the s-derivatives of the basis functions.
818 */
819 inline su2double* GetDsBasisFunctionsIntegration(void) { return dsLagBasisIntegration.data(); }
820
821 /*!
822 * \brief Function, which makes available the t-derivatives of the basis functions in the integration points.
823 * \return The pointer to data, which stores the t-derivatives of the basis functions.
824 */
825 inline su2double* GetDtBasisFunctionsIntegration(void) { return dtLagBasisIntegration.data(); }
826
827 /*!
828 * \brief Function, which makes available the matrix storage of the inverse of Vandermonde matrix of solution DOFs.
829 * \return The pointer to matVandermondeInv.
830 */
831 inline const su2double* GetMatVandermondeInv(void) const { return matVandermondeInv.data(); }
832
833 /*!
834 * \brief Function, which makes available the matrix storage of the basis functions in the integration points.
835 * \return The pointer to matBasisIntegration.
836 */
837 inline const su2double* GetMatBasisFunctionsIntegration(void) const { return matBasisIntegration.data(); }
838
839 /*!
840 * \brief Function, which makes available the transpose matrix of the derivative of the basis functions in the
841 * integration points. \return The pointer to matDerBasisIntTrans;
842 */
843 inline const su2double* GetDerMatBasisFunctionsIntTrans(void) const { return matDerBasisIntTrans.data(); }
844
845 /*!
846 * \brief Function, which makes available the matrix storage of the derivative of the basis functions in the own DOFs.
847 * \return The pointer to matDerBasisOwnDOFs.
848 */
849 inline const su2double* GetMatDerBasisFunctionsOwnDOFs(void) const { return matDerBasisOwnDOFs.data(); }
850
851 /*!
852 * \brief Function, which makes available the matrix storage of the derivative of the basis functions in the solution
853 * DOFs. \return The pointer to matDerBasisSolDOFs.
854 */
855 inline const su2double* GetMatDerBasisFunctionsSolDOFs(void) const { return matDerBasisSolDOFs.data(); }
856
857 /*!
858 * \brief Function, which makes available the matrix storage of the second derivativex of the basis functions
859 in the integration points.
860 * \return The pointer to mat2ndDerBasisInt.
861 */
862 inline const su2double* GetMat2ndDerBasisFunctionsInt(void) const { return mat2ndDerBasisInt.data(); }
863
864 /*!
865 * \brief Function, which makes available the connectivity of face 0.
866 * \return The pointer to data, which stores the connectivity of face 0.
867 */
868 inline unsigned short* GetConnFace0(void) { return connFace0.data(); }
869
870 /*!
871 * \brief Function, which makes available the connectivity of face 1.
872 * \return The pointer to data, which stores the connectivity of face 1.
873 */
874 inline unsigned short* GetConnFace1(void) { return connFace1.data(); }
875
876 /*!
877 * \brief Function, which makes available the connectivity of face 2.
878 * \return The pointer to data, which stores the connectivity of face 2.
879 */
880 inline unsigned short* GetConnFace2(void) { return connFace2.data(); }
881
882 /*!
883 * \brief Function, which makes available the connectivity of face 3.
884 * \return The pointer to data, which stores the connectivity of face 3.
885 */
886 inline unsigned short* GetConnFace3(void) { return connFace3.data(); }
887
888 /*!
889 * \brief Function, which makes available the connectivity of face 4.
890 * \return The pointer to data, which stores the connectivity of face 4.
891 */
892 inline unsigned short* GetConnFace4(void) { return connFace4.data(); }
893
894 /*!
895 * \brief Function, which makes available the connectivity of face 5.
896 * \return The pointer to data, which stores the connectivity of face 5.
897 */
898 inline unsigned short* GetConnFace5(void) { return connFace5.data(); }
899
900 /*!
901 * \brief Function, which makes available the number of DOFs for this standard element.
902 * \return The number of DOFs of this standard element.
903 */
904 inline unsigned short GetNDOFs(void) const { return nDOFs; }
905
906 /*!
907 * \brief Function, which makes available the polynomial degree for this standard element.
908 * \return The polynomial degree of this standard element.
909 */
910 inline unsigned short GetNPoly(void) const { return nPoly; }
911
912 /*!
913 * \brief Function, which makes available the type of the element in subConn1ForPlotting.
914 * \return The type of the elements in subConn1ForPlotting using the VTK convention.
915 */
916 inline unsigned short GetVTK_Type1(void) const { return VTK_Type1; }
917
918 /*!
919 * \brief Function, which makes available the number of sub-elements of type 1 for plotting.
920 * \return The number of sub-elements of type 1 for plotting.
921 */
922 inline unsigned short GetNSubElemsType1(void) const {
923 return subConn1ForPlotting.size() / GetNDOFsPerSubElem(GetVTK_Type1());
924 }
925
926 /*!
927 * \brief Function, which makes available the the connectivity of the linear elements of type 1 as a const pointer.
928 * \return The pointer to the local connectivity of the linear elements of type 1.
929 */
930 inline const unsigned short* GetSubConnType1(void) const { return subConn1ForPlotting.data(); }
931
932 /*!
933 * \brief Function, which makes available the type of the element in subConn2ForPlotting.
934 * \return The type of the elements in subConn2ForPlotting using the VTK convention.
935 */
936 inline unsigned short GetVTK_Type2(void) const { return VTK_Type2; }
937
938 /*!
939 * \brief Function, which makes available the number of sub-elements of type 2 for plotting.
940 * \return The number of sub-elements of type 2 for plotting.
941 */
942 inline unsigned short GetNSubElemsType2(void) const {
943 return subConn2ForPlotting.size() / GetNDOFsPerSubElem(GetVTK_Type2());
944 }
945
946 /*!
947 * \brief Function, which makes available the the connectivity of the linear elements of type 2 as a const pointer.
948 * \return The pointer to the local connectivity of the linear elements of type 2.
949 */
950 inline const unsigned short* GetSubConnType2(void) const { return subConn2ForPlotting.data(); }
951
952 /*!
953 * \brief Function, which makes available the number of DOFs of a linear element, used for plotting.
954 * \return The number of DOFs of the linear elements.
955 */
956 unsigned short GetNDOFsPerSubElem(unsigned short val_VTK_Type) const;
957
958 /*!
959 * \brief Function, which makes available the r-location of the DOFs as a
960 const pointer to the vector.
961 * \return The address of the vector, which stores the r-location of the DOFs.
962 */
963 inline const vector<su2double>* GetRDOFs(void) const { return &rDOFs; }
964
965 /*!
966 * \brief Function, which makes available the s-location of the DOFs as a
967 const pointer to the vector.
968 * \return The address of the vector, which stores the s-location of the DOFs.
969 */
970 inline const vector<su2double>* GetSDOFs(void) const { return &sDOFs; }
971
972 /*!
973 * \brief Function, which makes available the t-location of the DOFs as a
974 const pointer to the vector.
975 * \return The address of the vector, which stores the t-location of the DOFs.
976 */
977 inline const vector<su2double>* GetTDOFs(void) const { return &tDOFs; }
978
979 /*!
980 * \brief Function, which checks if the function arguments correspond to this standard element.
981 * \param[in] val_VTK_Type - Type of the element using the VTK convention.
982 * \param[in] val_nPoly - Polynomial degree of the element.
983 * \param[in] val_constJac - Whether or not the Jacobians are constant.
984 * \return Whether or not the function arguments correspond to this standard element.
985 */
986 bool SameStandardElement(unsigned short val_VTK_Type, unsigned short val_nPoly, bool val_constJac);
987
988 /*!
989 * \brief Function, which estimates the amount of work for an element of this
990 type. This information is used to determine a well balanced partition.
991 * \param[in] config - Object, which contains the input parameters.
992 */
994
995 private:
996 /*!
997 * \brief Function, which changes the given quadrilateral connectivity, such that the direction coincides
998 with the direction corresponding to corner vertices vert0, vert1, vert2, vert3.
999 * \param[in,out] connQuad - Connectivity of the quadrilateral, that must be adapted.
1000 * \param[in] vert0 - Corner vertex 0 of the desired sequence.
1001 * \param[in] vert1 - Corner vertex 1 of the desired sequence.
1002 * \param[in] vert2 - Corner vertex 2 of the desired sequence.
1003 * \param[in] vert3 - Corner vertex 3 of the desired sequence.
1004 */
1005 void ChangeDirectionQuadConn(vector<unsigned short>& connQuad, unsigned short vert0, unsigned short vert1,
1006 unsigned short vert2, unsigned short vert3) const;
1007
1008 /*!
1009 * \brief Function, which changes the given triangular connectivity, such that the direction coincides
1010 with the direction corresponding to corner vertices vert0, vert1, vert2.
1011 * \param[in,out] connTriangle - Connectivity of the triangle, that must be adapted.
1012 * \param[in] vert0 - Corner vertex 0 of the desired sequence.
1013 * \param[in] vert1 - Corner vertex 1 of the desired sequence.
1014 * \param[in] vert2 - Corner vertex 2 of the desired sequence.
1015 */
1016 void ChangeDirectionTriangleConn(vector<unsigned short>& connTriangle, unsigned short vert0, unsigned short vert1,
1017 unsigned short vert2) const;
1018
1019 /*!
1020 * \brief Function, which copies the data of the given object into the current object.
1021 * \param[in] other - Object, whose data is copied.
1022 */
1023 void Copy(const CFEMStandardElement& other);
1024
1025 /*!
1026 * \brief Function, which creates the basis functions and the matrix containing
1027 the derivatives of the basis functions in the given location of the
1028 parametric coordinates.
1029 * \param[in] rLoc - r-locations of the given points.
1030 * \param[in] sLoc - s-locations of the given points.
1031 * \param[in] tLoc - t-locations of the given points, if relevant.
1032 * \param[out] lagBasis - Lagrangian basis functions in the given
1033 parametric locations.
1034 * \param[out] matDerBasis - Matrix to store the derivatives of the basis
1035 functions.
1036 */
1037 void CreateBasisFunctionsAndMatrixDerivatives(const vector<su2double>& rLoc, const vector<su2double>& sLoc,
1038 const vector<su2double>& tLoc, vector<su2double>& matVandermondeInv,
1039 vector<su2double>& lagBasis, vector<su2double>& matDerBasis);
1040 /*!
1041 * \brief Function, which creates all the data for a line element.
1042 */
1043 void DataStandardLine(void);
1044
1045 /*!
1046 * \brief Function, which creates all the data for a triangular element.
1047 */
1048 void DataStandardTriangle(void);
1049
1050 /*!
1051 * \brief Function, which creates all the data for a quadrilateral element.
1052 */
1053 void DataStandardQuadrilateral(void);
1054
1055 /*!
1056 * \brief Function, which creates all the data for a tetrahedral element.
1057 */
1058 void DataStandardTetrahedron(void);
1059
1060 /*!
1061 * \brief Function, which creates all the data for a pyramid element.
1062 */
1063 void DataStandardPyramid(void);
1064
1065 /*!
1066 * \brief Function, which creates all the data for a prism element.
1067 */
1068 void DataStandardPrism(void);
1069
1070 /*!
1071 * \brief Function, which creates all the data for a hexahedral element.
1072 */
1073 void DataStandardHexahedron(void);
1074
1075 /*!
1076 * \brief Function, which determines the connectivity of the linear subtetrahedra for a high
1077 order tetrahedron.
1078 */
1079 void SubConnTetrahedron(void);
1080
1081 /*!
1082 * \brief Function, which determines the connectivity of the linear subpyramids and
1083 subtetrahedra for a high order pyramid.
1084 */
1085 void SubConnPyramid(void);
1086
1087 /*!
1088 * \brief Function, which determines the connectivity of the linear subprisms for a high
1089 order prism.
1090 */
1091 void SubConnPrism(void);
1092
1093 /*!
1094 * \brief Function, which determines the connectivity of the linear subhexahedra for a high
1095 order hexahedron.
1096 */
1097 void SubConnHexahedron(void);
1098};
1099
1100/*!
1101 * \class CFEMStandardInternalFace
1102 * \brief Class to define a FEM standard internal face.
1103 * \author E. van der Weide
1104 * \version 8.5.0 "Harrier"
1105 */
1107 private:
1108 unsigned short nDOFsFaceSide0; /*!< \brief Number of DOFs on side 0 of the face. */
1109 unsigned short nDOFsFaceSide1; /*!< \brief Number of DOFs on side 1 of the face. */
1110
1111 unsigned short nPolyElemSide0; /*!< \brief Polynomial degree of the element on side 0 of the face. */
1112 unsigned short nPolyElemSide1; /*!< \brief Polynomial degree of the element on side 1 of the face. */
1113 unsigned short nDOFsElemSide0; /*!< \brief Number of DOFs of the element on side 0 of the face. */
1114 unsigned short nDOFsElemSide1; /*!< \brief Number of DOFs of the element on side 1 of the face. */
1115 unsigned short VTK_TypeElemSide0; /*!< \brief Type of the element on side 0 of the face using the VTK convention. */
1116 unsigned short VTK_TypeElemSide1; /*!< \brief Type of the element on side 1 of the face using the VTK convention. */
1117
1118 bool swapFaceInElementSide0; /*!< \brief Whether or not the connectivity of the face must
1119 be swapped compared to the face of the corresponding
1120 standard element on side 0 of the face. */
1121 bool swapFaceInElementSide1; /*!< \brief Whether or not the connectivity of the face must
1122 be swapped compared to the face of the corresponding
1123 standard element on side 1 of the face. */
1124
1125 su2double penaltyConstantFace; /*!< \brief The constant of the penalty parameter of the face,
1126 which is used in the viscous discretization. */
1127
1128 vector<su2double> rDOFsFaceSide0; /*!< \brief r-location of the DOFs on side 0 of the face. */
1129 vector<su2double> rDOFsFaceSide1; /*!< \brief r-location of the DOFs on side 1 of the face. */
1130 vector<su2double> sDOFsFaceSide0; /*!< \brief s-location of the DOFs on side 0 of the face, if needed. */
1131 vector<su2double> sDOFsFaceSide1; /*!< \brief s-location of the DOFs on side 1 of the face, if needed. */
1132
1133 vector<su2double> lagBasisFaceIntegrationSide0; /*!< \brief Lagrangian basis functions in the integration points
1134 of side0 of the face. */
1135 vector<su2double> lagBasisFaceIntegrationSide1; /*!< \brief Lagrangian basis functions in the integration points
1136 of side1 of the face. */
1137
1138 vector<su2double> lagBasisFaceIntegrationTransposeSide0; /*!< \brief Transpose of lagBasisFaceIntegrationSide0. */
1139 vector<su2double> lagBasisFaceIntegrationTransposeSide1; /*!< \brief Transpose of lagBasisFaceIntegrationSide1. */
1140
1141 vector<su2double> drLagBasisFaceIntegrationSide0; /*!< \brief r-derivatives of the face Lagrangian basis functions
1142 of side 0 in the integration points. */
1143 vector<su2double> drLagBasisFaceIntegrationSide1; /*!< \brief r-derivatives of the face Lagrangian basis functions
1144 of side 1 in the integration points. */
1145 vector<su2double> dsLagBasisFaceIntegrationSide0; /*!< \brief s-derivatives of the face Lagrangian basis functions
1146 of side 0 in the integration points. */
1147 vector<su2double> dsLagBasisFaceIntegrationSide1; /*!< \brief s-derivatives of the face Lagrangian basis functions
1148 of side 1 in the integration points. */
1149
1150 vector<su2double> drLagBasisElemIntegrationSide0; /*!< \brief r-derivatives of the element Lagrangian basis functions
1151 of side 0 in the integration points. */
1152 vector<su2double> drLagBasisElemIntegrationSide1; /*!< \brief r-derivatives of the element Lagrangian basis functions
1153 of side 1 in the integration points. */
1154 vector<su2double> dsLagBasisElemIntegrationSide0; /*!< \brief s-derivatives of the element Lagrangian basis functions
1155 of side 0 in the integration points. */
1156 vector<su2double> dsLagBasisElemIntegrationSide1; /*!< \brief s-derivatives of the element Lagrangian basis functions
1157 of side 1 in the integration points. */
1158 vector<su2double> dtLagBasisElemIntegrationSide0; /*!< \brief t-derivatives of the element Lagrangian basis functions
1159 of side 0 in the integration points. */
1160 vector<su2double> dtLagBasisElemIntegrationSide1; /*!< \brief t-derivatives of the element Lagrangian basis functions
1161 of side 1 in the integration points. */
1162
1163 vector<su2double>
1164 matDerBasisElemIntegrationSide0; /*!< \brief Matrix of drLagBasisElemIntegrationSide0,
1165 dsLagBasisElemIntegrationSide0 and dtLagBasisElemIntegrationSide0 combined for
1166 efficiency when using BLAS routines. */
1167 vector<su2double>
1168 matDerBasisElemIntegrationSide1; /*!< \brief Matrix of drLagBasisElemIntegrationSide1,
1169 dsLagBasisElemIntegrationSide1 and dtLagBasisElemIntegrationSide1 combined for
1170 efficiency when using BLAS routines. */
1171
1172 vector<su2double> matDerBasisElemIntegrationTransposeSide0; /*!< \brief Transpose of matDerBasisElemIntegrationSide0,
1173 such that the residuals of the symmetrizing terms can
1174 be computed with a single matrix multiplication. */
1175 vector<su2double> matDerBasisElemIntegrationTransposeSide1; /*!< \brief Transpose of matDerBasisElemIntegrationSide1,
1176 such that the residuals of the symmetrizing terms can
1177 be computed with a single matrix multiplication. */
1178 public:
1179 /*!
1180 * \brief Alternative constructor.
1181 * \param[in] val_VTK_TypeFace - The type of the face using the VTK convention.
1182 * \param[in] val_VTK_TypeSide0 - Type of the element adjacent to side 0 of the face
1183 using the VTK convention.
1184 * \param[in] val_nPolySide0 - Polynomial degree of the element adjacent to side 0
1185 of the face.
1186 * \param[in] val_VTK_TypeSide1 - Type of the element adjacent to side 1 of the face
1187 using the VTK convention.
1188 * \param[in] val_nPolySide1 - Polynomial degree of the element adjacent to side 1
1189 of the face.
1190 * \param[in] val_constJac - Whether or not the Jacobians are constant.
1191 * \param[in] val_swapFaceInElementSide0 - Whether or not the connectivity of the face must be
1192 swapped compared to the face of the corresponding
1193 standard element on side 0 of the face.
1194 * \param[in] val_swapFaceInElementSide1 - Whether or not the connectivity of the face must be
1195 swapped compared to the face of the corresponding
1196 standard element on side 1 of the face.
1197 * \param[in] config - Object, which contains the input parameters.
1198 * \param[in] val_orderExact - Default argument. If specified, it contains the
1199 order of the polynomials that must be integrated
1200 exactly by the integration rule.
1201 */
1202 CFEMStandardInternalFace(unsigned short val_VTK_TypeFace, unsigned short val_VTK_TypeSide0,
1203 unsigned short val_nPolySide0, unsigned short val_VTK_TypeSide1,
1204 unsigned short val_nPolySide1, bool val_constJac, bool val_swapFaceInElementSide0,
1205 bool val_swapFaceInElementSide1, CConfig* config, unsigned short val_orderExact = 0);
1206 /*!
1207 * \brief Copy constructor.
1208 * \param[in] other - Object, whose data must be copied.
1209 */
1211
1212 /*!
1213 * \brief Assignment operator.
1214 * \param[in] other - Object, to which this object must be assigned.
1215 * \return The current object, after the member variables were assigned the correct value.
1216 */
1218 Copy(other);
1219 return (*this);
1220 }
1221
1222 /*!
1223 * \brief Function, which makes available the r-derivatives of the elements
1224 basis functions of side 0 in the integration points.
1225 * \return The pointer to data, which stores this information.
1226 */
1227 inline su2double* GetDrBasisElemIntegrationSide0(void) { return drLagBasisElemIntegrationSide0.data(); }
1228
1229 /*!
1230 * \brief Function, which makes available the r-derivatives of the elements
1231 basis functions of side 1 in the integration points.
1232 * \return The pointer to data, which stores this information.
1233 */
1234 inline su2double* GetDrBasisElemIntegrationSide1(void) { return drLagBasisElemIntegrationSide1.data(); }
1235
1236 /*!
1237 * \brief Function, which makes available the s-derivatives of the elements
1238 basis functions of side 0 in the integration points.
1239 * \return The pointer to data, which stores this information.
1240 */
1241 inline su2double* GetDsBasisElemIntegrationSide0(void) { return dsLagBasisElemIntegrationSide0.data(); }
1242
1243 /*!
1244 * \brief Function, which makes available the s-derivatives of the elements
1245 basis functions of side 1 in the integration points.
1246 * \return The pointer to data, which stores this information.
1247 */
1248 inline su2double* GetDsBasisElemIntegrationSide1(void) { return dsLagBasisElemIntegrationSide1.data(); }
1249
1250 /*!
1251 * \brief Function, which makes available the t-derivatives of the elements
1252 basis functions of side 0 in the integration points.
1253 * \return The pointer to data, which stores this information.
1254 */
1255 inline su2double* GetDtBasisElemIntegrationSide0(void) { return dtLagBasisElemIntegrationSide0.data(); }
1256
1257 /*!
1258 * \brief Function, which makes available the t-derivatives of the elements
1259 basis functions of side 1 in the integration points.
1260 * \return The pointer to data, which stores this information.
1261 */
1262 inline su2double* GetDtBasisElemIntegrationSide1(void) { return dtLagBasisElemIntegrationSide1.data(); }
1263
1264 /*!
1265 * \brief Function, which makes available the matrix with the derivatives of
1266 the element basis functions of side 0 in the integration points.
1267 * \return The const pointer to data, which stores this information.
1268 */
1270 return matDerBasisElemIntegrationSide0.data();
1271 }
1272
1273 /*!
1274 * \brief Function, which makes available the matrix with the derivatives of
1275 the element basis functions of side 1 in the integration points.
1276 * \return The const pointer to data, which stores this information.
1277 */
1279 return matDerBasisElemIntegrationSide1.data();
1280 }
1281
1282 /*!
1283 * \brief Function, which makes available the transpose of the matrix with
1284 the derivatives of the element basis functions of side 0 in the
1285 integration points.
1286 * \return The const pointer to data, which stores this information.
1287 */
1289 return matDerBasisElemIntegrationTransposeSide0.data();
1290 }
1291
1292 /*!
1293 * \brief Function, which makes available the transpose of the matrix with
1294 the derivatives of the element basis functions of side 1 in the
1295 integration points.
1296 * \return The const pointer to data, which stores this information.
1297 */
1299 return matDerBasisElemIntegrationTransposeSide1.data();
1300 }
1301
1302 /*!
1303 * \brief Function, which makes available the face basis functions of side 0
1304 in the integration points.
1305 * \return The pointer to data, which stores this information.
1306 */
1307 inline const su2double* GetBasisFaceIntegrationSide0(void) const { return lagBasisFaceIntegrationSide0.data(); }
1308
1309 /*!
1310 * \brief Function, which makes available the face basis functions of side 1
1311 in the integration points.
1312 * \return The pointer to data, which stores this information.
1313 */
1314 inline const su2double* GetBasisFaceIntegrationSide1(void) const { return lagBasisFaceIntegrationSide1.data(); }
1315
1316 /*!
1317 * \brief Function, which makes available transpose matrix of the face basis
1318 functions of side 0 in the integration points.
1319 * \return The pointer to data, which stores this information.
1320 */
1322 return lagBasisFaceIntegrationTransposeSide0.data();
1323 }
1324
1325 /*!
1326 * \brief Function, which makes available transpose matrix of the face basis
1327 functions of side 1 in the integration points.
1328 * \return The pointer to data, which stores this information.
1329 */
1331 return lagBasisFaceIntegrationTransposeSide1.data();
1332 }
1333
1334 /*!
1335 * \brief Function, which makes available the r-derivatives of the face basis
1336 functions of side 0 in the integration points.
1337 * \return The pointer to data, which stores this information.
1338 */
1339 inline su2double* GetDrBasisFaceIntegrationSide0(void) { return drLagBasisFaceIntegrationSide0.data(); }
1340
1341 /*!
1342 * \brief Function, which makes available the r-derivatives of the face basis
1343 functions of side 1 in the integration points.
1344 * \return The pointer to data, which stores this information.
1345 */
1346 inline su2double* GetDrBasisFaceIntegrationSide1(void) { return drLagBasisFaceIntegrationSide1.data(); }
1347
1348 /*!
1349 * \brief Function, which makes available the s-derivatives of the face basis
1350 functions of side 0 in the integration points.
1351 * \return The pointer to data, which stores this information.
1352 */
1353 inline su2double* GetDsBasisFaceIntegrationSide0(void) { return dsLagBasisFaceIntegrationSide0.data(); }
1354
1355 /*!
1356 * \brief Function, which makes available the s-derivatives of the face basis
1357 functions of side 1 in the integration points.
1358 * \return The pointer to data, which stores this information.
1359 */
1360 inline su2double* GetDsBasisFaceIntegrationSide1(void) { return dsLagBasisFaceIntegrationSide1.data(); }
1361
1362 /*!
1363 * \brief Function, which makes available the number of DOFs of the element
1364 on side 0 of the face.
1365 * \return The number of DOFs of the element on side 0.
1366 */
1367 inline unsigned short GetNDOFsElemSide0(void) const { return nDOFsElemSide0; }
1368
1369 /*!
1370 * \brief Function, which makes available the number of DOFs of the element
1371 on side 1 of the face.
1372 * \return The number of DOFs on side 1.
1373 */
1374 inline unsigned short GetNDOFsElemSide1(void) const { return nDOFsElemSide1; }
1375
1376 /*!
1377 * \brief Function, which makes available the number of DOFs on side 0 of the face.
1378 * \return The number of DOFs on side 0.
1379 */
1380 inline unsigned short GetNDOFsFaceSide0(void) const { return nDOFsFaceSide0; }
1381
1382 /*!
1383 * \brief Function, which makes available the number of DOFs on side 1 of the face.
1384 * \return The number of DOFs on side 1.
1385 */
1386 inline unsigned short GetNDOFsFaceSide1(void) const { return nDOFsFaceSide1; }
1387
1388 /*!
1389 * \brief Function, which makes available the penalty constant for this standard face.
1390 * \return The penalty constant.
1391 */
1392 inline su2double GetPenaltyConstant(void) const { return penaltyConstantFace; }
1393
1394 /*!
1395 * \brief Function, which checks if the function arguments correspond to this standard face.
1396 * \param[in] val_VTK_TypeFace - The type of the face using the VTK convention.
1397 * \param[in] val_constJac - Whether or not the Jacobians are constant.
1398 * \param[in] val_VTK_TypeSide0 - Type of the element adjacent to side 0
1399 of the face using the VTK convention.
1400 * \param[in] val_nPolySide0 - Polynomial degree of the element adjacent
1401 to side 0 of the face.
1402 * \param[in] val_VTK_TypeSide1 - Type of the element adjacent to side 1
1403 of the face using the VTK convention.
1404 * \param[in] val_nPolySide1 - Polynomial degree of the element adjacent
1405 to side 1 of the face.
1406 * \param[in] val_swapFaceInElementSide0 - Whether or not the connectivity of the face must
1407 be swapped w.r.t. the connectivity of face of the
1408 element on side 0.
1409 * \param[in] val_swapFaceInElementSide1 - Whether or not the connectivity of the face must
1410 be swapped w.r.t. the connectivity of face of the
1411 element on side 1.
1412 */
1413 bool SameStandardMatchingFace(unsigned short val_VTK_TypeFace, bool val_constJac, unsigned short val_VTK_TypeSide0,
1414 unsigned short val_nPolySide0, unsigned short val_VTK_TypeSide1,
1415 unsigned short val_nPolySide1, bool val_swapFaceInElementSide0,
1416 bool val_swapFaceInElementSide1);
1417
1418 /*!
1419 * \brief Function, which estimates the amount of work for an element of this
1420 type. This information is used to determine a well balanced partition.
1421 * \param[in] config - Object, which contains the input parameters.
1422 */
1424
1425 private:
1426 /*!
1427 * \brief Function, which copies the data of the given object into the current object.
1428 * \param[in] other - Object, whose data is copied.
1429 */
1430 void Copy(const CFEMStandardInternalFace& other);
1431};
1432
1433/*!
1434 * \class CFEMStandardBoundaryFace
1435 * \brief Class to define a FEM standard boundary face.
1436 * \author E. van der Weide
1437 * \version 8.5.0 "Harrier"
1438 */
1440 private:
1441 unsigned short nDOFsFace; /*!< \brief Number of DOFs of the face. */
1442
1443 unsigned short nPolyElem; /*!< \brief Polynomial degree of the element adjacent to the face. */
1444 unsigned short nDOFsElem; /*!< \brief Number of DOFs of the element adjacent element to the face. */
1445 unsigned short VTK_TypeElem; /*!< \brief Type of the element adjacent to the face using the VTK convention. */
1446
1447 bool swapFaceInElement; /*!< \brief Whether or not the connectivity of the face must be swapped compared
1448 to the face of the corresponding standard element adjacent to the face. */
1449
1450 su2double penaltyConstantFace; /*!< \brief The constant of the penalty parameter of the face,
1451 which is used in the viscous discretization. */
1452
1453 vector<su2double> rDOFsFace; /*!< \brief r-location of the DOFs of the face. */
1454 vector<su2double> sDOFsFace; /*!< \brief s-location of the DOFs of the face, if needed. */
1455
1456 vector<su2double> lagBasisFaceIntegration; /*!< \brief Lagrangian basis functions in the integration
1457 points of the face. */
1458 vector<su2double> lagBasisFaceIntegrationTranspose; /*!< \brief Transpose of lagBasisFaceIntegration. */
1459
1460 vector<su2double> drLagBasisFaceIntegration; /*!< \brief r-derivatives of the face Lagrangian basis functions
1461 in the integration points. */
1462 vector<su2double> dsLagBasisFaceIntegration; /*!< \brief s-derivatives of the face Lagrangian basis functions
1463 in the integration points. */
1464
1465 vector<su2double> drLagBasisElemIntegration; /*!< \brief r-derivatives of the Lagrangian basis functions in the
1466 integration points of the element adjacent to the face. */
1467 vector<su2double> dsLagBasisElemIntegration; /*!< \brief s-derivatives of the Lagrangian basis functions in the
1468 integration points of the element adjacent to the face. */
1469 vector<su2double> dtLagBasisElemIntegration; /*!< \brief t-derivatives of the Lagrangian basis functions in the
1470 integration points of the element adjacent to the face. */
1471
1472 vector<su2double> matDerBasisElemIntegration; /*!< \brief Matrix of drLagBasisElemIntegration,
1473 dsLagBasisElemIntegration and dtLagBasisElemIntegration combined for
1474 efficiency when using BLAS routines. */
1475
1476 vector<su2double> matDerBasisElemIntegrationTranspose; /*!< \brief Transpose of matDerBasisElemIntegration, such that
1477 the residuals of the symmetrizing terms can be
1478 computed with a single matrix multiplication. */
1479
1480 vector<unsigned short> subConnForPlotting; /*!< \brief Local subconnectivity of the high order element.
1481 Used for plotting. */
1482 public:
1483 /*!
1484 * \brief Alternative constructor.
1485 * \param[in] val_VTK_TypeFace - The type of the face using the VTK convention.
1486 * \param[in] val_VTK_TypeElem - Type of the element adjacent to the face using the VTK convention.
1487 * \param[in] val_nPolyElem - Polynomial degree of the element adjacent to the face.
1488 * \param[in] val_constJac - Whether or not the Jacobians are constant.
1489 * \param[in] val_swapFaceInElement - Whether or not the connectivity of the face must be swapped compared
1490 to the face of the corresponding standard element adjacent to the face.
1491 * \param[in] config - Object, which contains the input parameters.
1492 * \param[in] val_orderExact - Default argument. If specified, it contains the order of the
1493 polynomials that must be integrated exactly by the integration rule.
1494 */
1495 CFEMStandardBoundaryFace(unsigned short val_VTK_TypeFace, unsigned short val_VTK_TypeElem,
1496 unsigned short val_nPolyElem, bool val_constJac, bool val_swapFaceInElement, CConfig* config,
1497 unsigned short val_orderExact = 0);
1498
1499 /*!
1500 * \brief Copy constructor.
1501 * \param[in] other - Object, whose data must be copied.
1502 */
1504
1505 /*!
1506 * \brief Assignment operator.
1507 * \param[in] other - Object, to which this object must be assigned.
1508 * \return The current object, after the member variables were assigned the correct value.
1509 */
1511 Copy(other);
1512 return (*this);
1513 }
1514
1515 /*!
1516 * \brief Function, which makes available the r-derivatives of the element
1517 basis functions in the integration points.
1518 * \return The pointer to data, which stores this information.
1519 */
1520 inline const su2double* GetDrBasisElemIntegration(void) const { return drLagBasisElemIntegration.data(); }
1521
1522 /*!
1523 * \brief Function, which makes available the s-derivatives of the element
1524 basis functions in the integration points.
1525 * \return The pointer to data, which stores this information.
1526 */
1527 inline const su2double* GetDsBasisElemIntegration(void) const { return dsLagBasisElemIntegration.data(); }
1528
1529 /*!
1530 * \brief Function, which makes available the t-derivatives of the element
1531 basis functions in the integration points.
1532 * \return The pointer to data, which stores this information.
1533 */
1534 inline const su2double* GetDtBasisElemIntegration(void) const { return dtLagBasisElemIntegration.data(); }
1535
1536 /*!
1537 * \brief Function, which makes available the matrix with the derivatives of
1538 the element basis functions in the integration points.
1539 * \return The pointer to data, which stores this information.
1540 */
1541 inline const su2double* GetMatDerBasisElemIntegration(void) const { return matDerBasisElemIntegration.data(); }
1542
1543 /*!
1544 * \brief Function, which makes available the transpose of the matrix with
1545 the derivatives of the element basis functions in the integration
1546 points.
1547 * \return The const pointer to data, which stores this information.
1548 */
1550 return matDerBasisElemIntegrationTranspose.data();
1551 }
1552
1553 /*!
1554 * \brief Function, which makes available the face basis functions in the
1555 integration points.
1556 * \return The pointer to data, which stores this information.
1557 */
1558 inline const su2double* GetBasisFaceIntegration(void) const { return lagBasisFaceIntegration.data(); }
1559
1560 /*!
1561 * \brief Function, which makes available transpose matrix of the face basis
1562 functions in the integration points.
1563 * \return The pointer to data, which stores this information.
1564 */
1566 return lagBasisFaceIntegrationTranspose.data();
1567 }
1568
1569 /*!
1570 * \brief Function, which makes available the r-derivatives of the face basis
1571 functions in the integration points.
1572 * \return The pointer to data, which stores this information.
1573 */
1574 inline const su2double* GetDrBasisFaceIntegration(void) const { return drLagBasisFaceIntegration.data(); }
1575
1576 /*!
1577 * \brief Function, which makes available the s-derivatives of the face basis
1578 functions in the integration points.
1579 * \return The pointer to data, which stores this information.
1580 */
1581 inline const su2double* GetDsBasisFaceIntegration(void) const { return dsLagBasisFaceIntegration.data(); }
1582
1583 /*!
1584 * \brief Function, which makes available the number of DOFs of the
1585 adjacent element.
1586 * \return The number of DOFs of the element.
1587 */
1588 inline unsigned short GetNDOFsElem(void) const { return nDOFsElem; }
1589
1590 /*!
1591 * \brief Function, which makes available the number of DOFs of the face.
1592 * \return The number of DOFs of the face.
1593 */
1594 inline unsigned short GetNDOFsFace(void) const { return nDOFsFace; }
1595
1596 /*!
1597 * \brief Function, which makes available the number of linear subfaces used
1598 for plotting, among others.
1599 * \return The number of linear subfaces of the face.
1600 */
1601 inline unsigned short GetNSubFaces(void) const { return subConnForPlotting.size() / GetNDOFsPerSubFace(); }
1602
1603 /*!
1604 * \brief Function, which makes available the number of DOFs of a linear subface, used
1605 for plotting, among others, plotting.
1606 * \return The number of DOFs of a linear subfaces of the face.
1607 */
1608 unsigned short GetNDOFsPerSubFace(void) const;
1609
1610 /*!
1611 * \brief Function, which makes available the penalty constant for this standard face.
1612 * \return The penalty constant.
1613 */
1614 inline su2double GetPenaltyConstant(void) const { return penaltyConstantFace; }
1615
1616 /*!
1617 * \brief Function, which makes available the the connectivity of the linear subfaces
1618 as a const pointer.
1619 * \return The pointer to the local connectivity of the linear subfaces.
1620 */
1621 inline const unsigned short* GetSubFaceConn(void) const { return subConnForPlotting.data(); }
1622
1623 /*!
1624 * \brief Function, which checks if the function arguments correspond to this standard face.
1625 * \param[in] val_VTK_TypeFace - The type of the face using the VTK convention.
1626 * \param[in] val_constJac - Whether or not the Jacobians are constant.
1627 * \param[in] val_VTK_TypeElem - Type of the element adjacent to the face using the VTK convention.
1628 * \param[in] val_nPolyElem - Polynomial degree of the element adjacent to the face.
1629 * \param[in] val_swapFaceInElem - Whether or not the connectivity of the face must be swapped w.r.t.
1630 the connectivity of face of the adjacent element.
1631 */
1632 bool SameStandardBoundaryFace(unsigned short val_VTK_TypeFace, bool val_constJac, unsigned short val_VTK_TypeElem,
1633 unsigned short val_nPolyElem, bool val_swapFaceInElem);
1634 /*!
1635 * \brief Function, which estimates the amount of work for an element of this
1636 type. This information is used to determine a well balanced partition.
1637 * \param[in] config - Object, which contains the input parameters.
1638 */
1640
1641 /*!
1642 * \brief Function, which estimates the additional amount of work for an element
1643 of this type when a wall function treatment is used. This information
1644 is used to determine a well balanced partition.
1645 * \param[in] config - Object, which contains the input parameters.
1646 * \param[in] nPointsWF - Number of points to discretize the wall model.
1647 */
1648 passivedouble WorkEstimateMetisWallFunctions(CConfig* config, const unsigned short nPointsWF);
1649
1650 private:
1651 /*!
1652 * \brief Function, which copies the data of the given object into the current object.
1653 * \param[in] other - Object, whose data is copied.
1654 */
1655 void Copy(const CFEMStandardBoundaryFace& other);
1656};
#define A(I, J)
#define C(i, j)
Definition blas_structure.cpp:133
#define B(i, j)
Definition blas_structure.cpp:132
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Class to define a FEM standard boundary face.
Definition fem_standard_element.hpp:1439
unsigned short GetNSubFaces(void) const
Function, which makes available the number of linear subfaces used for plotting, among others.
Definition fem_standard_element.hpp:1601
const su2double * GetDrBasisElemIntegration(void) const
Function, which makes available the r-derivatives of the element basis functions in the integration p...
Definition fem_standard_element.hpp:1520
unsigned short GetNDOFsFace(void) const
Function, which makes available the number of DOFs of the face.
Definition fem_standard_element.hpp:1594
const su2double * GetBasisFaceIntegration(void) const
Function, which makes available the face basis functions in the integration points.
Definition fem_standard_element.hpp:1558
const su2double * GetBasisFaceIntegrationTranspose(void) const
Function, which makes available transpose matrix of the face basis functions in the integration point...
Definition fem_standard_element.hpp:1565
const su2double * GetMatDerBasisElemIntegrationTranspose(void) const
Function, which makes available the transpose of the matrix with the derivatives of the element basis...
Definition fem_standard_element.hpp:1549
unsigned short GetNDOFsPerSubFace(void) const
Function, which makes available the number of DOFs of a linear subface, used for plotting,...
Definition fem_standard_element.cpp:3583
passivedouble WorkEstimateMetis(CConfig *config)
Function, which estimates the amount of work for an element of this type. This information is used to...
Definition fem_work_estimate_metis.cpp:41
su2double GetPenaltyConstant(void) const
Function, which makes available the penalty constant for this standard face.
Definition fem_standard_element.hpp:1614
const su2double * GetDsBasisElemIntegration(void) const
Function, which makes available the s-derivatives of the element basis functions in the integration p...
Definition fem_standard_element.hpp:1527
unsigned short GetNDOFsElem(void) const
Function, which makes available the number of DOFs of the adjacent element.
Definition fem_standard_element.hpp:1588
const su2double * GetDtBasisElemIntegration(void) const
Function, which makes available the t-derivatives of the element basis functions in the integration p...
Definition fem_standard_element.hpp:1534
const su2double * GetDsBasisFaceIntegration(void) const
Function, which makes available the s-derivatives of the face basis functions in the integration poin...
Definition fem_standard_element.hpp:1581
CFEMStandardBoundaryFace(const CFEMStandardBoundaryFace &other)
Copy constructor.
Definition fem_standard_element.hpp:1503
bool SameStandardBoundaryFace(unsigned short val_VTK_TypeFace, bool val_constJac, unsigned short val_VTK_TypeElem, unsigned short val_nPolyElem, bool val_swapFaceInElem)
Function, which checks if the function arguments correspond to this standard face.
Definition fem_standard_element.cpp:3607
const unsigned short * GetSubFaceConn(void) const
Function, which makes available the the connectivity of the linear subfaces as a const pointer.
Definition fem_standard_element.hpp:1621
const su2double * GetDrBasisFaceIntegration(void) const
Function, which makes available the r-derivatives of the face basis functions in the integration poin...
Definition fem_standard_element.hpp:1574
CFEMStandardBoundaryFace & operator=(const CFEMStandardBoundaryFace &other)
Assignment operator.
Definition fem_standard_element.hpp:1510
passivedouble WorkEstimateMetisWallFunctions(CConfig *config, const unsigned short nPointsWF)
Function, which estimates the additional amount of work for an element of this type when a wall funct...
Definition fem_work_estimate_metis.cpp:46
const su2double * GetMatDerBasisElemIntegration(void) const
Function, which makes available the matrix with the derivatives of the element basis functions in the...
Definition fem_standard_element.hpp:1541
Base class for a FEM standard element.
Definition fem_standard_element.hpp:45
void GradVandermonde2D_Triangle(unsigned short nPoly, unsigned short nDOFs, const vector< su2double > &r, const vector< su2double > &s, vector< su2double > &VDr, vector< su2double > &VDs)
Function, which computes the gradients of the Vandermonde matrix for a standard triangle.
Definition fem_standard_element.cpp:1010
void Vandermonde3D_Pyramid(unsigned short nPoly, unsigned short nDOFs, const vector< su2double > &r, const vector< su2double > &s, const vector< su2double > &t, vector< su2double > &V)
Function, which computes the Vandermonde matrix for a standard pyramid.
Definition fem_standard_element.cpp:1271
void SubConnForPlottingTriangle(const unsigned short nPoly, vector< unsigned short > &subConn)
Function, which computes the local connectivity of linear subelements of a triangle,...
Definition fem_standard_element.cpp:935
void Copy(const CFEMStandardElementBase &other)
Function, which copies the data of the given object into the current object.
Definition fem_standard_element.cpp:250
vector< su2double > tIntegration
t-location of the integration points for this standard element, if needed.
Definition fem_standard_element.hpp:57
void LagrangianBasisFunctionAndDerivativesTetrahedron(const unsigned short nPoly, const vector< su2double > &rPoints, const vector< su2double > &sPoints, const vector< su2double > &tPoints, unsigned short &nDOFs, vector< su2double > &rDOFs, vector< su2double > &sDOFs, vector< su2double > &tDOFs, vector< su2double > &matVandermondeInv, vector< su2double > &lagBasisPoints, vector< su2double > &drLagBasisPoints, vector< su2double > &dsLagBasisPoints, vector< su2double > &dtLagBasisPoints)
Function, which determines the values of the Lagrangian interpolation functions and its derivatives i...
Definition fem_standard_element.cpp:580
su2double ViscousPenaltyParameter(const unsigned short VTK_TypeElem, const unsigned short nPolyElem) const
Function, which computes the constant in the penalty terms for a a viscous discretization.
Definition fem_standard_element.cpp:1579
vector< su2double > sIntegration
s-location of the integration points for this standard element, if needed.
Definition fem_standard_element.hpp:55
void GradVandermonde1D(unsigned short nDOFs, const vector< su2double > &r, vector< su2double > &VDr)
Function, which computes the gradient of the Vandermonde matrix for a standard 1D edge.
Definition fem_standard_element.cpp:155
unsigned short GetVTK_Type(void) const
Function, which makes available the type of the element.
Definition fem_standard_element.hpp:91
void CheckSumLagrangianBasisFunctions(const unsigned short nPoints, const unsigned short nDOFs, vector< su2double > &lagBasisPoints)
Function, which checks if the sum of the given Lagrangian interpolation functions is 1 in the points.
Definition fem_standard_element.cpp:233
void GradVandermonde3D_Tetrahedron(unsigned short nPoly, unsigned short nDOFs, const vector< su2double > &r, const vector< su2double > &s, const vector< su2double > &t, vector< su2double > &VDr, vector< su2double > &VDs, vector< su2double > &VDt)
Function, which computes the gradients of the Vandermonde matrix for a standard tetrahedron.
Definition fem_standard_element.cpp:1160
bool constJacobian
Whether or not the element has a constant Jacobian.
Definition fem_standard_element.hpp:51
void Vandermonde2D_Triangle(unsigned short nPoly, unsigned short nDOFs, const vector< su2double > &r, const vector< su2double > &s, vector< su2double > &V)
Function, which computes the Vandermonde matrix for a standard triangle.
Definition fem_standard_element.cpp:976
void Vandermonde1D(unsigned short nDOFs, const vector< su2double > &r, vector< su2double > &V)
Function, which computes the Vandermonde matrix for a standard 1D edge.
Definition fem_standard_element.cpp:139
void CheckSumDerivativesLagrangianBasisFunctions(const unsigned short nPoints, const unsigned short nDOFs, const vector< su2double > &dLagBasisPoints)
Function, which checks if the sum of the given derivatives of the Lagrangian interpolation functions ...
Definition fem_standard_element.cpp:220
void Vandermonde2D_Quadrilateral(unsigned short nPoly, unsigned short nDOFs, const vector< su2double > &r, const vector< su2double > &s, vector< su2double > &V)
Function, which computes the Vandermonde matrix for a standard quadrilateral.
Definition fem_standard_element.cpp:1065
void GradVandermonde3D_Pyramid(unsigned short nPoly, unsigned short nDOFs, const vector< su2double > &r, const vector< su2double > &s, const vector< su2double > &t, vector< su2double > &VDr, vector< su2double > &VDs, vector< su2double > &VDt)
Function, which computes the gradients of the Vandermonde matrix for a standard pyramid.
Definition fem_standard_element.cpp:1318
void SubConnForPlottingQuadrilateral(const unsigned short nPoly, vector< unsigned short > &subConn)
Function, which computes the local connectivity of linear subelements of a quadrilateral,...
Definition fem_standard_element.cpp:913
unsigned short VTK_Type
Element type using the VTK convention.
Definition fem_standard_element.hpp:47
void MatMulRowMajor(const unsigned short nDOFs, const unsigned short nPoints, const vector< su2double > &A, const vector< su2double > &B, vector< su2double > &C)
Function, which carries out a matrix matrix multiplication to obtain data in points and stores the re...
Definition fem_standard_element.cpp:874
void LagrangianBasisFunctionAndDerivativesPrism(const unsigned short nPoly, const vector< su2double > &rPoints, const vector< su2double > &sPoints, const vector< su2double > &tPoints, unsigned short &nDOFs, vector< su2double > &rDOFs, vector< su2double > &sDOFs, vector< su2double > &tDOFs, vector< su2double > &matVandermondeInv, vector< su2double > &lagBasisPoints, vector< su2double > &drLagBasisPoints, vector< su2double > &dsLagBasisPoints, vector< su2double > &dtLagBasisPoints)
Function, which determines the values of the Lagrangian interpolation functions and its derivatives i...
Definition fem_standard_element.cpp:732
vector< su2double > rIntegration
r-location of the integration points for this standard element.
Definition fem_standard_element.hpp:53
void LagrangianBasisFunctionAndDerivativesQuadrilateral(const unsigned short nPoly, const vector< su2double > &rPoints, const vector< su2double > &sPoints, unsigned short &nDOFs, vector< su2double > &rDOFs, vector< su2double > &sDOFs, vector< su2double > &matVandermondeInv, vector< su2double > &lagBasisPoints, vector< su2double > &drLagBasisPoints, vector< su2double > &dsLagBasisPoints)
Function, which determines the values of the Lagrangian interpolation functions and its derivatives i...
Definition fem_standard_element.cpp:520
unsigned short nIntegration
Number of points used in the numerical integration.
Definition fem_standard_element.hpp:49
void LagrangianBasisFunctionAndDerivativesPyramid(const unsigned short nPoly, const vector< su2double > &rPoints, const vector< su2double > &sPoints, const vector< su2double > &tPoints, unsigned short &nDOFs, vector< su2double > &rDOFs, vector< su2double > &sDOFs, vector< su2double > &tDOFs, vector< su2double > &matVandermondeInv, vector< su2double > &lagBasisPoints, vector< su2double > &drLagBasisPoints, vector< su2double > &dsLagBasisPoints, vector< su2double > &dtLagBasisPoints)
Function, which determines the values of the Lagrangian interpolation functions and its derivatives i...
Definition fem_standard_element.cpp:650
void GradVandermonde2D_Quadrilateral(unsigned short nPoly, unsigned short nDOFs, const vector< su2double > &r, const vector< su2double > &s, vector< su2double > &VDr, vector< su2double > &VDs)
Function, which computes the gradients of the Vandermonde matrix for a standard quadrilateral.
Definition fem_standard_element.cpp:1087
virtual ~CFEMStandardElementBase()=default
Destructor. Nothing to be done, because the vectors are deleted automatically.
CFEMStandardElementBase()=default
Constructor. Nothing to be done.
void Vandermonde3D_Hexahedron(unsigned short nPoly, unsigned short nDOFs, const vector< su2double > &r, const vector< su2double > &s, const vector< su2double > &t, vector< su2double > &V)
Function, which computes the Vandermonde matrix for a standard hexahedron.
Definition fem_standard_element.cpp:1524
void LagrangianBasisFunctionAndDerivativesTriangle(const unsigned short nPoly, const vector< su2double > &rPoints, const vector< su2double > &sPoints, unsigned short &nDOFs, vector< su2double > &rDOFs, vector< su2double > &sDOFs, vector< su2double > &matVandermondeInv, vector< su2double > &lagBasisPoints, vector< su2double > &drLagBasisPoints, vector< su2double > &dsLagBasisPoints)
Function, which determines the values of the Lagrangian interpolation functions and its derivatives i...
Definition fem_standard_element.cpp:459
vector< su2double > wIntegration
The weights of the integration points for this standard element.
Definition fem_standard_element.hpp:58
unsigned short GetNIntegration(void) const
Function, which makes available the number of integration points for this standard element.
Definition fem_standard_element.hpp:114
void LagrangianBasisFunctionAndDerivativesHexahedron(const unsigned short nPoly, const vector< su2double > &rPoints, const vector< su2double > &sPoints, const vector< su2double > &tPoints, unsigned short &nDOFs, vector< su2double > &rDOFs, vector< su2double > &sDOFs, vector< su2double > &tDOFs, vector< su2double > &matVandermondeInv, vector< su2double > &lagBasisPoints, vector< su2double > &drLagBasisPoints, vector< su2double > &dsLagBasisPoints, vector< su2double > &dtLagBasisPoints)
Function, which determines the values of the Lagrangian interpolation functions and its derivatives i...
Definition fem_standard_element.cpp:804
void GradVandermonde3D_Prism(unsigned short nPoly, unsigned short nDOFs, const vector< su2double > &r, const vector< su2double > &s, const vector< su2double > &t, vector< su2double > &VDr, vector< su2double > &VDs, vector< su2double > &VDt)
Function, which computes the gradients of the Vandermonde matrix for a standard prism.
Definition fem_standard_element.cpp:1453
void LagrangianBasisFunctionAndDerivativesLine(const unsigned short nPoly, const vector< su2double > &rPoints, unsigned short &nDOFs, vector< su2double > &rDOFs, vector< su2double > &matVandermondeInv, vector< su2double > &lagBasisPoints, vector< su2double > &drLagBasisPoints)
Function, which determines the values of the Lagrangian interpolation functions and its derivatives i...
Definition fem_standard_element.cpp:412
unsigned short GetOrderExact(void) const
Function, which makes available the polynomial order that must be integrated exactly.
Definition fem_standard_element.hpp:120
const su2double * GetWeightsIntegration(void) const
Function, which makes available the weights in the integration points.
Definition fem_standard_element.hpp:97
static unsigned short GetNDOFsStatic(unsigned short VTK_Type, unsigned short nPoly, unsigned long typeErrorMessage=0)
Static function, which makes available the number of DOFs for an element corresponding to the argumen...
Definition fem_standard_element.cpp:36
void Vandermonde3D_Tetrahedron(unsigned short nPoly, unsigned short nDOFs, const vector< su2double > &r, const vector< su2double > &s, const vector< su2double > &t, vector< su2double > &V)
Function, which computes the Vandermonde matrix for a standard tetrahedron.
Definition fem_standard_element.cpp:1112
void GradVandermonde3D_Hexahedron(unsigned short nPoly, unsigned short nDOFs, const vector< su2double > &r, const vector< su2double > &s, const vector< su2double > &t, vector< su2double > &VDr, vector< su2double > &VDs, vector< su2double > &VDt)
Function, which computes the gradients of the Vandermonde matrix for a standard hexahedron.
Definition fem_standard_element.cpp:1548
static void InverseMatrix(unsigned short n, vector< su2double > &A)
Static function, which computes the inverse of the given square matrix.
Definition fem_standard_element.cpp:79
unsigned short orderExact
Polynomial order that must be integrated exactly by the integration rule.
Definition fem_standard_element.hpp:48
void SubConnForPlottingLine(const unsigned short nPoly, vector< unsigned short > &subConn)
Function, which computes the local connectivity of linear subelements of a line, which can be used fo...
Definition fem_standard_element.cpp:902
void Vandermonde3D_Prism(unsigned short nPoly, unsigned short nDOFs, const vector< su2double > &r, const vector< su2double > &s, const vector< su2double > &t, vector< su2double > &V)
Function, which computes the Vandermonde matrix for a standard prism.
Definition fem_standard_element.cpp:1413
void DerivativesBasisFunctionsAdjacentElement(unsigned short VTK_TypeElem, unsigned short nPolyElem, const bool swapFaceInElement, unsigned short &nDOFsElem, vector< su2double > &drLagBasisIntegration, vector< su2double > &dsLagBasisIntegration, vector< su2double > &dtLagBasisIntegration)
Function, which computes the values of the derivatives of the basis functions of the adjacent element...
Definition fem_standard_element.cpp:262
Class to define a FEM standard element.
Definition fem_standard_element.hpp:673
unsigned short GetNPoly(void) const
Function, which makes available the polynomial degree for this standard element.
Definition fem_standard_element.hpp:910
const su2double * GetDerMatBasisFunctionsIntTrans(void) const
Function, which makes available the transpose matrix of the derivative of the basis functions in the ...
Definition fem_standard_element.hpp:843
su2double * GetDrBasisFunctionsIntegration(void)
Function, which makes available the r-derivatives of the basis functions in the integration points.
Definition fem_standard_element.hpp:813
su2double * GetBasisFunctionsIntegration(void)
Function, which makes available the values of the basis functions in the integration points.
Definition fem_standard_element.hpp:795
void BasisFunctionsAndDerivativesInPoint(const su2double *parCoor, vector< su2double > &lagBasis, vector< vector< su2double > > &dLagBasis)
Function, which computes the Lagrangian basis functions and its derivatives for the given parametric ...
Definition fem_standard_element.cpp:1955
const su2double * GetBasisFunctionsIntegrationTrans(void) const
Function, which makes available the transpose of the basis functions in the integration points.
Definition fem_standard_element.hpp:801
const su2double * GetBasisFunctionsSolDOFs(void) const
Function, which makes available the values of the basis functions in the solution DOFs.
Definition fem_standard_element.hpp:807
const vector< su2double > * GetTDOFs(void) const
Function, which makes available the t-location of the DOFs as a const pointer to the vector.
Definition fem_standard_element.hpp:977
CFEMStandardElement(const CFEMStandardElement &other)
Copy constructor.
Definition fem_standard_element.hpp:759
unsigned short * GetConnFace5(void)
Function, which makes available the connectivity of face 5.
Definition fem_standard_element.hpp:898
const su2double * GetMatVandermondeInv(void) const
Function, which makes available the matrix storage of the inverse of Vandermonde matrix of solution D...
Definition fem_standard_element.hpp:831
unsigned short * GetConnFace1(void)
Function, which makes available the connectivity of face 1.
Definition fem_standard_element.hpp:874
const su2double * GetMatBasisFunctionsIntegration(void) const
Function, which makes available the matrix storage of the basis functions in the integration points.
Definition fem_standard_element.hpp:837
unsigned short * GetConnFace3(void)
Function, which makes available the connectivity of face 3.
Definition fem_standard_element.hpp:886
unsigned short * GetConnFace4(void)
Function, which makes available the connectivity of face 4.
Definition fem_standard_element.hpp:892
void BasisFunctionsInPoint(const su2double *parCoor, vector< su2double > &lagBasis)
Function, which computes the Lagrangian basis functions for the given parametric coordinates.
Definition fem_standard_element.cpp:1889
bool SameStandardElement(unsigned short val_VTK_Type, unsigned short val_nPoly, bool val_constJac)
Function, which checks if the function arguments correspond to this standard element.
Definition fem_standard_element.cpp:2015
unsigned short GetNDOFs(void) const
Function, which makes available the number of DOFs for this standard element.
Definition fem_standard_element.hpp:904
const unsigned short * GetSubConnType2(void) const
Function, which makes available the the connectivity of the linear elements of type 2 as a const poin...
Definition fem_standard_element.hpp:950
unsigned short GetNSubElemsType1(void) const
Function, which makes available the number of sub-elements of type 1 for plotting.
Definition fem_standard_element.hpp:922
CFEMStandardElement & operator=(const CFEMStandardElement &other)
Assignment operator.
Definition fem_standard_element.hpp:766
unsigned short * GetConnFace2(void)
Function, which makes available the connectivity of face 2.
Definition fem_standard_element.hpp:880
const su2double * GetMatDerBasisFunctionsOwnDOFs(void) const
Function, which makes available the matrix storage of the derivative of the basis functions in the ow...
Definition fem_standard_element.hpp:849
su2double * GetDsBasisFunctionsIntegration(void)
Function, which makes available the s-derivatives of the basis functions in the integration points.
Definition fem_standard_element.hpp:819
const unsigned short * GetSubConnType1(void) const
Function, which makes available the the connectivity of the linear elements of type 1 as a const poin...
Definition fem_standard_element.hpp:930
unsigned short GetVTK_Type2(void) const
Function, which makes available the type of the element in subConn2ForPlotting.
Definition fem_standard_element.hpp:936
unsigned short GetNDOFsPerSubElem(unsigned short val_VTK_Type) const
Function, which makes available the number of DOFs of a linear element, used for plotting.
Definition fem_standard_element.cpp:2897
passivedouble WorkEstimateMetis(CConfig *config)
Function, which estimates the amount of work for an element of this type. This information is used to...
Definition fem_work_estimate_metis.cpp:31
const vector< su2double > * GetSDOFs(void) const
Function, which makes available the s-location of the DOFs as a const pointer to the vector.
Definition fem_standard_element.hpp:970
const vector< su2double > * GetRDOFs(void) const
Function, which makes available the r-location of the DOFs as a const pointer to the vector.
Definition fem_standard_element.hpp:963
const su2double * GetMat2ndDerBasisFunctionsInt(void) const
Function, which makes available the matrix storage of the second derivativex of the basis functions i...
Definition fem_standard_element.hpp:862
unsigned short * GetConnFace0(void)
Function, which makes available the connectivity of face 0.
Definition fem_standard_element.hpp:868
unsigned short GetNSubElemsType2(void) const
Function, which makes available the number of sub-elements of type 2 for plotting.
Definition fem_standard_element.hpp:942
su2double * GetDtBasisFunctionsIntegration(void)
Function, which makes available the t-derivatives of the basis functions in the integration points.
Definition fem_standard_element.hpp:825
unsigned short GetVTK_Type1(void) const
Function, which makes available the type of the element in subConn1ForPlotting.
Definition fem_standard_element.hpp:916
const su2double * GetMatDerBasisFunctionsSolDOFs(void) const
Function, which makes available the matrix storage of the derivative of the basis functions in the so...
Definition fem_standard_element.hpp:855
Class to define a FEM standard internal face.
Definition fem_standard_element.hpp:1106
unsigned short GetNDOFsElemSide1(void) const
Function, which makes available the number of DOFs of the element on side 1 of the face.
Definition fem_standard_element.hpp:1374
unsigned short GetNDOFsElemSide0(void) const
Function, which makes available the number of DOFs of the element on side 0 of the face.
Definition fem_standard_element.hpp:1367
CFEMStandardInternalFace(const CFEMStandardInternalFace &other)
Copy constructor.
Definition fem_standard_element.hpp:1210
unsigned short GetNDOFsFaceSide1(void) const
Function, which makes available the number of DOFs on side 1 of the face.
Definition fem_standard_element.hpp:1386
const su2double * GetMatDerBasisElemIntegrationSide1(void) const
Function, which makes available the matrix with the derivatives of the element basis functions of sid...
Definition fem_standard_element.hpp:1278
const su2double * GetMatDerBasisElemIntegrationSide0(void) const
Function, which makes available the matrix with the derivatives of the element basis functions of sid...
Definition fem_standard_element.hpp:1269
su2double * GetDrBasisFaceIntegrationSide1(void)
Function, which makes available the r-derivatives of the face basis functions of side 1 in the integr...
Definition fem_standard_element.hpp:1346
bool SameStandardMatchingFace(unsigned short val_VTK_TypeFace, bool val_constJac, unsigned short val_VTK_TypeSide0, unsigned short val_nPolySide0, unsigned short val_VTK_TypeSide1, unsigned short val_nPolySide1, bool val_swapFaceInElementSide0, bool val_swapFaceInElementSide1)
Function, which checks if the function arguments correspond to this standard face.
Definition fem_standard_element.cpp:3397
CFEMStandardInternalFace & operator=(const CFEMStandardInternalFace &other)
Assignment operator.
Definition fem_standard_element.hpp:1217
su2double * GetDrBasisFaceIntegrationSide0(void)
Function, which makes available the r-derivatives of the face basis functions of side 0 in the integr...
Definition fem_standard_element.hpp:1339
su2double * GetDsBasisFaceIntegrationSide0(void)
Function, which makes available the s-derivatives of the face basis functions of side 0 in the integr...
Definition fem_standard_element.hpp:1353
const su2double * GetBasisFaceIntegrationTransposeSide0(void) const
Function, which makes available transpose matrix of the face basis functions of side 0 in the integra...
Definition fem_standard_element.hpp:1321
const su2double * GetBasisFaceIntegrationSide0(void) const
Function, which makes available the face basis functions of side 0 in the integration points.
Definition fem_standard_element.hpp:1307
su2double * GetDrBasisElemIntegrationSide0(void)
Function, which makes available the r-derivatives of the elements basis functions of side 0 in the in...
Definition fem_standard_element.hpp:1227
su2double * GetDsBasisElemIntegrationSide0(void)
Function, which makes available the s-derivatives of the elements basis functions of side 0 in the in...
Definition fem_standard_element.hpp:1241
su2double * GetDsBasisElemIntegrationSide1(void)
Function, which makes available the s-derivatives of the elements basis functions of side 1 in the in...
Definition fem_standard_element.hpp:1248
passivedouble WorkEstimateMetis(CConfig *config)
Function, which estimates the amount of work for an element of this type. This information is used to...
Definition fem_work_estimate_metis.cpp:36
const su2double * GetBasisFaceIntegrationSide1(void) const
Function, which makes available the face basis functions of side 1 in the integration points.
Definition fem_standard_element.hpp:1314
const su2double * GetBasisFaceIntegrationTransposeSide1(void) const
Function, which makes available transpose matrix of the face basis functions of side 1 in the integra...
Definition fem_standard_element.hpp:1330
su2double * GetDsBasisFaceIntegrationSide1(void)
Function, which makes available the s-derivatives of the face basis functions of side 1 in the integr...
Definition fem_standard_element.hpp:1360
const su2double * GetMatDerBasisElemIntegrationTransposeSide1(void) const
Function, which makes available the transpose of the matrix with the derivatives of the element basis...
Definition fem_standard_element.hpp:1298
su2double GetPenaltyConstant(void) const
Function, which makes available the penalty constant for this standard face.
Definition fem_standard_element.hpp:1392
su2double * GetDtBasisElemIntegrationSide1(void)
Function, which makes available the t-derivatives of the elements basis functions of side 1 in the in...
Definition fem_standard_element.hpp:1262
const su2double * GetMatDerBasisElemIntegrationTransposeSide0(void) const
Function, which makes available the transpose of the matrix with the derivatives of the element basis...
Definition fem_standard_element.hpp:1288
su2double * GetDtBasisElemIntegrationSide0(void)
Function, which makes available the t-derivatives of the elements basis functions of side 0 in the in...
Definition fem_standard_element.hpp:1255
unsigned short GetNDOFsFaceSide0(void) const
Function, which makes available the number of DOFs on side 0 of the face.
Definition fem_standard_element.hpp:1380
su2double * GetDrBasisElemIntegrationSide1(void)
Function, which makes available the r-derivatives of the elements basis functions of side 1 in the in...
Definition fem_standard_element.hpp:1234
double passivedouble
Definition code_config.hpp:129
passivedouble su2double
Definition code_config.hpp:181
@ V
Menter k-w SST model with vorticity production terms.