Documentation 6b54b78464
Loading...
Searching...
No Matches
CFreeFormDefBox.hpp
Go to the documentation of this file.
1/*!
2 * \file CFreeFormDefBox.hpp
3 * \brief Headers of the CFreeFormDefBox class.
4 * \author F. Palacios & A. Galdran.
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#pragma once
29
30#include "CGridMovement.hpp"
31#include "CFreeFormBlending.hpp"
32
33/*!
34 * \class CFreeFormDefBox
35 * \brief Class for defining the free form FFDBox structure.
36 * \author F. Palacios & A. Galdran.
37 */
39 public:
40 unsigned short nDim; /*!< \brief Number of dimensions of the problem. */
41 unsigned short nCornerPoints, /*!< \brief Number of corner points of the FFDBox. */
42 nControlPoints, nControlPoints_Copy; /*!< \brief Number of control points of the FFDBox. */
43 su2double **Coord_Corner_Points, /*!< \brief Coordinates of the corner points. */
44 ****Coord_Control_Points, /*!< \brief Coordinates of the control points. */
45 ****ParCoord_Control_Points, /*!< \brief Coordinates of the control points. */
46 ****Coord_Control_Points_Copy, /*!< \brief Coordinates of the control points (copy). */
47 ****Coord_SupportCP{nullptr}; /*!< \brief Coordinates of the support control points. */
48 unsigned short lOrder, lOrder_Copy, /*!< \brief Order of the FFDBox in the i direction. */
49 mOrder, mOrder_Copy, /*!< \brief Order of the FFDBox in the j direction. */
50 nOrder, nOrder_Copy; /*!< \brief Order of the FFDBox in the k direction. */
51 unsigned short lDegree, lDegree_Copy, /*!< \brief Degree of the FFDBox in the i direction. (lOrder - 1)*/
52 mDegree, mDegree_Copy, /*!< \brief Degree of the FFDBox in the j direction. (mOrder - 1)*/
53 nDegree, nDegree_Copy; /*!< \brief Degree of the FFDBox in the k direction. (nOrder - 1)*/
54 su2double *ParamCoord, *ParamCoord_, /*!< \brief Parametric coordinates of a point. */
55 *cart_coord, *cart_coord_; /*!< \brief Cartesian coordinates of a point. */
56 su2double ObjFunc; /*!< \brief Objective function of the point inversion process. */
57 su2double* Gradient; /*!< \brief Gradient of the point inversion process. */
58 su2double** Hessian; /*!< \brief Hessian of the point inversion process. */
59 su2double MaxCoord[3]; /*!< \brief Maximum coordinates of the FFDBox. */
60 su2double MinCoord[3]; /*!< \brief Minimum coordinates of the FFDBox. */
61 string Tag; /*!< \brief Tag to identify the FFDBox. */
62 unsigned short Level; /*!< \brief Nested level of the FFD box. */
63
64 vector<su2double> CartesianCoord[3]; /*!< \brief Vector with all the cartesian coordinates in the FFD FFDBox. */
65 vector<su2double> ParametricCoord[3]; /*!< \brief Vector with all the parametrics coordinates in the FFD FFDBox. */
66 vector<unsigned short> MarkerIndex; /*!< \brief Vector with all markers in the FFD FFDBox. */
67 vector<unsigned long> VertexIndex; /*!< \brief Vector with all vertex index in the FFD FFDBox. */
68 vector<unsigned long> PointIndex; /*!< \brief Vector with all points index in the FFD FFDBox. */
69 unsigned long nSurfacePoint; /*!< \brief Number of surfaces in the FFD FFDBox. */
70 vector<string> ParentFFDBox; /*!< \brief Vector with all the parent FFD FFDBox. */
71 vector<string> ChildFFDBox; /*!< \brief Vector with all the child FFD FFDBox. */
72 vector<unsigned short> Fix_IPlane; /*!< \brief Fix FFD I plane. */
73 vector<unsigned short> Fix_JPlane; /*!< \brief Fix FFD J plane. */
74 vector<unsigned short> Fix_KPlane; /*!< \brief Fix FFD K plane. */
75
77
78 public:
79 /*!
80 * \brief Constructor of the class.
81 */
82 CFreeFormDefBox(void);
83
84 /*!
85 * \overload
86 * \param[in] val_lDegree - Degree of the FFDBox in the i direction.
87 * \param[in] val_mDegree - Degree of the FFDBox in the j direction.
88 * \param[in] val_nDegree - Degree of the FFDBox in the k direction.
89 */
90 CFreeFormDefBox(const unsigned short Degree[], unsigned short BSplineOrder[], unsigned short kind_blending);
91
92 /*!
93 * \brief Destructor of the class.
94 */
95 ~CFreeFormDefBox(void) override;
96
97 /*!
98 * \brief Define the I planes to to fix in a FFD box.
99 * \param[in] val_plane - Index of the plane to fix.
100 */
101 inline void Set_Fix_IPlane(unsigned short val_plane) { Fix_IPlane.push_back(val_plane); }
102
103 /*!
104 * \brief Define the I planes to to fix in a FFD box.
105 * \param[in] val_plane - Index of the plane to fix.
106 */
107 inline void Set_Fix_JPlane(unsigned short val_plane) { Fix_JPlane.push_back(val_plane); }
108
109 /*!
110 * \brief Define the I planes to to fix in a FFD box.
111 * \param[in] val_plane - Index of the plane to fix.
112 */
113 inline void Set_Fix_KPlane(unsigned short val_plane) { Fix_KPlane.push_back(val_plane); }
114
115 /*!
116 * \brief Define the I planes to to fix in a FFD box.
117 * \param[in] val_plane - Index of the plane to fix.
118 */
119 inline unsigned short Get_Fix_IPlane(unsigned short val_index) { return Fix_IPlane[val_index]; }
120
121 /*!
122 * \brief Define the I planes to to fix in a FFD box.
123 * \param[in] val_plane - Index of the plane to fix.
124 */
125 inline unsigned short Get_Fix_JPlane(unsigned short val_index) { return Fix_JPlane[val_index]; }
126
127 /*!
128 * \brief Define the I planes to to fix in a FFD box.
129 * \param[in] val_plane - Index of the plane to fix.
130 */
131 inline unsigned short Get_Fix_KPlane(unsigned short val_index) { return Fix_KPlane[val_index]; }
132
133 /*!
134 * \brief Define the I planes to to fix in a FFD box.
135 * \param[in] val_plane - Index of the plane to fix.
136 */
137 inline unsigned short Get_nFix_IPlane(void) const { return Fix_IPlane.size(); }
138
139 /*!
140 * \brief Define the I planes to to fix in a FFD box.
141 * \param[in] val_plane - Index of the plane to fix.
142 */
143 inline unsigned short Get_nFix_JPlane(void) const { return Fix_JPlane.size(); }
144
145 /*!
146 * \brief Define the I planes to to fix in a FFD box.
147 * \param[in] val_plane - Index of the plane to fix.
148 */
149 inline unsigned short Get_nFix_KPlane(void) const { return Fix_KPlane.size(); }
150
151 /*!
152 * \brief Add to the vector of markers a new marker.
153 * \param[in] val_iMarker - New marker inside the FFD box.
154 */
155 inline void Set_MarkerIndex(unsigned short val_iMarker) { MarkerIndex.push_back(val_iMarker); }
156
157 /*!
158 * \brief Add to the vector of vertices a new vertex.
159 * \param[in] val_iVertex - New vertex inside the FFD box.
160 */
161 inline void Set_VertexIndex(unsigned long val_iVertex) { VertexIndex.push_back(val_iVertex); }
162
163 /*!
164 * \brief Add to the vector of points a new point.
165 * \param[in] val_iPoint - New point inside the FFD box.
166 */
167 inline void Set_PointIndex(unsigned long val_iPoint) { PointIndex.push_back(val_iPoint); }
168
169 /*!
170 * \brief Add to the vector of cartesian coordinates a new coordinate.
171 * \param[in] val_coord - New coordinate inside the FFD box.
172 */
173 inline void Set_CartesianCoord(su2double* val_coord) {
174 CartesianCoord[0].push_back(val_coord[0]);
175 CartesianCoord[1].push_back(val_coord[1]);
176 CartesianCoord[2].push_back(val_coord[2]);
177 }
178
179 /*!
180 * \brief Adds to the vector of cartesian coordinates.
181 * \param[in] val_coord - New coord inside FFD box.
182 * \param[in] val_iSurfacePoints - Surface points of FFD box.
183 */
184 inline void Set_CartesianCoord(const su2double* val_coord, unsigned long val_iSurfacePoints) {
185 CartesianCoord[0][val_iSurfacePoints] = val_coord[0];
186 CartesianCoord[1][val_iSurfacePoints] = val_coord[1];
187 CartesianCoord[2][val_iSurfacePoints] = val_coord[2];
188 }
189
190 /*!
191 * \brief Add to the vector of parametric coordinates a new coordinate.
192 * \param[in] val_coord - New coordinate inside the FFD box.
193 */
194 inline void Set_ParametricCoord(su2double* val_coord) {
195 ParametricCoord[0].push_back(val_coord[0]);
196 ParametricCoord[1].push_back(val_coord[1]);
197 ParametricCoord[2].push_back(val_coord[2]);
198 }
199
200 /*!
201 * \brief Add to the vector of parent FFDBoxes a new FFD FFDBox.
202 * \param[in] val_iParentFFDBox - New parent FFDBox in the vector.
203 */
204 inline void SetParentFFDBox(string val_iParentFFDBox) { ParentFFDBox.push_back(val_iParentFFDBox); }
205
206 /*!
207 * \brief Add to the vector of child FFDBoxes a new FFD FFDBox.
208 * \param[in] val_iChildFFDBox - New child FFDBox in the vector.
209 */
210 inline void SetChildFFDBox(string val_iChildFFDBox) { ChildFFDBox.push_back(val_iChildFFDBox); }
211
212 /*!
213 * \brief Adds to the set of Parametric coordinates.
214 * \param[in] val_coord - New coord inside FFD box.
215 * \param[in] val_iSurfacePoints - Surface points of FFD box.
216 */
217 inline void Set_ParametricCoord(const su2double* val_coord, unsigned long val_iSurfacePoints) {
218 ParametricCoord[0][val_iSurfacePoints] = val_coord[0];
219 ParametricCoord[1][val_iSurfacePoints] = val_coord[1];
220 ParametricCoord[2][val_iSurfacePoints] = val_coord[2];
221 }
222
223 /*!
224 * \brief Get index of the marker.
225 * \param[in] val_iSurfacePoints - Surface points of FFD box.
226 */
227 inline unsigned short Get_MarkerIndex(unsigned long val_iSurfacePoints) { return MarkerIndex[val_iSurfacePoints]; }
228
229 /*!
230 * \brief Get index of the marker.
231 * \param[in] Get_VertexIndex - Surface points of FFD box.
232 */
233 inline unsigned long Get_VertexIndex(unsigned long val_iSurfacePoints) { return VertexIndex[val_iSurfacePoints]; }
234
235 /*!
236 * \brief Get index of the point.
237 * \param[in] Get_VertexIndex - Surface points of FFD box.
238 */
239 inline unsigned long Get_PointIndex(unsigned long val_iSurfacePoints) { return PointIndex[val_iSurfacePoints]; }
240
241 /*!
242 * \brief Get Cartesian coordinates.
243 * \param[in] Get_VertexIndex - Surface points of FFD box.
244 */
245 inline su2double* Get_CartesianCoord(unsigned long val_iSurfacePoints) {
246 cart_coord_[0] = CartesianCoord[0][val_iSurfacePoints];
247 cart_coord_[1] = CartesianCoord[1][val_iSurfacePoints];
248 cart_coord_[2] = CartesianCoord[2][val_iSurfacePoints];
249 return cart_coord_;
250 }
251
252 /*!
253 * \brief Get parametric coordinates.
254 * \param[in] Get_VertexIndex - Surface points of FFD box.
255 */
256 inline su2double* Get_ParametricCoord(unsigned long val_iSurfacePoints) {
257 ParamCoord_[0] = ParametricCoord[0][val_iSurfacePoints];
258 ParamCoord_[1] = ParametricCoord[1][val_iSurfacePoints];
259 ParamCoord_[2] = ParametricCoord[2][val_iSurfacePoints];
260 return ParamCoord_;
261 }
262
263 /*!
264 * \brief Get number of surface points.
265 */
266 inline unsigned long GetnSurfacePoint(void) const { return PointIndex.size(); }
267
268 /*!
269 * \brief Get number of parent FFD boxes.
270 */
271 inline unsigned short GetnParentFFDBox(void) const { return ParentFFDBox.size(); }
272
273 /*!
274 * \brief Get number of child FFD boxes.
275 */
276 inline unsigned short GetnChildFFDBox(void) const { return ChildFFDBox.size(); }
277
278 /*!
279 * \brief Get tag of parent FFD box.
280 * \param[in] val_ParentFFDBox - idex of parent FFD box.
281 */
282 inline string GetParentFFDBoxTag(unsigned short val_ParentFFDBox) { return ParentFFDBox[val_ParentFFDBox]; }
283
284 /*!
285 * \brief Get tag of child FFD box.
286 * \param[in] val_ChildFFDBox - index of child FFD box.
287 */
288 inline string GetChildFFDBoxTag(unsigned short val_ChildFFDBox) { return ChildFFDBox[val_ChildFFDBox]; }
289
290 /*!
291 * \brief Change the the position of the corners of the unitary FFDBox,
292 * and find the position of the control points for the FFDBox
293 * \param[in] FFDBox - Original FFDBox where we want to compute the control points.
294 */
296
297 /*!
298 * \brief Set the number of corner points.
299 * \param[in] val_ncornerpoints - Number of corner points.
300 */
301 inline void SetnCornerPoints(unsigned short val_ncornerpoints) { nCornerPoints = val_ncornerpoints; }
302
303 /*!
304 * \brief Get the number of corner points.
305 * \return Number of corner points.
306 */
307 inline unsigned short GetnCornerPoints(void) const { return nCornerPoints; }
308
309 /*!
310 * \brief Get the number of control points.
311 * \return Number of control points.
312 */
313 inline unsigned short GetnControlPoints(void) const { return nControlPoints; }
314
315 /*!
316 * \brief Get the number of control points.
317 * \return Number of control points.
318 */
320
321 /*!
322 * \brief Get the number of numerical points on the surface.
323 * \return Number of numerical points on the surface.
324 */
325 inline unsigned long GetnSurfacePoints(void) { return 0; }
326
327 /*!
328 * \brief Set the corner point for the unitary FFDBox.
329 */
330 void SetUnitCornerPoints(void);
331
332 /*!
333 * \brief Set the coordinates of the corner points.
334 * \param[in] val_coord - Coordinates of the corner point with index <i>val_icornerpoints</i>.
335 * \param[in] val_icornerpoints - Index of the corner point.
336 */
337 inline void SetCoordCornerPoints(const su2double* val_coord, unsigned short val_icornerpoints) {
338 for (unsigned short iDim = 0; iDim < nDim; iDim++) Coord_Corner_Points[val_icornerpoints][iDim] = val_coord[iDim];
339 }
340
341 /*!
342 * \overload
343 * \param[in] val_xcoord - X coordinate of the corner point with index <i>val_icornerpoints</i>.
344 * \param[in] val_ycoord - Y coordinate of the corner point with index <i>val_icornerpoints</i>.
345 * \param[in] val_zcoord - Z coordinate of the corner point with index <i>val_icornerpoints</i>.
346 * \param[in] val_icornerpoints - Index of the corner point.
347 */
348 inline void SetCoordCornerPoints(su2double val_xcoord, su2double val_ycoord, su2double val_zcoord,
349 unsigned short val_icornerpoints) {
350 Coord_Corner_Points[val_icornerpoints][0] = val_xcoord;
351 Coord_Corner_Points[val_icornerpoints][1] = val_ycoord;
352 Coord_Corner_Points[val_icornerpoints][2] = val_zcoord;
353 }
354
355 /*!
356 * \brief Set the coordinates of the control points.
357 * \param[in] val_coord - Coordinates of the control point.
358 * \param[in] iDegree - Index of the FFDBox, i direction.
359 * \param[in] jDegree - Index of the FFDBox, j direction.
360 * \param[in] kDegree - Index of the FFDBox, k direction.
361 */
362 inline void SetCoordControlPoints(const su2double* val_coord, unsigned short iDegree, unsigned short jDegree,
363 unsigned short kDegree) {
364 for (unsigned short iDim = 0; iDim < nDim; iDim++) {
365 Coord_Control_Points[iDegree][jDegree][kDegree][iDim] = val_coord[iDim];
366 }
367 }
368
369 /*!
370 * \brief Set the coordinates of the control points.
371 * \param[in] val_coord - Coordinates of the control point.
372 * \param[in] iDegree - Index of the FFDBox, i direction.
373 * \param[in] jDegree - Index of the FFDBox, j direction.
374 * \param[in] kDegree - Index of the FFDBox, k direction.
375 */
376 inline void SetCoordControlPoints_Copy(const su2double* val_coord, unsigned short iDegree, unsigned short jDegree,
377 unsigned short kDegree) {
378 for (unsigned short iDim = 0; iDim < nDim; iDim++) {
379 Coord_Control_Points_Copy[iDegree][jDegree][kDegree][iDim] = val_coord[iDim];
380 }
381 }
382
383 /*!
384 * \brief Set the coordinates of the control points.
385 * \param[in] val_coord - Coordinates of the control point.
386 * \param[in] iDegree - Index of the FFDBox, i direction.
387 * \param[in] jDegree - Index of the FFDBox, j direction.
388 * \param[in] kDegree - Index of the FFDBox, k direction.
389 */
390 inline void SetParCoordControlPoints(const su2double* val_coord, unsigned short iDegree, unsigned short jDegree,
391 unsigned short kDegree) {
392 for (unsigned short iDim = 0; iDim < nDim; iDim++)
393 ParCoord_Control_Points[iDegree][jDegree][kDegree][iDim] = val_coord[iDim];
394 }
395
396 /*!
397 * \brief Get the coordinates of the corner points.
398 * \param[in] val_dim - Index of the coordinate (x, y, z).
399 * \param[in] val_icornerpoints - Index of the corner point.
400 * \return Coordinate <i>val_dim</i> of the corner point <i>val_icornerpoints</i>.
401 */
402 inline su2double GetCoordCornerPoints(unsigned short val_dim, unsigned short val_icornerpoints) const {
403 return Coord_Corner_Points[val_icornerpoints][val_dim];
404 }
405
406 /*!
407 * \brief Get the coordinates of the corner points.
408 * \param[in] val_icornerpoints - Index of the corner point.
409 * \return Pointer to the coordinate vector of the corner point <i>val_icornerpoints</i>.
410 */
411 inline su2double* GetCoordCornerPoints(unsigned short val_icornerpoints) const {
412 return Coord_Corner_Points[val_icornerpoints];
413 }
414
415 /*!
416 * \brief Get the coordinates of the control point.
417 * \param[in] val_iindex - Value of the local i index of the control point.
418 * \param[in] val_jindex - Value of the local j index of the control point.
419 * \param[in] val_kindex - Value of the local k index of the control point.
420 * \return Pointer to the coordinate vector of the control point with local index (i, j, k).
421 */
422 inline su2double* GetCoordControlPoints(unsigned short val_iindex, unsigned short val_jindex,
423 unsigned short val_kindex) const {
424 return Coord_Control_Points[val_iindex][val_jindex][val_kindex];
425 }
426
427 /*!
428 * \brief Get the parametric coordinates of the control point.
429 * \param[in] val_iindex - Value of the local i index of the control point.
430 * \param[in] val_jindex - Value of the local j index of the control point.
431 * \param[in] val_kindex - Value of the local k index of the control point.
432 * \return Pointer to the coordinate vector of the control point with local index (i, j, k).
433 */
434 inline su2double* GetParCoordControlPoints(unsigned short val_iindex, unsigned short val_jindex,
435 unsigned short val_kindex) const {
436 return ParCoord_Control_Points[val_iindex][val_jindex][val_kindex];
437 }
438
439 /*!
440 * \brief Set the control points in a parallelepiped (hexahedron).
441 */
443
444 /*!
445 * \brief Set the control points of the final chuck in a unitary hexahedron free form.
446 * \param[in] FFDBox - Original FFDBox where we want to compute the control points.
447 */
448 void SetSupportCP(CFreeFormDefBox* FFDBox);
449
450 /*!
451 * \brief Set the new value of the coordinates of the control points.
452 * \param[in] val_index - Local index (i, j, k) of the control point.
453 * \param[in] movement - Movement of the control point.
454 */
455 inline void SetControlPoints(const unsigned short* val_index, const su2double* movement) {
456 for (unsigned short iDim = 0; iDim < nDim; iDim++)
457 Coord_Control_Points[val_index[0]][val_index[1]][val_index[2]][iDim] += movement[iDim];
458 }
459
460 /*!
461 * \brief Set the original value of the control points.
462 */
464 for (unsigned short iDegree = 0; iDegree <= lDegree_Copy; iDegree++)
465 for (unsigned short jDegree = 0; jDegree <= mDegree_Copy; jDegree++)
466 for (unsigned short kDegree = 0; kDegree <= nDegree_Copy; kDegree++)
467 for (unsigned short iDim = 0; iDim < nDim; iDim++)
468 Coord_Control_Points[iDegree][jDegree][kDegree][iDim] =
469 Coord_Control_Points_Copy[iDegree][jDegree][kDegree][iDim];
470
478 }
479
480 /*!
481 * \brief Set the tecplot file of the FFD chuck structure.
482 * \param[in] iFFDBox - Index of the FFD box.
483 * \param[in] original - Original box (before deformation).
484 */
485 void SetTecplot(CGeometry* geometry, unsigned short iFFDBox, bool original);
486
487 /*!
488 * \brief Set the paraview file of the FFD chuck structure.
489 * \param[in] iFFDBox - Index of the FFD box.
490 * \param[in] original - Original box (before deformation).
491 */
492 void SetParaview(CGeometry* geometry, unsigned short iFFDBox, bool original);
493
494 /*!
495 * \brief Set the CGNS file of the FFD chuck structure.
496 * \param[in] iFFDBox - Index of the FFD box.
497 * \param[in] original - Original box (before deformation).
498 */
499 void SetCGNS(CGeometry* geometry, unsigned short iFFDBox, bool original);
500
501 /*!
502 * \brief Set Cylindrical to Cartesians_ControlPoints.
503 * \param[in] config - Definition of the particular problem.
504 */
506
507 /*!
508 * \brief Set Cartesians to Cylindrical ControlPoints.
509 * \param[in] config - Definition of the particular problem.
510 */
512
513 /*!
514 * \brief Set Cylindrical to Cartesians_CornerPoints.
515 * \param[in] config - Definition of the particular problem.
516 */
517 void SetCyl2Cart_CornerPoints(CConfig* config);
518
519 /*!
520 * \brief Set Cartesians to Cylindrical CornerPoints.
521 * \param[in] config - Definition of the particular problem.
522 */
523 void SetCart2Cyl_CornerPoints(CConfig* config);
524
525 /*!
526 * \brief Set Spherical to Cartesians ControlPoints.
527 * \param[in] config - Definition of the particular problem.
528 */
530
531 /*!
532 * \brief SetCartesians to Spherical ControlPoints.
533 * \param[in] config - Definition of the particular problem.
534 */
536
537 /*!
538 * \brief Set Spherical to Cartesians_CornerPoints.
539 * \param[in] config - Definition of the particular problem.
540 */
542
543 /*!
544 * \brief Set Cartesians to Spherical Corner Points.
545 * \param[in] config - Definition of the particular problem.
546 */
548
549 /*!
550 * \brief Set the cartesian coords of a point in R^3 and convert them to the parametric coords of
551 * our parametrization of a paralellepiped.
552 * \param[in] cart_coord - Cartesian coordinates of a point.
553 * \return Pointer to the parametric coordinates of a point.
554 */
556
557 /*!
558 * \brief Iterative strategy for computing the parametric coordinates.
559 * \param[in] xyz - Cartesians coordinates of the target point.
560 * \param[in] guess - Initial guess for doing the parametric coordinates search.
561 * \param[in] tol - Level of convergence of the iterative method.
562 * \param[in] it_max - Maximal number of iterations.
563 * \return Parametric coordinates of the point.
564 */
565 su2double* GetParametricCoord_Iterative(unsigned long iPoint, su2double* xyz, const su2double* guess,
566 CConfig* config);
567
568 /*!
569 * \brief Compute the cross product.
570 * \param[in] v1 - First input vector.
571 * \param[in] v2 - Second input vector.
572 * \param[out] v3 - Output vector wuth the cross product.
573 */
574 inline void CrossProduct(const su2double* v1, const su2double* v2, su2double* v3) {
575 v3[0] = v1[1] * v2[2] - v1[2] * v2[1];
576 v3[1] = v1[2] * v2[0] - v1[0] * v2[2];
577 v3[2] = v1[0] * v2[1] - v1[1] * v2[0];
578 }
579
580 /*!
581 * \brief Compute the doc product.
582 * \param[in] v1 - First input vector.
583 * \param[in] v2 - Sencond input vector.
584 * \return Dot product between <i>v1</i>, and <i>v2</i>.
585 */
586 inline su2double DotProduct(const su2double* v1, const su2double* v2) {
587 su2double scalar = v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
588 return scalar;
589 }
590
591 /*!
592 * \brief Here we take the parametric coords of a point in the box and we convert them to the
593 * physical cartesian coords by plugging the ParamCoords on the Bezier parameterization of our box.
594 * \param[in] ParamCoord - Parametric coordinates of a point.
595 * \return Pointer to the cartesian coordinates of a point.
596 */
598
599 /*!
600 * \brief Get the order in the l direction of the FFD FFDBox.
601 * \return Order in the l direction of the FFD FFDBox.
602 */
603 inline unsigned short GetlOrder(void) const { return lOrder; }
604
605 /*!
606 * \brief Get the order in the m direction of the FFD FFDBox.
607 * \return Order in the m direction of the FFD FFDBox.
608 */
609 inline unsigned short GetmOrder(void) const { return mOrder; }
610
611 /*!
612 * \brief Get the order in the n direction of the FFD FFDBox.
613 * \return Order in the n direction of the FFD FFDBox.
614 */
615 inline unsigned short GetnOrder(void) const { return nOrder; }
616
617 /*!
618 * \brief Get the order in the l direction of the FFD FFDBox.
619 * \return Order in the l direction of the FFD FFDBox.
620 */
621 inline void SetlOrder(unsigned short val_lOrder) {
622 lOrder = val_lOrder;
623 lDegree = lOrder - 1;
624 }
625
626 /*!
627 * \brief Get the order in the m direction of the FFD FFDBox.
628 * \return Order in the m direction of the FFD FFDBox.
629 */
630 inline void SetmOrder(unsigned short val_mOrder) {
631 mOrder = val_mOrder;
632 mDegree = mOrder - 1;
633 }
634
635 /*!
636 * \brief Get the order in the n direction of the FFD FFDBox.
637 * \return Order in the n direction of the FFD FFDBox.
638 */
639 inline void SetnOrder(unsigned short val_nOrder) {
640 nOrder = val_nOrder;
641 nDegree = nOrder - 1;
642 }
643
644 /*!
645 * \brief Returns true if the point is inside the FFD.
646 * \param[in] coord - Coordinate of the point to check.
647 */
648 bool CheckPointInsideFFD(const su2double* coord) const;
649
650 /*!
651 * \brief Set the zone of the computational domain that is going to be deformed.
652 * \param[in] geometry - Geometrical definition of the problem.
653 * \param[in] config - Definition of the particular problem.
654 * \param[in] iFFDBox - Index of the FFDBox.
655 */
656 // this routine is not used. We should consider deleting it.
657 void SetDeformationZone(CGeometry* geometry, CConfig* config, unsigned short iFFDBox) const;
658
659 /*!
660 * \brief The routine computes the gradient of F(u, v, w) = ||X(u, v, w)-(x, y, z)||^2 evaluated at (u, v, w).
661 * \param[in] val_coord - Parametric coordiates of the target point.
662 * \param[in] xyz - Cartesians coordinates of the point.
663 * \param[in] analytical - Compute the analytical gradient.
664 * \return Value of the analytical gradient.
665 */
666 su2double* GetFFDGradient(su2double* val_coord, su2double* xyz);
667
668 /*!
669 * \brief The routine that computes the Hessian of F(u, v, w) = ||X(u, v, w)-(x, y, z)||^2 evaluated at (u, v, w)
670 * Input: (u, v, w), (x, y, z)
671 * Output: Hessian F (u, v, w).
672 * \param[in] uvw - Current value of the parametrics coordinates.
673 * \param[in] xyz - Cartesians coordinates of the target point to compose the functional.
674 * \param[in] val_Hessian - Value of the hessian.
675 */
676 void GetFFDHessian(su2double* uvw, su2double* xyz, su2double** val_Hessian);
677
678 /*!
679 * \brief An auxiliary routine to help us compute the gradient of F(u, v, w) = ||X(u, v, w)-(x, y, z)||^2 =
680 * (Sum_ijk^lmn P1_ijk Bi Bj Bk -x)^2+(Sum_ijk^lmn P2_ijk Bi Bj Bk -y)^2+(Sum_ijk^lmn P3_ijk Bi Bj Bk -z)^2
681 * Input: val_t, val_diff (to identify the index of the Bernstein polynomail we differentiate), the i, j, k ,
682 * l, m, n E.G.: val_diff=2 => we differentiate w.r.t. w (val_diff=0,1, or 2) Output: d [B_i^l*B_j^m *B_k^n] / d
683 * val_diff (val_u, val_v, val_w). \param[in] uvw - __________. \param[in] val_diff - __________. \param[in] ijk -
684 * __________. \param[in] lmn - Degree of the FFD box. \return __________.
685 */
686 su2double GetDerivative1(su2double* uvw, unsigned short val_diff, unsigned short* ijk, unsigned short* lmn) const;
687
688 /*!
689 * \brief An auxiliary routine to help us compute the gradient of F(u, v, w) = ||X(u, v, w)-(x, y, z)||^2 =
690 * (Sum_ijk^lmn P1_ijk Bi Bj Bk -x)^2+(Sum_ijk^lmn P2_ijk Bi Bj Bk -y)^2+(Sum_ijk^lmn P3_ijk Bi Bj Bk -z)^2
691 * Input: (u, v, w), dim , xyz=(x, y, z), l, m, n E.G.: dim=2 => we use the third coordinate of the control
692 * points, and the z-coordinate of xyz (0<=dim<=2) Output: 2* ( (Sum_{i, j, k}^l, m, n P_{ijk}[dim] B_i^l[u] B_j^m[v]
693 * B_k^n[w]) - xyz[dim]). \param[in] uvw - __________. \param[in] dim - __________. \param[in] xyz - __________.
694 * \param[in] lmn - Degree of the FFD box.
695 * \return __________.
696 */
697 su2double GetDerivative2(su2double* uvw, unsigned short dim, const su2double* xyz, const unsigned short* lmn) const;
698
699 /*!
700 * \brief An auxiliary routine to help us compute the gradient of F(u, v, w) = ||X(u, v, w)-(x, y, z)||^2 =
701 * (Sum_ijk^lmn P1_ijk Bi Bj Bk -x)^2+(Sum_ijk^lmn P2_ijk Bi Bj Bk -y)+(Sum_ijk^lmn P3_ijk Bi Bj Bk -z)
702 * \param[in] uvw - Parametric coordiates of the point.
703 * \param[in] dim - Value of the coordinate to be differentiate.
704 * \param[in] diff_this - Diferentiation with respect this coordinate.
705 * \param[in] lmn - Degree of the FFD box.
706 * \return Sum_{i, j, k}^{l, m, n} [one of them with -1,
707 * depending on diff_this=0,1 or 2] P_{ijk}[dim] * (B_i^l[u] B_j^m[v] B_k^n[w])--one of them diffrentiated;
708 * which? diff_thiss will tell us ; E.G.: dim=2, diff_this=1 => we use the third coordinate of the control
709 * points, and derivate de v-Bersntein polynomial (use m-1 when summing!!).
710 */
711 su2double GetDerivative3(su2double* uvw, unsigned short dim, unsigned short diff_this, unsigned short* lmn) const;
712
713 /*!
714 * \brief An auxiliary routine to help us compute the Hessian of F(u, v, w) = ||X(u, v, w)-(x, y, z)||^2 =
715 * (Sum_ijk^lmn P1_ijk Bi Bj Bk -x)^2+(Sum_ijk^lmn P2_ijk Bi Bj Bk -y)+(Sum_ijk^lmn P3_ijk Bi Bj Bk -z)
716 * Input: val_t, val_diff, val_diff2 (to identify the index of the Bernstein polynomials we differentiate), the
717 * i, j, k , l, m, n E.G.: val_diff=1, val_diff2=2 => we differentiate w.r.t. v and w (val_diff=0,1, or 2) E.G.:
718 * val_diff=0, val_diff2=0 => we differentiate w.r.t. u two times Output: [d [B_i^l*B_j^m *B_k^n]/d val_diff *d
719 * [B_i^l*B_j^m *B_k^n]/d val_diff2] (val_u, val_v, val_w) . \param[in] uvw - __________. \param[in] val_diff -
720 * __________. \param[in] val_diff2 - __________. \param[in] ijk - __________. \param[in] lmn - Degree of the FFD box.
721 * \return __________.
722 */
723 su2double GetDerivative4(su2double* uvw, unsigned short val_diff, unsigned short val_diff2, unsigned short* ijk,
724 unsigned short* lmn) const;
725
726 /*!
727 * \brief An auxiliary routine to help us compute the Hessian of F(u, v, w) = ||X(u, v, w)-(x, y, z)||^2 =
728 * (Sum_ijk^lmn P1_ijk Bi Bj Bk -x)^2+(Sum_ijk^lmn P2_ijk Bi Bj Bk -y)+(Sum_ijk^lmn P3_ijk Bi Bj Bk -z)
729 * Input: (u, v, w), dim , diff_this, diff_this_also, xyz=(x, y, z), l, m, n
730 * Output:
731 * Sum_{i, j, k}^{l, m, n} [two of them with -1, depending on diff_this, diff_this_also=0,1 or 2]
732 * P_{ijk}[dim] * (B_i^l[u] B_j^m[v] B_k^n[w])--one of them diffrentiated; which? diff_thiss will tell us ;
733 * E.G.: dim=2, diff_this=1 => we use the third coordinate of the control points, and derivate de v-Bersntein
734 * polynomial (use m-1 when summing!!).
735 * \param[in] uvw - __________.
736 * \param[in] dim - __________.
737 * \param[in] diff_this - __________.
738 * \param[in] diff_this_also - __________.
739 * \param[in] lmn - Degree of the FFD box.
740 * \return __________.
741 */
742 su2double GetDerivative5(su2double* uvw, unsigned short dim, unsigned short diff_this, unsigned short diff_this_also,
743 unsigned short* lmn) const;
744
745 /*!
746 * \brief Euclidean norm of a vector.
747 * \param[in] a - _______.
748 * \return __________.
749 */
750 inline su2double GetNorm(const su2double* a) {
751 su2double norm = sqrt(a[0] * a[0] + a[1] * a[1] + a[2] * a[2]);
752 return norm;
753 }
754
755 /*!
756 * \brief Set the tag that identify a FFDBox.
757 * \param[in] val_tag - value of the tag.
758 */
759 inline void SetTag(string val_tag) { Tag = val_tag; }
760
761 /*!
762 * \brief Get the tag that identify a FFDBox.
763 * \return Value of the tag that identigy the FFDBox.
764 */
765 inline string GetTag() const { return Tag; }
766
767 /*!
768 * \brief Set the nested level of the FFDBox.
769 * \param[in] val_level - value of the level.
770 */
771 inline void SetLevel(unsigned short val_level) { Level = val_level; }
772
773 /*!
774 * \brief Get the nested level of the FFDBox.
775 * \return Value of the nested level of the the FFDBox.
776 */
777 inline unsigned short GetLevel() const { return Level; }
778};
Headers of the CFreeFormBlending class. It is the parent class for the FFD blending function.
Headers of the CGridMovement class.
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Class that defines the particular kind of blending function for the free form deformation.
Definition CFreeFormBlending.hpp:39
Class for defining the free form FFDBox structure.
Definition CFreeFormDefBox.hpp:38
su2double GetDerivative1(su2double *uvw, unsigned short val_diff, unsigned short *ijk, unsigned short *lmn) const
An auxiliary routine to help us compute the gradient of F(u, v, w) = ||X(u, v, w)-(x,...
Definition CFreeFormDefBox.cpp:1059
unsigned long Get_PointIndex(unsigned long val_iSurfacePoints)
Get index of the point.
Definition CFreeFormDefBox.hpp:239
CFreeFormDefBox(void)
Constructor of the class.
Definition CFreeFormDefBox.cpp:33
su2double GetDerivative5(su2double *uvw, unsigned short dim, unsigned short diff_this, unsigned short diff_this_also, unsigned short *lmn) const
An auxiliary routine to help us compute the Hessian of F(u, v, w) = ||X(u, v, w)-(x,...
Definition CFreeFormDefBox.cpp:1128
unsigned short GetnChildFFDBox(void) const
Get number of child FFD boxes.
Definition CFreeFormDefBox.hpp:276
su2double * cart_coord_
Cartesian coordinates of a point.
Definition CFreeFormDefBox.hpp:55
void SetnCornerPoints(unsigned short val_ncornerpoints)
Set the number of corner points.
Definition CFreeFormDefBox.hpp:301
unsigned short mOrder
Definition CFreeFormDefBox.hpp:49
void SetnOrder(unsigned short val_nOrder)
Get the order in the n direction of the FFD FFDBox.
Definition CFreeFormDefBox.hpp:639
su2double GetCoordCornerPoints(unsigned short val_dim, unsigned short val_icornerpoints) const
Get the coordinates of the corner points.
Definition CFreeFormDefBox.hpp:402
void SetCoordCornerPoints(su2double val_xcoord, su2double val_ycoord, su2double val_zcoord, unsigned short val_icornerpoints)
Definition CFreeFormDefBox.hpp:348
su2double * ParamCoord
Definition CFreeFormDefBox.hpp:54
void SetSupportCP(CFreeFormDefBox *FFDBox)
Set the control points of the final chuck in a unitary hexahedron free form.
Definition CFreeFormDefBox.cpp:227
void Set_Fix_JPlane(unsigned short val_plane)
Define the I planes to to fix in a FFD box.
Definition CFreeFormDefBox.hpp:107
unsigned short nCornerPoints
Number of corner points of the FFDBox.
Definition CFreeFormDefBox.hpp:41
void SetSphe2Cart_ControlPoints(CConfig *config)
Set Spherical to Cartesians ControlPoints.
Definition CFreeFormDefBox.cpp:481
su2double * Get_ParametricCoord(unsigned long val_iSurfacePoints)
Get parametric coordinates.
Definition CFreeFormDefBox.hpp:256
unsigned short GetnParentFFDBox(void) const
Get number of parent FFD boxes.
Definition CFreeFormDefBox.hpp:271
vector< unsigned short > Fix_IPlane
Fix FFD I plane.
Definition CFreeFormDefBox.hpp:72
unsigned long Get_VertexIndex(unsigned long val_iSurfacePoints)
Get index of the marker.
Definition CFreeFormDefBox.hpp:233
su2double * GetCoordCornerPoints(unsigned short val_icornerpoints) const
Get the coordinates of the corner points.
Definition CFreeFormDefBox.hpp:411
su2double ObjFunc
Objective function of the point inversion process.
Definition CFreeFormDefBox.hpp:56
su2double * GetFFDGradient(su2double *val_coord, su2double *xyz)
The routine computes the gradient of F(u, v, w) = ||X(u, v, w)-(x, y, z)||^2 evaluated at (u,...
Definition CFreeFormDefBox.cpp:832
void SetnControlPoints(void)
Get the number of control points.
Definition CFreeFormDefBox.hpp:319
su2double GetNorm(const su2double *a)
Euclidean norm of a vector.
Definition CFreeFormDefBox.hpp:750
void SetDeformationZone(CGeometry *geometry, CConfig *config, unsigned short iFFDBox) const
Set the zone of the computational domain that is going to be deformed.
su2double DotProduct(const su2double *v1, const su2double *v2)
Compute the doc product.
Definition CFreeFormDefBox.hpp:586
unsigned short nOrder_Copy
Order of the FFDBox in the k direction.
Definition CFreeFormDefBox.hpp:50
vector< string > ChildFFDBox
Vector with all the child FFD FFDBox.
Definition CFreeFormDefBox.hpp:71
unsigned short Get_Fix_IPlane(unsigned short val_index)
Define the I planes to to fix in a FFD box.
Definition CFreeFormDefBox.hpp:119
void SetLevel(unsigned short val_level)
Set the nested level of the FFDBox.
Definition CFreeFormDefBox.hpp:771
vector< unsigned short > MarkerIndex
Vector with all markers in the FFD FFDBox.
Definition CFreeFormDefBox.hpp:66
su2double **** ParCoord_Control_Points
Coordinates of the control points.
Definition CFreeFormDefBox.hpp:45
void SetParentFFDBox(string val_iParentFFDBox)
Add to the vector of parent FFDBoxes a new FFD FFDBox.
Definition CFreeFormDefBox.hpp:204
su2double ** Coord_Corner_Points
Coordinates of the corner points.
Definition CFreeFormDefBox.hpp:43
void SetParCoordControlPoints(const su2double *val_coord, unsigned short iDegree, unsigned short jDegree, unsigned short kDegree)
Set the coordinates of the control points.
Definition CFreeFormDefBox.hpp:390
su2double * Get_CartesianCoord(unsigned long val_iSurfacePoints)
Get Cartesian coordinates.
Definition CFreeFormDefBox.hpp:245
unsigned short lOrder_Copy
Order of the FFDBox in the i direction.
Definition CFreeFormDefBox.hpp:48
bool CheckPointInsideFFD(const su2double *coord) const
Returns true if the point is inside the FFD.
Definition CFreeFormDefBox.cpp:1019
void SetmOrder(unsigned short val_mOrder)
Get the order in the m direction of the FFD FFDBox.
Definition CFreeFormDefBox.hpp:630
void SetCart2Cyl_ControlPoints(CConfig *config)
Set Cartesians to Cylindrical ControlPoints.
Definition CFreeFormDefBox.cpp:315
string Tag
Tag to identify the FFDBox.
Definition CFreeFormDefBox.hpp:61
void SetTag(string val_tag)
Set the tag that identify a FFDBox.
Definition CFreeFormDefBox.hpp:759
void SetCoordCornerPoints(const su2double *val_coord, unsigned short val_icornerpoints)
Set the coordinates of the corner points.
Definition CFreeFormDefBox.hpp:337
su2double * GetParCoordControlPoints(unsigned short val_iindex, unsigned short val_jindex, unsigned short val_kindex) const
Get the parametric coordinates of the control point.
Definition CFreeFormDefBox.hpp:434
void SetCGNS(CGeometry *geometry, unsigned short iFFDBox, bool original)
Set the CGNS file of the FFD chuck structure.
Definition CFreeFormDefBox.cpp:557
su2double ** Hessian
Hessian of the point inversion process.
Definition CFreeFormDefBox.hpp:58
unsigned short Get_nFix_KPlane(void) const
Define the I planes to to fix in a FFD box.
Definition CFreeFormDefBox.hpp:149
unsigned short GetlOrder(void) const
Get the order in the l direction of the FFD FFDBox.
Definition CFreeFormDefBox.hpp:603
void SetCart2Sphe_CornerPoints(CConfig *config)
Set Cartesians to Spherical Corner Points.
Definition CFreeFormDefBox.cpp:513
void SetTecplot(CGeometry *geometry, unsigned short iFFDBox, bool original)
Set the tecplot file of the FFD chuck structure.
Definition CFreeFormDefBox.cpp:657
vector< unsigned short > Fix_JPlane
Fix FFD J plane.
Definition CFreeFormDefBox.hpp:73
su2double * ParamCoord_
Parametric coordinates of a point.
Definition CFreeFormDefBox.hpp:54
void SetChildFFDBox(string val_iChildFFDBox)
Add to the vector of child FFDBoxes a new FFD FFDBox.
Definition CFreeFormDefBox.hpp:210
void Set_MarkerIndex(unsigned short val_iMarker)
Add to the vector of markers a new marker.
Definition CFreeFormDefBox.hpp:155
unsigned short nControlPoints
Definition CFreeFormDefBox.hpp:42
void SetCart2Cyl_CornerPoints(CConfig *config)
Set Cartesians to Cylindrical CornerPoints.
Definition CFreeFormDefBox.cpp:391
void SetUnitCornerPoints(void)
Set the corner point for the unitary FFDBox.
Definition CFreeFormDefBox.cpp:154
void Set_CartesianCoord(const su2double *val_coord, unsigned long val_iSurfacePoints)
Adds to the vector of cartesian coordinates.
Definition CFreeFormDefBox.hpp:184
unsigned short lDegree
Definition CFreeFormDefBox.hpp:51
void SetlOrder(unsigned short val_lOrder)
Get the order in the l direction of the FFD FFDBox.
Definition CFreeFormDefBox.hpp:621
string GetTag() const
Get the tag that identify a FFDBox.
Definition CFreeFormDefBox.hpp:765
void Set_ParametricCoord(su2double *val_coord)
Add to the vector of parametric coordinates a new coordinate.
Definition CFreeFormDefBox.hpp:194
void SetCyl2Cart_ControlPoints(CConfig *config)
Set Cylindrical to Cartesians_ControlPoints.
Definition CFreeFormDefBox.cpp:359
vector< unsigned long > PointIndex
Vector with all points index in the FFD FFDBox.
Definition CFreeFormDefBox.hpp:68
vector< unsigned long > VertexIndex
Vector with all vertex index in the FFD FFDBox.
Definition CFreeFormDefBox.hpp:67
su2double **** Coord_Control_Points_Copy
Coordinates of the control points (copy).
Definition CFreeFormDefBox.hpp:46
void SetCyl2Cart_CornerPoints(CConfig *config)
Set Cylindrical to Cartesians_CornerPoints.
Definition CFreeFormDefBox.cpp:413
void Set_Fix_IPlane(unsigned short val_plane)
Define the I planes to to fix in a FFD box.
Definition CFreeFormDefBox.hpp:101
~CFreeFormDefBox(void) override
Destructor of the class.
Definition CFreeFormDefBox.cpp:111
vector< unsigned short > Fix_KPlane
Fix FFD K plane.
Definition CFreeFormDefBox.hpp:74
unsigned short GetnOrder(void) const
Get the order in the n direction of the FFD FFDBox.
Definition CFreeFormDefBox.hpp:615
void Set_PointIndex(unsigned long val_iPoint)
Add to the vector of points a new point.
Definition CFreeFormDefBox.hpp:167
CFreeFormBlending ** BlendingFunction
Definition CFreeFormDefBox.hpp:76
void SetOriginalControlPoints()
Set the original value of the control points.
Definition CFreeFormDefBox.hpp:463
vector< string > ParentFFDBox
Vector with all the parent FFD FFDBox.
Definition CFreeFormDefBox.hpp:70
unsigned long nSurfacePoint
Number of surfaces in the FFD FFDBox.
Definition CFreeFormDefBox.hpp:69
unsigned short mOrder_Copy
Order of the FFDBox in the j direction.
Definition CFreeFormDefBox.hpp:49
unsigned short Get_nFix_IPlane(void) const
Define the I planes to to fix in a FFD box.
Definition CFreeFormDefBox.hpp:137
void SetCoordControlPoints_Copy(const su2double *val_coord, unsigned short iDegree, unsigned short jDegree, unsigned short kDegree)
Set the coordinates of the control points.
Definition CFreeFormDefBox.hpp:376
su2double GetDerivative3(su2double *uvw, unsigned short dim, unsigned short diff_this, unsigned short *lmn) const
An auxiliary routine to help us compute the gradient of F(u, v, w) = ||X(u, v, w)-(x,...
Definition CFreeFormDefBox.cpp:1086
unsigned short GetmOrder(void) const
Get the order in the m direction of the FFD FFDBox.
Definition CFreeFormDefBox.hpp:609
unsigned long GetnSurfacePoints(void)
Get the number of numerical points on the surface.
Definition CFreeFormDefBox.hpp:325
void Set_Fix_KPlane(unsigned short val_plane)
Define the I planes to to fix in a FFD box.
Definition CFreeFormDefBox.hpp:113
unsigned short GetLevel() const
Get the nested level of the FFDBox.
Definition CFreeFormDefBox.hpp:777
su2double * EvalCartesianCoord(su2double *ParamCoord) const
Here we take the parametric coords of a point in the box and we convert them to the physical cartesia...
Definition CFreeFormDefBox.cpp:814
void SetParaview(CGeometry *geometry, unsigned short iFFDBox, bool original)
Set the paraview file of the FFD chuck structure.
Definition CFreeFormDefBox.cpp:718
unsigned short Get_Fix_JPlane(unsigned short val_index)
Define the I planes to to fix in a FFD box.
Definition CFreeFormDefBox.hpp:125
unsigned short lDegree_Copy
Degree of the FFDBox in the i direction. (lOrder - 1)
Definition CFreeFormDefBox.hpp:51
unsigned short nDegree
Definition CFreeFormDefBox.hpp:53
void Set_ParametricCoord(const su2double *val_coord, unsigned long val_iSurfacePoints)
Adds to the set of Parametric coordinates.
Definition CFreeFormDefBox.hpp:217
unsigned short nControlPoints_Copy
Number of control points of the FFDBox.
Definition CFreeFormDefBox.hpp:42
unsigned short GetnControlPoints(void) const
Get the number of control points.
Definition CFreeFormDefBox.hpp:313
unsigned long GetnSurfacePoint(void) const
Get number of surface points.
Definition CFreeFormDefBox.hpp:266
su2double **** Coord_Control_Points
Coordinates of the control points.
Definition CFreeFormDefBox.hpp:44
void SetSupportCPChange(CFreeFormDefBox *FFDBox)
Change the the position of the corners of the unitary FFDBox, and find the position of the control po...
Definition CFreeFormDefBox.cpp:270
void SetControlPoints(const unsigned short *val_index, const su2double *movement)
Set the new value of the coordinates of the control points.
Definition CFreeFormDefBox.hpp:455
void SetCoordControlPoints(const su2double *val_coord, unsigned short iDegree, unsigned short jDegree, unsigned short kDegree)
Set the coordinates of the control points.
Definition CFreeFormDefBox.hpp:362
unsigned short mDegree_Copy
Degree of the FFDBox in the j direction. (mOrder - 1)
Definition CFreeFormDefBox.hpp:52
void SetCart2Sphe_ControlPoints(CConfig *config)
SetCartesians to Spherical ControlPoints.
Definition CFreeFormDefBox.cpp:435
unsigned short Level
Nested level of the FFD box.
Definition CFreeFormDefBox.hpp:62
void SetControlPoints_Parallelepiped(void)
Set the control points in a parallelepiped (hexahedron).
Definition CFreeFormDefBox.cpp:196
unsigned short Get_Fix_KPlane(unsigned short val_index)
Define the I planes to to fix in a FFD box.
Definition CFreeFormDefBox.hpp:131
unsigned short nDegree_Copy
Degree of the FFDBox in the k direction. (nOrder - 1)
Definition CFreeFormDefBox.hpp:53
void Set_VertexIndex(unsigned long val_iVertex)
Add to the vector of vertices a new vertex.
Definition CFreeFormDefBox.hpp:161
su2double * GetParametricCoord_Iterative(unsigned long iPoint, su2double *xyz, const su2double *guess, CConfig *config)
Iterative strategy for computing the parametric coordinates.
Definition CFreeFormDefBox.cpp:890
string GetParentFFDBoxTag(unsigned short val_ParentFFDBox)
Get tag of parent FFD box.
Definition CFreeFormDefBox.hpp:282
vector< su2double > ParametricCoord[3]
Vector with all the parametrics coordinates in the FFD FFDBox.
Definition CFreeFormDefBox.hpp:65
unsigned short mDegree
Definition CFreeFormDefBox.hpp:52
unsigned short nDim
Number of dimensions of the problem.
Definition CFreeFormDefBox.hpp:40
unsigned short nOrder
Definition CFreeFormDefBox.hpp:50
string GetChildFFDBoxTag(unsigned short val_ChildFFDBox)
Get tag of child FFD box.
Definition CFreeFormDefBox.hpp:288
void CrossProduct(const su2double *v1, const su2double *v2, su2double *v3)
Compute the cross product.
Definition CFreeFormDefBox.hpp:574
su2double **** Coord_SupportCP
Coordinates of the support control points.
Definition CFreeFormDefBox.hpp:47
su2double * GetCoordControlPoints(unsigned short val_iindex, unsigned short val_jindex, unsigned short val_kindex) const
Get the coordinates of the control point.
Definition CFreeFormDefBox.hpp:422
su2double GetDerivative4(su2double *uvw, unsigned short val_diff, unsigned short val_diff2, unsigned short *ijk, unsigned short *lmn) const
An auxiliary routine to help us compute the Hessian of F(u, v, w) = ||X(u, v, w)-(x,...
Definition CFreeFormDefBox.cpp:1109
unsigned short Get_nFix_JPlane(void) const
Define the I planes to to fix in a FFD box.
Definition CFreeFormDefBox.hpp:143
su2double * Gradient
Gradient of the point inversion process.
Definition CFreeFormDefBox.hpp:57
su2double * cart_coord
Definition CFreeFormDefBox.hpp:55
su2double GetDerivative2(su2double *uvw, unsigned short dim, const su2double *xyz, const unsigned short *lmn) const
An auxiliary routine to help us compute the gradient of F(u, v, w) = ||X(u, v, w)-(x,...
Definition CFreeFormDefBox.cpp:1071
void GetFFDHessian(su2double *uvw, su2double *xyz, su2double **val_Hessian)
The routine that computes the Hessian of F(u, v, w) = ||X(u, v, w)-(x, y, z)||^2 evaluated at (u,...
Definition CFreeFormDefBox.cpp:850
vector< su2double > CartesianCoord[3]
Vector with all the cartesian coordinates in the FFD FFDBox.
Definition CFreeFormDefBox.hpp:64
su2double MaxCoord[3]
Maximum coordinates of the FFDBox.
Definition CFreeFormDefBox.hpp:59
unsigned short lOrder
Definition CFreeFormDefBox.hpp:48
void SetSphe2Cart_CornerPoints(CConfig *config)
Set Spherical to Cartesians_CornerPoints.
Definition CFreeFormDefBox.cpp:535
unsigned short Get_MarkerIndex(unsigned long val_iSurfacePoints)
Get index of the marker.
Definition CFreeFormDefBox.hpp:227
void Set_CartesianCoord(su2double *val_coord)
Add to the vector of cartesian coordinates a new coordinate.
Definition CFreeFormDefBox.hpp:173
su2double * GetParametricCoord_Analytical(const su2double *cart_coord)
Set the cartesian coords of a point in R^3 and convert them to the parametric coords of our parametri...
Definition CFreeFormDefBox.cpp:773
unsigned short GetnCornerPoints(void) const
Get the number of corner points.
Definition CFreeFormDefBox.hpp:307
su2double MinCoord[3]
Minimum coordinates of the FFDBox.
Definition CFreeFormDefBox.hpp:60
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition CGeometry.hpp:75
Class for moving the surface and volumetric numerical grid (2D and 3D problems).
Definition CGridMovement.hpp:39
passivedouble su2double
Definition code_config.hpp:181
FORCEINLINE ARRAY_T sqrt(const ARRAY_T &x)
Definition special_vectorization.hpp:116
Double norm(const Vector< Double, nDim > &vector)
Vector norm.
Definition util.hpp:267