www.mooseframework.org
PorousFlowMaterialBase.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
9 #include "Conversion.h"
10 
11 template <>
12 InputParameters
14 {
15  InputParameters params = validParams<PorousFlowMaterial>();
16  params.addRequiredParam<unsigned int>("phase", "The phase number");
17  params.addClassDescription("Base class for PorousFlow materials");
18  return params;
19 }
20 
21 PorousFlowMaterialBase::PorousFlowMaterialBase(const InputParameters & parameters)
22  : DerivativeMaterialInterface<PorousFlowMaterial>(parameters),
23  _phase_num(getParam<unsigned int>("phase")),
24  _phase(Moose::stringify(_phase_num))
25 {
26  if (_phase_num >= _dictator.numPhases())
27  mooseError("PorousFlowMaterial: The Dictator proclaims that the number of fluid phases is ",
28  _dictator.numPhases(),
29  " while you have foolishly entered phase = ",
30  _phase_num,
31  " in ",
32  _name,
33  ". Be aware that the Dictator does not tolerate mistakes.");
34 }
PorousFlowMaterialBase(const InputParameters &parameters)
InputParameters validParams< PorousFlowMaterialBase >()
const unsigned int _phase_num
Phase number of fluid.
InputParameters validParams< PorousFlowMaterial >()