From b063be569630b82bfc9b7410b53ad82b666d0062 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Sep 2022 17:32:12 +0000 Subject: [PATCH 1/5] Bump actions/upload-release-asset from 1.0.1 to 1.0.2 Bumps [actions/upload-release-asset](https://github.com/actions/upload-release-asset) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/actions/upload-release-asset/releases) - [Commits](https://github.com/actions/upload-release-asset/compare/v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: actions/upload-release-asset dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/release-management.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-management.yml b/.github/workflows/release-management.yml index dfe9a0f0436..d07819a6d4e 100644 --- a/.github/workflows/release-management.yml +++ b/.github/workflows/release-management.yml @@ -57,7 +57,7 @@ jobs: # Upload binaries as assets to draft release - name: Upload Release Asset id: upload-release-asset - uses: actions/upload-release-asset@v1.0.1 + uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From 108699a3fde6422564834726e328cc44947e1353 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Sep 2022 17:32:15 +0000 Subject: [PATCH 2/5] Bump actions/cache from 1 to 3 Bumps [actions/cache](https://github.com/actions/cache) from 1 to 3. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v1...v3) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/release-management.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-management.yml b/.github/workflows/release-management.yml index dfe9a0f0436..d23fcae7e32 100644 --- a/.github/workflows/release-management.yml +++ b/.github/workflows/release-management.yml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Object Files - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: ccache key: ${{ matrix.os_bin }}-${{ github.sha }} From 3538194fb416e78443a2a7b7be27f6c3bef67784 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Sep 2022 17:32:18 +0000 Subject: [PATCH 3/5] Bump actions/upload-artifact from 1 to 3 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 1 to 3. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v1...v3) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/release-management.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-management.yml b/.github/workflows/release-management.yml index dfe9a0f0436..11584433e8a 100644 --- a/.github/workflows/release-management.yml +++ b/.github/workflows/release-management.yml @@ -44,7 +44,7 @@ jobs: zip -r ../${{matrix.os_bin}}.zip bin/* # Uploads binaries as artifacts (just as a backup) - name: Upload Binaries - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: ${{matrix.os_bin}} path: ${{matrix.os_bin}}.zip From 9a7c03811dd60668b3ac9b5c3bb483f75d1b7e83 Mon Sep 17 00:00:00 2001 From: Nijso Date: Tue, 20 Sep 2022 16:22:44 +0200 Subject: [PATCH 4/5] FFD box fix for nonplanar faces (#1742) * FFD box uses supporting point in the middle of the face to avoid ambiguous definition of nonplanar faces * implementation of github review comments (formatting and deleting memory) * Apply suggestions from code review Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- Common/src/grid_movement/CFreeFormDefBox.cpp | 136 +++++++++---------- 1 file changed, 61 insertions(+), 75 deletions(-) diff --git a/Common/src/grid_movement/CFreeFormDefBox.cpp b/Common/src/grid_movement/CFreeFormDefBox.cpp index 3ec628aa45b..9a817df8ea3 100644 --- a/Common/src/grid_movement/CFreeFormDefBox.cpp +++ b/Common/src/grid_movement/CFreeFormDefBox.cpp @@ -102,19 +102,34 @@ CFreeFormDefBox::CFreeFormDefBox(const unsigned short Degree[], unsigned short B CFreeFormDefBox::~CFreeFormDefBox(void) { unsigned short iOrder, jOrder, kOrder, iCornerPoints, iDim; - for (iOrder = 0; iOrder < lOrder; iOrder++) - for (jOrder = 0; jOrder < mOrder; jOrder++) + for (iOrder = 0; iOrder < lOrder; iOrder++) { + for (jOrder = 0; jOrder < mOrder; jOrder++) { for (kOrder = 0; kOrder < nOrder; kOrder++) { delete [] Coord_Control_Points[iOrder][jOrder][kOrder]; delete [] ParCoord_Control_Points[iOrder][jOrder][kOrder]; delete [] Coord_Control_Points_Copy[iOrder][jOrder][kOrder]; + if (Coord_SupportCP != nullptr) delete [] Coord_SupportCP[iOrder][jOrder][kOrder]; } + delete [] Coord_Control_Points[iOrder][jOrder]; + delete [] ParCoord_Control_Points[iOrder][jOrder]; + delete [] Coord_Control_Points_Copy[iOrder][jOrder]; + if (Coord_SupportCP != nullptr) delete [] Coord_SupportCP[iOrder][jOrder]; + } + delete [] Coord_Control_Points[iOrder]; + delete [] ParCoord_Control_Points[iOrder]; + delete [] Coord_Control_Points_Copy[iOrder]; + if (Coord_SupportCP != nullptr) delete [] Coord_SupportCP[iOrder]; + } + delete [] Coord_Control_Points; delete [] ParCoord_Control_Points; delete [] Coord_Control_Points_Copy; + delete [] Coord_SupportCP; delete [] ParamCoord; + delete [] ParamCoord_; delete [] cart_coord; + delete [] cart_coord_; delete [] Gradient; for (iCornerPoints = 0; iCornerPoints < nCornerPoints; iCornerPoints++) @@ -969,26 +984,37 @@ su2double *CFreeFormDefBox::GetParametricCoord_Iterative(unsigned long iPoint, s } bool CFreeFormDefBox::GetPointFFD(CGeometry *geometry, CConfig *config, unsigned long iPoint) const { - su2double Coord[3] = {0.0, 0.0, 0.0}; - unsigned short iVar, jVar, iDim; - su2double X_0, Y_0, Z_0, Xbar, Ybar, Zbar; - bool Inside = false; + bool Inside = true; bool cylindrical = (config->GetFFD_CoordSystem() == CYLINDRICAL); bool spherical = (config->GetFFD_CoordSystem() == SPHERICAL); bool polar = (config->GetFFD_CoordSystem() == POLAR); - unsigned short Index[5][7] = { - {0, 1, 2, 5, 0, 1, 2}, - {0, 2, 7, 5, 0, 2, 7}, - {0, 2, 3, 7, 0, 2, 3}, - {0, 5, 7, 4, 0, 5, 7}, - {2, 7, 5, 6, 2, 7, 5}}; + /*--- indices of the FFD box. Note that the front face is labelled 0,1,2,3 and the back face is 4,5,6,7 ---*/ + + unsigned short Index[6][5] = { + {0,1,2,3,0}, // front side + {1,5,6,2,1}, // right side + {2,6,7,3,2}, // top side + {3,7,4,0,3}, // left side + {4,5,1,0,4}, // bottom side + {4,7,6,5,4}}; // back side + + /*--- The current approach is to subdivide each of the 6 faces of the hexahedral FFD box into 4 triangles + by defining a supporting middle point. This allows nonplanar FFD boxes. + Note that the definition of the FFD box is as follows: the FFD box is a 6-sided die and we are looking at the side "1". + The opposite side is side "6". + If we are looking at side "1", we define the nodes counterclockwise. + If we are looking at side "6", we define the face clockwise ---*/ + unsigned short nDim = geometry->GetnDim(); - for (iDim = 0; iDim < nDim; iDim++) + su2double Coord[3] = {0.0, 0.0, 0.0}; + for (unsigned short iDim = 0; iDim < nDim; iDim++) Coord[iDim] = geometry->nodes->GetCoord(iPoint, iDim); + su2double X_0, Y_0, Z_0, Xbar, Ybar, Zbar; + if (cylindrical) { X_0 = config->GetFFD_Axis(0); Y_0 = config->GetFFD_Axis(1); Z_0 = config->GetFFD_Axis(2); @@ -1013,78 +1039,38 @@ bool CFreeFormDefBox::GetPointFFD(CGeometry *geometry, CConfig *config, unsigned } - /*--- 1st tetrahedron {V0, V1, V2, V5} - 2nd tetrahedron {V0, V2, V7, V5} - 3th tetrahedron {V0, V2, V3, V7} - 4th tetrahedron {V0, V5, V7, V4} - 5th tetrahedron {V2, V7, V5, V6} ---*/ + /*--- loop over the faces of the FFD box ---*/ + + for (unsigned short iVar = 0; iVar < 6; iVar++) { + + su2double P[3] = {0.0, 0.0, 0.0}; + + /*--- every face needs an interpolated middle point for the triangles ---*/ + + for (int p = 0; p < 4; p++){ + P[0] += 0.25*Coord_Corner_Points[Index[iVar][p]][0]; + P[1] += 0.25*Coord_Corner_Points[Index[iVar][p]][1]; + P[2] += 0.25*Coord_Corner_Points[Index[iVar][p]][2]; + } + + /*--- loop over the 4 triangles making up the FFD box. The sign is equal for all distances ---*/ - for (iVar = 0; iVar < 5; iVar++) { - Inside = true; - for (jVar = 0; jVar < 4; jVar++) { + for (unsigned short jVar = 0; jVar < 4; jVar++) { su2double Distance_Point = geometry->Point2Plane_Distance(Coord, + Coord_Corner_Points[Index[iVar][jVar]], Coord_Corner_Points[Index[iVar][jVar+1]], - Coord_Corner_Points[Index[iVar][jVar+2]], - Coord_Corner_Points[Index[iVar][jVar+3]]); - - su2double Distance_Vertex = geometry->Point2Plane_Distance(Coord_Corner_Points[Index[iVar][jVar]], - Coord_Corner_Points[Index[iVar][jVar+1]], - Coord_Corner_Points[Index[iVar][jVar+2]], - Coord_Corner_Points[Index[iVar][jVar+3]]); - if (Distance_Point*Distance_Vertex < 0.0) Inside = false; + P); + if (Distance_Point < 0) { + Inside = false; + return Inside; + } } - if (Inside) break; } return Inside; } -void CFreeFormDefBox::SetDeformationZone(CGeometry *geometry, CConfig *config, unsigned short iFFDBox) const { - su2double *Coord; - unsigned short iMarker, iVar, jVar; - unsigned long iVertex, iPoint; - bool Inside = false; - - unsigned short Index[5][7] = { - {0, 1, 2, 5, 0, 1, 2}, - {0, 2, 7, 5, 0, 2, 7}, - {0, 2, 3, 7, 0, 2, 3}, - {0, 5, 7, 4, 0, 5, 7}, - {2, 7, 5, 6, 2, 7, 5}}; - - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - if (config->GetMarker_All_DV(iMarker) == YES) { - for (iVertex = 0; iVertex < geometry->nVertex[iMarker]; iVertex++) { - iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); - - Coord = geometry->nodes->GetCoord(iPoint); - - /*--- 1st tetrahedron {V0, V1, V2, V5} - 2nd tetrahedron {V0, V2, V7, V5} - 3th tetrahedron {V0, V2, V3, V7} - 4th tetrahedron {V0, V5, V7, V4} - 5th tetrahedron {V2, V7, V5, V6} ---*/ - - for (iVar = 0; iVar < 5; iVar++) { - Inside = true; - for (jVar = 0; jVar < 4; jVar++) { - su2double Distance_Point = geometry->Point2Plane_Distance(Coord, - Coord_Corner_Points[Index[iVar][jVar+1]], - Coord_Corner_Points[Index[iVar][jVar+2]], - Coord_Corner_Points[Index[iVar][jVar+3]]); - su2double Distance_Vertex = geometry->Point2Plane_Distance(Coord_Corner_Points[Index[iVar][jVar]], - Coord_Corner_Points[Index[iVar][jVar+1]], - Coord_Corner_Points[Index[iVar][jVar+2]], - Coord_Corner_Points[Index[iVar][jVar+3]]); - if (Distance_Point*Distance_Vertex < 0.0) Inside = false; - } - if (Inside) break; - } - } - } - } -} su2double CFreeFormDefBox::GetDerivative1(su2double *uvw, unsigned short val_diff, unsigned short *ijk, unsigned short *lmn) const { From 750def191c5a1e14b5381f441bab081faf2320d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Bl=C3=BChdorn?= Date: Fri, 23 Sep 2022 14:57:35 +0200 Subject: [PATCH 5/5] CoDiPack update. --- externals/codi | 2 +- meson_scripts/init.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/externals/codi b/externals/codi index b576224d5ea..96ac78ec5bc 160000 --- a/externals/codi +++ b/externals/codi @@ -1 +1 @@ -Subproject commit b576224d5ea686fb8385b7ba6b5df0743d2be8aa +Subproject commit 96ac78ec5bcc5ac25b785e79b16ed76fca22d736 diff --git a/meson_scripts/init.py b/meson_scripts/init.py index 67e90709e54..3326cf113f7 100755 --- a/meson_scripts/init.py +++ b/meson_scripts/init.py @@ -44,7 +44,7 @@ def init_submodules(method = 'auto'): # This information of the modules is used if projects was not cloned using git # The sha tag must be maintained manually to point to the correct commit - sha_version_codi = 'b576224d5ea686fb8385b7ba6b5df0743d2be8aa' + sha_version_codi = '96ac78ec5bcc5ac25b785e79b16ed76fca22d736' github_repo_codi = 'https://github.com/scicompkl/CoDiPack' sha_version_medi = '6aef76912e7099c4f08c9705848797ca9e8070da' github_repo_medi = 'https://github.com/SciCompKL/MeDiPack'