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 "MaterialRankFourTensorAux.h" 11 : 12 : registerMooseObject("MooseApp", MaterialRankFourTensorAux); 13 : registerMooseObject("MooseApp", ADMaterialRankFourTensorAux); 14 : 15 : template <bool is_ad> 16 : InputParameters 17 54045 : MaterialRankFourTensorAuxTempl<is_ad>::validParams() 18 : { 19 54045 : InputParameters params = MaterialAuxBaseTempl<RankFourTensor, is_ad>::validParams(); 20 54045 : params.addClassDescription( 21 : "Access a component of a RankFourTensor for automatic material property output"); 22 54045 : params.addRequiredParam<unsigned int>("i", "The index i of ijkl for the tensor to output"); 23 54045 : params.addRequiredParam<unsigned int>("j", "The index j of ijkl for the tensor to output"); 24 54045 : params.addRequiredParam<unsigned int>("k", "The index k of ijkl for the tensor to output"); 25 54045 : params.addRequiredParam<unsigned int>("l", "The index l of ijkl for the tensor to output"); 26 54045 : return params; 27 0 : } 28 : 29 : template <bool is_ad> 30 13365 : MaterialRankFourTensorAuxTempl<is_ad>::MaterialRankFourTensorAuxTempl( 31 : const InputParameters & parameters) 32 : : MaterialAuxBaseTempl<RankFourTensor, is_ad>(parameters), 33 13365 : _i(this->template getParam<unsigned int>("i")), 34 13365 : _j(this->template getParam<unsigned int>("j")), 35 13365 : _k(this->template getParam<unsigned int>("k")), 36 26730 : _l(this->template getParam<unsigned int>("l")) 37 : { 38 : mooseAssert(_i < LIBMESH_DIM, "i component out of range for current LIBMESH_DIM"); 39 : mooseAssert(_j < LIBMESH_DIM, "j component out of range for current LIBMESH_DIM"); 40 : mooseAssert(_k < LIBMESH_DIM, "k component out of range for current LIBMESH_DIM"); 41 : mooseAssert(_l < LIBMESH_DIM, "l component out of range for current LIBMESH_DIM"); 42 13365 : } 43 : 44 : template <bool is_ad> 45 : Real 46 9039600 : MaterialRankFourTensorAuxTempl<is_ad>::getRealValue() 47 : { 48 9039600 : return MetaPhysicL::raw_value(this->_full_value(_i, _j, _k, _l)); 49 : }