LCOV - code coverage report
Current view: top level - include/materials - ComputeIsotropicElasticityTensor.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: 3 4 75.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 "ComputeElasticityTensorBase.h"
      13             : 
      14             : /**
      15             :  * ComputeIsotropicElasticityTensor defines an elasticity tensor material for
      16             :  * isotropic materials.
      17             :  */
      18             : template <bool is_ad, typename T>
      19             : class ComputeIsotropicElasticityTensorTempl : public ComputeElasticityTensorBaseTempl<is_ad, T>
      20             : {
      21             : public:
      22             :   static InputParameters validParams();
      23             : 
      24             :   ComputeIsotropicElasticityTensorTempl(const InputParameters & parameters);
      25             : 
      26       16326 :   virtual void initialSetup() override { residualSetup(); }
      27             : 
      28             :   virtual void residualSetup() override;
      29             : 
      30             : protected:
      31             :   virtual void computeQpElasticityTensor() override;
      32             : 
      33             :   /// Elastic constants
      34             :   bool _bulk_modulus_set;
      35             :   bool _lambda_set;
      36             :   bool _poissons_ratio_set;
      37             :   bool _shear_modulus_set;
      38             :   bool _youngs_modulus_set;
      39             : 
      40             :   const Real & _bulk_modulus;
      41             :   const Real & _lambda;
      42             :   const Real & _poissons_ratio;
      43             :   const Real & _shear_modulus;
      44             :   const Real & _youngs_modulus;
      45             : 
      46             :   /// Individual elasticity tensor
      47             :   T _Cijkl;
      48             : 
      49             :   /// Effective stiffness of the element: function of material properties
      50             :   Real _effective_stiffness_local;
      51             : 
      52             :   using ComputeElasticityTensorBaseTempl<is_ad, T>::name;
      53             :   using ComputeElasticityTensorBaseTempl<is_ad, T>::_elasticity_tensor_name;
      54             :   using ComputeElasticityTensorBaseTempl<is_ad, T>::issueGuarantee;
      55             :   using ComputeElasticityTensorBaseTempl<is_ad, T>::isParamValid;
      56             :   using ComputeElasticityTensorBaseTempl<is_ad, T>::_elasticity_tensor;
      57             :   using ComputeElasticityTensorBaseTempl<is_ad, T>::_qp;
      58             :   using ComputeElasticityTensorBaseTempl<is_ad, T>::_effective_stiffness;
      59             : };
      60             : 
      61             : typedef ComputeIsotropicElasticityTensorTempl<false, RankFourTensor>
      62             :     ComputeIsotropicElasticityTensor;
      63             : typedef ComputeIsotropicElasticityTensorTempl<true, RankFourTensor>
      64             :     ADComputeIsotropicElasticityTensor;
      65             : typedef ComputeIsotropicElasticityTensorTempl<false, SymmetricRankFourTensor>
      66             :     SymmetricIsotropicElasticityTensor;
      67             : typedef ComputeIsotropicElasticityTensorTempl<true, SymmetricRankFourTensor>
      68             :     ADSymmetricIsotropicElasticityTensor;

Generated by: LCOV version 1.14