LCOV - code coverage report
Current view: top level - src/materials - ComputeCosseratElasticityTensor.C (source / functions) Hit Total Coverage
Test: idaholab/moose tensor_mechanics: d6b47a Lines: 24 25 96.0 %
Date: 2024-02-27 11:53:14 Functions: 3 3 100.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             : #include "ComputeCosseratElasticityTensor.h"
      11             : 
      12             : registerMooseObject("TensorMechanicsApp", ComputeCosseratElasticityTensor);
      13             : 
      14             : InputParameters
      15         136 : ComputeCosseratElasticityTensor::validParams()
      16             : {
      17         136 :   InputParameters params = ComputeElasticityTensorBase::validParams();
      18         136 :   params.addClassDescription("Compute Cosserat elasticity and flexural bending rigidity tensors");
      19         272 :   params.addRequiredParam<std::vector<Real>>("E_ijkl", "Elastic stiffness tensor for material");
      20         272 :   params.addParam<MooseEnum>(
      21         272 :       "fill_method", RankFourTensor::fillMethodEnum() = "symmetric9", "The fill method");
      22         272 :   params.addRequiredParam<std::vector<Real>>("B_ijkl", "Flexural bending rigidity tensor.");
      23         272 :   params.addParam<MooseEnum>("fill_method_bending",
      24         272 :                              RankFourTensor::fillMethodEnum() = "antisymmetric_isotropic",
      25             :                              "The fill method for the 'bending' tensor.");
      26         136 :   return params;
      27           0 : }
      28             : 
      29         102 : ComputeCosseratElasticityTensor::ComputeCosseratElasticityTensor(const InputParameters & parameters)
      30             :   : ComputeElasticityTensorBase(parameters),
      31         306 :     _Eijkl(getParam<std::vector<Real>>("E_ijkl"),
      32         204 :            (RankFourTensor::FillMethod)(int)getParam<MooseEnum>("fill_method")),
      33         306 :     _Bijkl(getParam<std::vector<Real>>("B_ijkl"),
      34         102 :            (RankFourTensor::FillMethod)(int)getParam<MooseEnum>("fill_method_bending")),
      35         102 :     _elastic_flexural_rigidity_tensor(
      36         204 :         declareProperty<RankFourTensor>("elastic_flexural_rigidity_tensor"))
      37             : {
      38         204 :   if (!isParamValid("elasticity_tensor_prefactor"))
      39         204 :     issueGuarantee(_elasticity_tensor_name, Guarantee::CONSTANT_IN_TIME);
      40         102 : }
      41             : 
      42             : void
      43       34720 : ComputeCosseratElasticityTensor::computeQpElasticityTensor()
      44             : {
      45       34720 :   _elasticity_tensor[_qp] = _Eijkl;
      46       34720 :   _elastic_flexural_rigidity_tensor[_qp] = _Bijkl;
      47       34720 : }

Generated by: LCOV version 1.14