www.mooseframework.org
PorousFlowMaterialBase.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 
10 #include "PorousFlowMaterialBase.h"
11 #include "Conversion.h"
12 
15 {
17  params.addRequiredParam<unsigned int>("phase", "The phase number");
18  params.addClassDescription("Base class for PorousFlow materials");
19  return params;
20 }
21 
24  _phase_num(getParam<unsigned int>("phase")),
25  _phase(Moose::stringify(_phase_num))
26 {
27  if (_phase_num >= _dictator.numPhases())
28  paramError("phase",
29  "The Dictator proclaims that the number of fluid phases is ",
30  _dictator.numPhases(),
31  " while you have foolishly entered ",
32  _phase_num,
33  ". Remember that indexing starts at 0. Be aware that the Dictator does not tolerate "
34  "mistakes.");
35 }
PorousFlowMaterial is the base class for all PorousFlow Materials It allows users to specify that the...
static InputParameters validParams()
PorousFlowMaterialBase(const InputParameters &parameters)
void addRequiredParam(const std::string &name, const std::string &doc_string)
const unsigned int _phase_num
Phase number of fluid.
std::string stringify(const T &t)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
void ErrorVector unsigned int