LCOV - code coverage report
Current view: top level - include/utils - RotationTensor.h (source / functions) Hit Total Coverage
Test: idaholab/moose tensor_mechanics: d6b47a Lines: 1 1 100.0 %
Date: 2024-02-27 11:53:14 Functions: 0 0 -
Legend: Lines: hit not hit

          Line data    Source code
       1             : //* This file is part of the MOOSE framework
       2             : //* https://www.mooseframework.org
       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             : #pragma once
      11             : 
      12             : #include "Moose.h"
      13             : 
      14             : // Any requisite includes here
      15             : #include "libmesh/tensor_value.h"
      16             : #include "libmesh/vector_value.h"
      17             : 
      18             : /**
      19             :  * This is a RealTensor version of a rotation matrix
      20             :  * It is instantiated
      21             :  *   with the Euler angles, which are measured in degrees.
      22             :  *     R = Z0 *X1 * Z2
      23             :  *     where Z0 = anticlockwise rotation about Z axis through euler_angles(0) degrees
      24             :  *     where X1 = anticlockwise rotation about X axis through euler_angles(1) degress
      25             :  *     where Z2 = anticlockwise rotation about Z axis through euler_angles(2) degrees
      26             :  *   or an axis, angle pair
      27             :  *     where the angle is taken anticlockwise in degrees
      28             :  */
      29         856 : class RotationTensor : public RealTensorValue
      30             : {
      31             : public:
      32             :   /// axis for single axis rotation constructor
      33             :   enum Axis
      34             :   {
      35             :     XAXIS = 0,
      36             :     YAXIS,
      37             :     ZAXIS
      38             :   };
      39             : 
      40             :   /// single axis rotation (in degrees)
      41             :   RotationTensor(Axis axis, Real angle);
      42             : 
      43             :   /// fills according to Euler angles (measured in degrees)
      44             :   RotationTensor(const RealVectorValue & euler_angles);
      45             : 
      46             :   /// reforms the rotation matrix according to axis and angle.
      47             :   void update(Axis axis, Real angle);
      48             : 
      49             :   /// reforms the rotation matrix according to the Euler angles.
      50             :   void update(const RealVectorValue & euler_angles);
      51             : };

Generated by: LCOV version 1.14