Documentation 6b54b78464
Loading...
Searching...
No Matches
CFEM_DG_EulerSolver.hpp
Go to the documentation of this file.
1/*!
2 * \file CFEM_DG_EulerSolver.hpp
3 * \brief Headers of the CFEM_DG_EulerSolver class
4 * \author E. van der Weide, T. Economon, J. Alonso
5 * \version 8.5.0 "Harrier"
6 *
7 * SU2 Project Website: https://su2code.github.io
8 *
9 * The SU2 Project is maintained by the SU2 Foundation
10 * (http://su2foundation.org)
11 *
12 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
13 *
14 * SU2 is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
18 *
19 * SU2 is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
26 */
27
28
29#pragma once
30
31#include "CSolver.hpp"
32
33/*!
34 * \class CFEM_DG_EulerSolver
35 * \brief Main class for defining the Euler Discontinuous Galerkin finite element flow solver.
36 * \ingroup Euler_Equations
37 * \author E. van der Weide, T. Economon, J. Alonso
38 * \version 8.5.0 "Harrier"
39 */
41protected:
42
43 su2double Gamma; /*!< \brief Fluid's Gamma constant (ratio of specific heats). */
44 su2double Gamma_Minus_One; /*!< \brief Fluids's Gamma - 1.0 . */
45
46 CFluidModel *FluidModel; /*!< \brief fluid model used in the solver */
47
49 Mach_Inf, /*!< \brief Mach number at infinity. */
50 Density_Inf, /*!< \brief Density at infinity. */
51 Energy_Inf, /*!< \brief Energy at infinity. */
52 Temperature_Inf, /*!< \brief Energy at infinity. */
53 Pressure_Inf, /*!< \brief Pressure at infinity. */
54 *Velocity_Inf; /*!< \brief Flow velocity vector at infinity. */
55
56 vector<su2double> ConsVarFreeStream; /*!< \brief Vector, which contains the free stream
57 conservative variables. */
59 *CL_Inv, /*!< \brief Lift coefficient (inviscid contribution) for each boundary. */
60 *CD_Inv, /*!< \brief Drag coefficient (inviscid contribution) for each boundary. */
61 *CSF_Inv, /*!< \brief Sideforce coefficient (inviscid contribution) for each boundary. */
62 *CFx_Inv, /*!< \brief x Force coefficient (inviscid contribution) for each boundary. */
63 *CFy_Inv, /*!< \brief y Force coefficient (inviscid contribution) for each boundary. */
64 *CFz_Inv, /*!< \brief z Force coefficient (inviscid contribution) for each boundary. */
65 *CMx_Inv, /*!< \brief x Moment coefficient (inviscid contribution) for each boundary. */
66 *CMy_Inv, /*!< \brief y Moment coefficient (inviscid contribution) for each boundary. */
67 *CMz_Inv, /*!< \brief z Moment coefficient (inviscid contribution) for each boundary. */
68 *CEff_Inv; /*!< \brief Efficiency (Cl/Cd) (inviscid contribution) for each boundary. */
69
71 *Surface_CL_Inv, /*!< \brief Lift coefficient (inviscid contribution) for each monitoring surface. */
72 *Surface_CD_Inv, /*!< \brief Drag coefficient (inviscid contribution) for each monitoring surface. */
73 *Surface_CSF_Inv, /*!< \brief Side-force coefficient (inviscid contribution) for each monitoring surface. */
74 *Surface_CFx_Inv, /*!< \brief x Force coefficient (inviscid contribution) for each monitoring surface. */
75 *Surface_CFy_Inv, /*!< \brief y Force coefficient (inviscid contribution) for each monitoring surface. */
76 *Surface_CFz_Inv, /*!< \brief z Force coefficient (inviscid contribution) for each monitoring surface. */
77 *Surface_CMx_Inv, /*!< \brief x Moment coefficient (inviscid contribution) for each monitoring surface. */
78 *Surface_CMy_Inv, /*!< \brief y Moment coefficient (inviscid contribution) for each monitoring surface. */
79 *Surface_CMz_Inv, /*!< \brief z Moment coefficient (inviscid contribution) for each monitoring surface. */
80 *Surface_CEff_Inv; /*!< \brief Efficiency (Cl/Cd) (inviscid contribution) for each monitoring surface. */
81
83 AllBound_CL_Inv, /*!< \brief Total lift coefficient (inviscid contribution) for all the boundaries. */
84 AllBound_CD_Inv, /*!< \brief Total drag coefficient (inviscid contribution) for all the boundaries. */
85 AllBound_CSF_Inv, /*!< \brief Total sideforce coefficient (inviscid contribution) for all the boundaries. */
86 AllBound_CFx_Inv, /*!< \brief Total x force coefficient (inviscid contribution) for all the boundaries. */
87 AllBound_CFy_Inv, /*!< \brief Total y force coefficient (inviscid contribution) for all the boundaries. */
88 AllBound_CFz_Inv, /*!< \brief Total z force coefficient (inviscid contribution) for all the boundaries. */
89 AllBound_CMx_Inv, /*!< \brief Total x moment coefficient (inviscid contribution) for all the boundaries. */
90 AllBound_CMy_Inv, /*!< \brief Total y moment coefficient (inviscid contribution) for all the boundaries. */
91 AllBound_CMz_Inv, /*!< \brief Total z moment coefficient (inviscid contribution) for all the boundaries. */
92 AllBound_CEff_Inv; /*!< \brief Total efficiency (Cl/Cd) (inviscid contribution) for all the boundaries. */
93
95 AeroCoeffForceRef, /*!< \brief Reference force for coefficients */
96 Total_CL, /*!< \brief Total lift coefficient for all the boundaries. */
97 Total_CD, /*!< \brief Total drag coefficient for all the boundaries. */
98 Total_CSF, /*!< \brief Total sideforce coefficient for all the boundaries. */
99 Total_CFx, /*!< \brief Total x force coefficient for all the boundaries. */
100 Total_CFy, /*!< \brief Total y force coefficient for all the boundaries. */
101 Total_CFz, /*!< \brief Total z force coefficient for all the boundaries. */
102 Total_CMx, /*!< \brief Total x moment coefficient for all the boundaries. */
103 Total_CMy, /*!< \brief Total y moment coefficient for all the boundaries. */
104 Total_CMz, /*!< \brief Total z moment coefficient for all the boundaries. */
105 Total_CEff; /*!< \brief Total efficiency coefficient for all the boundaries. */
106
108 *Surface_CL, /*!< \brief Lift coefficient for each monitoring surface. */
109 *Surface_CD, /*!< \brief Drag coefficient for each monitoring surface. */
110 *Surface_CSF, /*!< \brief Side-force coefficient for each monitoring surface. */
111 *Surface_CFx, /*!< \brief x Force coefficient for each monitoring surface. */
112 *Surface_CFy, /*!< \brief y Force coefficient for each monitoring surface. */
113 *Surface_CFz, /*!< \brief z Force coefficient for each monitoring surface. */
114 *Surface_CMx, /*!< \brief x Moment coefficient for each monitoring surface. */
115 *Surface_CMy, /*!< \brief y Moment coefficient for each monitoring surface. */
116 *Surface_CMz, /*!< \brief z Moment coefficient for each monitoring surface. */
117 *Surface_CEff; /*!< \brief Efficiency (Cl/Cd) for each monitoring surface. */
118
119 unsigned long nDOFsLocTot; /*!< \brief Total number of local DOFs, including halos. */
120 unsigned long nDOFsLocOwned; /*!< \brief Number of owned local DOFs. */
121 unsigned long nDOFsGlobal; /*!< \brief Number of global DOFs. */
122
123 unsigned long nVolElemTot; /*!< \brief Total number of local volume elements, including halos. */
124 unsigned long nVolElemOwned; /*!< \brief Number of owned local volume elements. */
125 CVolumeElementFEM *volElem; /*!< \brief Array of the local volume elements, including halos. */
126
127 const unsigned long *nVolElemOwnedPerTimeLevel; /*!< \brief Number of owned local volume elements
128 per time level. Cumulative storage. */
129 const unsigned long *nVolElemInternalPerTimeLevel; /*!< \brief Number of internal local volume elements per
130 time level. Internal means that the solution
131 data does not need to be communicated. */
132 const unsigned long *nVolElemHaloPerTimeLevel; /*!< \brief Number of halo volume elements
133 per time level. Cumulative storage. */
134
135 vector<vector<unsigned long> > ownedElemAdjLowTimeLevel; /*!< \brief List of owned elements per time level that are
136 adjacent to elements of the lower time level. */
137 vector<vector<unsigned long> > haloElemAdjLowTimeLevel; /*!< \brief List of halo elements per time level that are
138 adjacent to elements of the lower time level. */
139
140 unsigned long nMeshPoints; /*!< \brief Number of mesh points in the local part of the grid. */
141 CPointFEM *meshPoints; /*!< \brief Array of the points of the FEM mesh. */
142
143 const unsigned long *nMatchingInternalFacesWithHaloElem; /*!< \brief Number of local matching internal faces per time level
144 between an owned and a halo element. Cumulative storage. */
145 const unsigned long *nMatchingInternalFacesLocalElem; /*!< \brief Number of local matching internal faces per time level
146 between local elements. Cumulative storage. */
147
148 CInternalFaceElementFEM *matchingInternalFaces; /*!< \brief Array of the local matching internal faces. */
149 CBoundaryFEM *boundaries; /*!< \brief Array of the boundaries of the FEM mesh. */
150
151 unsigned short nStandardBoundaryFacesSol; /*!< \brief Number of standard boundary faces used for solution of the DG solver. */
152 unsigned short nStandardElementsSol; /*!< \brief Number of standard volume elements used for solution of the DG solver. */
153 unsigned short nStandardMatchingFacesSol; /*!< \brief Number of standard matching internal faces used for solution of the DG solver. */
154
155 const CFEMStandardBoundaryFace *standardBoundaryFacesSol; /*!< \brief Array that contains the standard boundary
156 faces used for the solution of the DG solver. */
157 const CFEMStandardElement *standardElementsSol; /*!< \brief Array that contains the standard volume elements
158 used for the solution of the DG solver. */
159 const CFEMStandardInternalFace *standardMatchingFacesSol; /*!< \brief Array that contains the standard matching
160 internal faces used for the solution of
161 the DG solver. */
162
163 const su2double *timeCoefADER_DG; /*!< \brief The time coefficients in the iteration matrix of
164 the ADER-DG predictor step. */
165 const su2double *timeInterpolDOFToIntegrationADER_DG; /*!< \brief The interpolation matrix between the time DOFs and
166 the time integration points for ADER-DG. */
167 const su2double *timeInterpolAdjDOFToIntegrationADER_DG; /*!< \brief The interpolation matrix between the time DOFs of adjacent
168 elements of a higher time level and the time integration
169 points for ADER-DG. */
170
171 unsigned int sizeWorkArray; /*!< \brief The size of the work array needed. */
172
173 vector<su2double> TolSolADER; /*!< \brief Vector, which stores the tolerances for the conserved
174 variables in the ADER predictor step. */
175
176 vector<su2double> VecSolDOFs; /*!< \brief Vector, which stores the solution variables in the owned DOFs. */
177 vector<su2double> VecSolDOFsNew; /*!< \brief Vector, which stores the new solution variables in the owned DOFs (needed for classical RK4 scheme). */
178 vector<su2double> VecDeltaTime; /*!< \brief Vector, which stores the time steps of the owned volume elements. */
179
180 vector<su2double> VecSolDOFsPredictorADER; /*!< \brief Vector, which stores the ADER predictor solution in the owned
181 DOFs. These are both space and time DOFs. */
182
183 vector<vector<su2double> > VecWorkSolDOFs; /*!< \brief Working double vector to store the conserved variables for
184 the DOFs for the different time levels. */
185
186 vector<su2double> VecResDOFs; /*!< \brief Vector, which stores the residuals in the owned DOFs. */
187 vector<su2double> VecResFaces; /*!< \brief Vector, which stores the residuals of the DOFs that
188 come from the faces, both boundary and internal. */
189 vector<su2double> VecTotResDOFsADER; /*!< \brief Vector, which stores the accumulated residuals of the
190 owned DOFs for the ADER corrector step. */
191
192
193 vector<unsigned long> nEntriesResFaces; /*!< \brief Number of entries for the DOFs in the
194 residual of the faces. Cumulative storage. */
195 vector<unsigned long> entriesResFaces; /*!< \brief The corresponding entries in the residual of the faces. */
196
197 vector<unsigned long> nEntriesResAdjFaces; /*!< \brief Number of entries for the DOFs in the residual of the faces,
198 where the face is adjacent to an element of lower time
199 level. Cumulative storage. */
200 vector<unsigned long> entriesResAdjFaces; /*!< \brief The corresponding entries in the residual of the faces. */
201
202 vector<vector<unsigned long> > startLocResFacesMarkers; /*!< \brief The starting location in the residual of the
203 faces for the time levels of the boundary
204 markers. */
205
206 vector<unsigned long> startLocResInternalFacesLocalElem; /*!< \brief The starting location in the residual of the
207 faces for the time levels of internal faces
208 between locally owned elements. */
209 vector<unsigned long> startLocResInternalFacesWithHaloElem; /*!< \brief The starting location in the residual of the
210 faces for the time levels of internal faces
211 between an owned and a halo element. */
212
213 bool symmetrizingTermsPresent; /*!< \brief Whether or not symmetrizing terms are present in the
214 discretization. */
215
216 vector<unsigned long> nDOFsPerRank; /*!< \brief Number of DOFs per rank in
217 cumulative storage format. */
218 vector<vector<unsigned long> > nonZeroEntriesJacobian; /*!< \brief The ID's of the DOFs for the
219 non-zero entries of the Jacobian
220 for the locally owned DOFs. */
221
222 int nGlobalColors; /*!< \brief Number of global colors for the Jacobian computation. */
223
224 vector<vector<unsigned long> > localDOFsPerColor; /*!< \brief Double vector, which contains for every
225 color the local DOFs. */
226 vector<vector<int> > colorToIndEntriesJacobian; /*!< \brief Double vector, which contains for every
227 local DOF the mapping from the color to the
228 entry in the Jacobian. A -1 indicates that
229 the color does not contribute to the Jacobian
230 of the DOF. */
231
232 CBlasStructure *blasFunctions; /*!< \brief Pointer to the object to carry out the BLAS functionalities. */
233
234private:
235
236#ifdef HAVE_MPI
237 vector<vector<SU2_MPI::Request> > commRequests; /*!< \brief Communication requests in the communication of the solution for all
238 time levels. These are both sending and receiving requests. */
239
240 vector<vector<vector<unsigned long> > > elementsRecvMPIComm; /*!< \brief Triple vector, which contains the halo elements
241 for MPI communication for all time levels. */
242 vector<vector<vector<unsigned long> > > elementsSendMPIComm; /*!< \brief Triple vector, which contains the donor elements
243 for MPI communication for all time levels. */
244
245 vector<vector<int> > ranksRecvMPI; /*!< \brief Double vector, which contains the ranks from which the halo elements
246 are received for all time levels. */
247 vector<vector<int> > ranksSendMPI; /*!< \brief Double vector, which contains the ranks to which the donor elements
248 are sent for all time levels. */
249
250 vector<vector<vector<su2double> > > commRecvBuf; /*!< \brief Receive buffers used to receive the solution data
251 in the communication pattern for all time levels. */
252 vector<vector<vector<su2double> > > commSendBuf; /*!< \brief Send buffers used to send the solution data
253 in the communication pattern for all time levels. */
254#endif
255
256 vector<vector<unsigned long> > elementsRecvSelfComm; /*!< \brief Double vector, which contains the halo elements
257 for self communication for all time levels. */
258 vector<vector<unsigned long> > elementsSendSelfComm; /*!< \brief Double vector, which contains the donor elements
259 for self communication for all time levels. */
260
261 vector<su2double> rotationMatricesPeriodicity; /*!< \brief Vector, which contains the rotation matrices
262 for the rotational periodic transformations. */
263 vector<vector<vector<unsigned long> > > halosRotationalPeriodicity; /*!< \brief Triple vector, which contains the indices
264 of halo elements for which a periodic
265 transformation must be applied for all
266 time levels. */
267
268 vector<CTaskDefinition> tasksList; /*!< \brief List of tasks to be carried out in the computationally
269 intensive part of the solver. */
270
271 CVariable* GetBaseClassPointerToNodes() final {return nullptr;}
272
273public:
274
275 /*!
276 * \brief Constructor of the class.
277 */
279
280 /*!
281 * \overload
282 * \param[in] config - Definition of the particular problem.
283 * \param[in] val_nDim - Dimension of the problem (2D or 3D).
284 * \param[in] iMesh - Index of the mesh in multigrid computations.
285 */
286 CFEM_DG_EulerSolver(CConfig *config, unsigned short val_nDim, unsigned short iMesh);
287
288 /*!
289 * \overload
290 * \param[in] geometry - Geometrical definition of the problem.
291 * \param[in] config - Definition of the particular problem.
292 * \param[in] iMesh - Index of the mesh in multigrid computations.
293 */
294 CFEM_DG_EulerSolver(CGeometry *geometry, CConfig *config, unsigned short iMesh);
295
296 /*!
297 * \brief Destructor of the class.
298 */
299 ~CFEM_DG_EulerSolver(void) override;
300
301 /*!
302 * \brief Set the fluid solver nondimensionalization.
303 * \param[in] config - Definition of the particular problem.
304 * \param[in] iMesh - Index of the mesh in multigrid computations.
305 * \param[in] writeOutput - Whether or not output must be written.
306 */
308 unsigned short iMesh,
309 const bool writeOutput);
310
311 /*!
312 * \brief Get a pointer to the vector of the solution degrees of freedom.
313 * \return Pointer to the vector of the solution degrees of freedom.
314 */
315 inline su2double* GetVecSolDOFs(void) final { return VecSolDOFs.data(); }
316
317 /*!
318 * \brief Get the global number of solution degrees of freedom for the calculation.
319 * \return Global number of solution degrees of freedom
320 */
321 inline unsigned long GetnDOFsGlobal(void) const final { return nDOFsGlobal; }
322
323 /*!
324 * \brief Compute the pressure at the infinity.
325 * \return Value of the pressure at the infinity.
326 */
327 inline CFluidModel* GetFluidModel(void) const final { return FluidModel;}
328
329 /*!
330 * \brief Compute the density at the infinity.
331 * \return Value of the density at the infinity.
332 */
333 inline su2double GetDensity_Inf(void) const final { return Density_Inf; }
334
335 /*!
336 * \brief Compute 2-norm of the velocity at the infinity.
337 * \return Value of the 2-norm of the velocity at the infinity.
338 */
339 inline su2double GetModVelocity_Inf(void) const final {
340 su2double Vel2 = 0;
341 for (unsigned short iDim = 0; iDim < nDim; iDim++)
342 Vel2 += Velocity_Inf[iDim]*Velocity_Inf[iDim];
343 return sqrt(Vel2);
344 }
345
346
347 /*!
348 * \brief Compute the density multiply by energy at the infinity.
349 * \return Value of the density multiply by energy at the infinity.
350 */
351 inline su2double GetDensity_Energy_Inf(void) const final { return Density_Inf*Energy_Inf; }
352
353 /*!
354 * \brief Compute the pressure at the infinity.
355 * \return Value of the pressure at the infinity.
356 */
357 inline su2double GetPressure_Inf(void) const final { return Pressure_Inf; }
358
359 /*!
360 * \brief Get the velocity at the infinity.
361 * \param[in] val_dim - Index of the velocity vector.
362 * \return Value of the velocity at the infinity.
363 */
364 inline su2double GetVelocity_Inf(unsigned short val_dim) const final { return Velocity_Inf[val_dim]; }
365
366 /*!
367 * \brief Get the velocity at the infinity.
368 * \return Value of the velocity at the infinity.
369 */
370 inline su2double *GetVelocity_Inf(void) final { return Velocity_Inf; }
371
372 /*!
373 * \brief Set the freestream pressure.
374 * \param[in] Value of freestream pressure.
375 */
376 inline void SetPressure_Inf(su2double p_inf) final { Pressure_Inf = p_inf; }
377
378 /*!
379 * \brief Set the freestream temperature.
380 * \param[in] Value of freestream temperature.
381 */
382 inline void SetTemperature_Inf(su2double t_inf) final { Temperature_Inf = t_inf; }
383
384 /*!
385 * \brief Set the initial condition for the Euler Equations.
386 * \param[in] geometry - Geometrical definition of the problem.
387 * \param[in] solver_container - Container with all the solutions.
388 * \param[in] config - Definition of the particular problem.
389 * \param[in] ExtIter - External iteration.
390 */
391 void SetInitialCondition(CGeometry **geometry,
392 CSolver ***solver_container,
393 CConfig *config,
394 unsigned long TimeIter) final;
395
396 /*!
397 * \brief Set the working solution of the first time level to the current
398 * solution. Used for Runge-Kutta type schemes.
399 */
400 void Set_OldSolution() final;
401
402 /*!
403 * \brief Set the new solution to the current solution for classical RK.
404 */
405 void Set_NewSolution() final;
406
407 /*!
408 * \brief Function to compute the time step for solving the Euler equations.
409 * \param[in] geometry - Geometrical definition of the problem.
410 * \param[in] solver_container - Container vector with all the solutions.
411 * \param[in] config - Definition of the particular problem.
412 * \param[in] iMesh - Index of the mesh in multigrid computations.
413 * \param[in] Iteration - Value of the current iteration.
414 */
415 void SetTime_Step(CGeometry *geometry,
416 CSolver **solver_container,
417 CConfig *config,
418 unsigned short iMesh,
419 unsigned long Iteration) override;
420
421 /*!
422 * \brief Function, which checks whether or not the time synchronization point is reached
423 when explicit time stepping is used.
424 * \param[in] config - Definition of the particular problem.
425 * \param[in] TimeSync - The synchronization time.
426 * \param[in,out] timeEvolved - On input the time evolved before the time step,
427 on output the time evolved after the time step.
428 * \param[out] syncTimeReached - Whether or not the synchronization time is reached.
429 */
431 const su2double TimeSync,
432 su2double &timeEvolved,
433 bool &syncTimeReached) final;
434
435 /*!
436 * \brief Function, which processes the list of tasks to be executed by
437 the DG solver.
438 * \param[in] geometry - Geometrical definition of the problem.
439 * \param[in] solver_container - Container vector with all the solutions.
440 * \param[in] numerics - Description of the numerical method.
441 * \param[in] config - Definition of the particular problem.
442 * \param[in] iMesh - Index of the mesh in multigrid computations.
443 */
444 void ProcessTaskList_DG(CGeometry *geometry,
445 CSolver **solver_container,
446 CNumerics **numerics,
447 CConfig *config,
448 unsigned short iMesh) final;
449
450 /*!
451 * \brief Function, to carry out the space time integration for ADER
452 with time accurate local time stepping.
453 * \param[in] geometry - Geometrical definition of the problem.
454 * \param[in] solver_container - Container vector with all the solutions.
455 * \param[in] numerics - Description of the numerical method.
456 * \param[in] config - Definition of the particular problem.
457 * \param[in] iMesh - Index of the mesh in multigrid computations.
458 */
460 CSolver **solver_container,
461 CNumerics **numerics,
462 CConfig *config,
463 unsigned short iMesh,
464 unsigned short RunTime_EqSystem) final;
465
466 /*!
467 * \brief Function, which controls the computation of the spatial Jacobian.
468 * \param[in] geometry - Geometrical definition of the problem.
469 * \param[in] solver_container - Container vector with all the solutions.
470 * \param[in] numerics - Description of the numerical method.
471 * \param[in] config - Definition of the particular problem.
472 * \param[in] iMesh - Index of the mesh in multigrid computations.
473 */
474 void ComputeSpatialJacobian(CGeometry *geometry,
475 CSolver **solver_container,
476 CNumerics **numerics,
477 CConfig *config,
478 unsigned short iMesh,
479 unsigned short RunTime_EqSystem) final;
480
481 /*!
482 * \brief Function, which determines the values of the tolerances in
483 the predictor step of ADER-DG.
484 */
486
487 /*!
488 * \brief Function, carries out the predictor step of the ADER-DG
489 time integration.
490 * \param[in] config - Definition of the particular problem.
491 * \param[in] elemBeg - Begin index of the element range to be computed.
492 * \param[in] elemEnd - End index (not included) of the element range to be computed.
493 * \param[out] workArray - Work array.
494 */
495 void ADER_DG_PredictorStep(CConfig *config,
496 const unsigned long elemBeg,
497 const unsigned long elemEnd,
498 su2double *workArray);
499
500 /*!
501 * \brief Function, which interpolates the predictor solution of ADER-DG
502 to the time value that corresponds to iTime.
503 * \param[in] config - Definition of the particular problem.
504 * \param[in] iTime - Time index of the time integration point for the
505 integration over the time slab in the corrector
506 step of ADER-DG.
507 * \param[in] elemBeg - Begin index of the element range to be computed. This
508 range is for elements of the same time level.
509 * \param[in] elemEnd - End index (not included) of the element range to be computed.
510 * \param[in] nAdjElem - Number of elements of the next time level, which are
511 adjacent to elements of the current time level.
512 * \param[in] adjElem - The ID's of the adjacent elements.
513 * \param[in] secondPartTimeInt - Whether or not this is the second part of the
514 time interval for the adjacent elements.
515 * \param[out] solTimeLevel - Array in which the interpolated solution for the
516 time level considered must be stored.
517 */
519 const unsigned short iTime,
520 const unsigned long elemBeg,
521 const unsigned long elemEnd,
522 const unsigned long nAdjElem,
523 const unsigned long *adjElem,
524 const bool secondPartTimeInt,
525 su2double *solTimeLevel);
526
527 /*!
528 * \brief Compute the artificial viscosity for shock capturing in DG. It is a virtual
529 function, because this function is overruled for Navier-Stokes.
530 * \param[in] config - Definition of the particular problem.
531 * \param[in] elemBeg - Begin index of the element range to be computed.
532 * \param[in] elemEnd - End index (not included) of the element range to be computed.
533 * \param[out] workArray - Work array.
534 */
535 virtual void Shock_Capturing_DG(CConfig *config,
536 const unsigned long elemBeg,
537 const unsigned long elemEnd,
538 su2double *workArray);
539
540 /*!
541 * \brief Compute the volume contributions to the spatial residual. It is a virtual
542 function, because this function is overruled for Navier-Stokes.
543 * \param[in] config - Definition of the particular problem.
544 * \param[in] elemBeg - Begin index of the element range to be computed.
545 * \param[in] elemEnd - End index (not included) of the element range to be computed.
546 * \param[out] workArray - Work array.
547 */
548 virtual void Volume_Residual(CConfig *config,
549 const unsigned long elemBeg,
550 const unsigned long elemEnd,
551 su2double *workArray);
552
553 /*!
554 * \brief Function, which computes the spatial residual for the DG discretization.
555 * \param[in] timeLevel - Time level of the time accurate local time stepping,
556 if relevant.
557 * \param[in] config - Definition of the particular problem.
558 * \param[in] numerics - Description of the numerical method.
559 * \param[in] haloInfoNeededForBC - If true, treat boundaries for which halo data is needed.
560 If false, treat boundaries for which only owned data is needed.
561 * \param[out] workArray - Work array.
562 */
563 void Boundary_Conditions(const unsigned short timeLevel,
564 CConfig *config,
565 CNumerics **numerics,
566 const bool haloInfoNeededForBC,
567 su2double *workArray);
568
569 /*!
570 * \brief Compute the spatial residual for the given range of faces. It is a virtual
571 function, because this function is overruled for Navier-Stokes.
572 * \param[in] config - Definition of the particular problem.
573 * \param[in] indFaceBeg - Starting index in the matching faces.
574 * \param[in] indFaceEnd - End index in the matching faces.
575 * \param[in,out] indResFaces - Index where to store the residuals in
576 the vector of face residuals.
577 * \param[in] numerics - Description of the numerical method.
578 * \param[out] workArray - Work array.
579 */
580 virtual void ResidualFaces(CConfig *config,
581 const unsigned long indFaceBeg,
582 const unsigned long indFaceEnd,
583 unsigned long &indResFaces,
584 CNumerics *numerics,
585 su2double *workArray);
586
587 /*!
588 * \brief Function, which accumulates the space time residual of the ADER-DG
589 time integration scheme for the owned elements.
590 * \param[in] config - Definition of the particular problem.
591 * \param[in] timeLevel - time level for which the residuals must be
592 accumulated.
593 * \param[in] intPoint - Index of the time integration point.
594 */
596 const unsigned short timeLevel,
597 const unsigned short intPoint);
598
599 /*!
600 * \brief Function, which accumulates the space time residual of the ADER-DG
601 time integration scheme for the halo elements.
602 * \param[in] config - Definition of the particular problem.
603 * \param[in] timeLevel - time level for which the residuals must be
604 accumulated.
605 * \param[in] intPoint - Index of the time integration point.
606 */
608 const unsigned short timeLevel,
609 const unsigned short intPoint);
610
611 /*!
612 * \brief Compute primitive variables and their gradients.
613 * \param[in] geometry - Geometrical definition of the problem.
614 * \param[in] solver_container - Container vector with all the solutions.
615 * \param[in] config - Definition of the particular problem.
616 * \param[in] iStep - Current step in the time accurate local time
617 stepping algorithm, if appropriate.
618 * \param[in] RunTime_EqSystem - System of equations which is going to be solved.
619 */
620 void Preprocessing(CGeometry *geometry,
621 CSolver **solver_container,
622 CConfig *config,
623 unsigned short iMesh,
624 unsigned short iRKStep,
625 unsigned short RunTime_EqSystem,
626 bool Output) final;
627
628 /*!
629 * \brief
630 * \param[in] geometry - Geometrical definition of the problem.
631 * \param[in] solver_container - Container vector with all the solutions.
632 * \param[in] config - Definition of the particular problem.
633 * \param[in] iMesh - Index of the mesh in multigrid computations.
634 */
635 void Postprocessing(CGeometry *geometry,
636 CSolver **solver_container,
637 CConfig *config,
638 unsigned short iMesh) final;
639
640 /*!
641 * \brief Impose via the residual the Euler wall boundary condition. It is a
642 virtual function, because for Navier-Stokes it is overwritten.
643 * \param[in] config - Definition of the particular problem.
644 * \param[in] surfElemBeg - Start index in the list of surface elements.
645 * \param[in] surfElemEnd - End index (not included) in the list of surface elements.
646 * \param[in] surfElem - Array of surface elements for which the boundary
647 conditions must be imposed.
648 * \param[out] resFaces - Array where the residual contribution from the
649 surface elements must be stored.
650 * \param[in] conv_numerics - Description of the numerical method.
651 * \param[out] workArray - Work array.
652 */
653 virtual void BC_Euler_Wall(CConfig *config,
654 const unsigned long surfElemBeg,
655 const unsigned long surfElemEnd,
656 const CSurfaceElementFEM *surfElem,
657 su2double *resFaces,
658 CNumerics *conv_numerics,
659 su2double *workArray);
660 using CSolver::BC_Euler_Wall;
661
662 /*!
663 * \brief Impose the far-field boundary condition. It is a virtual
664 function, because for Navier-Stokes it is overwritten.
665 * \param[in] config - Definition of the particular problem.
666 * \param[in] surfElemBeg - Start index in the list of surface elements.
667 * \param[in] surfElemEnd - End index (not included) in the list of surface elements.
668 * \param[in] surfElem - Array of surface elements for which the boundary
669 conditions must be imposed.
670 * \param[out] resFaces - Array where the residual contribution from the
671 surface elements must be stored.
672 * \param[in] conv_numerics - Description of the numerical method.
673 * \param[out] workArray - Work array.
674 */
675 virtual void BC_Far_Field(CConfig *config,
676 const unsigned long surfElemBeg,
677 const unsigned long surfElemEnd,
678 const CSurfaceElementFEM *surfElem,
679 su2double *resFaces,
680 CNumerics *conv_numerics,
681 su2double *workArray);
682 using CSolver::BC_Far_Field;
683
684 /*!
685 * \brief Impose the symmetry boundary condition. It is a virtual
686 function, because for Navier-Stokes it is overwritten.
687 * \param[in] config - Definition of the particular problem.
688 * \param[in] surfElemBeg - Start index in the list of surface elements.
689 * \param[in] surfElemEnd - End index (not included) in the list of surface elements.
690 * \param[in] surfElem - Array of surface elements for which the boundary
691 conditions must be imposed.
692 * \param[out] resFaces - Array where the residual contribution from the
693 surface elements must be stored.
694 * \param[in] conv_numerics - Description of the numerical method.
695 * \param[out] workArray - Work array.
696 */
697 virtual void BC_Sym_Plane(CConfig *config,
698 const unsigned long surfElemBeg,
699 const unsigned long surfElemEnd,
700 const CSurfaceElementFEM *surfElem,
701 su2double *resFaces,
702 CNumerics *conv_numerics,
703 su2double *workArray);
704 using CSolver::BC_Sym_Plane;
705
706 /*!
707 * \brief Impose the supersonic outlet boundary condition. It is a virtual
708 function, because for Navier-Stokes it is overwritten.
709 * \param[in] config - Definition of the particular problem.
710 * \param[in] surfElemBeg - Start index in the list of surface elements.
711 * \param[in] surfElemEnd - End index (not included) in the list of surface elements.
712 * \param[in] surfElem - Array of surface elements for which the boundary
713 conditions must be imposed.
714 * \param[out] resFaces - Array where the residual contribution from the
715 surface elements must be stored.
716 * \param[in] conv_numerics - Description of the numerical method.
717 * \param[out] workArray - Work array.
718 */
719 virtual void BC_Supersonic_Outlet(CConfig *config,
720 const unsigned long surfElemBeg,
721 const unsigned long surfElemEnd,
722 const CSurfaceElementFEM *surfElem,
723 su2double *resFaces,
724 CNumerics *conv_numerics,
725 su2double *workArray);
727
728 /*!
729 * \brief Impose the subsonic inlet boundary condition. It is a virtual
730 function, because for Navier-Stokes it is overwritten.
731 * \param[in] config - Definition of the particular problem.
732 * \param[in] surfElemBeg - Start index in the list of surface elements.
733 * \param[in] surfElemEnd - End index (not included) in the list of surface elements.
734 * \param[in] surfElem - Array of surface elements for which the boundary
735 conditions must be imposed.
736 * \param[out] resFaces - Array where the residual contribution from the
737 surface elements must be stored.
738 * \param[in] conv_numerics - Description of the numerical method.
739 * \param[in] val_marker - Surface marker where the boundary condition is applied.
740 * \param[out] workArray - Work array.
741 */
742 virtual void BC_Inlet(CConfig *config,
743 const unsigned long surfElemBeg,
744 const unsigned long surfElemEnd,
745 const CSurfaceElementFEM *surfElem,
746 su2double *resFaces,
747 CNumerics *conv_numerics,
748 unsigned short val_marker,
749 su2double *workArray);
750 using CSolver::BC_Inlet;
751
752 /*!
753 * \brief Impose the outlet boundary condition.It is a virtual
754 function, because for Navier-Stokes it is overwritten.
755 * \param[in] config - Definition of the particular problem.
756 * \param[in] surfElemBeg - Start index in the list of surface elements.
757 * \param[in] surfElemEnd - End index (not included) in the list of surface elements.
758 * \param[in] surfElem - Array of surface elements for which the boundary
759 conditions must be imposed.
760 * \param[out] resFaces - Array where the residual contribution from the
761 surface elements must be stored.
762 * \param[in] conv_numerics - Description of the numerical method.
763 * \param[in] val_marker - Surface marker where the boundary condition is applied.
764 * \param[out] workArray - Work array.
765 */
766 virtual void BC_Outlet(CConfig *config,
767 const unsigned long surfElemBeg,
768 const unsigned long surfElemEnd,
769 const CSurfaceElementFEM *surfElem,
770 su2double *resFaces,
771 CNumerics *conv_numerics,
772 unsigned short val_marker,
773 su2double *workArray);
774 using CSolver::BC_Outlet;
775
776 /*!
777 * \brief Impose a constant heat-flux condition at the wall. It is a virtual
778 function, such that it can be overwritten for Navier-Stokes.
779 * \param[in] config - Definition of the particular problem.
780 * \param[in] surfElemBeg - Start index in the list of surface elements.
781 * \param[in] surfElemEnd - End index (not included) in the list of surface elements.
782 * \param[in] surfElem - Array of surface elements for which the boundary
783 conditions must be imposed.
784 * \param[out] resFaces - Array where the residual contribution from the
785 surface elements must be stored.
786 * \param[in] conv_numerics - Description of the numerical method.
787 * \param[in] val_marker - Surface marker where the boundary condition is applied.
788 * \param[out] workArray - Work array.
789 */
790 inline virtual void BC_HeatFlux_Wall(CConfig *config,
791 const unsigned long surfElemBeg,
792 const unsigned long surfElemEnd,
793 const CSurfaceElementFEM *surfElem,
794 su2double *resFaces,
795 CNumerics *conv_numerics,
796 unsigned short val_marker,
797 su2double *workArray) {}
799
800 /*!
801 * \brief Impose an isothermal condition at the wall. It is a virtual
802 function, such that it can be overwritten for Navier-Stokes.
803 * \param[in] config - Definition of the particular problem.
804 * \param[in] surfElemBeg - Start index in the list of surface elements.
805 * \param[in] surfElemEnd - End index (not included) in the list of surface elements.
806 * \param[in] surfElem - Array of surface elements for which the boundary
807 conditions must be imposed.
808 * \param[out] resFaces - Array where the residual contribution from the
809 surface elements must be stored.
810 * \param[in] conv_numerics - Description of the numerical method.
811 * \param[in] val_marker - Surface marker where the boundary condition is applied.
812 * \param[out] workArray - Work array.
813 */
814 inline virtual void BC_Isothermal_Wall(CConfig *config,
815 const unsigned long surfElemBeg,
816 const unsigned long surfElemEnd,
817 const CSurfaceElementFEM *surfElem,
818 su2double *resFaces,
819 CNumerics *conv_numerics,
820 unsigned short val_marker,
821 su2double *workArray) {}
823
824 /*!
825 * \brief Impose the boundary condition using characteristic reconstruction. It is
826 * a virtual function, such that it can be overwritten for Navier-Stokes.
827 * \param[in] config - Definition of the particular problem.
828 * \param[in] surfElemBeg - Start index in the list of surface elements.
829 * \param[in] surfElemEnd - End index (not included) in the list of surface elements.
830 * \param[in] surfElem - Array of surface elements for which the boundary
831 conditions must be imposed.
832 * \param[out] resFaces - Array where the residual contribution from the
833 surface elements must be stored.
834 * \param[in] conv_numerics - Description of the numerical method.
835 * \param[in] val_marker - Surface marker where the boundary condition is applied.
836 * \param[out] workArray - Work array.
837 */
838 virtual void BC_Riemann(CConfig *config,
839 const unsigned long surfElemBeg,
840 const unsigned long surfElemEnd,
841 const CSurfaceElementFEM *surfElem,
842 su2double *resFaces,
843 CNumerics *conv_numerics,
844 unsigned short val_marker,
845 su2double *workArray);
847
848 /*!
849 * \brief Impose the user customized boundary condition. It is a virtual
850 function, because for Navier-Stokes it is overwritten.
851 * \param[in] config - Definition of the particular problem.
852 * \param[in] surfElemBeg - Start index in the list of surface elements.
853 * \param[in] surfElemEnd - End index (not included) in the list of surface elements.
854 * \param[in] surfElem - Array of surface elements for which the boundary
855 conditions must be imposed.
856 * \param[out] resFaces - Array where the residual contribution from the
857 surface elements must be stored.
858 * \param[in] conv_numerics - Description of the numerical method.
859 * \param[out] workArray - Work array.
860 */
861 virtual void BC_Custom(CConfig *config,
862 const unsigned long surfElemBeg,
863 const unsigned long surfElemEnd,
864 const CSurfaceElementFEM *surfElem,
865 su2double *resFaces,
866 CNumerics *conv_numerics,
867 su2double *workArray);
868 using CSolver::BC_Custom;
869
870 /*!
871 * \brief Update the solution using a Runge-Kutta scheme.
872 * \param[in] geometry - Geometrical definition of the problem.
873 * \param[in] solver_container - Container vector with all the solutions.
874 * \param[in] config - Definition of the particular problem.
875 * \param[in] iRKStep - Current step of the Runge-Kutta iteration.
876 */
877 void ExplicitRK_Iteration(CGeometry *geometry,
878 CSolver **solver_container,
879 CConfig *config,
880 unsigned short iRKStep) final;
881
882 /*!
883 * \brief Update the solution using the classical fourth-order Runge-Kutta scheme.
884 * \param[in] geometry - Geometrical definition of the problem.
885 * \param[in] solver_container - Container vector with all the solutions.
886 * \param[in] config - Definition of the particular problem.
887 * \param[in] iRKStep - Current step of the Runge-Kutta iteration.
888 */
889 void ClassicalRK4_Iteration(CGeometry *geometry,
890 CSolver **solver_container,
891 CConfig *config,
892 unsigned short iRKStep) final;
893
894 /*!
895 * \brief Update the solution using the classical fourth-order Runge-Kutta scheme.
896 * \param[in] geometry - Geometrical definition of the problem.
897 * \param[in] config - Definition of the particular problem.
898 */
899 void SetResidual_RMS_FEM(CGeometry *geometry, CConfig *config);
900
901 /*!
902 * \brief Compute the global error measures (L2, Linf) for verification cases.
903 * \param[in] geometry - Geometrical definition.
904 * \param[in] config - Definition of the particular problem.
905 */
906 void ComputeVerificationError(CGeometry *geometry, CConfig *config) final;
907
908 /*!
909 * \brief Update the solution for the ADER-DG scheme for the given range
910 of elements.
911 * \param[in] elemBeg - Begin index of the element range to be computed.
912 * \param[in] elemEnd - End index (not included) of the element range to be computed.
913 */
914 void ADER_DG_Iteration(const unsigned long elemBeg,
915 const unsigned long elemEnd);
916
917 /*!
918 * \brief Compute the pressure forces and all the adimensional coefficients.
919 * \param[in] geometry - Geometrical definition of the problem.
920 * \param[in] config - Definition of the particular problem.
921 */
922 void Pressure_Forces(const CGeometry* geometry, const CConfig* config) final;
923
924 /*!
925 * \brief Load a solution from a restart file.
926 * \param[in] geometry - Geometrical definition of the problem.
927 * \param[in] solver - Container vector with all of the solvers.
928 * \param[in] config - Definition of the particular problem.
929 * \param[in] val_iter - Current external iteration number.
930 * \param[in] val_update_geo - Flag for updating coords and grid velocity.
931 */
932 void LoadRestart(CGeometry **geometry,
933 CSolver ***solver,
934 CConfig *config,
935 int val_iter,
936 bool val_update_geo) final;
937
938 /*!
939 * \brief Provide the non dimensional lift coefficient (inviscid contribution).
940 * \param val_marker Surface where the coefficient is going to be computed.
941 * \return Value of the lift coefficient (inviscid contribution) on the surface <i>val_marker</i>.
942 */
943 inline su2double GetCL_Inv(unsigned short val_marker) const final { return CL_Inv[val_marker]; }
944
945 /*!
946 * \brief Provide the non dimensional lift coefficient.
947 * \param[in] val_marker - Surface marker where the coefficient is computed.
948 * \return Value of the lift coefficient on the surface <i>val_marker</i>.
949 */
950 inline su2double GetSurface_CL(unsigned short val_marker) const final { return Surface_CL[val_marker]; }
951
952 /*!
953 * \brief Provide the non dimensional drag coefficient.
954 * \param[in] val_marker - Surface marker where the coefficient is computed.
955 * \return Value of the drag coefficient on the surface <i>val_marker</i>.
956 */
957 inline su2double GetSurface_CD(unsigned short val_marker) const final { return Surface_CD[val_marker]; }
958
959 /*!
960 * \brief Provide the non dimensional side-force coefficient.
961 * \param[in] val_marker - Surface marker where the coefficient is computed.
962 * \return Value of the side-force coefficient on the surface <i>val_marker</i>.
963 */
964 inline su2double GetSurface_CSF(unsigned short val_marker) const final { return Surface_CSF[val_marker]; }
965
966 /*!
967 * \brief Provide the non dimensional side-force coefficient.
968 * \param[in] val_marker - Surface marker where the coefficient is computed.
969 * \return Value of the side-force coefficient on the surface <i>val_marker</i>.
970 */
971 inline su2double GetSurface_CEff(unsigned short val_marker) const final { return Surface_CEff[val_marker]; }
972
973 /*!
974 * \brief Provide the non dimensional x force coefficient.
975 * \param[in] val_marker - Surface marker where the coefficient is computed.
976 * \return Value of the x force coefficient on the surface <i>val_marker</i>.
977 */
978 inline su2double GetSurface_CFx(unsigned short val_marker) const final { return Surface_CFx[val_marker]; }
979
980 /*!
981 * \brief Provide the non dimensional y force coefficient.
982 * \param[in] val_marker - Surface marker where the coefficient is computed.
983 * \return Value of the y force coefficient on the surface <i>val_marker</i>.
984 */
985 inline su2double GetSurface_CFy(unsigned short val_marker) const final { return Surface_CFy[val_marker]; }
986
987 /*!
988 * \brief Provide the non dimensional z force coefficient.
989 * \param[in] val_marker - Surface marker where the coefficient is computed.
990 * \return Value of the z force coefficient on the surface <i>val_marker</i>.
991 */
992 inline su2double GetSurface_CFz(unsigned short val_marker) const final { return Surface_CFz[val_marker]; }
993
994 /*!
995 * \brief Provide the non dimensional x moment coefficient.
996 * \param[in] val_marker - Surface marker where the coefficient is computed.
997 * \return Value of the x moment coefficient on the surface <i>val_marker</i>.
998 */
999 inline su2double GetSurface_CMx(unsigned short val_marker) const final { return Surface_CMx[val_marker]; }
1000
1001 /*!
1002 * \brief Provide the non dimensional y moment coefficient.
1003 * \param[in] val_marker - Surface marker where the coefficient is computed.
1004 * \return Value of the y moment coefficient on the surface <i>val_marker</i>.
1005 */
1006 inline su2double GetSurface_CMy(unsigned short val_marker) const final { return Surface_CMy[val_marker]; }
1007
1008 /*!
1009 * \brief Provide the non dimensional z moment coefficient.
1010 * \param[in] val_marker - Surface marker where the coefficient is computed.
1011 * \return Value of the z moment coefficient on the surface <i>val_marker</i>.
1012 */
1013 inline su2double GetSurface_CMz(unsigned short val_marker) const final { return Surface_CMz[val_marker]; }
1014
1015 /*!
1016 * \brief Provide the non dimensional lift coefficient.
1017 * \param[in] val_marker - Surface marker where the coefficient is computed.
1018 * \return Value of the lift coefficient on the surface <i>val_marker</i>.
1019 */
1020 inline su2double GetSurface_CL_Inv(unsigned short val_marker) const final { return Surface_CL_Inv[val_marker]; }
1021
1022 /*!
1023 * \brief Provide the non dimensional drag coefficient.
1024 * \param[in] val_marker - Surface marker where the coefficient is computed.
1025 * \return Value of the drag coefficient on the surface <i>val_marker</i>.
1026 */
1027 inline su2double GetSurface_CD_Inv(unsigned short val_marker) const final { return Surface_CD_Inv[val_marker]; }
1028
1029 /*!
1030 * \brief Provide the non dimensional side-force coefficient.
1031 * \param[in] val_marker - Surface marker where the coefficient is computed.
1032 * \return Value of the side-force coefficient on the surface <i>val_marker</i>.
1033 */
1034 inline su2double GetSurface_CSF_Inv(unsigned short val_marker) const final { return Surface_CSF_Inv[val_marker]; }
1035
1036 /*!
1037 * \brief Provide the non dimensional side-force coefficient.
1038 * \param[in] val_marker - Surface marker where the coefficient is computed.
1039 * \return Value of the side-force coefficient on the surface <i>val_marker</i>.
1040 */
1041 inline su2double GetSurface_CEff_Inv(unsigned short val_marker) const final { return Surface_CEff_Inv[val_marker]; }
1042
1043 /*!
1044 * \brief Provide the non dimensional x force coefficient.
1045 * \param[in] val_marker - Surface marker where the coefficient is computed.
1046 * \return Value of the x force coefficient on the surface <i>val_marker</i>.
1047 */
1048 inline su2double GetSurface_CFx_Inv(unsigned short val_marker) const final { return Surface_CFx_Inv[val_marker]; }
1049
1050 /*!
1051 * \brief Provide the non dimensional y force coefficient.
1052 * \param[in] val_marker - Surface marker where the coefficient is computed.
1053 * \return Value of the y force coefficient on the surface <i>val_marker</i>.
1054 */
1055 inline su2double GetSurface_CFy_Inv(unsigned short val_marker) const final { return Surface_CFy_Inv[val_marker]; }
1056
1057 /*!
1058 * \brief Provide the non dimensional z force coefficient.
1059 * \param[in] val_marker - Surface marker where the coefficient is computed.
1060 * \return Value of the z force coefficient on the surface <i>val_marker</i>.
1061 */
1062 inline su2double GetSurface_CFz_Inv(unsigned short val_marker) const final { return Surface_CFz_Inv[val_marker]; }
1063
1064 /*!
1065 * \brief Provide the non dimensional x moment coefficient.
1066 * \param[in] val_marker - Surface marker where the coefficient is computed.
1067 * \return Value of the x moment coefficient on the surface <i>val_marker</i>.
1068 */
1069 inline su2double GetSurface_CMx_Inv(unsigned short val_marker) const final { return Surface_CMx_Inv[val_marker]; }
1070
1071 /*!
1072 * \brief Provide the non dimensional y moment coefficient.
1073 * \param[in] val_marker - Surface marker where the coefficient is computed.
1074 * \return Value of the y moment coefficient on the surface <i>val_marker</i>.
1075 */
1076 inline su2double GetSurface_CMy_Inv(unsigned short val_marker) const final { return Surface_CMy_Inv[val_marker]; }
1077
1078 /*!
1079 * \brief Provide the non dimensional z moment coefficient.
1080 * \param[in] val_marker - Surface marker where the coefficient is computed.
1081 * \return Value of the z moment coefficient on the surface <i>val_marker</i>.
1082 */
1083 inline su2double GetSurface_CMz_Inv(unsigned short val_marker) const final { return Surface_CMz_Inv[val_marker]; }
1084
1085 /*!
1086 * \brief Provide the non dimensional drag coefficient (inviscid contribution).
1087 * \param val_marker Surface where the coeficient is going to be computed.
1088 * \return Value of the drag coefficient (inviscid contribution) on the surface <i>val_marker</i>.
1089 */
1090 inline su2double GetCD_Inv(unsigned short val_marker) const final { return CD_Inv[val_marker]; }
1091
1092 /*!
1093 * \brief Provide the non dimensional sideforce coefficient (inviscid contribution).
1094 * \param val_marker Surface where the coeficient is going to be computed.
1095 * \return Value of the sideforce coefficient (inviscid contribution) on the surface <i>val_marker</i>.
1096 */
1097 inline su2double GetCSF_Inv(unsigned short val_marker) const final { return CSF_Inv[val_marker]; }
1098
1099 /*!
1100 * \brief Provide the non dimensional efficiency coefficient (inviscid contribution).
1101 * \param val_marker Surface where the coeficient is going to be computed.
1102 * \return Value of the efficiency coefficient (inviscid contribution) on the surface <i>val_marker</i>.
1103 */
1104 inline su2double GetCEff_Inv(unsigned short val_marker) const final { return CEff_Inv[val_marker]; }
1105
1106 /*!
1107 * \brief Provide the total (inviscid + viscous) non dimensional sideforce coefficient.
1108 * \return Value of the sideforce coefficient (inviscid + viscous contribution).
1109 */
1110 inline su2double GetTotal_CSF() const final { return Total_CSF; }
1111
1112 /*!
1113 * \brief Provide the total (inviscid + viscous) non dimensional efficiency coefficient.
1114 * \return Value of the efficiency coefficient (inviscid + viscous contribution).
1115 */
1116 inline su2double GetTotal_CEff() const final { return Total_CEff; }
1117
1118 /*!
1119 * \brief Store the total (inviscid + viscous) non dimensional lift coefficient.
1120 * \param[in] val_Total_CL - Value of the total lift coefficient.
1121 */
1122 inline void SetTotal_CL(su2double val_Total_CL) final { Total_CL = val_Total_CL; }
1123
1124 /*!
1125 * \brief Get the reference force used to compute CL, CD, etc.
1126 */
1128
1129 /*!
1130 * \brief Provide the total (inviscid + viscous) non dimensional lift coefficient.
1131 * \return Value of the lift coefficient (inviscid + viscous contribution).
1132 */
1133 inline su2double GetTotal_CL() const final { return Total_CL; }
1134
1135 /*!
1136 * \brief Provide the total (inviscid + viscous) non dimensional drag coefficient.
1137 * \return Value of the drag coefficient (inviscid + viscous contribution).
1138 */
1139 inline su2double GetTotal_CD() const final { return Total_CD; }
1140
1141 /*!
1142 * \brief Provide the total (inviscid + viscous) non dimensional x moment coefficient.
1143 * \return Value of the moment x coefficient (inviscid + viscous contribution).
1144 */
1145 inline su2double GetTotal_CMx() const final { return Total_CMx; }
1146
1147 /*!
1148 * \brief Provide the total (inviscid + viscous) non dimensional y moment coefficient.
1149 * \return Value of the moment y coefficient (inviscid + viscous contribution).
1150 */
1151 inline su2double GetTotal_CMy() const final { return Total_CMy; }
1152
1153 /*!
1154 * \brief Provide the total (inviscid + viscous) non dimensional z moment coefficient.
1155 * \return Value of the moment z coefficient (inviscid + viscous contribution).
1156 */
1157 inline su2double GetTotal_CMz() const final { return Total_CMz; }
1158
1159 /*!
1160 * \brief Provide the total (inviscid + viscous) non dimensional x force coefficient.
1161 * \return Value of the force x coefficient (inviscid + viscous contribution).
1162 */
1163 inline su2double GetTotal_CFx() const final { return Total_CFx; }
1164
1165 /*!
1166 * \brief Provide the total (inviscid + viscous) non dimensional y force coefficient.
1167 * \return Value of the force y coefficient (inviscid + viscous contribution).
1168 */
1169 inline su2double GetTotal_CFy() const final { return Total_CFy; }
1170
1171 /*!
1172 * \brief Provide the total (inviscid + viscous) non dimensional z force coefficient.
1173 * \return Value of the force z coefficient (inviscid + viscous contribution).
1174 */
1175 inline su2double GetTotal_CFz() const final { return Total_CFz; }
1176
1177 /*!
1178 * \brief Store the total (inviscid + viscous) non dimensional drag coefficient.
1179 * \param[in] val_Total_CD - Value of the total drag coefficient.
1180 */
1181 inline void SetTotal_CD(su2double val_Total_CD) final { Total_CD = val_Total_CD; }
1182
1183 /*!
1184 * \brief Get the inviscid contribution to the lift coefficient.
1185 * \return Value of the lift coefficient (inviscid contribution).
1186 */
1187 inline su2double GetAllBound_CL_Inv() const final { return AllBound_CL_Inv; }
1188
1189 /*!
1190 * \brief Get the inviscid contribution to the drag coefficient.
1191 * \return Value of the drag coefficient (inviscid contribution).
1192 */
1193 inline su2double GetAllBound_CD_Inv() const final { return AllBound_CD_Inv; }
1194
1195 /*!
1196 * \brief Get the inviscid contribution to the sideforce coefficient.
1197 * \return Value of the sideforce coefficient (inviscid contribution).
1198 */
1199 inline su2double GetAllBound_CSF_Inv() const final { return AllBound_CSF_Inv; }
1200
1201 /*!
1202 * \brief Get the inviscid contribution to the efficiency coefficient.
1203 * \return Value of the efficiency coefficient (inviscid contribution).
1204 */
1205 inline su2double GetAllBound_CEff_Inv() const final { return AllBound_CEff_Inv; }
1206
1207 /*!
1208 * \brief Get the inviscid contribution to the efficiency coefficient.
1209 * \return Value of the efficiency coefficient (inviscid contribution).
1210 */
1211 inline su2double GetAllBound_CMx_Inv() const final { return AllBound_CMx_Inv; }
1212
1213 /*!
1214 * \brief Get the inviscid contribution to the efficiency coefficient.
1215 * \return Value of the efficiency coefficient (inviscid contribution).
1216 */
1217 inline su2double GetAllBound_CMy_Inv() const final { return AllBound_CMy_Inv; }
1218
1219 /*!
1220 * \brief Get the inviscid contribution to the efficiency coefficient.
1221 * \return Value of the efficiency coefficient (inviscid contribution).
1222 */
1223 inline su2double GetAllBound_CMz_Inv() const final { return AllBound_CMz_Inv; }
1224
1225 /*!
1226 * \brief Get the inviscid contribution to the efficiency coefficient.
1227 * \return Value of the efficiency coefficient (inviscid contribution).
1228 */
1229 inline su2double GetAllBound_CFx_Inv() const final { return AllBound_CFx_Inv; }
1230
1231 /*!
1232 * \brief Get the inviscid contribution to the efficiency coefficient.
1233 * \return Value of the efficiency coefficient (inviscid contribution).
1234 */
1235 inline su2double GetAllBound_CFy_Inv() const final { return AllBound_CFy_Inv; }
1236
1237 /*!
1238 * \brief Get the inviscid contribution to the efficiency coefficient.
1239 * \return Value of the efficiency coefficient (inviscid contribution).
1240 */
1241 inline su2double GetAllBound_CFz_Inv() const final { return AllBound_CFz_Inv; }
1242
1243protected:
1244
1245 /*!
1246 * \brief Routine that initiates the non-blocking communication between ranks
1247 for the givem time level.
1248 * \param[in] config - Definition of the particular problem.
1249 * \param[in] timeLevel - The time level for which the communication must be
1250 initiated.
1251 */
1253 const unsigned short timeLevel);
1254
1255 /*!
1256 * \brief Routine that initiates the reverse non-blocking communication
1257 between ranks.
1258 * \param[in] config - Definition of the particular problem.
1259 * \param[in] timeLevel - The time level for which the reverse communication
1260 must be initiated.
1261 */
1263 const unsigned short timeLevel);
1264
1265 /*!
1266 * \brief Routine that completes the non-blocking communication between ranks.
1267 * \param[in] config - Definition of the particular problem.
1268 * \param[in] timeLevel - The time level for which the communication
1269 may be completed.
1270 * \param[in] commMustBeCompleted - Whether or not the communication must be completed.
1271 * \return Whether or not the communication has been completed.
1272 */
1274 const unsigned short timeLevel,
1275 const bool commMustBeCompleted);
1276
1277 /*!
1278 * \brief Routine that completes the reverse non-blocking communication
1279 between ranks.
1280 * \param[in] config - Definition of the particular problem.
1281 * \param[in] timeLevel - The time level for which the communication
1282 may be completed.
1283 * \param[in] commMustBeCompleted - Whether or not the communication must be completed.
1284 * \return Whether or not the communication has been completed.
1285 */
1287 const unsigned short timeLevel,
1288 const bool commMustBeCompleted);
1289
1290 /*!
1291 * \brief Function, which computes the inviscid fluxes in face points.
1292 * \param[in] config - Definition of the particular problem.
1293 * \param[in] nFaceSimul - Number of faces that are treated simultaneously
1294 to improve performance.
1295 * \param[in] NPad - Value of the padding parameter to obtain optimal
1296 performance in the gemm computations.
1297 * \param[in] nPoints - Number of points per face for which the fluxes
1298 must be computed.
1299 * \param[in] normalsFace - The normals in the points for the faces.
1300 * \param[in] gridVelsFace - The grid velocities in the points for the faces.
1301 * \param[in] solL - Solution in the left state of the points.
1302 * \param[in] solR - Solution in the right state of the points.
1303 * \param[out] fluxes - Inviscid fluxes in the points.
1304 * \param[in] numerics - Object, which contains the Riemann solver.
1305 */
1307 const unsigned short nFaceSimul,
1308 const unsigned short NPad,
1309 const unsigned long nPoints,
1310 const su2double *normalsFace[],
1311 const su2double *gridVelsFace[],
1312 const su2double *solL,
1313 const su2double *solR,
1314 su2double *fluxes,
1315 CNumerics *numerics);
1316
1317 /*!
1318 * \brief Function, which computes the inviscid fluxes in the face integration
1319 points of a chunk of matching internal faces.
1320 * \param[in] config - Definition of the particular problem.
1321 * \param[in] lBeg - Start index in matchingInternalFaces for which
1322 the inviscid fluxes should be computed.
1323 * \param[in] lEnd - End index (not included) in matchingInternalFaces
1324 for which the inviscid fluxes should be computed.
1325 * \param[in] NPad - Value of the padding parameter to obtain optimal
1326 performance in the gemm computations.
1327 * \param[out] solIntL - Solution in the left state of the integration points.
1328 * \param[out] solIntR - Solution in the right state of the integration points.
1329 * \param[out] fluxes - Inviscid fluxes in the integration points.
1330 * \param[in] numerics - Object, which contains the Riemann solver.
1331 */
1333 const unsigned long lBeg,
1334 const unsigned long lEnd,
1335 const unsigned short NPad,
1336 su2double *solIntL,
1337 su2double *solIntR,
1338 su2double *fluxes,
1339 CNumerics *numerics);
1340 /*!
1341 * \brief Function, which computes the left state of a boundary face.
1342 * \param[in] config - Definition of the particular problem.
1343 * \param[in] nFaceSimul - Number of faces that are treated simultaneously
1344 to improve performance.
1345 * \param[in] NPad - Value of the padding parameter to obtain optimal
1346 performance in the gemm computations.
1347 * \param[in] surfElem - Surface boundary elements for which the left state must be computed.
1348 * \param[out] solFace - Temporary storage for the solution in the DOFs.
1349 * \param[out] solIntL - Left states in the integration points of the face.
1350 */
1352 const unsigned short nFaceSimul,
1353 const unsigned short NPad,
1354 const CSurfaceElementFEM *surfElem,
1355 su2double *solFace,
1356 su2double *solIntL);
1357
1358 /*!
1359 * \brief Function, which computes the boundary states in the integration points
1360 of the boundary face by applying the inviscid wall boundary conditions.
1361 * \param[in] config - Definition of the particular problem.
1362 * \param[in] nFaceSimul - Number of faces that are treated simultaneously
1363 to improve performance.
1364 * \param[in] NPad - Value of the padding parameter to obtain optimal
1365 performance in the gemm computations.
1366 * \param[in] surfElem - Surface boundary elements for which the left state must
1367 be computed.
1368 * \param[in] solIntL - Left states in the integration points of the face.
1369 * \param[out] solIntR - Right states in the integration points of the face.
1370 */
1372 const unsigned short nFaceSimul,
1373 const unsigned short NPad,
1374 const CSurfaceElementFEM *surfElem,
1375 const su2double *solIntL,
1376 su2double *solIntR);
1377
1378 /*!
1379 * \brief Function, which computes the boundary states in the integration points
1380 of the boundary face by applying the inlet boundary conditions.
1381 * \param[in] config - Definition of the particular problem.
1382 * \param[in] nFaceSimul - Number of fused faces, i.e. the number of faces
1383 that are treated simultaneously to improve performance.
1384 * \param[in] NPad - Value of the padding parameter to obtain optimal
1385 performance in the gemm computations.
1386 * \param[in] surfElem - Surface boundary element for which the left state must be computed.
1387 * \param[in] val_marker - Surface marker where the boundary condition is applied.
1388 * \param[in] solIntL - Left states in the integration points of the face.
1389 * \param[out] solIntR - Right states in the integration points of the face.
1390 */
1391 void BoundaryStates_Inlet(CConfig *config,
1392 const unsigned short nFaceSimul,
1393 const unsigned short NPad,
1394 const CSurfaceElementFEM *surfElem,
1395 unsigned short val_marker,
1396 const su2double *solIntL,
1397 su2double *solIntR);
1398
1399 /*!
1400 * \brief Function, which computes the boundary states in the integration points
1401 of the boundary face by applying the outlet boundary conditions.
1402 * \param[in] config - Definition of the particular problem.
1403 * \param[in] nFaceSimul - Number of fused faces, i.e. the number of faces
1404 that are treated simultaneously to improve performance.
1405 * \param[in] NPad - Value of the padding parameter to obtain optimal
1406 performance in the gemm computations.
1407 * \param[in] surfElem - Surface boundary element for which the left state must be computed.
1408 * \param[in] val_marker - Surface marker where the boundary condition is applied.
1409 * \param[in] solIntL - Left states in the integration points of the face.
1410 * \param[out] solIntR - Right states in the integration points of the face.
1411 */
1412 void BoundaryStates_Outlet(CConfig *config,
1413 const unsigned short nFaceSimul,
1414 const unsigned short NPad,
1415 const CSurfaceElementFEM *surfElem,
1416 unsigned short val_marker,
1417 const su2double *solIntL,
1418 su2double *solIntR);
1419
1420 /*!
1421 * \brief Function, which computes the boundary states in the integration points
1422 of the boundary face by applying the Riemann boundary conditions.
1423 * \param[in] config - Definition of the particular problem.
1424 * \param[in] nFaceSimul - Number of fused faces, i.e. the number of faces
1425 that are treated simultaneously to improve performance.
1426 * \param[in] NPad - Value of the padding parameter to obtain optimal
1427 performance in the gemm computations.
1428 * \param[in] surfElem - Surface boundary element for which the left state must be computed.
1429 * \param[in] val_marker - Surface marker where the boundary condition is applied.
1430 * \param[in] solIntL - Left states in the integration points of the face.
1431 * \param[out] solIntR - Right states in the integration points of the face.
1432 */
1433 void BoundaryStates_Riemann(CConfig *config,
1434 const unsigned short nFaceSimul,
1435 const unsigned short NPad,
1436 const CSurfaceElementFEM *surfElem,
1437 unsigned short val_marker,
1438 const su2double *solIntL,
1439 su2double *solIntR);
1440private:
1441
1442 /*!
1443 * \brief Virtual function, which computes the spatial residual of the ADER-DG
1444 predictor step for the given volume element and solution using an
1445 aliased discretization in 2D.
1446 * \param[in] config - Definition of the particular problem.
1447 * \param[in] elem - Volume element for which the spatial residual of the
1448 predictor step must be computed.
1449 * \param[in] sol - Solution for which the residual must be computed.
1450 * \param[in] nSimul - Number of entities (typically time integration points)
1451 that are treated simultaneously.
1452 * \param[in] NPad - Padded N value in the matrix multiplications to
1453 obtain better performance. The solution sol is stored
1454 with this padded value to avoid a memcpy.
1455 * \param[out] res - Residual of the spatial DOFs to be computed by this
1456 function.
1457 * \param[out] work - Work array.
1458 */
1459 virtual void ADER_DG_AliasedPredictorResidual_2D(CConfig *config,
1460 CVolumeElementFEM *elem,
1461 const su2double *sol,
1462 const unsigned short nSimul,
1463 const unsigned short NPad,
1464 su2double *res,
1465 su2double *work);
1466
1467 /*!
1468 * \brief Virtual function, which computes the spatial residual of the ADER-DG
1469 predictor step for the given volume element and solution using an
1470 aliased discretization in 3D.
1471 * \param[in] config - Definition of the particular problem.
1472 * \param[in] elem - Volume element for which the spatial residual of the
1473 predictor step must be computed.
1474 * \param[in] sol - Solution for which the residual must be computed.
1475 * \param[in] nSimul - Number of entities (typically time integration points)
1476 that are treated simultaneously.
1477 * \param[in] NPad - Padded N value in the matrix multiplications to
1478 obtain better performance. The solution sol is stored
1479 with this padded value to avoid a memcpy.
1480 * \param[out] res - Residual of the spatial DOFs to be computed by this
1481 function.
1482 * \param[out] work - Work array.
1483 */
1484 virtual void ADER_DG_AliasedPredictorResidual_3D(CConfig *config,
1485 CVolumeElementFEM *elem,
1486 const su2double *sol,
1487 const unsigned short nSimul,
1488 const unsigned short NPad,
1489 su2double *res,
1490 su2double *work);
1491
1492 /*!
1493 * \brief Virtual function, which computes the spatial residual of the ADER-DG
1494 predictor step for the given volume element and solution using a
1495 non-aliased discretization in 2D.
1496 * \param[in] config - Definition of the particular problem.
1497 * \param[in] elem - Volume element for which the spatial residual of the
1498 predictor step must be computed.
1499 * \param[in] sol - Solution for which the residual must be computed.
1500 * \param[in] nSimul - Number of entities (typically time integration points)
1501 that are treated simultaneously.
1502 * \param[in] NPad - Padded N value in the matrix multiplications to
1503 obtain better performance. The solution sol is stored
1504 with this padded value to avoid a memcpy.
1505 * \param[out] res - Residual of the spatial DOFs to be computed by this
1506 function.
1507 * \param[out] work - Work array.
1508 */
1509 virtual void ADER_DG_NonAliasedPredictorResidual_2D(CConfig *config,
1510 CVolumeElementFEM *elem,
1511 const su2double *sol,
1512 const unsigned short nSimul,
1513 const unsigned short NPad,
1514 su2double *res,
1515 su2double *work);
1516
1517 /*!
1518 * \brief Virtual function, which computes the spatial residual of the ADER-DG
1519 predictor step for the given volume element and solution using a
1520 non-aliased discretization in 3D.
1521 * \param[in] config - Definition of the particular problem.
1522 * \param[in] elem - Volume element for which the spatial residual of the
1523 predictor step must be computed.
1524 * \param[in] sol - Solution for which the residual must be computed.
1525 * \param[in] nSimul - Number of entities (typically time integration points)
1526 that are treated simultaneously.
1527 * \param[in] NPad - Padded N value in the matrix multiplications to
1528 obtain better performance. The solution sol is stored
1529 with this padded value to avoid a memcpy.
1530 * \param[out] res - Residual of the spatial DOFs to be computed by this
1531 function.
1532 * \param[out] work - Work array.
1533 */
1534 virtual void ADER_DG_NonAliasedPredictorResidual_3D(CConfig *config,
1535 CVolumeElementFEM *elem,
1536 const su2double *sol,
1537 const unsigned short nSimul,
1538 const unsigned short NPad,
1539 su2double *res,
1540 su2double *work);
1541
1542 /*!
1543 * \brief Function, which computes the graph of the spatial discretization
1544 for the locally owned DOFs.
1545 * \param[in] DGGeometry - Geometrical definition of the DG problem.
1546 * \param[in] config - Definition of the particular problem.
1547 */
1548 void DetermineGraphDOFs(const CMeshFEM *FEMGeometry,
1549 CConfig *config);
1550
1551 /*!
1552 * \brief Function, which determines the meta data needed for the computation
1553 of the Jacobian of the spatial residual.
1554 * \param[in] DGGeometry - Geometrical definition of the DG problem.
1555 * \param[in] colorLocalDOFs - Color of the locally stored DOFs.
1556 */
1557 void MetaDataJacobianComputation(const CMeshFEM *FEMGeometry,
1558 const vector<int> &colorLocalDOFs);
1559
1560 /*!
1561 * \brief Function, which sets up the list of tasks to be carried out in the
1562 computationally expensive part of the solver.
1563 * \param[in] config - Definition of the particular problem.
1564 */
1565 void SetUpTaskList(CConfig *config);
1566
1567 /*!
1568 * \brief Function, which sets up the persistent communication of the flow
1569 variables in the DOFs.
1570 * \param[in] DGGeometry - Geometrical definition of the DG problem.
1571 * \param[in] config - Definition of the particular problem.
1572 */
1573 void Prepare_MPI_Communication(const CMeshFEM *FEMGeometry,
1574 CConfig *config);
1575
1576 /*!
1577 * \brief Function, which creates the final residual by summing up
1578 the contributions for the DOFs of the elements considered.
1579 * \param[in] timeLevel - Time level of the elements for which the
1580 final residual must be created.
1581 * \param[in] ownedElements - Whether owned or halo elements must be treated.
1582 */
1583 void CreateFinalResidual(const unsigned short timeLevel,
1584 const bool ownedElements);
1585
1586 /*!
1587 * \brief Function, which multiplies the residual by the inverse
1588 of the (lumped) mass matrix.
1589 * \param[in] config - Definition of the particular problem.
1590 * \param[in] useADER - Whether or not the ADER residual must be multiplied.
1591 * \param[in] elemBeg - Begin index of the element range to be computed.
1592 * \param[in] elemEnd - End index (not included) of the element range to be computed.
1593 * \param[out] workArray - Work array.
1594 */
1595 void MultiplyResidualByInverseMassMatrix(CConfig *config,
1596 const bool useADER,
1597 const unsigned long elemBeg,
1598 const unsigned long elemEnd,
1599 su2double *workArray);
1600
1601 /*!
1602 * \brief Function, which computes the residual contribution from a boundary
1603 face in an inviscid computation when the boundary conditions have
1604 already been applied.
1605 * \param[in] config - Definition of the particular problem.
1606 * \param[in] nFaceSimul - Number of faces that are treated simultaneously
1607 to improve performance.
1608 * \param[in] NPad - Value of the padding parameter to obtain optimal
1609 performance in the gemm computations.
1610 * \param[in] conv_numerics - Description of the numerical method.
1611 * \param[in] surfElem - Surface boundary element for which the
1612 contribution to the residual must be computed.
1613 * \param[in] solInt0 - Solution in the integration points of side 0.
1614 It is not const, because the array is used for
1615 temporary storage for the residual.
1616 * \param[in] solInt1 - Solution in the integration points of side 1.
1617 * \param[out] fluxes - Temporary storage for the fluxes in the
1618 integration points.
1619 * \param[out] resFaces - Array to store the residuals of the face.
1620 * \param[in,out] indResFaces - Index in resFaces, where the current residual
1621 should be stored. It is updated in the function
1622 for the next boundary element.
1623 */
1624 void ResidualInviscidBoundaryFace(CConfig *config,
1625 const unsigned short nFaceSimul,
1626 const unsigned short NPad,
1627 CNumerics *conv_numerics,
1628 const CSurfaceElementFEM *surfElem,
1629 su2double *solInt0,
1630 su2double *solInt1,
1631 su2double *fluxes,
1632 su2double *resFaces,
1633 unsigned long &indResFaces);
1634
1635protected:
1636 /*!
1637 * \brief Template function, which determines some meta data for the chunk of
1638 elements/faces that must be treated simulaneously.
1639 * \param[in] elem - Const pointer the volume or face elements for which
1640 the meta data must be computed.
1641 * \param[in] l - Start index for the current chunk of elements/faces.
1642 * \param[in] elemEnd - End index (index not included) of the elements to be
1643 treated in the residual computation from which this
1644 function is called.
1645 * \param[in] nElemSimul - Desired number of elements/faces that must be treated
1646 simultaneously for optimal performance.
1647 * \param[in] nPadMin - Minimum number of the padding value in the gemm calls.
1648 * \param[out] lEnd - Actual end index (not included) for this chunk of
1649 elements.
1650 * \param[out] ind - Index in the standard elements to which this chunk of
1651 elements can be mapped.
1652 * \param[out] llEnd - Actual number of elements/faces that are treated
1653 simultaneously, llEnd = lEnd - l.
1654 * \param[out] NPad - Actual padded N value in the gemm computations for
1655 this chunk of elements.
1656 */
1657 template <class TElemType>
1658 void MetaDataChunkOfElem(const TElemType *elem,
1659 const unsigned long l,
1660 const unsigned long elemEnd,
1661 const unsigned short nElemSimul,
1662 const unsigned short nPadMin,
1663 unsigned long &lEnd,
1664 unsigned short &ind,
1665 unsigned short &llEnd,
1666 unsigned short &NPad) {
1667
1668 /* Determine the end index for this chunk of elements that must be
1669 treated simulaneously. The elements of this chunk must have the
1670 same standard element in order to make this work. */
1671 const unsigned long lEndMax = min(l+nElemSimul, elemEnd);
1672
1673 ind = elem[l].indStandardElement;
1674 for(lEnd=l+1; lEnd<lEndMax; ++lEnd) {
1675 if(elem[lEnd].indStandardElement != ind) break;
1676 }
1677
1678 /* Store the number of elements that are treated simultaneously in this chunk
1679 in llEnd and determine the padded N value in the gemm computations. */
1680 llEnd = lEnd - l;
1681 NPad = llEnd*nVar;
1682 if( NPad%nPadMin ) NPad += nPadMin - (NPad%nPadMin);
1683 }
1684};
Headers of the CSolver class which is inherited by all of the other solvers.
Class, which serves as an interface to the BLAS functionalities needed.
Definition blas_structure.hpp:41
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
Class to define a FEM standard element.
Definition fem_standard_element.hpp:673
Class to define a FEM standard internal face.
Definition fem_standard_element.hpp:1106
Main class for defining the Euler Discontinuous Galerkin finite element flow solver.
Definition CFEM_DG_EulerSolver.hpp:40
su2double GetTotal_CFz() const final
Provide the total (inviscid + viscous) non dimensional z force coefficient.
Definition CFEM_DG_EulerSolver.hpp:1175
virtual void BC_Sym_Plane(CConfig *config, const unsigned long surfElemBeg, const unsigned long surfElemEnd, const CSurfaceElementFEM *surfElem, su2double *resFaces, CNumerics *conv_numerics, su2double *workArray)
Impose the symmetry boundary condition. It is a virtual function, because for Navier-Stokes it is ove...
Definition CFEM_DG_EulerSolver.cpp:8404
CPointFEM * meshPoints
Array of the points of the FEM mesh.
Definition CFEM_DG_EulerSolver.hpp:141
su2double * CSF_Inv
Sideforce coefficient (inviscid contribution) for each boundary.
Definition CFEM_DG_EulerSolver.hpp:61
void SetTotal_CL(su2double val_Total_CL) final
Store the total (inviscid + viscous) non dimensional lift coefficient.
Definition CFEM_DG_EulerSolver.hpp:1122
void SetPressure_Inf(su2double p_inf) final
Set the freestream pressure.
Definition CFEM_DG_EulerSolver.hpp:376
su2double * Surface_CFx_Inv
x Force coefficient (inviscid contribution) for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:74
void AccumulateSpaceTimeResidualADEROwnedElem(CConfig *config, const unsigned short timeLevel, const unsigned short intPoint)
Function, which accumulates the space time residual of the ADER-DG time integration scheme for the ow...
Definition CFEM_DG_EulerSolver.cpp:6617
void Set_NewSolution() final
Set the new solution to the current solution for classical RK.
Definition CFEM_DG_EulerSolver.cpp:3696
su2double Total_CL
Total lift coefficient for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:96
virtual void BC_Custom(CConfig *config, const unsigned long surfElemBeg, const unsigned long surfElemEnd, const CSurfaceElementFEM *surfElem, su2double *resFaces, CNumerics *conv_numerics, su2double *workArray)
Impose the user customized boundary condition. It is a virtual function, because for Navier-Stokes it...
Definition CFEM_DG_EulerSolver.cpp:8796
void ADER_SpaceTimeIntegration(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics, CConfig *config, unsigned short iMesh, unsigned short RunTime_EqSystem) final
Function, to carry out the space time integration for ADER with time accurate local time stepping.
Definition CFEM_DG_EulerSolver.cpp:4212
vector< unsigned long > entriesResAdjFaces
The corresponding entries in the residual of the faces.
Definition CFEM_DG_EulerSolver.hpp:200
su2double * Surface_CMz_Inv
z Moment coefficient (inviscid contribution) for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:79
const su2double * timeInterpolDOFToIntegrationADER_DG
The interpolation matrix between the time DOFs and the time integration points for ADER-DG.
Definition CFEM_DG_EulerSolver.hpp:165
su2double GetTotal_CD() const final
Provide the total (inviscid + viscous) non dimensional drag coefficient.
Definition CFEM_DG_EulerSolver.hpp:1139
su2double * CFx_Inv
x Force coefficient (inviscid contribution) for each boundary.
Definition CFEM_DG_EulerSolver.hpp:62
void ComputeVerificationError(CGeometry *geometry, CConfig *config) final
Compute the global error measures (L2, Linf) for verification cases.
Definition CFEM_DG_EulerSolver.cpp:7444
su2double * Surface_CMx_Inv
x Moment coefficient (inviscid contribution) for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:77
su2double GetTotal_CMy() const final
Provide the total (inviscid + viscous) non dimensional y moment coefficient.
Definition CFEM_DG_EulerSolver.hpp:1151
su2double GetCEff_Inv(unsigned short val_marker) const final
Provide the non dimensional efficiency coefficient (inviscid contribution).
Definition CFEM_DG_EulerSolver.hpp:1104
su2double * Surface_CMz
z Moment coefficient for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:116
~CFEM_DG_EulerSolver(void) override
Destructor of the class.
Definition CFEM_DG_EulerSolver.cpp:736
su2double Temperature_Inf
Energy at infinity.
Definition CFEM_DG_EulerSolver.hpp:52
su2double Total_CFx
Total x force coefficient for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:99
void Pressure_Forces(const CGeometry *geometry, const CConfig *config) final
Compute the pressure forces and all the adimensional coefficients.
Definition CFEM_DG_EulerSolver.cpp:6845
su2double GetAllBound_CMx_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFEM_DG_EulerSolver.hpp:1211
const CFEMStandardElement * standardElementsSol
Array that contains the standard volume elements used for the solution of the DG solver.
Definition CFEM_DG_EulerSolver.hpp:157
su2double AllBound_CFy_Inv
Total y force coefficient (inviscid contribution) for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:87
const unsigned long * nMatchingInternalFacesLocalElem
Number of local matching internal faces per time level between local elements. Cumulative storage.
Definition CFEM_DG_EulerSolver.hpp:145
su2double Pressure_Inf
Pressure at infinity.
Definition CFEM_DG_EulerSolver.hpp:53
void TolerancesADERPredictorStep(void)
Function, which determines the values of the tolerances in the predictor step of ADER-DG.
Definition CFEM_DG_EulerSolver.cpp:4227
su2double * Surface_CSF
Side-force coefficient for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:110
su2double * Surface_CL
Lift coefficient for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:108
su2double * CMz_Inv
z Moment coefficient (inviscid contribution) for each boundary.
Definition CFEM_DG_EulerSolver.hpp:67
su2double GetCL_Inv(unsigned short val_marker) const final
Provide the non dimensional lift coefficient (inviscid contribution).
Definition CFEM_DG_EulerSolver.hpp:943
su2double GetSurface_CL_Inv(unsigned short val_marker) const final
Provide the non dimensional lift coefficient.
Definition CFEM_DG_EulerSolver.hpp:1020
void SetNondimensionalization(CConfig *config, unsigned short iMesh, const bool writeOutput)
Set the fluid solver nondimensionalization.
Definition CFEM_DG_EulerSolver.cpp:776
su2double * CD_Inv
Drag coefficient (inviscid contribution) for each boundary.
Definition CFEM_DG_EulerSolver.hpp:60
void BoundaryStates_Outlet(CConfig *config, const unsigned short nFaceSimul, const unsigned short NPad, const CSurfaceElementFEM *surfElem, unsigned short val_marker, const su2double *solIntL, su2double *solIntR)
Function, which computes the boundary states in the integration points of the boundary face by applyi...
Definition CFEM_DG_EulerSolver.cpp:7755
unsigned long GetnDOFsGlobal(void) const final
Get the global number of solution degrees of freedom for the calculation.
Definition CFEM_DG_EulerSolver.hpp:321
su2double AllBound_CEff_Inv
Total efficiency (Cl/Cd) (inviscid contribution) for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:92
void SetResidual_RMS_FEM(CGeometry *geometry, CConfig *config)
Update the solution using the classical fourth-order Runge-Kutta scheme.
Definition CFEM_DG_EulerSolver.cpp:7359
unsigned long nDOFsGlobal
Number of global DOFs.
Definition CFEM_DG_EulerSolver.hpp:121
su2double * CEff_Inv
Efficiency (Cl/Cd) (inviscid contribution) for each boundary.
Definition CFEM_DG_EulerSolver.hpp:68
const su2double * timeCoefADER_DG
The time coefficients in the iteration matrix of the ADER-DG predictor step.
Definition CFEM_DG_EulerSolver.hpp:163
void ComputeSpatialJacobian(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics, CConfig *config, unsigned short iMesh, unsigned short RunTime_EqSystem) final
Function, which controls the computation of the spatial Jacobian.
Definition CFEM_DG_EulerSolver.cpp:3520
su2double Total_CFz
Total z force coefficient for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:101
su2double * Surface_CFx
x Force coefficient for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:111
CInternalFaceElementFEM * matchingInternalFaces
Array of the local matching internal faces.
Definition CFEM_DG_EulerSolver.hpp:148
su2double Energy_Inf
Energy at infinity.
Definition CFEM_DG_EulerSolver.hpp:51
su2double * Surface_CMy
y Moment coefficient for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:115
su2double GetAllBound_CFz_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFEM_DG_EulerSolver.hpp:1241
su2double * Surface_CSF_Inv
Side-force coefficient (inviscid contribution) for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:73
su2double AllBound_CSF_Inv
Total sideforce coefficient (inviscid contribution) for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:85
CFEM_DG_EulerSolver(void)
Constructor of the class.
Definition CFEM_DG_EulerSolver.cpp:41
su2double AllBound_CMz_Inv
Total z moment coefficient (inviscid contribution) for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:91
const su2double * timeInterpolAdjDOFToIntegrationADER_DG
The interpolation matrix between the time DOFs of adjacent elements of a higher time level and the ti...
Definition CFEM_DG_EulerSolver.hpp:167
void ComputeInviscidFluxesFace(CConfig *config, const unsigned short nFaceSimul, const unsigned short NPad, const unsigned long nPoints, const su2double *normalsFace[], const su2double *gridVelsFace[], const su2double *solL, const su2double *solR, su2double *fluxes, CNumerics *numerics)
Function, which computes the inviscid fluxes in face points.
Definition CFEM_DG_EulerSolver.cpp:9015
vector< vector< unsigned long > > haloElemAdjLowTimeLevel
List of halo elements per time level that are adjacent to elements of the lower time level.
Definition CFEM_DG_EulerSolver.hpp:137
virtual void BC_Far_Field(CConfig *config, const unsigned long surfElemBeg, const unsigned long surfElemEnd, const CSurfaceElementFEM *surfElem, su2double *resFaces, CNumerics *conv_numerics, su2double *workArray)
Impose the far-field boundary condition. It is a virtual function, because for Navier-Stokes it is ov...
Definition CFEM_DG_EulerSolver.cpp:8333
vector< su2double > VecSolDOFsNew
Vector, which stores the new solution variables in the owned DOFs (needed for classical RK4 scheme).
Definition CFEM_DG_EulerSolver.hpp:177
CVolumeElementFEM * volElem
Array of the local volume elements, including halos.
Definition CFEM_DG_EulerSolver.hpp:125
su2double GetSurface_CD(unsigned short val_marker) const final
Provide the non dimensional drag coefficient.
Definition CFEM_DG_EulerSolver.hpp:957
su2double * CFy_Inv
y Force coefficient (inviscid contribution) for each boundary.
Definition CFEM_DG_EulerSolver.hpp:63
vector< su2double > VecSolDOFs
Vector, which stores the solution variables in the owned DOFs.
Definition CFEM_DG_EulerSolver.hpp:176
su2double * Surface_CFz
z Force coefficient for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:113
su2double AllBound_CD_Inv
Total drag coefficient (inviscid contribution) for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:84
void SetTime_Step(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned long Iteration) override
Function to compute the time step for solving the Euler equations.
Definition CFEM_DG_EulerSolver.cpp:3703
void ADER_DG_PredictorStep(CConfig *config, const unsigned long elemBeg, const unsigned long elemEnd, su2double *workArray)
Function, carries out the predictor step of the ADER-DG time integration.
Definition CFEM_DG_EulerSolver.cpp:4281
void ADER_DG_TimeInterpolatePredictorSol(CConfig *config, const unsigned short iTime, const unsigned long elemBeg, const unsigned long elemEnd, const unsigned long nAdjElem, const unsigned long *adjElem, const bool secondPartTimeInt, su2double *solTimeLevel)
Function, which interpolates the predictor solution of ADER-DG to the time value that corresponds to ...
Definition CFEM_DG_EulerSolver.cpp:5781
su2double Total_CMy
Total y moment coefficient for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:103
vector< unsigned long > startLocResInternalFacesWithHaloElem
The starting location in the residual of the faces for the time levels of internal faces between an o...
Definition CFEM_DG_EulerSolver.hpp:209
CFluidModel * GetFluidModel(void) const final
Compute the pressure at the infinity.
Definition CFEM_DG_EulerSolver.hpp:327
su2double AllBound_CMy_Inv
Total y moment coefficient (inviscid contribution) for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:90
su2double GetSurface_CMz(unsigned short val_marker) const final
Provide the non dimensional z moment coefficient.
Definition CFEM_DG_EulerSolver.hpp:1013
void Initiate_MPI_ReverseCommunication(CConfig *config, const unsigned short timeLevel)
Routine that initiates the reverse non-blocking communication between ranks.
Definition CFEM_DG_EulerSolver.cpp:3010
int nGlobalColors
Number of global colors for the Jacobian computation.
Definition CFEM_DG_EulerSolver.hpp:222
void BoundaryStates_Riemann(CConfig *config, const unsigned short nFaceSimul, const unsigned short NPad, const CSurfaceElementFEM *surfElem, unsigned short val_marker, const su2double *solIntL, su2double *solIntR)
Function, which computes the boundary states in the integration points of the boundary face by applyi...
Definition CFEM_DG_EulerSolver.cpp:7833
void BoundaryStates_Euler_Wall(CConfig *config, const unsigned short nFaceSimul, const unsigned short NPad, const CSurfaceElementFEM *surfElem, const su2double *solIntL, su2double *solIntR)
Function, which computes the boundary states in the integration points of the boundary face by applyi...
Definition CFEM_DG_EulerSolver.cpp:7571
su2double GetAllBound_CL_Inv() const final
Get the inviscid contribution to the lift coefficient.
Definition CFEM_DG_EulerSolver.hpp:1187
void ClassicalRK4_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iRKStep) final
Update the solution using the classical fourth-order Runge-Kutta scheme.
Definition CFEM_DG_EulerSolver.cpp:7306
su2double GetSurface_CMy(unsigned short val_marker) const final
Provide the non dimensional y moment coefficient.
Definition CFEM_DG_EulerSolver.hpp:1006
su2double GetAeroCoeffsReferenceForce() const final
Get the reference force used to compute CL, CD, etc.
Definition CFEM_DG_EulerSolver.hpp:1127
su2double AllBound_CMx_Inv
Total x moment coefficient (inviscid contribution) for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:89
su2double GetSurface_CFz(unsigned short val_marker) const final
Provide the non dimensional z force coefficient.
Definition CFEM_DG_EulerSolver.hpp:992
su2double Total_CFy
Total y force coefficient for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:100
su2double * Surface_CMy_Inv
y Moment coefficient (inviscid contribution) for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:78
su2double GetSurface_CMz_Inv(unsigned short val_marker) const final
Provide the non dimensional z moment coefficient.
Definition CFEM_DG_EulerSolver.hpp:1083
vector< su2double > ConsVarFreeStream
Vector, which contains the free stream conservative variables.
Definition CFEM_DG_EulerSolver.hpp:56
vector< vector< su2double > > VecWorkSolDOFs
Working double vector to store the conserved variables for the DOFs for the different time levels.
Definition CFEM_DG_EulerSolver.hpp:183
void Postprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh) final
Definition CFEM_DG_EulerSolver.cpp:3517
su2double Mach_Inf
Mach number at infinity.
Definition CFEM_DG_EulerSolver.hpp:49
vector< unsigned long > nDOFsPerRank
Number of DOFs per rank in cumulative storage format.
Definition CFEM_DG_EulerSolver.hpp:216
su2double * Surface_CD_Inv
Drag coefficient (inviscid contribution) for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:72
virtual void BC_HeatFlux_Wall(CConfig *config, const unsigned long surfElemBeg, const unsigned long surfElemEnd, const CSurfaceElementFEM *surfElem, su2double *resFaces, CNumerics *conv_numerics, unsigned short val_marker, su2double *workArray)
Impose a constant heat-flux condition at the wall. It is a virtual function, such that it can be over...
Definition CFEM_DG_EulerSolver.hpp:790
su2double * Surface_CL_Inv
Lift coefficient (inviscid contribution) for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:71
su2double GetSurface_CFy(unsigned short val_marker) const final
Provide the non dimensional y force coefficient.
Definition CFEM_DG_EulerSolver.hpp:985
su2double GetPressure_Inf(void) const final
Compute the pressure at the infinity.
Definition CFEM_DG_EulerSolver.hpp:357
CFluidModel * FluidModel
fluid model used in the solver
Definition CFEM_DG_EulerSolver.hpp:46
su2double GetSurface_CEff(unsigned short val_marker) const final
Provide the non dimensional side-force coefficient.
Definition CFEM_DG_EulerSolver.hpp:971
vector< su2double > VecTotResDOFsADER
Vector, which stores the accumulated residuals of the owned DOFs for the ADER corrector step.
Definition CFEM_DG_EulerSolver.hpp:189
su2double * CMx_Inv
x Moment coefficient (inviscid contribution) for each boundary.
Definition CFEM_DG_EulerSolver.hpp:65
unsigned short nStandardMatchingFacesSol
Number of standard matching internal faces used for solution of the DG solver.
Definition CFEM_DG_EulerSolver.hpp:153
su2double GetDensity_Inf(void) const final
Compute the density at the infinity.
Definition CFEM_DG_EulerSolver.hpp:333
su2double Total_CMz
Total z moment coefficient for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:104
void LeftStatesIntegrationPointsBoundaryFace(CConfig *config, const unsigned short nFaceSimul, const unsigned short NPad, const CSurfaceElementFEM *surfElem, su2double *solFace, su2double *solIntL)
Function, which computes the left state of a boundary face.
Definition CFEM_DG_EulerSolver.cpp:8968
su2double GetSurface_CSF(unsigned short val_marker) const final
Provide the non dimensional side-force coefficient.
Definition CFEM_DG_EulerSolver.hpp:964
su2double * Surface_CFy
y Force coefficient for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:112
su2double * Surface_CEff
Efficiency (Cl/Cd) for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:117
const unsigned long * nVolElemInternalPerTimeLevel
Number of internal local volume elements per time level. Internal means that the solution data does n...
Definition CFEM_DG_EulerSolver.hpp:129
unsigned long nVolElemOwned
Number of owned local volume elements.
Definition CFEM_DG_EulerSolver.hpp:124
su2double GetAllBound_CFx_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFEM_DG_EulerSolver.hpp:1229
vector< unsigned long > entriesResFaces
The corresponding entries in the residual of the faces.
Definition CFEM_DG_EulerSolver.hpp:195
vector< su2double > VecDeltaTime
Vector, which stores the time steps of the owned volume elements.
Definition CFEM_DG_EulerSolver.hpp:178
virtual void BC_Outlet(CConfig *config, const unsigned long surfElemBeg, const unsigned long surfElemEnd, const CSurfaceElementFEM *surfElem, su2double *resFaces, CNumerics *conv_numerics, unsigned short val_marker, su2double *workArray)
Impose the outlet boundary condition.It is a virtual function, because for Navier-Stokes it is overwr...
Definition CFEM_DG_EulerSolver.cpp:8666
virtual void Shock_Capturing_DG(CConfig *config, const unsigned long elemBeg, const unsigned long elemEnd, su2double *workArray)
Compute the artificial viscosity for shock capturing in DG. It is a virtual function,...
Definition CFEM_DG_EulerSolver.cpp:5871
virtual void ResidualFaces(CConfig *config, const unsigned long indFaceBeg, const unsigned long indFaceEnd, unsigned long &indResFaces, CNumerics *numerics, su2double *workArray)
Compute the spatial residual for the given range of faces. It is a virtual function,...
Definition CFEM_DG_EulerSolver.cpp:6353
su2double AllBound_CFz_Inv
Total z force coefficient (inviscid contribution) for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:88
su2double GetCD_Inv(unsigned short val_marker) const final
Provide the non dimensional drag coefficient (inviscid contribution).
Definition CFEM_DG_EulerSolver.hpp:1090
su2double GetCSF_Inv(unsigned short val_marker) const final
Provide the non dimensional sideforce coefficient (inviscid contribution).
Definition CFEM_DG_EulerSolver.hpp:1097
vector< vector< unsigned long > > startLocResFacesMarkers
The starting location in the residual of the faces for the time levels of the boundary markers.
Definition CFEM_DG_EulerSolver.hpp:202
su2double GetAllBound_CMz_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFEM_DG_EulerSolver.hpp:1223
su2double GetSurface_CFz_Inv(unsigned short val_marker) const final
Provide the non dimensional z force coefficient.
Definition CFEM_DG_EulerSolver.hpp:1062
unsigned short nStandardBoundaryFacesSol
Number of standard boundary faces used for solution of the DG solver.
Definition CFEM_DG_EulerSolver.hpp:151
virtual void BC_Euler_Wall(CConfig *config, const unsigned long surfElemBeg, const unsigned long surfElemEnd, const CSurfaceElementFEM *surfElem, su2double *resFaces, CNumerics *conv_numerics, su2double *workArray)
Impose via the residual the Euler wall boundary condition. It is a virtual function,...
Definition CFEM_DG_EulerSolver.cpp:8268
su2double GetTotal_CL() const final
Provide the total (inviscid + viscous) non dimensional lift coefficient.
Definition CFEM_DG_EulerSolver.hpp:1133
su2double * Surface_CFz_Inv
z Force coefficient (inviscid contribution) for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:76
su2double Total_CSF
Total sideforce coefficient for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:98
su2double GetSurface_CMx_Inv(unsigned short val_marker) const final
Provide the non dimensional x moment coefficient.
Definition CFEM_DG_EulerSolver.hpp:1069
void Set_OldSolution() final
Set the working solution of the first time level to the current solution. Used for Runge-Kutta type s...
Definition CFEM_DG_EulerSolver.cpp:3689
unsigned long nDOFsLocTot
Total number of local DOFs, including halos.
Definition CFEM_DG_EulerSolver.hpp:119
unsigned int sizeWorkArray
The size of the work array needed.
Definition CFEM_DG_EulerSolver.hpp:171
su2double Total_CEff
Total efficiency coefficient for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:105
void ExplicitRK_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iRKStep) final
Update the solution using a Runge-Kutta scheme.
Definition CFEM_DG_EulerSolver.cpp:7257
vector< su2double > VecSolDOFsPredictorADER
Vector, which stores the ADER predictor solution in the owned DOFs. These are both space and time DOF...
Definition CFEM_DG_EulerSolver.hpp:180
su2double AllBound_CFx_Inv
Total x force coefficient (inviscid contribution) for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:86
virtual void BC_Supersonic_Outlet(CConfig *config, const unsigned long surfElemBeg, const unsigned long surfElemEnd, const CSurfaceElementFEM *surfElem, su2double *resFaces, CNumerics *conv_numerics, su2double *workArray)
Impose the supersonic outlet boundary condition. It is a virtual function, because for Navier-Stokes ...
Definition CFEM_DG_EulerSolver.cpp:8535
su2double GetTotal_CMz() const final
Provide the total (inviscid + viscous) non dimensional z moment coefficient.
Definition CFEM_DG_EulerSolver.hpp:1157
su2double Gamma_Minus_One
Fluids's Gamma - 1.0 .
Definition CFEM_DG_EulerSolver.hpp:44
unsigned long nDOFsLocOwned
Number of owned local DOFs.
Definition CFEM_DG_EulerSolver.hpp:120
unsigned long nVolElemTot
Total number of local volume elements, including halos.
Definition CFEM_DG_EulerSolver.hpp:123
su2double GetSurface_CMx(unsigned short val_marker) const final
Provide the non dimensional x moment coefficient.
Definition CFEM_DG_EulerSolver.hpp:999
su2double * Surface_CFy_Inv
y Force coefficient (inviscid contribution) for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:75
su2double * CFz_Inv
z Force coefficient (inviscid contribution) for each boundary.
Definition CFEM_DG_EulerSolver.hpp:64
su2double GetAllBound_CFy_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFEM_DG_EulerSolver.hpp:1235
su2double Gamma
Fluid's Gamma constant (ratio of specific heats).
Definition CFEM_DG_EulerSolver.hpp:43
su2double * Surface_CD
Drag coefficient for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:109
bool symmetrizingTermsPresent
Whether or not symmetrizing terms are present in the discretization.
Definition CFEM_DG_EulerSolver.hpp:213
su2double * Surface_CMx
x Moment coefficient for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:114
su2double GetTotal_CFy() const final
Provide the total (inviscid + viscous) non dimensional y force coefficient.
Definition CFEM_DG_EulerSolver.hpp:1169
su2double * CL_Inv
Lift coefficient (inviscid contribution) for each boundary.
Definition CFEM_DG_EulerSolver.hpp:59
vector< su2double > VecResFaces
Vector, which stores the residuals of the DOFs that come from the faces, both boundary and internal.
Definition CFEM_DG_EulerSolver.hpp:187
su2double GetAllBound_CMy_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFEM_DG_EulerSolver.hpp:1217
su2double GetSurface_CFy_Inv(unsigned short val_marker) const final
Provide the non dimensional y force coefficient.
Definition CFEM_DG_EulerSolver.hpp:1055
su2double Density_Inf
Density at infinity.
Definition CFEM_DG_EulerSolver.hpp:50
const unsigned long * nVolElemHaloPerTimeLevel
Number of halo volume elements per time level. Cumulative storage.
Definition CFEM_DG_EulerSolver.hpp:132
virtual void BC_Riemann(CConfig *config, const unsigned long surfElemBeg, const unsigned long surfElemEnd, const CSurfaceElementFEM *surfElem, su2double *resFaces, CNumerics *conv_numerics, unsigned short val_marker, su2double *workArray)
Impose the boundary condition using characteristic reconstruction. It is a virtual function,...
Definition CFEM_DG_EulerSolver.cpp:8731
su2double GetSurface_CFx(unsigned short val_marker) const final
Provide the non dimensional x force coefficient.
Definition CFEM_DG_EulerSolver.hpp:978
void LoadRestart(CGeometry **geometry, CSolver ***solver, CConfig *config, int val_iter, bool val_update_geo) final
Load a solution from a restart file.
Definition CFEM_DG_EulerSolver.cpp:9543
su2double GetSurface_CL(unsigned short val_marker) const final
Provide the non dimensional lift coefficient.
Definition CFEM_DG_EulerSolver.hpp:950
void CheckTimeSynchronization(CConfig *config, const su2double TimeSync, su2double &timeEvolved, bool &syncTimeReached) final
Function, which checks whether or not the time synchronization point is reached when explicit time st...
Definition CFEM_DG_EulerSolver.cpp:3860
su2double GetModVelocity_Inf(void) const final
Compute 2-norm of the velocity at the infinity.
Definition CFEM_DG_EulerSolver.hpp:339
vector< vector< unsigned long > > nonZeroEntriesJacobian
The ID's of the DOFs for the non-zero entries of the Jacobian for the locally owned DOFs.
Definition CFEM_DG_EulerSolver.hpp:218
void SetTotal_CD(su2double val_Total_CD) final
Store the total (inviscid + viscous) non dimensional drag coefficient.
Definition CFEM_DG_EulerSolver.hpp:1181
void InviscidFluxesInternalMatchingFace(CConfig *config, const unsigned long lBeg, const unsigned long lEnd, const unsigned short NPad, su2double *solIntL, su2double *solIntR, su2double *fluxes, CNumerics *numerics)
Function, which computes the inviscid fluxes in the face integration points of a chunk of matching in...
Definition CFEM_DG_EulerSolver.cpp:6474
su2double GetAllBound_CSF_Inv() const final
Get the inviscid contribution to the sideforce coefficient.
Definition CFEM_DG_EulerSolver.hpp:1199
vector< su2double > TolSolADER
Vector, which stores the tolerances for the conserved variables in the ADER predictor step.
Definition CFEM_DG_EulerSolver.hpp:173
su2double * Velocity_Inf
Flow velocity vector at infinity.
Definition CFEM_DG_EulerSolver.hpp:54
su2double GetSurface_CD_Inv(unsigned short val_marker) const final
Provide the non dimensional drag coefficient.
Definition CFEM_DG_EulerSolver.hpp:1027
const CFEMStandardInternalFace * standardMatchingFacesSol
Array that contains the standard matching internal faces used for the solution of the DG solver.
Definition CFEM_DG_EulerSolver.hpp:159
su2double GetAllBound_CD_Inv() const final
Get the inviscid contribution to the drag coefficient.
Definition CFEM_DG_EulerSolver.hpp:1193
su2double * Surface_CEff_Inv
Efficiency (Cl/Cd) (inviscid contribution) for each monitoring surface.
Definition CFEM_DG_EulerSolver.hpp:80
unsigned short nStandardElementsSol
Number of standard volume elements used for solution of the DG solver.
Definition CFEM_DG_EulerSolver.hpp:152
su2double GetSurface_CFx_Inv(unsigned short val_marker) const final
Provide the non dimensional x force coefficient.
Definition CFEM_DG_EulerSolver.hpp:1048
void SetTemperature_Inf(su2double t_inf) final
Set the freestream temperature.
Definition CFEM_DG_EulerSolver.hpp:382
vector< vector< unsigned long > > localDOFsPerColor
Double vector, which contains for every color the local DOFs.
Definition CFEM_DG_EulerSolver.hpp:224
void Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output) final
Compute primitive variables and their gradients.
Definition CFEM_DG_EulerSolver.cpp:3237
vector< vector< unsigned long > > ownedElemAdjLowTimeLevel
List of owned elements per time level that are adjacent to elements of the lower time level.
Definition CFEM_DG_EulerSolver.hpp:135
bool Complete_MPI_Communication(CConfig *config, const unsigned short timeLevel, const bool commMustBeCompleted)
Routine that completes the non-blocking communication between ranks.
Definition CFEM_DG_EulerSolver.cpp:2867
void MetaDataChunkOfElem(const TElemType *elem, const unsigned long l, const unsigned long elemEnd, const unsigned short nElemSimul, const unsigned short nPadMin, unsigned long &lEnd, unsigned short &ind, unsigned short &llEnd, unsigned short &NPad)
Template function, which determines some meta data for the chunk of elements/faces that must be treat...
Definition CFEM_DG_EulerSolver.hpp:1658
void ADER_DG_Iteration(const unsigned long elemBeg, const unsigned long elemEnd)
Update the solution for the ADER-DG scheme for the given range of elements.
Definition CFEM_DG_EulerSolver.cpp:7549
void AccumulateSpaceTimeResidualADERHaloElem(CConfig *config, const unsigned short timeLevel, const unsigned short intPoint)
Function, which accumulates the space time residual of the ADER-DG time integration scheme for the ha...
Definition CFEM_DG_EulerSolver.cpp:6691
su2double Total_CD
Total drag coefficient for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:97
su2double * GetVelocity_Inf(void) final
Get the velocity at the infinity.
Definition CFEM_DG_EulerSolver.hpp:370
su2double GetTotal_CEff() const final
Provide the total (inviscid + viscous) non dimensional efficiency coefficient.
Definition CFEM_DG_EulerSolver.hpp:1116
vector< vector< int > > colorToIndEntriesJacobian
Double vector, which contains for every local DOF the mapping from the color to the entry in the Jaco...
Definition CFEM_DG_EulerSolver.hpp:226
vector< su2double > VecResDOFs
Vector, which stores the residuals in the owned DOFs.
Definition CFEM_DG_EulerSolver.hpp:186
const CFEMStandardBoundaryFace * standardBoundaryFacesSol
Array that contains the standard boundary faces used for the solution of the DG solver.
Definition CFEM_DG_EulerSolver.hpp:155
CBoundaryFEM * boundaries
Array of the boundaries of the FEM mesh.
Definition CFEM_DG_EulerSolver.hpp:149
virtual void BC_Inlet(CConfig *config, const unsigned long surfElemBeg, const unsigned long surfElemEnd, const CSurfaceElementFEM *surfElem, su2double *resFaces, CNumerics *conv_numerics, unsigned short val_marker, su2double *workArray)
Impose the subsonic inlet boundary condition. It is a virtual function, because for Navier-Stokes it ...
Definition CFEM_DG_EulerSolver.cpp:8601
su2double GetVelocity_Inf(unsigned short val_dim) const final
Get the velocity at the infinity.
Definition CFEM_DG_EulerSolver.hpp:364
su2double AeroCoeffForceRef
Reference force for coefficients.
Definition CFEM_DG_EulerSolver.hpp:95
su2double GetSurface_CEff_Inv(unsigned short val_marker) const final
Provide the non dimensional side-force coefficient.
Definition CFEM_DG_EulerSolver.hpp:1041
void Boundary_Conditions(const unsigned short timeLevel, CConfig *config, CNumerics **numerics, const bool haloInfoNeededForBC, su2double *workArray)
Function, which computes the spatial residual for the DG discretization.
Definition CFEM_DG_EulerSolver.cpp:6268
virtual void Volume_Residual(CConfig *config, const unsigned long elemBeg, const unsigned long elemEnd, su2double *workArray)
Compute the volume contributions to the spatial residual. It is a virtual function,...
Definition CFEM_DG_EulerSolver.cpp:5888
su2double GetTotal_CFx() const final
Provide the total (inviscid + viscous) non dimensional x force coefficient.
Definition CFEM_DG_EulerSolver.hpp:1163
void ProcessTaskList_DG(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics, CConfig *config, unsigned short iMesh) final
Function, which processes the list of tasks to be executed by the DG solver.
Definition CFEM_DG_EulerSolver.cpp:3898
su2double GetSurface_CMy_Inv(unsigned short val_marker) const final
Provide the non dimensional y moment coefficient.
Definition CFEM_DG_EulerSolver.hpp:1076
su2double GetTotal_CMx() const final
Provide the total (inviscid + viscous) non dimensional x moment coefficient.
Definition CFEM_DG_EulerSolver.hpp:1145
void Initiate_MPI_Communication(CConfig *config, const unsigned short timeLevel)
Routine that initiates the non-blocking communication between ranks for the givem time level.
Definition CFEM_DG_EulerSolver.cpp:2800
su2double * CMy_Inv
y Moment coefficient (inviscid contribution) for each boundary.
Definition CFEM_DG_EulerSolver.hpp:66
su2double GetAllBound_CEff_Inv() const final
Get the inviscid contribution to the efficiency coefficient.
Definition CFEM_DG_EulerSolver.hpp:1205
su2double GetDensity_Energy_Inf(void) const final
Compute the density multiply by energy at the infinity.
Definition CFEM_DG_EulerSolver.hpp:351
const unsigned long * nVolElemOwnedPerTimeLevel
Number of owned local volume elements per time level. Cumulative storage.
Definition CFEM_DG_EulerSolver.hpp:127
su2double AllBound_CL_Inv
Total lift coefficient (inviscid contribution) for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:83
su2double Total_CMx
Total x moment coefficient for all the boundaries.
Definition CFEM_DG_EulerSolver.hpp:102
vector< unsigned long > startLocResInternalFacesLocalElem
The starting location in the residual of the faces for the time levels of internal faces between loca...
Definition CFEM_DG_EulerSolver.hpp:206
su2double GetTotal_CSF() const final
Provide the total (inviscid + viscous) non dimensional sideforce coefficient.
Definition CFEM_DG_EulerSolver.hpp:1110
bool Complete_MPI_ReverseCommunication(CConfig *config, const unsigned short timeLevel, const bool commMustBeCompleted)
Routine that completes the reverse non-blocking communication between ranks.
Definition CFEM_DG_EulerSolver.cpp:3116
void SetInitialCondition(CGeometry **geometry, CSolver ***solver_container, CConfig *config, unsigned long TimeIter) final
Set the initial condition for the Euler Equations.
Definition CFEM_DG_EulerSolver.cpp:3212
virtual void BC_Isothermal_Wall(CConfig *config, const unsigned long surfElemBeg, const unsigned long surfElemEnd, const CSurfaceElementFEM *surfElem, su2double *resFaces, CNumerics *conv_numerics, unsigned short val_marker, su2double *workArray)
Impose an isothermal condition at the wall. It is a virtual function, such that it can be overwritten...
Definition CFEM_DG_EulerSolver.hpp:814
void BoundaryStates_Inlet(CConfig *config, const unsigned short nFaceSimul, const unsigned short NPad, const CSurfaceElementFEM *surfElem, unsigned short val_marker, const su2double *solIntL, su2double *solIntR)
Function, which computes the boundary states in the integration points of the boundary face by applyi...
Definition CFEM_DG_EulerSolver.cpp:7639
unsigned long nMeshPoints
Number of mesh points in the local part of the grid.
Definition CFEM_DG_EulerSolver.hpp:140
su2double * GetVecSolDOFs(void) final
Get a pointer to the vector of the solution degrees of freedom.
Definition CFEM_DG_EulerSolver.hpp:315
const unsigned long * nMatchingInternalFacesWithHaloElem
Number of local matching internal faces per time level between an owned and a halo element....
Definition CFEM_DG_EulerSolver.hpp:143
vector< unsigned long > nEntriesResAdjFaces
Number of entries for the DOFs in the residual of the faces, where the face is adjacent to an element...
Definition CFEM_DG_EulerSolver.hpp:197
vector< unsigned long > nEntriesResFaces
Number of entries for the DOFs in the residual of the faces. Cumulative storage.
Definition CFEM_DG_EulerSolver.hpp:193
su2double GetSurface_CSF_Inv(unsigned short val_marker) const final
Provide the non dimensional side-force coefficient.
Definition CFEM_DG_EulerSolver.hpp:1034
CBlasStructure * blasFunctions
Pointer to the object to carry out the BLAS functionalities.
Definition CFEM_DG_EulerSolver.hpp:232
Main class for defining the Thermo-Physical Model.
Definition CFluidModel.hpp:47
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition CGeometry.hpp:75
Base class for the FEM solver.
Definition fem_geometry_structure.hpp:288
Class for defining the numerical methods.
Definition CNumerics.hpp:48
Definition CSolver.hpp:71
unsigned short nDim
Number of dimensions of the problem.
Definition CSolver.hpp:90
virtual void BC_Riemann(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
A virtual member.
Definition CSolver.hpp:1101
unsigned short nVar
Number of variables of the problem.
Definition CSolver.hpp:85
virtual void BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
A virtual member.
Definition CSolver.hpp:1043
virtual void BC_Custom(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
A virtual member.
Definition CSolver.hpp:1242
virtual void BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
A virtual member.
Definition CSolver.hpp:1027
Main class for defining the variables.
Definition CVariable.hpp:50
Class to store a volume element for the FEM solver.
Definition fem_geometry_structure.hpp:45
passivedouble su2double
Definition code_config.hpp:181
FORCEINLINE ARRAY_T sqrt(const ARRAY_T &x)
Definition special_vectorization.hpp:116
Class to store a boundary for the FEM solver.
Definition fem_geometry_structure.hpp:265
Class to store an internal face for the FEM solver.
Definition fem_geometry_structure.hpp:160
Class to store a point for the FEM solver.
Definition fem_geometry_structure.hpp:136
Class to store a surface element for the FEM solver.
Definition fem_geometry_structure.hpp:204