https://mooseframework.inl.gov
Loading...
Searching...
No Matches
RotationTensorTest.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#include "gtest/gtest.h"
11
12#include "RankFourTensor.h"
13#include "RotationTensor.h"
14
15TEST(RotationTensorTest, rotation)
16{
17 std::vector<Real> input(81);
18 for (size_t i = 0; i < input.size(); ++i)
19 input[i] = i + 1.1;
20
22
25
26 auto xyrot = xrot * yrot;
27 auto yxrot = yrot * xrot;
28
29 auto axy1 = a;
30 axy1.rotate(xrot);
31 axy1.rotate(yrot);
32
33 auto axy2 = a;
34 axy2.rotate(yxrot);
35
36 EXPECT_NEAR(0, (axy1 - axy2).L2norm(), 1E-8);
37}
TEST(RotationTensorTest, rotation)
This is a RealTensor version of a rotation matrix It is instantiated with the Euler angles,...