From c17887cab8fb94781ec9d978c0d285b4426f0ec4 Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Mon, 29 Nov 2021 18:34:25 -0700 Subject: [PATCH] Use internal rotation matrix for airfoil. --- source/grid/grid_generator.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/source/grid/grid_generator.cc b/source/grid/grid_generator.cc index 7d961f01ba..1625a626b6 100644 --- a/source/grid/grid_generator.cc +++ b/source/grid/grid_generator.cc @@ -28,6 +28,8 @@ #include #include +#include + #include #include #include @@ -954,14 +956,10 @@ namespace GridGenerator std::vector vertex_processed(tria.n_vertices(), false); // rotation matrix for clockwise rotation of block 1 by angle gamma - Tensor<2, 2, double> rotation_matrix_1, rotation_matrix_2; - - rotation_matrix_1[0][0] = +std::cos(-gamma); - rotation_matrix_1[0][1] = -std::sin(-gamma); - rotation_matrix_1[1][0] = +std::sin(-gamma); - rotation_matrix_1[1][1] = +std::cos(-gamma); - - rotation_matrix_2 = transpose(rotation_matrix_1); + const Tensor<2, 2, double> rotation_matrix_1 = + Physics::Transformations::Rotations::rotation_matrix_2d(-gamma); + const Tensor<2, 2, double> rotation_matrix_2 = + transpose(rotation_matrix_1); // horizontal offset in order to place coarse-grid node A in the // origin -- 2.39.5