https://mooseframework.inl.gov
Loading...
Searching...
No Matches
solid_mechanics
unit
src
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
15
TEST
(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
21
RankFourTensor
a
(input,
RankFourTensor::general
);
22
23
RotationTensor
xrot(
RotationTensor::XAXIS
, 90);
24
RotationTensor
yrot(
RotationTensor::YAXIS
, 90);
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
}
a
const Real a
Definition
GeochemistryActivityCalculatorsTest.C:17
RankFourTensor.h
TEST
TEST(RotationTensorTest, rotation)
Definition
RotationTensorTest.C:15
RotationTensor.h
RankFourTensorTempl< Real >
RankFourTensorTempl< Real >::general
general
RotationTensor
This is a RealTensor version of a rotation matrix It is instantiated with the Euler angles,...
Definition
RotationTensor.h:31
RotationTensor::XAXIS
@ XAXIS
Definition
RotationTensor.h:36
RotationTensor::YAXIS
@ YAXIS
Definition
RotationTensor.h:37
Generated on Fri Aug 21 2026 13:41:47 for https://mooseframework.inl.gov by
1.9.8