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 "PorousFlowPermeabilityConst.h" 11 : 12 : registerMooseObject("PorousFlowApp", PorousFlowPermeabilityConst); 13 : registerMooseObject("PorousFlowApp", ADPorousFlowPermeabilityConst); 14 : 15 : template <bool is_ad> 16 : InputParameters 17 23012 : PorousFlowPermeabilityConstTempl<is_ad>::validParams() 18 : { 19 23012 : InputParameters params = PorousFlowPermeabilityBase::validParams(); 20 46024 : params.addRequiredParam<RealTensorValue>( 21 : "permeability", 22 : "The permeability tensor (usually in m^2), which is assumed constant for this material"); 23 23012 : params.addClassDescription( 24 : "This Material calculates the permeability tensor assuming it is constant"); 25 23012 : return params; 26 0 : } 27 : 28 : template <bool is_ad> 29 18021 : PorousFlowPermeabilityConstTempl<is_ad>::PorousFlowPermeabilityConstTempl( 30 : const InputParameters & parameters) 31 : : PorousFlowPermeabilityBaseTempl<is_ad>(parameters), 32 36042 : _input_permeability(this->template getParam<RealTensorValue>("permeability")) 33 : { 34 18021 : } 35 : 36 : template <bool is_ad> 37 : void 38 47285073 : PorousFlowPermeabilityConstTempl<is_ad>::computeQpProperties() 39 : { 40 47285073 : _permeability_qp[_qp] = _input_permeability; 41 : 42 : if (!is_ad) 43 : { 44 46764253 : (*_dpermeability_qp_dvar)[_qp].assign(_num_var, RealTensorValue()); 45 46764253 : (*_dpermeability_qp_dgradvar)[_qp].resize(LIBMESH_DIM); 46 : 47 187057012 : for (const auto i : make_range(Moose::dim)) 48 140292759 : (*_dpermeability_qp_dgradvar)[_qp][i].assign(_num_var, RealTensorValue()); 49 : } 50 47285073 : } 51 : 52 : template class PorousFlowPermeabilityConstTempl<false>; 53 : template class PorousFlowPermeabilityConstTempl<true>;