-
Notifications
You must be signed in to change notification settings - Fork 922
Added prevention of intersections in grid elements after deformation #1076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c419e2a
d576687
743d0d9
21a7224
6bbd4a6
770dc94
8e0085b
bced0cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -109,7 +109,8 @@ class CGeometry { | |
| nelem_triangle_bound{0}, /*!< \brief Number of triangles on the mesh boundaries. */ | ||
| Global_nelem_triangle_bound{0}, /*!< \brief Total number of triangles on the mesh boundaries across all processors. */ | ||
| nelem_quad_bound{0}, /*!< \brief Number of quads on the mesh boundaries. */ | ||
| Global_nelem_quad_bound{0}; /*!< \brief Total number of quads on the mesh boundaries across all processors. */ | ||
| Global_nelem_quad_bound{0}, /*!< \brief Total number of quads on the mesh boundaries across all processors. */ | ||
| nNonconvexElements{0}; /*!< \brief Number of nonconvex elements in the mesh. */ | ||
|
|
||
| unsigned short nDim{0}; /*!< \brief Number of dimension of the problem. */ | ||
| unsigned short nZone{0}; /*!< \brief Number of zones in the problem. */ | ||
|
|
@@ -1699,5 +1700,16 @@ class CGeometry { | |
| */ | ||
| static void ComputeWallDistance(const CConfig * const *config_container, CGeometry ****geometry_container); | ||
|
|
||
| /*! | ||
| * \brief Set the amount of nonconvex elements in the mesh. | ||
| * \param[in] nonconvex_elems - amount of nonconvex elements in the mesh | ||
| */ | ||
| void SetnNonconvexElements(unsigned long nonconvex_elems) {nNonconvexElements = nonconvex_elems;} | ||
|
|
||
| /*! | ||
| * \brief Get the amount of nonconvex elements in the mesh. | ||
| * \param[out] nNonconvexElements- amount of nonconvex elements in the mesh | ||
| */ | ||
| unsigned long GetnNonconvexElements(void) {return nNonconvexElements;} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one |
||
| }; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -211,7 +211,7 @@ class CSurfaceMovement : public CGridMovement { | |
| * \param[in] geometry - Geometrical definition of the problem. | ||
| * \param[in] config - Definition of the particular problem. | ||
| */ | ||
| void SetSurface_Deformation(CGeometry *geometry, CConfig *config) override; | ||
| void SetSurface_Deformation(CGeometry *geometry, CConfig *config, su2double** totaldeformation = nullptr); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The compiler is probably giving a warning about this function no? (because it has the same signature but it no longer overrides, instead it "hides" the original virtual SetSurface_Deformation) |
||
|
|
||
| /*! | ||
| * \brief Compute the parametric coordinates of a grid point using a point inversion strategy | ||
|
|
@@ -268,6 +268,15 @@ class CSurfaceMovement : public CGridMovement { | |
| */ | ||
| void GetCartesianCoordCP(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBoxParent, CFreeFormDefBox *FFDBoxChild); | ||
|
|
||
| /*! | ||
| * \brief Apply the design variables to the control point position | ||
| * \param[in] geometry - Geometrical definition of the problem. | ||
| * \param[in] config - Definition of the particular problem. | ||
| * \param[in] FFDBox - Array with all the free forms FFDBoxes of the computation. | ||
| * \param[in] iFFDBox - Index of FFD box. | ||
| */ | ||
| void ApplyDesignVariables(CGeometry *geometry, CConfig *config, CFreeFormDefBox **FFDBox, unsigned short iFFDBox); | ||
|
|
||
| /*! | ||
| * \brief Recompute the cartesian coordinates using the control points position. | ||
| * \param[in] geometry - Geometrical definition of the problem. | ||
|
|
@@ -484,4 +493,13 @@ class CSurfaceMovement : public CGridMovement { | |
| * \param[in] config - Definition of the particular problem. | ||
| */ | ||
| void SetSurface_Derivative(CGeometry *geometry, CConfig *config); | ||
|
|
||
| /*! | ||
| * \brief Calculate the determinant of the Jacobian matrix for the FFD problem. | ||
| * \param[in] geometry - Geometrical definition of the problem. | ||
| * \param[in] config - Definition of the particular problem. | ||
| * \param[in] FFDBox - Free form deformation box. | ||
| * \return Number of points with negative Jacobian determinant. | ||
| */ | ||
| unsigned long calculateJacobianDeterminant(CGeometry *geometry, CConfig *config, CFreeFormDefBox *FFDBox); | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2564,6 +2564,24 @@ void CConfig::SetConfig_Options() { | |
| /* DESCRIPTION: Free surface damping coefficient */ | ||
| addDoubleOption("FFD_TOLERANCE", FFD_Tol, 1E-10); | ||
|
|
||
| /* DESCRIPTION: Procedure to prevent self-intersections within the FFD box based on Jacobian determinant */ | ||
| addBoolOption("FFD_INTPREV", FFD_IntPrev, NO); | ||
|
Comment on lines
+2567
to
+2568
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am in favor of |
||
|
|
||
| /* DESCRIPTION: Number of total iterations in the convexity check procedure */ | ||
| addUnsignedShortOption("FFD_INTPREV_ITER", FFD_IntPrev_MaxIter, 10); | ||
|
|
||
| /* DESCRIPTION: Recursion depth in the FFD self-intersection prevention */ | ||
| addUnsignedShortOption("FFD_INTPREV_DEPTH", FFD_IntPrev_MaxDepth, 3); | ||
|
|
||
| /* DESCRIPTION: Convexity check on all mesh elements */ | ||
| addBoolOption("CONVEXITY_CHECK", ConvexityCheck, NO); | ||
|
Comment on lines
+2576
to
+2577
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And here I would go maybe for |
||
|
|
||
| /* DESCRIPTION: Number of total iterations in the convexity check procedure */ | ||
| addUnsignedShortOption("CONVEXITY_CHECK_ITER", ConvexityCheck_MaxIter, 10); | ||
|
|
||
| /* DESCRIPTION: Recursion depth in the FFD self-intersection prevention */ | ||
| addUnsignedShortOption("CONVEXITY_CHECK_DEPTH", ConvexityCheck_MaxDepth, 3); | ||
|
|
||
| /* DESCRIPTION: Definition of the FFD boxes */ | ||
| addFFDDefOption("FFD_DEFINITION", nFFDBox, CoordFFDBox, TagFFDBox); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for changing the return type 👍 these 2 methods can be
const