LCOV - code coverage report
Current view: top level - src/materials - ComputeRotatedElasticityTensorBase.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 13 14 92.9 %
Date: 2025-07-25 05:00:39 Functions: 4 4 100.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             : #include "ComputeRotatedElasticityTensorBase.h"
      11             : #include "RotationTensor.h"
      12             : 
      13             : template <bool is_ad>
      14             : InputParameters
      15       10794 : ComputeRotatedElasticityTensorBaseTempl<is_ad>::validParams()
      16             : {
      17       10794 :   InputParameters params = ComputeElasticityTensorBaseTempl<is_ad>::validParams();
      18       21588 :   params.addParam<Real>("euler_angle_1", 0.0, "Euler angle in direction 1");
      19       21588 :   params.addParam<Real>("euler_angle_2", 0.0, "Euler angle in direction 2");
      20       21588 :   params.addParam<Real>("euler_angle_3", 0.0, "Euler angle in direction 3");
      21       21588 :   params.addParam<RealTensorValue>("rotation_matrix",
      22             :                                    "Rotation matrix to apply to elasticity tensor.");
      23       10794 :   return params;
      24           0 : }
      25             : 
      26             : template <bool is_ad>
      27        8088 : ComputeRotatedElasticityTensorBaseTempl<is_ad>::ComputeRotatedElasticityTensorBaseTempl(
      28             :     const InputParameters & parameters)
      29             :   : ComputeElasticityTensorBaseTempl<is_ad>(parameters),
      30       24264 :     _Euler_angles(this->template getParam<Real>("euler_angle_1"),
      31             :                   this->template getParam<Real>("euler_angle_2"),
      32             :                   this->template getParam<Real>("euler_angle_3")),
      33        8180 :     _rotation_matrix(this->isParamValid("rotation_matrix")
      34       16176 :                          ? this->template getParam<RealTensorValue>("rotation_matrix")
      35        8088 :                          : RealTensorValue(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0))
      36             : {
      37        8088 : }
      38             : 
      39             : template class ComputeRotatedElasticityTensorBaseTempl<false>;
      40             : template class ComputeRotatedElasticityTensorBaseTempl<true>;

Generated by: LCOV version 1.14