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 "PorousFlowMaterialBase.h" 11 : #include "Conversion.h" 12 : 13 : InputParameters 14 96976 : PorousFlowMaterialBase::validParams() 15 : { 16 96976 : InputParameters params = PorousFlowMaterial::validParams(); 17 193952 : params.addRequiredParam<unsigned int>("phase", "The phase number"); 18 96976 : params.addClassDescription("Base class for PorousFlow materials"); 19 96976 : return params; 20 0 : } 21 : 22 75869 : PorousFlowMaterialBase::PorousFlowMaterialBase(const InputParameters & parameters) 23 : : DerivativeMaterialInterface<PorousFlowMaterial>(parameters), 24 75869 : _phase_num(getParam<unsigned int>("phase")), 25 151738 : _phase(Moose::stringify(_phase_num)) 26 : { 27 75869 : if (_phase_num >= _dictator.numPhases()) 28 0 : paramError("phase", 29 : "The Dictator proclaims that the number of fluid phases is ", 30 0 : _dictator.numPhases(), 31 : " while you have foolishly entered ", 32 0 : _phase_num, 33 : ". Remember that indexing starts at 0. Be aware that the Dictator does not tolerate " 34 : "mistakes."); 35 75869 : }