SU2
grid_adaptation_structure.hpp
Go to the documentation of this file.
1 
35 #pragma once
36 
37 #include "./mpi_structure.hpp"
38 
39 #include <cmath>
40 #include <iostream>
41 #include <cstdlib>
42 #include <fstream>
43 
44 #include "geometry_structure.hpp"
45 #include "config_structure.hpp"
46 
47 using namespace std;
48 
56 protected:
57  unsigned long nPoint_new,
58  nElem_new;
59  unsigned short nDim,
60  nVar;
61  su2double **ConsVar_Sol,
62  **ConsVar_Res,
63  **ConsVar_Adapt;
64  su2double **AdjVar_Sol,
65  **AdjVar_Res,
66  **AdjVar_Adapt;
67  su2double **LinVar_Sol,
68  **LinVar_Res,
69  **LinVar_Adapt;
70  su2double **Gradient,
71  **Gradient_Flow,
72  **Gradient_Adj;
73  su2double *Index;
75 public:
76 
82  CGridAdaptation(CGeometry *geometry, CConfig *config);
83 
87  ~CGridAdaptation(void);
88 
94  void GetFlowSolution(CGeometry *geometry, CConfig *config);
95 
101  void GetFlowResidual(CGeometry *geometry, CConfig *config);
102 
108  void GetAdjSolution(CGeometry *geometry, CConfig *config);
109 
115  void GetAdjResidual(CGeometry *geometry, CConfig *config);
116 
122  void SetComplete_Refinement(CGeometry *geometry, unsigned short strength);
123 
129  void SetNo_Refinement(CGeometry *geometry, unsigned short strength);
130 
136  void SetWake_Refinement(CGeometry *geometry, unsigned short strength);
137 
143  void SetSupShock_Refinement(CGeometry *geometry, CConfig *config);
144 
150  void SetNearField_Refinement(CGeometry *geometry, CConfig *config);
151 
158  void SetHomothetic_Adaptation2D(CGeometry *geometry, CPhysicalGeometry *geo_adapt, CConfig *config);
159 
166  void SetHomothetic_Adaptation3D(CGeometry *geometry, CPhysicalGeometry *geo_adapt, CConfig *config);
167 
173  long CheckTriangleCode(bool *AdaptCode);
174 
180  long CheckRectCode(bool *AdaptCode);
181 
187  long CheckRectExtCode(bool *AdaptCode);
188 
194  long CheckTetraCode(bool *AdaptCode);
195 
201  long CheckHexaCode(bool *AdaptCode);
202 
208  long CheckPyramCode(bool *AdaptCode);
209 
218  void TriangleDivision(long code, long *nodes, long *edges, long **Division, long *nPart);
219 
228  void RectDivision(long code, long *nodes, long **Division, long *nPart);
229 
238  void RectExtDivision(long code, long *nodes, long **Division, long *nPart);
239 
248  void TetraDivision(long code, long *nodes, long *edges, long **Division, long *nPart);
249 
258  void HexaDivision(long code, long *nodes, long **Division, long *nPart);
259 
268  void PyramDivision(long code, long *nodes, long **Division, long *nPart);
269 
276  void SetIndicator_Flow(CGeometry *geometry, CConfig *config, unsigned short strength);
277 
284  void SetIndicator_Adj(CGeometry *geometry, CConfig *config, unsigned short strength);
285 
291  void SetIndicator_FlowAdj(CGeometry *geometry, CConfig *config);
292 
298  void SetIndicator_Robust(CGeometry *geometry, CConfig *config);
299 
305  void SetIndicator_Computable(CGeometry *geometry, CConfig *config);
306 
312  void SetIndicator_Computable_Robust(CGeometry *geometry, CConfig *config);
313 
319  void SetRestart_FlowSolution(CConfig *config, CPhysicalGeometry *geo_adapt, string mesh_flowfilename);
320 
326  void SetRestart_AdjSolution(CConfig *config, CPhysicalGeometry *geo_adapt, string mesh_adjfilename);
327 
333  void SetRestart_LinSolution(CConfig *config, CPhysicalGeometry *geo_adapt, string mesh_linfilename);
334 
341  void SetSensorElem(CGeometry *geometry, CConfig *config, unsigned long max_elem);
342 
343 };
344 
346 
347 
Headers of the main subroutines for creating the geometrical structure. The subroutines and functions...
unsigned long nPoint_new
Number of new points.
Definition: grid_adaptation_structure.hpp:57
su2double ** Gradient_Flow
Gradient of the flow variables.
Definition: grid_adaptation_structure.hpp:70
All the information about the definition of the physical problem. The subroutines and functions are i...
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition: geometry_structure.hpp:72
su2double * Index
Adaptation index (indicates the value of the adaptation).
Definition: grid_adaptation_structure.hpp:73
In-Line subroutines of the grid_adaptation_structure.hpp file.
Headers of the mpi interface for generalized datatypes. The subroutines and functions are in the mpi_...
su2double ** ConsVar_Sol
Conservative variables (original solution).
Definition: grid_adaptation_structure.hpp:61
unsigned short nVar
Number of variables in the problem.
Definition: grid_adaptation_structure.hpp:59
Class for reading a defining the primal grid which is read from the grid file in .su2 format.
Definition: geometry_structure.hpp:945
su2double ** LinVar_Sol
Linear variables (original solution).
Definition: grid_adaptation_structure.hpp:67
Parent class for defining the grid adaptation.
Definition: grid_adaptation_structure.hpp:55
Main class for defining the problem; basically this class reads the configuration file...
Definition: config_structure.hpp:68
su2double ** AdjVar_Sol
Adjoint variables (original solution).
Definition: grid_adaptation_structure.hpp:64