LCOV - code coverage report
Current view: top level - include/utils - RotationTensor.h (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 1 1 100.0 %
Date: 2025-07-25 05:00:39 Functions: 0 0 -
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.14