Documentation 6b54b78464
Loading...
Searching...
No Matches
CPoint.hpp
Go to the documentation of this file.
1/*!
2 * \file CPoint.hpp
3 * \brief Declaration of the point class that stores geometric and adjacency
4 * information for dual control volumes.
5 * \author F. Palacios, T. Economon
6 * \version 8.5.0 "Harrier"
7 *
8 * SU2 Project Website: https://su2code.github.io
9 *
10 * The SU2 Project is maintained by the SU2 Foundation
11 * (http://su2foundation.org)
12 *
13 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
14 *
15 * SU2 is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Lesser General Public
17 * License as published by the Free Software Foundation; either
18 * version 2.1 of the License, or (at your option) any later version.
19 *
20 * SU2 is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
24 *
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
27 */
28
29#pragma once
30
31#include "../../containers/C2DContainer.hpp"
32#include "../../containers/container_decorators.hpp"
33#include "../../toolboxes/graph_toolbox.hpp"
34#include <vector>
35#include "../../toolboxes/ndflattener.hpp"
36
37using namespace std;
38
39class CConfig;
41
42/*!
43 * \class CPoint
44 * \brief Class for point definition (dual control volumes).
45 * \author F. Palacios
46 */
47class CPoint {
48 private:
49 friend class CPhysicalGeometry;
50
51 const unsigned long nDim = 0;
52
53 su2vector<unsigned long> GlobalIndex; /*!< \brief Global index in the parallel simulation. */
54 su2vector<unsigned long> Color; /*!< \brief Color of the point in the partitioning strategy. */
55
56 CCompressedSparsePatternUL Point; /*!< \brief Points surrounding the central node of the control volume. */
57 CCompressedSparsePatternL Edge; /*!< \brief Edges that set up a control volume (same sparse structure as Point). */
58 CCompressedSparsePatternL Elem; /*!< \brief Elements that set up a control volume around a node. */
59 vector<vector<long> > Vertex; /*!< \brief Index of the vertex that correspond which the control volume (we need one
60 for each marker in the same node). */
61
62 su2activevector Volume; /*!< \brief Volume or Area of the control volume in 3D and 2D. */
63 su2activevector Volume_n; /*!< \brief Volume at time n. */
64 su2activevector Volume_nM1; /*!< \brief Volume at time n-1. */
65 su2activevector Volume_Old; /*!< \brief Old containers for Volume. */
66 su2activevector Volume_n_Old; /*!< \brief Old containers for Volume at time n. */
67 su2activevector Volume_nM1_Old; /*!< \brief Old containers for Volume at time n-1. */
68 su2activevector Periodic_Volume; /*!< \brief Missing component of volume or area of a control volume on a periodic
69 marker in 3D and 2D. */
70
71 su2vector<bool> Domain; /*!< \brief Indicates if a point must be computed or belong to another boundary */
72 su2vector<bool> Boundary; /*!< \brief To see if a point belong to the boundary (including MPI). */
74 PhysicalBoundary; /*!< \brief To see if a point belong to the physical boundary (without includin MPI). */
76 SolidBoundary; /*!< \brief To see if a point belong to the physical boundary (without includin MPI). */
78 ViscousBoundary; /*!< \brief To see if a point belong to the physical boundary (without includin MPI). */
80 PeriodicBoundary; /*!< \brief To see if a point belongs to a periodic boundary (without including MPI). */
81
82 su2activematrix Coord; /*!< \brief vector with the coordinates of the node. */
84 Coord_Old; /*!< \brief Old coordinates vector for primal solution reloading for Disc.Adj. with dynamic grid. */
85 su2activematrix Coord_n; /*!< \brief Coordinates at time n for use with dynamic meshes. */
86 su2activematrix Coord_n1; /*!< \brief Coordinates at time n-1 for use with dynamic meshes. */
87 su2activematrix Coord_p1; /*!< \brief Coordinates at time n+1 for use with dynamic meshes. */
88
89 su2activematrix GridVel; /*!< \brief Velocity of the grid for dynamic mesh cases. */
90 CVectorOfMatrix GridVel_Grad; /*!< \brief Gradient of the grid velocity for dynamic meshes. */
91
92 su2vector<unsigned long> Parent_CV; /*!< \brief Index of the parent control volume in the agglomeration process. */
93 su2vector<unsigned short> nChildren_CV; /*!< \brief Number of children in the agglomeration process. */
94 vector<vector<unsigned long> >
95 Children_CV; /*!< \brief Index of the children control volumes in the agglomeration process. */
96 su2vector<bool> Agglomerate_Indirect; /*!< \brief This flag indicates if the indirect points can be agglomerated. */
97 su2vector<bool> Agglomerate; /*!< \brief This flag indicates if the element has been agglomerated. */
98
99 su2vector<unsigned short> nNeighbor; /*!< \brief Number of neighbors, needed by some numerical methods. */
100
101 /*--- Closest element on a viscous wall, and distance to it. ---*/
102 su2activevector Wall_Distance; /*!< \brief Distance to the nearest wall. */
103 su2vector<int> ClosestWall_Rank; /*!< \brief Rank of process holding the closest wall element. */
104 su2vector<unsigned short> ClosestWall_Zone; /*!< \brief Zone index of closest wall element. */
106 ClosestWall_Marker; /*!< \brief Marker index of closest wall element, for given rank and zone index. */
108 ClosestWall_Elem; /*!< \brief Element index of closest wall element, for givenrank, zone and marker index. */
109
110 su2activevector SharpEdge_Distance; /*!< \brief Distance to a sharp edge. */
111 su2activevector Curvature; /*!< \brief Value of the surface curvature (SU2_GEO). */
112 su2activevector MaxLength; /*!< \brief The maximum cell-center to cell-center length. */
113 su2activevector RoughnessHeight; /*!< \brief Roughness of the nearest wall. */
114
116 AD_InputIndex; /*!< \brief Indices of Coord variables in the adjoint vector before solver iteration. */
118 AD_OutputIndex; /*!< \brief Indices of Coord variables in the adjoint vector after solver iteration. */
119
120 /*!
121 * \brief Allocate fields required by the minimal constructor.
122 */
123 void MinimalAllocation(unsigned long npoint);
124
125 public:
126 /*!
127 * \brief "Full" constructor of the class.
128 * \param[in] npoint - Number of points (dual volumes) in the problem.
129 * \param[in] ndim - Number of spatial dimensions of the problem.
130 * \param[in] imesh - Index of the grid allocating the points.
131 * \param[in] config - Definition of the particular problem.
132 */
133 CPoint(unsigned long npoint, unsigned long ndim, unsigned short imesh, const CConfig* config);
134
135 /*!
136 * \brief Minimal constructor, only allocates the structures required to read and partition a mesh file.
137 * \param[in] npoint - Number of points (dual volumes) in the problem.
138 * \param[in] ndim - Number of spatial dimensions of the problem.
139 */
140 CPoint(unsigned long npoint, unsigned long ndim);
141
142 /*!
143 * \brief Default construction is not allowed.
144 */
145 CPoint() = delete;
146
147 /*!
148 * \brief Allocate the variables not covered by the minimal constructor.
149 */
150 void FullAllocation(unsigned short imesh, const CConfig* config);
151
152 /*!
153 * \brief Get the coordinates dor the control volume.
154 * \param[in] iPoint - Index of the point.
155 * \param[in] iDim - Number of dimensions of the problem.
156 * \return Coordinate that correspond with <i>iDim</i>.
157 */
158 inline su2double GetCoord(unsigned long iPoint, unsigned long iDim) const { return Coord(iPoint, iDim); }
159
160 /*!
161 * \brief Get the coordinates of the control volume.
162 * \param[in] iPoint - Index of the point.
163 * \return pointer to the coordinate of the point.
164 */
165 inline su2double* GetCoord(unsigned long iPoint) { return Coord[iPoint]; }
166
167 /*!
168 * \brief Get the entire matrix of coordinates of the control volumes.
169 */
170 inline const su2activematrix& GetCoord() const { return Coord; }
171
172 /*!
173 * \brief Set the coordinates for the control volume.
174 * \param[in] iPoint - Index of the point.
175 * \param[in] iDim - Position to store the coordinate.
176 * \param[in] coord - Coordinate for iDim.
177 */
178 inline void SetCoord(unsigned long iPoint, unsigned long iDim, su2double coord) { Coord(iPoint, iDim) = coord; }
179
180 /*!
181 * \brief Set the coordinates for the control volume.
182 * \param[in] iPoint - Index of the point.
183 * \param[in] iDim - Position to store the coordinate.
184 * \param[in] coord - Coordinate for iDim.
185 */
186 inline void AddCoord(unsigned long iPoint, unsigned long iDim, su2double coord) { Coord(iPoint, iDim) += coord; }
187
188 /*!
189 * \brief Set the point coordinates.
190 * \param[in] iPoint - Index of the point.
191 * \param[in] coord - Coordinate of the point.
192 */
193 inline void SetCoord(unsigned long iPoint, const su2double* coord) {
194 for (unsigned long iDim = 0; iDim < nDim; iDim++) Coord(iPoint, iDim) = coord[iDim];
195 }
196
197 /*!
198 * \brief Set the elements that are connected to each point.
199 * \param[in] elemsMatrix - List of lists with the neighbor points connected to each point.
200 */
201 void SetElems(const vector<vector<long> >& elemsMatrix);
202
203 /*!
204 * \brief Reset the elements of a control volume.
205 */
206 inline void ResetElems() { Elem = CCompressedSparsePatternL(); }
207
208 /*!
209 * \brief Get the number of elements that compose the control volume.
210 * \param[in] iPoint - Index of the point.
211 * \return Number of elements that compose the control volume.
212 */
213 inline unsigned short GetnElem(unsigned long iPoint) const { return Elem.getNumNonZeros(iPoint); }
214
215 /*!
216 * \brief Get all the elements that compose the control volume.
217 * \param[in] iPoint - Index of the point.
218 * \param[in] nelem - Position where the element is stored.
219 * \return Index of the element.
220 */
221 inline unsigned long GetElem(unsigned long iPoint, unsigned long nelem) const {
222 return Elem.getInnerIdx(iPoint, nelem);
223 }
224
225 /*!
226 * \brief Get inner iterator to loop over neighbor elements.
227 */
228 inline CCompressedSparsePatternL::CInnerIter GetElems(unsigned long iPoint) const {
229 return Elem.getInnerIter(iPoint);
230 }
231
232 /*!
233 * \brief Set the points that compose the control volume.
234 * \param[in] pointsMatrix - List of lists with the neighbor points connected to each point.
235 */
236 void SetPoints(const vector<vector<unsigned long> >& pointsMatrix);
237
238 /*!
239 * \brief Get the entire point adjacency information in compressed format (CSR).
240 */
241 const CCompressedSparsePatternUL& GetPoints() const { return Point; }
242
243 /*!
244 * \brief Reset the points that compose the control volume.
245 */
246 inline void ResetPoints() {
249 }
250
251 /*!
252 * \brief Get the number of points that compose the control volume.
253 * \param[in] iPoint - Index of the point.
254 * \return Number of points that compose the control volume.
255 */
256 inline unsigned short GetnPoint(unsigned long iPoint) const { return Point.getNumNonZeros(iPoint); }
257
258 /*!
259 * \brief Get all the points that compose the control volume.
260 * \param[in] iPoint - Index of the point.
261 * \param[in] point - Position where the point is stored.
262 * \return Index of the point.
263 */
264 inline unsigned long GetPoint(unsigned long iPoint, unsigned long npoint) const {
265 return Point.getInnerIdx(iPoint, npoint);
266 }
267
268 /*!
269 * \brief Get inner iterator to loop over neighbor points.
270 */
271 inline CCompressedSparsePatternUL::CInnerIter GetPoints(unsigned long iPoint) const {
272 return Point.getInnerIter(iPoint);
273 }
274
275 /*!
276 * \brief Set the edges that compose the control volume.
277 * \param[in] iPoint - Index of the point.
278 * \param[in] iedge - Edge to be added.
279 * \param[in] nedge - Position in which is going to be stored the edge for each control volume.
280 */
281 inline void SetEdge(unsigned long iPoint, long iedge, unsigned long nedge) {
282 Edge.getInnerIdx(iPoint, nedge) = iedge;
283 }
284
285 /*!
286 * \brief Get all the edges that compose the control volume.
287 * \param[in] iPoint - Index of the point.
288 * \param[in] nedge - Position where the edge is stored.
289 * \return Index of the edge.
290 */
291 inline long GetEdge(unsigned long iPoint, unsigned long nedge) const { return Edge.getInnerIdx(iPoint, nedge); }
292
293 /*!
294 * \brief Get inner iterator to loop over neighbor edges.
295 */
296 inline CCompressedSparsePatternL::CInnerIter GetEdges(unsigned long iPoint) const {
297 return Edge.getInnerIter(iPoint);
298 }
299
300 /*!
301 * \brief Set the boundary vertex that compose the control volume.
302 * \param[in] iPoint - Index of the point.
303 * \param[in] iVertex - Vertex to be added.
304 * \param[in] iMarker - Marker of the vertex to be added (position where is going to be stored).
305 */
306 inline void SetVertex(unsigned long iPoint, long iVertex, unsigned long iMarker) {
307 if (Boundary(iPoint)) Vertex[iPoint][iMarker] = iVertex;
308 }
309
310 /*!
311 * \brief Get the vertex that compose the control volume for a marker.
312 * \param[in] iPoint - Index of the point.
313 * \param[in] iMarker - Position where the vertex is stored.
314 * \return Index of the vertex.
315 */
316 inline long GetVertex(unsigned long iPoint, unsigned long iMarker) const {
317 if (Boundary(iPoint)) return Vertex[iPoint][iMarker];
318 return -1;
319 }
320
321 /*!
322 * \brief Set if a point belong to the boundary.
323 * \param[in] iPoint - Index of the point.
324 * \note It also create the structure to store the vertex.
325 * \param[in] nMarker - Max number of marker.
326 */
327 inline void SetBoundary(unsigned long iPoint, unsigned short nMarker) {
328 if (!Boundary(iPoint)) Vertex[iPoint].resize(nMarker, -1);
329 Boundary(iPoint) = true;
330 }
331
332 /*!
333 * \brief Reset the boundary of a control volume.
334 * \param[in] iPoint - Index of the point.
335 */
336 inline void ResetBoundary(unsigned long iPoint) {
337 Vertex[iPoint].clear();
338 Boundary(iPoint) = false;
339 }
340
341 /*!
342 * \brief Mark the point as boundary.
343 * \param[in] iPoint - Index of the point.
344 * \param[in] boundary - <code>TRUE</code> if the point belong to the boundary; otherwise <code>FALSE</code>.
345 */
346 inline void SetBoundary(unsigned long iPoint, bool boundary) { Boundary(iPoint) = boundary; }
347
348 /*!
349 * \brief Provides information about if a point belong to the boundaries.
350 * \param[in] iPoint - Index of the point.
351 * \return <code>TRUE</code> if the point belong to the boundary; otherwise <code>FALSE</code>.
352 */
353 inline bool GetBoundary(unsigned long iPoint) const { return Boundary(iPoint); }
354
355 /*!
356 * \brief Set if a point belong to the boundary.
357 * \param[in] iPoint - Index of the point.
358 * \param[in] boundary - <code>TRUE</code> if the point belong to the physical boundary; otherwise <code>FALSE</code>.
359 */
360 inline void SetPhysicalBoundary(unsigned long iPoint, bool boundary) { PhysicalBoundary(iPoint) = boundary; }
361
362 /*!
363 * \brief Provides information about if a point belong to the physical boundaries (without MPI).
364 * \param[in] iPoint - Index of the point.
365 * \return <code>TRUE</code> if the point belong to the boundary; otherwise <code>FALSE</code>.
366 */
367 inline bool GetPhysicalBoundary(unsigned long iPoint) const { return PhysicalBoundary(iPoint); }
368
369 /*!
370 * \brief Set if a point belong to the solid wall boundary.
371 * \param[in] iPoint - Index of the point.
372 * \param[in] boundary - <code>TRUE</code> if the point belong to the physical boundary; otherwise <code>FALSE</code>.
373 */
374 inline void SetSolidBoundary(unsigned long iPoint, bool boundary) { SolidBoundary(iPoint) = boundary; }
375
376 /*!
377 * \brief Provides information about if a point belong to the physical boundaries (without MPI).
378 * \param[in] iPoint - Index of the point.
379 * \return <code>TRUE</code> if the point belong to the boundary; otherwise <code>FALSE</code>.
380 */
381 inline bool GetSolidBoundary(unsigned long iPoint) const { return SolidBoundary(iPoint); }
382
383 /*!
384 * \brief Set if a point belong to the boundary.
385 * \param[in] iPoint - Index of the point.
386 * \param[in] boundary - <code>TRUE</code> if the point belong to the physical boundary; otherwise <code>FALSE</code>.
387 */
388 inline void SetViscousBoundary(unsigned long iPoint, bool boundary) { ViscousBoundary(iPoint) = boundary; }
389
390 /*!
391 * \brief Provides information about if a point belong to the physical boundaries (without MPI).
392 * \param[in] iPoint - Index of the point.
393 * \return <code>TRUE</code> if the point belong to the boundary; otherwise <code>FALSE</code>.
394 */
395 inline bool GetViscousBoundary(unsigned long iPoint) const { return ViscousBoundary(iPoint); }
396
397 /*!
398 * \brief Set if a point belongs to a periodic boundary.
399 * \param[in] iPoint - Index of the point.
400 * \param[in] boundary - <code>TRUE</code> if the point belongs to a periodic boundary; otherwise <code>FALSE</code>.
401 */
402 inline void SetPeriodicBoundary(unsigned long iPoint, bool boundary) { PeriodicBoundary(iPoint) = boundary; }
403
404 /*!
405 * \brief Provides information about if a point belongs to a periodic boundary (without MPI).
406 * \param[in] iPoint - Index of the point.
407 * \return <code>TRUE</code> if the point belongs to a periodic boundary; otherwise <code>FALSE</code>.
408 */
409 inline bool GetPeriodicBoundary(unsigned long iPoint) const { return PeriodicBoundary(iPoint); }
410
411 /*!
412 * \brief For parallel computation, its indicates if a point must be computed or not.
413 * \param[in] iPoint - Index of the point.
414 * \param[in] domain - <code>TRUE</code> if the point belong to the domain; otherwise <code>FALSE</code>.
415 */
416 inline void SetDomain(unsigned long iPoint, bool domain) { Domain(iPoint) = domain; }
417
418 /*!
419 * \brief For parallel computation, its indicates if a point must be computed or not.
420 * \param[in] iPoint - Index of the point.
421 * \return <code>TRUE</code> if the node belong to the physical domain; otherwise <code>FALSE</code>.
422 */
423 inline bool GetDomain(unsigned long iPoint) const { return Domain(iPoint); }
424
425 /*!
426 * \brief Set a color to the point that comes from the grid partitioning.
427 * \param[in] iPoint - Index of the point.
428 * \note Each domain has a different color.
429 * \param[in] color - Color of the point.
430 */
431 inline void SetColor(unsigned long iPoint, unsigned long color) { Color(iPoint) = color; }
432
433 /*!
434 * \brief Get the color of a point, the color indicates to which subdomain the point belong to.
435 * \param[in] iPoint - Index of the point.
436 * \return Color of the point.
437 */
438 inline unsigned long GetColor(unsigned long iPoint) const { return Color(iPoint); }
439
440 /*!
441 * \brief Set the global index in a parallel computation.
442 * \param[in] iPoint - Index of the point.
443 * \return Global index in a parallel computation.
444 */
445 inline void SetGlobalIndex(unsigned long iPoint, unsigned long globalindex) { GlobalIndex(iPoint) = globalindex; }
446
447 /*!
448 * \brief Get the global index in a parallel computation.
449 * \param[in] iPoint - Index of the point.
450 * \return Global index in a parallel computation.
451 */
452 inline unsigned long GetGlobalIndex(unsigned long iPoint) const { return GlobalIndex(iPoint); }
453
454 /*!
455 * \brief Set the number of neighbor (artificial dissipation).
456 * \param[in] iPoint - Index of the point.
457 * \param[in] nneighbor - Number of neighbors.
458 */
459 inline void SetnNeighbor(unsigned long iPoint, unsigned short nneighbor) { nNeighbor(iPoint) = nneighbor; }
460
461 /*!
462 * \brief Get the number of neighbor of a point.
463 * \param[in] iPoint - Index of the point.
464 * \return Number of neighbors.
465 */
466 inline unsigned short GetnNeighbor(unsigned long iPoint) const { return nNeighbor(iPoint); }
467
468 /*!
469 * \brief Set the value of the distance to the nearest wall.
470 * \param[in] iPoint - Index of the point.
471 * \param[in] distance - Value of the distance.
472 * \param[in] rankID - Rank of process holding the closest wall element.
473 * \param[in] zoneID - Zone index of closest wall element.
474 * \param[in] markerID - Marker index of closest wall element.
475 * \param[in] elemID - Element index of closest wall element.
476 */
477 inline void SetWall_Distance(unsigned long iPoint, su2double distance, int rankID, unsigned short zoneID,
478 unsigned short markerID, unsigned long elemID) {
479 Wall_Distance(iPoint) = distance;
480 ClosestWall_Rank(iPoint) = rankID;
481 ClosestWall_Zone(iPoint) = zoneID;
482 ClosestWall_Marker(iPoint) = markerID;
483 ClosestWall_Elem(iPoint) = elemID;
484 }
485 inline void SetWall_Distance(unsigned long iPoint, su2double distance) { Wall_Distance(iPoint) = distance; }
486
487 /*!
488 * \brief Get the value of the distance to the nearest wall.
489 * \param[in] iPoint - Index of the point.
490 * \return Value of the distance to the nearest wall.
491 */
492 inline su2double& GetWall_Distance(unsigned long iPoint) { return Wall_Distance(iPoint); }
493 inline const su2double& GetWall_Distance(unsigned long iPoint) const { return Wall_Distance(iPoint); }
494
495 /*!
496 * \brief Set the value of the distance to the nearest wall.
497 * \param[in] iPoint - Index of the point.
498 * \param[in] distance - Value of the distance.
499 */
500 inline void SetRoughnessHeight(unsigned long iPoint, su2double roughheight) { RoughnessHeight(iPoint) = roughheight; }
501
502 /*!
503 * \brief Get the value of the distance to the nearest wall.
504 * \param[in] iPoint - Index of the point.
505 * \return Value of the distance to the nearest wall.
506 */
507 inline su2double GetRoughnessHeight(unsigned long iPoint) const { return RoughnessHeight(iPoint); }
508
509 /*!
510 * \brief Set the value of the distance to a sharp edge.
511 * \param[in] iPoint - Index of the point.
512 * \param[in] distance - Value of the distance.
513 */
514 inline void SetSharpEdge_Distance(unsigned long iPoint, su2double distance) { SharpEdge_Distance(iPoint) = distance; }
515
516 /*!
517 * \brief Get the value of the distance to a sharp edge
518 * \param[in] iPoint - Index of the point.
519 * \return Value of the distance to the nearest wall.
520 */
521 inline su2double& GetSharpEdge_Distance(unsigned long iPoint) { return SharpEdge_Distance(iPoint); }
522 inline const su2double& GetSharpEdge_Distance(unsigned long iPoint) const { return SharpEdge_Distance(iPoint); }
523
524 /*!
525 * \brief Set the value of the curvature at a surface node.
526 * \param[in] iPoint - Index of the point.
527 * \param[in] curvature - Value of the curvature.
528 */
529 inline void SetCurvature(unsigned long iPoint, su2double curvature) { Curvature(iPoint) = curvature; }
530
531 /*!
532 * \brief Get the value of the curvature at a surface node.
533 * \param[in] iPoint - Index of the point.
534 * \return Value of the curvature.
535 */
536 inline su2double GetCurvature(unsigned long iPoint) const { return Curvature(iPoint); }
537
538 /*!
539 * \brief Set the max cell-center to cell-center length.
540 * \param[in] iPoint - Index of the point.
541 * \param[in] max_length - Value of the max length
542 */
543 inline void SetMaxLength(unsigned long iPoint, su2double max_length) { MaxLength(iPoint) = max_length; }
544
545 /*!
546 * \brief Get the maximum cell-center to cell-center length.
547 * \param[in] iPoint - Index of the point.
548 * \return The maximum cell-center to cell-center length.
549 */
550 inline su2double GetMaxLength(unsigned long iPoint) const { return MaxLength(iPoint); }
551
552 /*!
553 * \brief Get area or volume of the control volume.
554 * \param[in] iPoint - Index of the point.
555 * \return Area or volume of the control volume.
556 */
557 inline su2double& GetVolume(unsigned long iPoint) { return Volume(iPoint); }
558 inline const su2double& GetVolume(unsigned long iPoint) const { return Volume(iPoint); }
559
560 /*!
561 * \brief Set the volume of the control volume.
562 * \param[in] iPoint - Index of the point.
563 * \param[in] volume - Value of the volume.
564 */
565 inline void SetVolume(unsigned long iPoint, su2double volume) { Volume(iPoint) = volume; }
566
567 /*!
568 * \brief Adds some area or volume of the CV.
569 * \param[in] iPoint - Index of the point.
570 * \param[in] volume - Local volume to be added to the total one.
571 */
572 inline void AddVolume(unsigned long iPoint, su2double volume) { Volume(iPoint) += volume; }
573
574 /*!
575 * \brief Get the missing component of area or volume for a control volume on a periodic marker.
576 * \param[in] iPoint - Index of the point.
577 * \return Periodic component of area or volume for a control volume on a periodic marker.
578 */
579 inline su2double& GetPeriodicVolume(unsigned long iPoint) { return Periodic_Volume(iPoint); }
580 inline const su2double& GetPeriodicVolume(unsigned long iPoint) const { return Periodic_Volume(iPoint); }
581
582 /*!
583 * \brief Set the missing component of area or volume for a control volume on a periodic marker.
584 * \param[in] iPoint - Index of the point.
585 * \param[in] volume - Value of the volume from the missing components of the CV on the periodic marker.
586 */
587 inline void SetPeriodicVolume(unsigned long iPoint, su2double volume) { Periodic_Volume(iPoint) = volume; }
588
589 /*!
590 * \brief Get the volume of the control volume at time n.
591 * \param[in] iPoint - Index of the point.
592 * \return Volume of the control volume at time n
593 */
594 inline su2double GetVolume_n(unsigned long iPoint) const { return Volume_n(iPoint); }
595
596 /*!
597 * \brief Get the volume of the control volume at time n+1.
598 * \param[in] iPoint - Index of the point.
599 * \return Volume of the control volume at time n+1
600 */
601 inline su2double GetVolume_nM1(unsigned long iPoint) const { return Volume_nM1(iPoint); }
602
603 /*!
604 * \brief Set the volume of the control volume at time n.
605 */
606 void SetVolume_n();
607
608 /*!
609 * \brief Set the volume of the control volume at time n-1.
610 */
611 void SetVolume_nM1();
612
613 /*!
614 * \brief Set the volume of the control volume at time n using n-1.
615 */
617
618 /*!
619 * \brief Set the volume of the control volume at current time using time n.
620 */
621 void SetVolume_from_Oldn();
622
623 /*!
624 * \brief Set the Volume to Volume_Old.
625 */
626 void SetVolume_Old();
627
628 /*!
629 * \brief Set the Volume_n to Volume_n_Old.
630 */
631 void SetVolume_n_Old();
632
633 /*!
634 * \brief Set the Volume_nM1 to Volume_nM1_Old.
635 */
636 void SetVolume_nM1_Old();
637
638 /*!
639 * \brief Set the parent control volume of an agglomerated control volume.
640 * \param[in] iPoint - Index of the point.
641 * \param[in] parent_CV - Index of the parent control volume.
642 */
643 inline void SetParent_CV(unsigned long iPoint, unsigned long parent_CV) {
644 Parent_CV(iPoint) = parent_CV;
645 Agglomerate(iPoint) = true;
646 }
647
648 /*!
649 * \brief Set the children control volumes of an agglomerated control volume.
650 * \param[in] iPoint - Index of the point.
651 * \param[in] nchildren_CV - Number of children.
652 * \param[in] children_CV - Index of the children control volume.
653 */
654 inline void SetChildren_CV(unsigned long iPoint, unsigned long nchildren_CV, unsigned long children_CV) {
655 Children_CV[iPoint].resize(nchildren_CV + 1);
656 Children_CV[iPoint][nchildren_CV] = children_CV;
657 }
658
659 /*!
660 * \brief Set all the children control volumes of an agglomerated control volume at once.
661 * \param[in] iPoint - Index of the point.
662 * \param[in] children_CV - Indices of the children control volumes.
663 */
664 inline void SetChildren_CV(unsigned long iPoint, const vector<unsigned long>& children_CV) {
665 Children_CV[iPoint] = children_CV;
666 }
667
668 /*!
669 * \brief Get the parent control volume of an agglomerated control volume.
670 * \param[in] iPoint - Index of the point.
671 * \return Index of the parent control volume.
672 */
673 inline unsigned long GetParent_CV(unsigned long iPoint) const { return Parent_CV(iPoint); }
674
675 /*!
676 * \brief Get the children control volume of an agglomerated control volume.
677 * \param[in] iPoint - Index of the point.
678 * \param[in] nchildren_CV - Number of the children.
679 * \return Index of the parent control volume.
680 */
681 inline unsigned long GetChildren_CV(unsigned long iPoint, unsigned short nchildren_CV) const {
682 return Children_CV[iPoint][nchildren_CV];
683 }
684
685 /*!
686 * \brief Get the children control volumes of an agglomerated control volume. Only the first
687 * GetnChildren_CV entries are meaningful, the storage may be longer.
688 * \param[in] iPoint - Index of the point.
689 * \return Indices of the children control volumes.
690 */
691 inline const vector<unsigned long>& GetChildren_CV(unsigned long iPoint) const { return Children_CV[iPoint]; }
692
693 /*!
694 * \brief Get information about if a control volume has been agglomerated.
695 * \param[in] iPoint - Index of the point.
696 * \return <code>TRUE</code> if the point has been agglomerated; otherwise <code>FALSE</code>.
697 */
698 inline bool GetAgglomerate(unsigned long iPoint) const { return Agglomerate(iPoint); }
699
700 /*!
701 * \brief Get information about if the indirect neighbors can be agglomerated.
702 * \param[in] iPoint - Index of the point.
703 * \return <code>TRUE</code> if the indirect neigbors can be agglomerated; otherwise <code>FALSE</code>.
704 */
705 inline bool GetAgglomerate_Indirect(unsigned long iPoint) const { return Agglomerate_Indirect(iPoint); }
706
707 /*!
708 * \brief Set information about if the indirect neighbors can be agglomerated.
709 * \param[in] iPoint - Index of the point.
710 * \param[in] agglomerate - The indirect neigbors can be agglomerated.
711 */
712 inline void SetAgglomerate_Indirect(unsigned long iPoint, bool agglomerate) {
713 Agglomerate_Indirect(iPoint) = agglomerate;
714 };
715
716 /*!
717 * \brief Get the number of children of an agglomerated control volume.
718 * \param[in] iPoint - Index of the point.
719 * \return Number of children control volume.
720 */
721 inline unsigned short GetnChildren_CV(unsigned long iPoint) const { return nChildren_CV(iPoint); }
722
723 /*!
724 * \brief Set the number of children of an agglomerated control volume.
725 * \param[in] iPoint - Index of the point.
726 * \param[in] nchildren_CV - Number of children of the control volume.
727 */
728 inline void SetnChildren_CV(unsigned long iPoint, unsigned short nchildren_CV) {
729 nChildren_CV(iPoint) = nchildren_CV;
730 }
731
732 /*!
733 * \brief Get the coordinates of the control volume at time n.
734 * \param[in] iPoint - Index of the point.
735 * \return Coordinates of the control volume at time n.
736 */
737 inline su2double* GetCoord_n(unsigned long iPoint) { return Coord_n[iPoint]; }
738
739 /*!
740 * \brief Get the coordinates of the control volume at time n-1.
741 * \param[in] iPoint - Index of the point.
742 * \return Volume of the control volume at time n-1
743 */
744 inline su2double* GetCoord_n1(unsigned long iPoint) { return Coord_n1[iPoint]; }
745
746 /*!
747 * \brief Get the coordinates of the control volume at time n+1.
748 * \param[in] iPoint - Index of the point.
749 * \return Volume of the control volume at time n+1
750 */
751 inline su2double* GetCoord_p1(unsigned long iPoint) { return Coord_p1[iPoint]; }
752
753 /*!
754 * \brief Set the coordinates of the control volume at time n to the ones in <i>Coord</i>.
755 */
756 void SetCoord_n();
757
758 /*!
759 * \brief Set the coordinates of the control volume at time n-1 to the ones in <i>Coord_n</i>.
760 */
761 void SetCoord_n1();
762
763 /*!
764 * \brief Set the coordinates of the control volume at time n, for restart cases.
765 * \param[in] iPoint - Index of the point.
766 * \param[in] coord - Value of the grid coordinates at time n.
767 */
768 inline void SetCoord_n(unsigned long iPoint, const su2double* coord) {
769 for (unsigned long iDim = 0; iDim < nDim; iDim++) Coord_n(iPoint, iDim) = coord[iDim];
770 }
771
772 /*!
773 * \brief Set the coordinates of the control volume at time n-1, for restart cases.
774 * \param[in] iPoint - Index of the point.
775 * \param[in] coord - Value of the grid coordinates at time n-1.
776 */
777 inline void SetCoord_n1(unsigned long iPoint, const su2double* coord) {
778 for (unsigned long iDim = 0; iDim < nDim; iDim++) Coord_n1(iPoint, iDim) = coord[iDim];
779 }
780
781 /*!
782 * \brief Set the coordinates of the control volume at time n+1.
783 * \param[in] iPoint - Index of the point.
784 * \param[in] coord - Value of the grid coordinates at time n+1.
785 */
786 inline void SetCoord_p1(unsigned long iPoint, const su2double* coord) {
787 for (unsigned long iDim = 0; iDim < nDim; iDim++) Coord_p1(iPoint, iDim) = coord[iDim];
788 }
789
790 /*!
791 * \brief Get the value of the old coordinates.
792 * \param[in] iPoint - Index of the point.
793 * \return Old coordinates at a point.
794 */
795 inline su2double* GetCoord_Old(unsigned long iPoint) { return Coord_Old[iPoint]; }
796
797 /*!
798 * \brief Set the value of the vector <i>Coord_Old</i>.
799 * \param[in] iPoint - Index of the point.
800 * \param[in] coord_old - Value of the coordinates.
801 */
802 inline void SetCoord_Old(unsigned long iPoint, const su2double* coord_old) {
803 for (unsigned long iDim = 0; iDim < nDim; iDim++) Coord_Old(iPoint, iDim) = coord_old[iDim];
804 }
805
806 /*!
807 * \brief Set the value of the vector <i>Coord_Old</i> to <i>Coord</i>.
808 */
809 void SetCoord_Old();
810
811 /*!
812 * \brief Get the value of the grid velocity at the point.
813 * \param[in] iPoint - Index of the point.
814 * \return Grid velocity at the point.
815 */
816 inline su2double* GetGridVel(unsigned long iPoint) { return GridVel[iPoint]; }
817
818 /*!
819 * \brief Get the grid velocity matrix for the entire domain.
820 */
821 inline const su2activematrix& GetGridVel() const { return GridVel; }
822
823 /*!
824 * \brief Set the value of the grid velocity at the point.
825 * \param[in] iPoint - Index of the point.
826 * \param[in] iDim - Index of the coordinate.
827 * \param[in] gridvel - Value of the grid velocity.
828 */
829 inline void SetGridVel(unsigned long iPoint, unsigned long iDim, su2double gridvel) {
830 GridVel(iPoint, iDim) = gridvel;
831 }
832
833 /*!
834 * \brief Set the value of the grid velocity at the point.
835 * \param[in] iPoint - Index of the point.
836 * \param[in] gridvel - Value of the grid velocity.
837 */
838 inline void SetGridVel(unsigned long iPoint, const su2double* gridvel) {
839 for (unsigned long iDim = 0; iDim < nDim; iDim++) GridVel(iPoint, iDim) = gridvel[iDim];
840 }
841
842 /*!
843 * \brief Get the grid velocity gradients for the entire domain.
844 */
845 inline CVectorOfMatrix& GetGridVel_Grad() { return GridVel_Grad; }
846
847 /*!
848 * \brief Get the value of the grid velocity gradient at the point.
849 * \param[in] iPoint - Index of the point.
850 * \return Grid velocity gradient at the point.
851 */
852 inline CMatrixView<const su2double> GetGridVel_Grad(unsigned long iPoint) const { return GridVel_Grad[iPoint]; }
853
854 /*!
855 * \brief Set the adjoint values of the (geometric) coordinates.
856 * \param[in] iPoint - Index of the point.
857 * \param[in] adj_sol - Adjoint values of the Coord variables.
858 */
859 inline void SetAdjointSolution(unsigned long iPoint, const su2double* adj_sol) {
860 for (unsigned long iDim = 0; iDim < nDim; iDim++)
861 AD::SetDerivative(AD_OutputIndex(iPoint, iDim), SU2_TYPE::GetValue(adj_sol[iDim]));
862 }
863
864 /*!
865 * \brief Get the adjoint values of the (geometric) coordinates.
866 * \param[in] iPoint - Index of the point.
867 * \param[in] iDim - Dimension.
868 */
869 inline su2double GetAdjointSolution(unsigned long iPoint, unsigned long iDim) const {
870 return AD::GetDerivative(AD_InputIndex(iPoint, iDim));
871 }
872
873 /*!
874 * \brief Register coordinates of a point.
875 * \param[in] iPoint - Index of the point.
876 * \param[in] input - Register as input or output.
877 */
878 inline void RegisterCoordinates(unsigned long iPoint, bool input) {
879 for (unsigned long iDim = 0; iDim < nDim; iDim++) {
880 if (input) {
881 AD::RegisterInput(Coord(iPoint, iDim));
882 AD::SetIndex(AD_InputIndex(iPoint, iDim), Coord(iPoint, iDim));
883 } else {
884 AD::RegisterOutput(Coord(iPoint, iDim));
885 AD::SetIndex(AD_OutputIndex(iPoint, iDim), Coord(iPoint, iDim));
886 }
887 }
888 }
889
890 /*!
891 * \brief Set wall roughnesses according to stored closest wall information.
892 * \param[in] roughness - Mapping [rank][zone][marker] -> roughness
893 */
894 template <typename Roughness_type>
895 void SetWallRoughness(Roughness_type const& roughness) {
896 for (unsigned long iPoint = 0; iPoint < GlobalIndex.size(); ++iPoint) {
897 auto rankID = ClosestWall_Rank[iPoint];
898 auto zoneID = ClosestWall_Zone[iPoint];
899 auto markerID = ClosestWall_Marker[iPoint];
900 if (rankID >= 0) {
901 SetRoughnessHeight(iPoint, roughness[rankID][zoneID][markerID]);
902 }
903 }
904 }
905};
A templated matrix/vector-like object.
Definition C2DContainer.hpp:374
size_t size() const noexcept
Definition C2DContainer.hpp:222
CInnerIter getInnerIter(Index_t iOuterIdx) const
Definition graph_toolbox.hpp:226
Index_t getInnerIdx(Index_t iOuterIdx, Index_t iNonZero) const
Definition graph_toolbox.hpp:207
Index_t getNumNonZeros() const
Definition graph_toolbox.hpp:194
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Class to represent a matrix (without owning the data, this just wraps a pointer).
Definition container_decorators.hpp:40
Class for reading a defining the primal grid which is read from the grid file in ....
Definition CPhysicalGeometry.hpp:41
Class for point definition (dual control volumes).
Definition CPoint.hpp:47
void SetPeriodicVolume(unsigned long iPoint, su2double volume)
Set the missing component of area or volume for a control volume on a periodic marker.
Definition CPoint.hpp:587
CMatrixView< const su2double > GetGridVel_Grad(unsigned long iPoint) const
Get the value of the grid velocity gradient at the point.
Definition CPoint.hpp:852
void SetCoord_Old()
Set the value of the vector Coord_Old to Coord.
Definition CPoint.cpp:184
void SetPeriodicBoundary(unsigned long iPoint, bool boundary)
Set if a point belongs to a periodic boundary.
Definition CPoint.hpp:402
su2double * GetCoord_p1(unsigned long iPoint)
Get the coordinates of the control volume at time n+1.
Definition CPoint.hpp:751
void SetPhysicalBoundary(unsigned long iPoint, bool boundary)
Set if a point belong to the boundary.
Definition CPoint.hpp:360
const su2double & GetPeriodicVolume(unsigned long iPoint) const
Definition CPoint.hpp:580
void SetCoord(unsigned long iPoint, const su2double *coord)
Set the point coordinates.
Definition CPoint.hpp:193
su2double * GetCoord_n(unsigned long iPoint)
Get the coordinates of the control volume at time n.
Definition CPoint.hpp:737
void SetMaxLength(unsigned long iPoint, su2double max_length)
Set the max cell-center to cell-center length.
Definition CPoint.hpp:543
void SetBoundary(unsigned long iPoint, unsigned short nMarker)
Set if a point belong to the boundary.
Definition CPoint.hpp:327
void SetCoord_Old(unsigned long iPoint, const su2double *coord_old)
Set the value of the vector Coord_Old.
Definition CPoint.hpp:802
void SetViscousBoundary(unsigned long iPoint, bool boundary)
Set if a point belong to the boundary.
Definition CPoint.hpp:388
void SetnChildren_CV(unsigned long iPoint, unsigned short nchildren_CV)
Set the number of children of an agglomerated control volume.
Definition CPoint.hpp:728
void SetVolume_n()
Set the volume of the control volume at time n.
Definition CPoint.cpp:139
const CCompressedSparsePatternUL & GetPoints() const
Get the entire point adjacency information in compressed format (CSR).
Definition CPoint.hpp:241
void SetnNeighbor(unsigned long iPoint, unsigned short nneighbor)
Set the number of neighbor (artificial dissipation).
Definition CPoint.hpp:459
void SetCoord_n1()
Set the coordinates of the control volume at time n-1 to the ones in Coord_n.
Definition CPoint.cpp:179
void SetPoints(const vector< vector< unsigned long > > &pointsMatrix)
Set the points that compose the control volume.
Definition CPoint.cpp:134
const su2activematrix & GetGridVel() const
Get the grid velocity matrix for the entire domain.
Definition CPoint.hpp:821
void SetWallRoughness(Roughness_type const &roughness)
Set wall roughnesses according to stored closest wall information.
Definition CPoint.hpp:895
CCompressedSparsePatternL::CInnerIter GetEdges(unsigned long iPoint) const
Get inner iterator to loop over neighbor edges.
Definition CPoint.hpp:296
void SetGridVel(unsigned long iPoint, const su2double *gridvel)
Set the value of the grid velocity at the point.
Definition CPoint.hpp:838
void SetCoord_n(unsigned long iPoint, const su2double *coord)
Set the coordinates of the control volume at time n, for restart cases.
Definition CPoint.hpp:768
CCompressedSparsePatternUL::CInnerIter GetPoints(unsigned long iPoint) const
Get inner iterator to loop over neighbor points.
Definition CPoint.hpp:271
CCompressedSparsePatternL::CInnerIter GetElems(unsigned long iPoint) const
Get inner iterator to loop over neighbor elements.
Definition CPoint.hpp:228
CPoint()=delete
Default construction is not allowed.
su2double & GetPeriodicVolume(unsigned long iPoint)
Get the missing component of area or volume for a control volume on a periodic marker.
Definition CPoint.hpp:579
unsigned long GetElem(unsigned long iPoint, unsigned long nelem) const
Get all the elements that compose the control volume.
Definition CPoint.hpp:221
unsigned short GetnNeighbor(unsigned long iPoint) const
Get the number of neighbor of a point.
Definition CPoint.hpp:466
void SetRoughnessHeight(unsigned long iPoint, su2double roughheight)
Set the value of the distance to the nearest wall.
Definition CPoint.hpp:500
void AddCoord(unsigned long iPoint, unsigned long iDim, su2double coord)
Set the coordinates for the control volume.
Definition CPoint.hpp:186
void SetVolume_Old()
Set the Volume to Volume_Old.
Definition CPoint.cpp:149
void SetAgglomerate_Indirect(unsigned long iPoint, bool agglomerate)
Set information about if the indirect neighbors can be agglomerated.
Definition CPoint.hpp:712
void SetChildren_CV(unsigned long iPoint, const vector< unsigned long > &children_CV)
Set all the children control volumes of an agglomerated control volume at once.
Definition CPoint.hpp:664
su2double GetCurvature(unsigned long iPoint) const
Get the value of the curvature at a surface node.
Definition CPoint.hpp:536
su2double GetRoughnessHeight(unsigned long iPoint) const
Get the value of the distance to the nearest wall.
Definition CPoint.hpp:507
unsigned long GetChildren_CV(unsigned long iPoint, unsigned short nchildren_CV) const
Get the children control volume of an agglomerated control volume.
Definition CPoint.hpp:681
void SetCoord_p1(unsigned long iPoint, const su2double *coord)
Set the coordinates of the control volume at time n+1.
Definition CPoint.hpp:786
void SetSolidBoundary(unsigned long iPoint, bool boundary)
Set if a point belong to the solid wall boundary.
Definition CPoint.hpp:374
const su2activematrix & GetCoord() const
Get the entire matrix of coordinates of the control volumes.
Definition CPoint.hpp:170
void SetGlobalIndex(unsigned long iPoint, unsigned long globalindex)
Set the global index in a parallel computation.
Definition CPoint.hpp:445
void SetCurvature(unsigned long iPoint, su2double curvature)
Set the value of the curvature at a surface node.
Definition CPoint.hpp:529
void SetVolume_nM1_Old()
Set the Volume_nM1 to Volume_nM1_Old.
Definition CPoint.cpp:159
unsigned long GetPoint(unsigned long iPoint, unsigned long npoint) const
Get all the points that compose the control volume.
Definition CPoint.hpp:264
void SetVolume_n_Old()
Set the Volume_n to Volume_n_Old.
Definition CPoint.cpp:154
long GetEdge(unsigned long iPoint, unsigned long nedge) const
Get all the edges that compose the control volume.
Definition CPoint.hpp:291
unsigned long GetColor(unsigned long iPoint) const
Get the color of a point, the color indicates to which subdomain the point belong to.
Definition CPoint.hpp:438
void SetChildren_CV(unsigned long iPoint, unsigned long nchildren_CV, unsigned long children_CV)
Set the children control volumes of an agglomerated control volume.
Definition CPoint.hpp:654
void SetDomain(unsigned long iPoint, bool domain)
For parallel computation, its indicates if a point must be computed or not.
Definition CPoint.hpp:416
CVectorOfMatrix & GetGridVel_Grad()
Get the grid velocity gradients for the entire domain.
Definition CPoint.hpp:845
void SetVolume_n_from_OldnM1()
Set the volume of the control volume at time n using n-1.
Definition CPoint.cpp:164
bool GetPeriodicBoundary(unsigned long iPoint) const
Provides information about if a point belongs to a periodic boundary (without MPI).
Definition CPoint.hpp:409
unsigned long GetGlobalIndex(unsigned long iPoint) const
Get the global index in a parallel computation.
Definition CPoint.hpp:452
su2double * GetCoord(unsigned long iPoint)
Get the coordinates of the control volume.
Definition CPoint.hpp:165
void SetVolume_nM1()
Set the volume of the control volume at time n-1.
Definition CPoint.cpp:144
bool GetAgglomerate(unsigned long iPoint) const
Get information about if a control volume has been agglomerated.
Definition CPoint.hpp:698
void SetAdjointSolution(unsigned long iPoint, const su2double *adj_sol)
Set the adjoint values of the (geometric) coordinates.
Definition CPoint.hpp:859
void SetVolume_from_Oldn()
Set the volume of the control volume at current time using time n.
Definition CPoint.cpp:169
void RegisterCoordinates(unsigned long iPoint, bool input)
Register coordinates of a point.
Definition CPoint.hpp:878
su2double GetAdjointSolution(unsigned long iPoint, unsigned long iDim) const
Get the adjoint values of the (geometric) coordinates.
Definition CPoint.hpp:869
long GetVertex(unsigned long iPoint, unsigned long iMarker) const
Get the vertex that compose the control volume for a marker.
Definition CPoint.hpp:316
const su2double & GetSharpEdge_Distance(unsigned long iPoint) const
Definition CPoint.hpp:522
void SetElems(const vector< vector< long > > &elemsMatrix)
Set the elements that are connected to each point.
Definition CPoint.cpp:132
bool GetDomain(unsigned long iPoint) const
For parallel computation, its indicates if a point must be computed or not.
Definition CPoint.hpp:423
const su2double & GetVolume(unsigned long iPoint) const
Definition CPoint.hpp:558
void FullAllocation(unsigned short imesh, const CConfig *config)
Allocate the variables not covered by the minimal constructor.
Definition CPoint.cpp:52
void SetBoundary(unsigned long iPoint, bool boundary)
Mark the point as boundary.
Definition CPoint.hpp:346
unsigned long GetParent_CV(unsigned long iPoint) const
Get the parent control volume of an agglomerated control volume.
Definition CPoint.hpp:673
bool GetPhysicalBoundary(unsigned long iPoint) const
Provides information about if a point belong to the physical boundaries (without MPI).
Definition CPoint.hpp:367
void SetWall_Distance(unsigned long iPoint, su2double distance)
Definition CPoint.hpp:485
su2double GetCoord(unsigned long iPoint, unsigned long iDim) const
Get the coordinates dor the control volume.
Definition CPoint.hpp:158
void AddVolume(unsigned long iPoint, su2double volume)
Adds some area or volume of the CV.
Definition CPoint.hpp:572
void ResetPoints()
Reset the points that compose the control volume.
Definition CPoint.hpp:246
bool GetSolidBoundary(unsigned long iPoint) const
Provides information about if a point belong to the physical boundaries (without MPI).
Definition CPoint.hpp:381
su2double & GetVolume(unsigned long iPoint)
Get area or volume of the control volume.
Definition CPoint.hpp:557
void SetGridVel(unsigned long iPoint, unsigned long iDim, su2double gridvel)
Set the value of the grid velocity at the point.
Definition CPoint.hpp:829
unsigned short GetnPoint(unsigned long iPoint) const
Get the number of points that compose the control volume.
Definition CPoint.hpp:256
bool GetAgglomerate_Indirect(unsigned long iPoint) const
Get information about if the indirect neighbors can be agglomerated.
Definition CPoint.hpp:705
void SetWall_Distance(unsigned long iPoint, su2double distance, int rankID, unsigned short zoneID, unsigned short markerID, unsigned long elemID)
Set the value of the distance to the nearest wall.
Definition CPoint.hpp:477
void SetEdge(unsigned long iPoint, long iedge, unsigned long nedge)
Set the edges that compose the control volume.
Definition CPoint.hpp:281
su2double GetMaxLength(unsigned long iPoint) const
Get the maximum cell-center to cell-center length.
Definition CPoint.hpp:550
su2double GetVolume_n(unsigned long iPoint) const
Get the volume of the control volume at time n.
Definition CPoint.hpp:594
su2double * GetGridVel(unsigned long iPoint)
Get the value of the grid velocity at the point.
Definition CPoint.hpp:816
su2double GetVolume_nM1(unsigned long iPoint) const
Get the volume of the control volume at time n+1.
Definition CPoint.hpp:601
su2double & GetSharpEdge_Distance(unsigned long iPoint)
Get the value of the distance to a sharp edge.
Definition CPoint.hpp:521
void SetVertex(unsigned long iPoint, long iVertex, unsigned long iMarker)
Set the boundary vertex that compose the control volume.
Definition CPoint.hpp:306
void SetColor(unsigned long iPoint, unsigned long color)
Set a color to the point that comes from the grid partitioning.
Definition CPoint.hpp:431
void SetCoord_n()
Set the coordinates of the control volume at time n to the ones in Coord.
Definition CPoint.cpp:174
su2double * GetCoord_Old(unsigned long iPoint)
Get the value of the old coordinates.
Definition CPoint.hpp:795
su2double * GetCoord_n1(unsigned long iPoint)
Get the coordinates of the control volume at time n-1.
Definition CPoint.hpp:744
void ResetElems()
Reset the elements of a control volume.
Definition CPoint.hpp:206
const vector< unsigned long > & GetChildren_CV(unsigned long iPoint) const
Get the children control volumes of an agglomerated control volume. Only the first GetnChildren_CV en...
Definition CPoint.hpp:691
void ResetBoundary(unsigned long iPoint)
Reset the boundary of a control volume.
Definition CPoint.hpp:336
unsigned short GetnElem(unsigned long iPoint) const
Get the number of elements that compose the control volume.
Definition CPoint.hpp:213
su2double & GetWall_Distance(unsigned long iPoint)
Get the value of the distance to the nearest wall.
Definition CPoint.hpp:492
bool GetBoundary(unsigned long iPoint) const
Provides information about if a point belong to the boundaries.
Definition CPoint.hpp:353
bool GetViscousBoundary(unsigned long iPoint) const
Provides information about if a point belong to the physical boundaries (without MPI).
Definition CPoint.hpp:395
void SetCoord(unsigned long iPoint, unsigned long iDim, su2double coord)
Set the coordinates for the control volume.
Definition CPoint.hpp:178
unsigned short GetnChildren_CV(unsigned long iPoint) const
Get the number of children of an agglomerated control volume.
Definition CPoint.hpp:721
void SetParent_CV(unsigned long iPoint, unsigned long parent_CV)
Set the parent control volume of an agglomerated control volume.
Definition CPoint.hpp:643
void SetSharpEdge_Distance(unsigned long iPoint, su2double distance)
Set the value of the distance to a sharp edge.
Definition CPoint.hpp:514
const su2double & GetWall_Distance(unsigned long iPoint) const
Definition CPoint.hpp:493
void SetVolume(unsigned long iPoint, su2double volume)
Set the volume of the control volume.
Definition CPoint.hpp:565
void SetCoord_n1(unsigned long iPoint, const su2double *coord)
Set the coordinates of the control volume at time n-1, for restart cases.
Definition CPoint.hpp:777
passivedouble su2double
Definition code_config.hpp:181
CCompressedSparsePattern< su2int > CCompressedSparsePatternL
Definition graph_toolbox.hpp:338
CCompressedSparsePattern< su2uint > CCompressedSparsePatternUL
Definition graph_toolbox.hpp:337
void RegisterInput(su2double &data)
Registers the variable as an input. I.e. as a leaf of the computational graph.
Definition ad_structure.hpp:101
double GetDerivative(Identifier index)
Extracts the adjoint value at index.
Definition ad_structure.hpp:139
void SetDerivative(Identifier index, const double val)
Sets the adjoint value at index to val.
Definition ad_structure.hpp:132
void SetIndex(Identifier &index, const su2double &data)
Evaluates and saves gradient data from a variable.
Definition ad_structure.hpp:296
void RegisterOutput(su2double &data)
Registers the variable as an output. I.e. as the root of the computational graph.
Definition ad_structure.hpp:107
passivedouble GetValue(const su2double &data)
Get the (primitive) value of the datatype (needs to be specialized for active types).
Definition datatype_structure.hpp:113