www.mooseframework.org
PorousFlowPermeabilityConst.C
Go to the documentation of this file.
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 
11 
14 
15 template <bool is_ad>
18 {
21  "permeability",
22  "The permeability tensor (usually in m^2), which is assumed constant for this material");
23  params.addClassDescription(
24  "This Material calculates the permeability tensor assuming it is constant");
25  return params;
26 }
27 
28 template <bool is_ad>
30  const InputParameters & parameters)
31  : PorousFlowPermeabilityBaseTempl<is_ad>(parameters),
32  _input_permeability(this->template getParam<RealTensorValue>("permeability"))
33 {
34 }
35 
36 template <bool is_ad>
37 void
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 
PorousFlowPermeabilityConstTempl(const InputParameters &parameters)
static constexpr std::size_t dim
Base class Material designed to provide the permeability tensor.
void addRequiredParam(const std::string &name, const std::string &doc_string)
registerMooseObject("PorousFlowApp", PorousFlowPermeabilityConst)
TensorValue< Real > RealTensorValue
Material designed to provide a constant permeability tensor.
IntRange< T > make_range(T beg, T end)
void addClassDescription(const std::string &doc_string)