https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PorousFlowPermeabilityConst.C
Go to the documentation of this file.
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
11
14
15template <bool is_ad>
18{
20 params.addRequiredParam<RealTensorValue>(
21 "permeability",
22 "The permeability tensor (usually in m^2), which is assumed constant for this material");
24 "This Material calculates the permeability tensor assuming it is constant");
25 return params;
26}
27
28template <bool is_ad>
30 const InputParameters & parameters)
31 : PorousFlowPermeabilityBaseTempl<is_ad>(parameters),
32 _input_permeability(this->template getParam<RealTensorValue>("permeability"))
33{
34}
35
36template <bool is_ad>
37void
39{
40 _permeability_qp[_qp] = _input_permeability;
41
42 if (!is_ad)
43 {
44 (*_dpermeability_qp_dvar)[_qp].assign(_num_var, RealTensorValue());
45 (*_dpermeability_qp_dgradvar)[_qp].resize(LIBMESH_DIM);
46
47 for (const auto i : make_range(Moose::dim))
48 (*_dpermeability_qp_dgradvar)[_qp][i].assign(_num_var, RealTensorValue());
49 }
50}
51
registerMooseObject("PorousFlowApp", PorousFlowPermeabilityConst)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Base class Material designed to provide the permeability tensor.
Material designed to provide a constant permeability tensor.
PorousFlowPermeabilityConstTempl(const InputParameters &parameters)
static constexpr std::size_t dim