Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
MooseBaseParameterInterface Class Reference

Every object that can be built by the factory should be derived from this class. More...

#include <MooseBaseParameterInterface.h>

Inheritance diagram for MooseBaseParameterInterface:
[legend]

Public Member Functions

 MooseBaseParameterInterface (const MooseBase &base, const InputParameters &parameters)
 
virtual ~MooseBaseParameterInterface ()=default
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 The unique parameter name of a valid parameter of this object for accessing parameter controls. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
MooseObjectName uniqueName () const
 The unique name for accessing input parameters of this object in the InputParameterWarehouse. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 
template<typename T >
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 Retrieve a renamed parameter for the object. More...
 
template<typename T1 , typename T2 >
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 Retrieve two parameters and provide pair of parameters for the object. More...
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller. More...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
bool isParamSetByUser (const std::string &nm) const
 Test if the supplied parameter is set by a user, as opposed to not set or set to default. More...
 
template<typename... Args>
void paramError (const std::string &param, Args... args) const
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args) const
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args) const
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 Connect controllable parameter of this action with the controllable parameters of the objects added by this action. More...
 

Protected Attributes

const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. More...
 
Factory_factory
 The Factory associated with the MooseApp. More...
 
ActionFactory_action_factory
 Builds Actions. More...
 

Private Member Functions

template<typename... Args>
std::string paramErrorMsg (const std::string &param, Args... args) const
 

Private Attributes

const MooseBase_moose_base
 The MooseBase object that inherits this class. More...
 

Detailed Description

Every object that can be built by the factory should be derived from this class.

Definition at line 42 of file MooseBaseParameterInterface.h.

Constructor & Destructor Documentation

◆ MooseBaseParameterInterface()

MooseBaseParameterInterface::MooseBaseParameterInterface ( const MooseBase base,
const InputParameters parameters 
)

Definition at line 21 of file MooseBaseParameterInterface.C.

23  : _pars(parameters),
26  _moose_base(base)
27 {
28  // This enforces that we call finalizeParams (checkParams() and setting file paths)
29  mooseAssert(_pars.isFinalized(), "Params are not finalized");
30 }
const MooseBase & _moose_base
The MooseBase object that inherits this class.
ActionFactory & getActionFactory()
Retrieve a writable reference to the ActionFactory associated with this App.
Definition: MooseApp.h:429
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:45
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
Definition: MooseApp.h:424
Factory & _factory
The Factory associated with the MooseApp.
ActionFactory & _action_factory
Builds Actions.
bool isFinalized() const
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
const InputParameters & parameters() const
Get the parameters of the object.

◆ ~MooseBaseParameterInterface()

virtual MooseBaseParameterInterface::~MooseBaseParameterInterface ( )
virtualdefault

Member Function Documentation

◆ connectControllableParams()

void MooseBaseParameterInterface::connectControllableParams ( const std::string &  parameter,
const std::string &  object_type,
const std::string &  object_name,
const std::string &  object_parameter 
) const

Connect controllable parameter of this action with the controllable parameters of the objects added by this action.

Parameters
parameterName of the controllable parameter of this action
object_typeType of the object added by this action.
object_nameName of the object added by this action.
object_parameterName of the parameter of the object.

Definition at line 33 of file MooseBaseParameterInterface.C.

37 {
38  MooseObjectParameterName primary_name(uniqueName(), parameter);
39  const auto base_type = _factory.getValidParams(object_type).get<std::string>("_moose_base");
40  MooseObjectParameterName secondary_name(base_type, object_name, object_parameter);
42  primary_name, secondary_name);
43 
44  const auto & tags = _pars.get<std::vector<std::string>>("control_tags");
45  for (const auto & tag : tags)
46  {
47  if (!tag.empty())
48  {
49  // Only adds the parameter with the different control tags if the derived class
50  // properly registers the parameter to its own syntax
51  MooseObjectParameterName tagged_name(tag, _moose_base.name(), parameter);
53  tagged_name, secondary_name, /*error_on_empty=*/false);
54  }
55  }
56 }
void addControllableParameterConnection(const MooseObjectParameterName &primary, const MooseObjectParameterName &secondary, bool error_on_empty=true)
Method for linking control parameters of different names.
const MooseBase & _moose_base
The MooseBase object that inherits this class.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
Definition: MooseApp.C:2306
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
Definition: Factory.C:68
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:45
Factory & _factory
The Factory associated with the MooseApp.
MooseObjectName uniqueName() const
The unique name for accessing input parameters of this object in the InputParameterWarehouse.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
A class for storing an input parameter name.

◆ getCheckedPointerParam()

template<typename T >
T MooseBaseParameterInterface::getCheckedPointerParam ( const std::string &  name,
const std::string &  error_string = "" 
) const

Verifies that the requested parameter exists and is not NULL and returns it to the caller.

The template parameter must be a pointer or an error will be thrown.

Definition at line 268 of file MooseBaseParameterInterface.h.

270 {
271  return parameters().getCheckedPointerParam<T>(name, error_string);
272 }
std::string name(const ElemQuality q)
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller...
const InputParameters & parameters() const
Get the parameters of the object.

◆ getParam() [1/2]

template<typename T >
const T & MooseBaseParameterInterface::getParam ( const std::string &  name) const

Retrieve a parameter for the object.

Parameters
nameThe name of the parameter
Returns
The value of the parameter

Definition at line 204 of file MooseBaseParameterInterface.h.

Referenced by CreateDisplacedProblemAction::act(), AddPeriodicBCAction::act(), DiffusionPhysicsBase::addPostprocessors(), ADNodalKernel::ADNodalKernel(), ArrayParsedAux::ArrayParsedAux(), AddPeriodicBCAction::autoTranslationBoundaries(), BicubicSplineFunction::BicubicSplineFunction(), ComponentPhysicsInterface::ComponentPhysicsInterface(), FunctorAux::computeValue(), FEProblemBase::createTagSolutions(), CutMeshByLevelSetGenerator::CutMeshByLevelSetGenerator(), AccumulateReporter::declareLateValues(), DerivativeParsedMaterialTempl< is_ad >::DerivativeParsedMaterialTempl(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), EigenKernel::EigenKernel(), FEProblemBase::FEProblemBase(), FEProblemSolve::FEProblemSolve(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FVInterfaceKernel::FVInterfaceKernel(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), BlockDeletionGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenBlockGenerator::generate(), GeneratedMeshGenerator::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), MeshExtruderGenerator::generate(), GenericConstantRankTwoTensorTempl< is_ad >::GenericConstantRankTwoTensorTempl(), GenericConstantSymmetricRankTwoTensorTempl< is_ad >::GenericConstantSymmetricRankTwoTensorTempl(), MooseApp::getCheckpointDirectories(), DataFileInterface::getDataFileName(), ExecutorInterface::getExecutor(), GhostingUserObject::GhostingUserObject(), TimeSequenceStepper::init(), IterationAdaptiveDT::init(), AdvancedOutput::init(), AttribThread::initFrom(), AttribSysNum::initFrom(), AttribResidualObject::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), Console::initialSetup(), IterationAdaptiveDT::limitDTToPostprocessorValue(), MooseMesh::MooseMesh(), MooseVariableBase::MooseVariableBase(), MultiSystemSolveObject::MultiSystemSolveObject(), NestedDivision::NestedDivision(), ConsoleUtils::outputExecutionInformation(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedElementDeletionGenerator::ParsedElementDeletionGenerator(), ParsedExtraElementIDGenerator::ParsedExtraElementIDGenerator(), ParsedGenerateNodeset::ParsedGenerateNodeset(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedMaterialTempl< is_ad >::ParsedMaterialTempl(), ParsedNodeTransformGenerator::ParsedNodeTransformGenerator(), ParsedODEKernel::ParsedODEKernel(), ParsedPostprocessor::ParsedPostprocessor(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), PiecewiseConstantByBlockMaterialTempl< is_ad >::PiecewiseConstantByBlockMaterialTempl(), ReferenceResidualInterface::ReferenceResidualInterface(), RenameBlockGenerator::RenameBlockGenerator(), Moose::FV::setInterpolationMethod(), SetupMeshAction::setupMesh(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), TimePeriod::TimePeriod(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), FunctorIC::value(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), and VectorOfPostprocessors::VectorOfPostprocessors().

205 {
206  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0), &_moose_base);
207 }
const MooseBase & _moose_base
The MooseBase object that inherits this class.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type, const MooseBase *moose_base=nullptr)

◆ getParam() [2/2]

template<typename T1 , typename T2 >
std::vector< std::pair< T1, T2 > > MooseBaseParameterInterface::getParam ( const std::string &  param1,
const std::string &  param2 
) const

Retrieve two parameters and provide pair of parameters for the object.

Parameters
param1The name of first parameter
param2The name of second parameter
Returns
Vector of pairs of first and second parameters

Definition at line 261 of file MooseBaseParameterInterface.h.

262 {
263  return _pars.get<T1, T2>(param1, param2);
264 }
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ getRenamedParam()

template<typename T >
const T & MooseBaseParameterInterface::getRenamedParam ( const std::string &  old_name,
const std::string &  new_name 
) const

Retrieve a renamed parameter for the object.

This helper makes sure we check both names before erroring, and that only one parameter is passed to avoid silent errors

Parameters
old_namethe old name for the parameter
new_namethe new name for the parameter

Definition at line 211 of file MooseBaseParameterInterface.h.

213 {
214  // this enables having a default on the new parameter but bypassing it with the old one
215  // Most important: accept new parameter
216  if (isParamSetByUser(new_name) && !isParamValid(old_name))
217  return InputParameters::getParamHelper(new_name, _pars, static_cast<T *>(0), &_moose_base);
218  // Second most: accept old parameter
219  else if (isParamValid(old_name) && !isParamSetByUser(new_name))
220  return InputParameters::getParamHelper(old_name, _pars, static_cast<T *>(0), &_moose_base);
221  // Third most: accept default for new parameter
222  else if (isParamValid(new_name) && !isParamValid(old_name))
223  return InputParameters::getParamHelper(new_name, _pars, static_cast<T *>(0), &_moose_base);
224  // Refuse: no default, no value passed
225  else if (!isParamValid(old_name) && !isParamValid(new_name))
226  mooseError(_pars.blockFullpath() + ": parameter '" + new_name +
227  "' is being retrieved without being set.\n"
228  "Did you misspell it?");
229  // Refuse: both old and new parameters set by user
230  else
231  mooseError(_pars.blockFullpath() + ": parameter '" + new_name +
232  "' may not be provided alongside former parameter '" + old_name + "'");
233 }
const MooseBase & _moose_base
The MooseBase object that inherits this class.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
bool isParamSetByUser(const std::string &nm) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
std::string blockFullpath() const
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type, const MooseBase *moose_base=nullptr)

◆ isParamSetByUser()

bool MooseBaseParameterInterface::isParamSetByUser ( const std::string &  nm) const
inline

Test if the supplied parameter is set by a user, as opposed to not set or set to default.

Parameters
nmThe name of the parameter to test

Definition at line 117 of file MooseBaseParameterInterface.h.

Referenced by SetupDebugAction::act(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), DiffusionCG::addFEBCs(), DiffusionPhysicsBase::addInitialConditions(), DiffusionCG::addSolverVariables(), LibtorchNeuralNetControl::conditionalParameterError(), DiffusionPhysicsBase::DiffusionPhysicsBase(), ElementSubdomainModifierBase::ElementSubdomainModifierBase(), FixedPointSolve::FixedPointSolve(), getRenamedParam(), DefaultNonlinearConvergence::getSharedExecutionerParam(), PhysicsBase::initializePhysics(), ElementSubdomainModifierBase::initialSetup(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), SolutionInvalidityOutput::output(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), PetscExternalPartitioner::partition(), PiecewiseTabularBase::PiecewiseTabularBase(), MooseMesh::prepare(), SolutionUserObjectBase::readXda(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), TimedSubdomainModifier::TimedSubdomainModifier(), and XYDelaunayGenerator::XYDelaunayGenerator().

117 { return _pars.isParamSetByUser(nm); }
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ isParamValid()

bool MooseBaseParameterInterface::isParamValid ( const std::string &  name) const
inline

Test if the supplied parameter is valid.

Parameters
nameThe name of the parameter to test

Definition at line 111 of file MooseBaseParameterInterface.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), GridPartitioner::_do_partition(), CopyNodalVarsAction::act(), SetupMeshAction::act(), ComposeTimeStepperAction::act(), SetupDebugAction::act(), CreateDisplacedProblemAction::act(), SetAdaptivityOptionsAction::act(), CommonOutputAction::act(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), DiffusionCG::addFEKernels(), DiffusionFV::addFVBCs(), DiffusionFV::addFVKernels(), CylinderComponent::addMeshGenerators(), AddPeriodicBCAction::AddPeriodicBCAction(), DiffusionPhysicsBase::addPostprocessors(), AdvectiveFluxAux::AdvectiveFluxAux(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), AddPeriodicBCAction::autoTranslationBoundaries(), BicubicSplineFunction::BicubicSplineFunction(), BlockDeletionGenerator::BlockDeletionGenerator(), TimedSubdomainModifier::buildFromFile(), PiecewiseTabularBase::buildFromFile(), PiecewiseTabularBase::buildFromJSON(), ParsedChainControl::buildFunction(), GeneratedMesh::buildMesh(), MooseMesh::buildTypedMesh(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), CombinerGenerator::CombinerGenerator(), FunctorAux::computeValue(), CSVReaderVectorPostprocessor::CSVReaderVectorPostprocessor(), CutMeshByLevelSetGenerator::CutMeshByLevelSetGenerator(), CutMeshByLevelSetGeneratorBase::CutMeshByLevelSetGeneratorBase(), ConstantReporter::declareConstantReporterValues(), DGKernelBase::DGKernelBase(), DiffusionFluxAux::DiffusionFluxAux(), DomainUserObject::DomainUserObject(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), Eigenvalue::Eigenvalue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), PIDTransientControl::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), Exodus::Exodus(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), FEProblemBase::FEProblemBase(), FEProblemSolve::FEProblemSolve(), FieldSplitPreconditioner::FieldSplitPreconditioner(), FileOutput::FileOutput(), SpatialUserObjectVectorPostprocessor::fillPoints(), CombinerGenerator::fillPositions(), MultiApp::fillPositions(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FunctionDT::FunctionDT(), FunctionValuePostprocessor::FunctionValuePostprocessor(), FVInterfaceKernel::FVInterfaceKernel(), FVMassMatrix::FVMassMatrix(), FileMeshGenerator::generate(), AddMetaDataGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), ExtraNodesetGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), SubdomainPerElementGenerator::generate(), ElementGenerator::generate(), BlockDeletionGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainMeshGenerator::generate(), MeshExtruderGenerator::generate(), ParsedExtraElementIDGenerator::generate(), XYZDelaunayGenerator::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), SubdomainBoundingBoxGenerator::generate(), DistributedRectilinearMeshGenerator::generate(), PropertyReadFile::getFileNames(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), getRenamedParam(), MultiAppNearestNodeTransfer::getTargetLocalNodes(), Terminator::handleMessage(), HFEMDirichletBC::HFEMDirichletBC(), EigenExecutionerBase::init(), IterationAdaptiveDT::init(), Eigenvalue::init(), AdvancedOutput::initExecutionTypes(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), MultiAppCloneReporterTransfer::initialSetup(), MultiAppVariableValueSampleTransfer::initialSetup(), PiecewiseTabularBase::initialSetup(), ParsedConvergence::initialSetup(), SolutionScalarAux::initialSetup(), SolutionAux::initialSetup(), Console::initialSetup(), MooseParsedVectorFunction::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), MooseParsedGradFunction::initialSetup(), MooseParsedFunction::initialSetup(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), MassMatrix::MassMatrix(), MatCoupledForce::MatCoupledForce(), MatDiffusionBase< Real >::MatDiffusionBase(), MeshGeneratorComponent::MeshGeneratorComponent(), MooseMesh::MooseMesh(), MoosePreconditioner::MoosePreconditioner(), MooseVariableBase::MooseVariableBase(), MooseVariableFV< Real >::MooseVariableFV(), MortarConstraintBase::MortarConstraintBase(), MoveNodeGenerator::MoveNodeGenerator(), MultiApp::MultiApp(), MultiAppCloneReporterTransfer::MultiAppCloneReporterTransfer(), MultiAppGeneralFieldNearestLocationTransfer::MultiAppGeneralFieldNearestLocationTransfer(), MultiAppGeneralFieldShapeEvaluationTransfer::MultiAppGeneralFieldShapeEvaluationTransfer(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppPostprocessorInterpolationTransfer::MultiAppPostprocessorInterpolationTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppReporterTransfer::MultiAppReporterTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MultiAppVariableValueSampleTransfer::MultiAppVariableValueSampleTransfer(), MultiSystemSolveObject::MultiSystemSolveObject(), NodeSetsGeneratorBase::NodeSetsGeneratorBase(), EigenExecutionerBase::normalizeSolution(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), ParsedCurveGenerator::ParsedCurveGenerator(), PetscOutput::PetscOutput(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), PicardSolve::PicardSolve(), PIDTransientControl::PIDTransientControl(), PiecewiseTabularBase::PiecewiseTabularBase(), PlaneIDMeshGenerator::PlaneIDMeshGenerator(), MooseMesh::prepare(), MultiApp::readCommandLineArguments(), SolutionUserObjectBase::readExodusII(), ReferenceResidualInterface::ReferenceResidualInterface(), RenameBlockGenerator::RenameBlockGenerator(), ReporterPointSource::ReporterPointSource(), MooseMesh::setCoordSystem(), FileOutput::setFileBase(), FileOutput::setFileBaseInternal(), Split::setup(), SideSetsGeneratorBase::setup(), SetupMeshAction::setupMesh(), SideDiffusiveFluxIntegralTempl< is_ad, Real >::SideDiffusiveFluxIntegralTempl(), SideSetsGeneratorBase::SideSetsGeneratorBase(), SolutionUserObjectBase::SolutionUserObjectBase(), FEProblemSolve::solve(), WebServerControl::startServer(), Terminator::Terminator(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriod::TimePeriod(), MultiAppDofCopyTransfer::transfer(), TransformGenerator::TransformGenerator(), FunctorIC::value(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), WebServerControl::WebServerControl(), XYDelaunayGenerator::XYDelaunayGenerator(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

111 { return _pars.isParamValid(name); }
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ paramError()

template<typename... Args>
void MooseBaseParameterInterface::paramError ( const std::string &  param,
Args...  args 
) const

Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseError - only printing a message using the given args.

Definition at line 237 of file MooseBaseParameterInterface.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), AutoCheckpointAction::act(), SetupDebugAction::act(), AddPeriodicBCAction::act(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), DiffusionCG::addFEKernels(), DiffusionFV::addFVKernels(), ADDGKernel::ADDGKernel(), CylinderComponent::addMeshGenerators(), AddPeriodicBCAction::AddPeriodicBCAction(), ReporterPointSource::addPoints(), DiffusionCG::addSolverVariables(), ADIntegratedBCTempl< T >::ADIntegratedBCTempl(), ADKernelTempl< T >::ADKernelTempl(), ADNodalKernel::ADNodalKernel(), ADPenaltyPeriodicSegmentalConstraint::ADPenaltyPeriodicSegmentalConstraint(), ADPeriodicSegmentalConstraint::ADPeriodicSegmentalConstraint(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), AdvectiveFluxAux::AdvectiveFluxAux(), ADVectorFunctionDirichletBC::ADVectorFunctionDirichletBC(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), ArrayBodyForce::ArrayBodyForce(), ArrayDGKernel::ArrayDGKernel(), ArrayDGLowerDKernel::ArrayDGLowerDKernel(), ArrayDirichletBC::ArrayDirichletBC(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), ArrayIntegratedBC::ArrayIntegratedBC(), ArrayKernel::ArrayKernel(), ArrayLowerDIntegratedBC::ArrayLowerDIntegratedBC(), ArrayParsedAux::ArrayParsedAux(), ArrayPenaltyDirichletBC::ArrayPenaltyDirichletBC(), ArrayVacuumBC::ArrayVacuumBC(), AuxKernelTempl< Real >::AuxKernelTempl(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), BlockDeletionGenerator::BlockDeletionGenerator(), BlockWeightedPartitioner::BlockWeightedPartitioner(), BoundsBase::BoundsBase(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), BuildArrayVariableAux::BuildArrayVariableAux(), PiecewiseTabularBase::buildFromFile(), CartesianGridDivision::CartesianGridDivision(), checkComponent(), MeshGenerator::checkGetMesh(), ComponentInitialConditionInterface::checkInitialConditionsAllRequested(), BatchMeshGeneratorAction::checkInputParameterType(), PhysicsBase::checkIntegrityEarly(), PostprocessorInterface::checkParam(), FEProblemBase::checkProblemIntegrity(), MultiAppReporterTransfer::checkSiblingsTransferSupported(), Coupleable::checkVar(), MultiAppTransfer::checkVariable(), CircularBoundaryCorrectionGenerator::CircularBoundaryCorrectionGenerator(), CircularBoundaryCorrectionGenerator::circularCenterCalculator(), MultiAppGeneralFieldTransfer::closestToPosition(), CoarsenBlockGenerator::CoarsenBlockGenerator(), CombinerGenerator::CombinerGenerator(), ComponentInitialConditionInterface::ComponentInitialConditionInterface(), ComponentMaterialPropertyInterface::ComponentMaterialPropertyInterface(), CompositionDT::CompositionDT(), FunctorAux::computeValue(), ConcentricCircleMeshGenerator::ConcentricCircleMeshGenerator(), LibtorchNeuralNetControl::conditionalParameterError(), ConstantVectorPostprocessor::ConstantVectorPostprocessor(), ContainsPointAux::ContainsPointAux(), CopyValueAux::CopyValueAux(), Coupleable::Coupleable(), CoupledForceTempl< is_ad >::CoupledForceTempl(), CoupledValueFunctionMaterialTempl< is_ad >::CoupledValueFunctionMaterialTempl(), MultiApp::createApp(), MeshGeneratorSystem::createMeshGenerator(), CylindricalGridDivision::CylindricalGridDivision(), ConstantReporter::declareConstantReporterValues(), AccumulateReporter::declareLateValues(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DGLowerDKernel::DGLowerDKernel(), DiffusionFluxAux::DiffusionFluxAux(), DomainUserObject::DomainUserObject(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementLengthAux::ElementLengthAux(), ElementLpNormAux::ElementLpNormAux(), ElementValueSampler::ElementValueSampler(), ElementVectorL2Error::ElementVectorL2Error(), ReporterPointSource::errorCheck(), ExamplePatchMeshGenerator::ExamplePatchMeshGenerator(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), ExtraElementIDAux::ExtraElementIDAux(), ExtraElementIntegerDivision::ExtraElementIntegerDivision(), FEProblemSolve::FEProblemSolve(), FileMeshGenerator::FileMeshGenerator(), FillBetweenCurvesGenerator::FillBetweenCurvesGenerator(), FillBetweenSidesetsGenerator::FillBetweenSidesetsGenerator(), ReporterPointSource::fillPoint(), SpatialUserObjectVectorPostprocessor::fillPoints(), CombinerGenerator::fillPositions(), MultiApp::fillPositions(), InternalSideIndicator::finalize(), FixedPointSolve::FixedPointSolve(), ForcingFunctionAux::ForcingFunctionAux(), FullSolveMultiApp::FullSolveMultiApp(), FunctionArrayAux::FunctionArrayAux(), FunctionValuePostprocessor::FunctionValuePostprocessor(), FunctorADConverterTempl< T >::FunctorADConverterTempl(), FunctorAux::FunctorAux(), FunctorBinnedValuesDivision::FunctorBinnedValuesDivision(), FunctorCoordinatesFunctionAux::FunctorCoordinatesFunctionAux(), FunctorElementalGradientAuxTempl< is_ad >::FunctorElementalGradientAuxTempl(), FunctorIC::FunctorIC(), FunctorPositions::FunctorPositions(), FunctorVectorElementalAuxTempl< is_ad >::FunctorVectorElementalAuxTempl(), FVAdvection::FVAdvection(), FVFluxBC::FVFluxBC(), FVInterfaceKernel::FVInterfaceKernel(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), FVTwoVarContinuityConstraint::FVTwoVarContinuityConstraint(), BoundaryDeletionGenerator::generate(), FillBetweenSidesetsGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), PlaneIDMeshGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), AddMetaDataGenerator::generate(), BlockToMeshConverterGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), ElementsToTetrahedronsConverter::generate(), ExtraNodesetGenerator::generate(), FillBetweenCurvesGenerator::generate(), BlockDeletionGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenBlockGenerator::generate(), FlipSidesetGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainMeshGenerator::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), AdvancedExtruderGenerator::generate(), CircularBoundaryCorrectionGenerator::generate(), CombinerGenerator::generate(), MeshCollectionGenerator::generate(), MeshExtruderGenerator::generate(), ParsedCurveGenerator::generate(), ParsedExtraElementIDGenerator::generate(), StackGenerator::generate(), StitchedMeshGenerator::generate(), XYZDelaunayGenerator::generate(), BreakMeshByElementGenerator::generate(), CutMeshByLevelSetGeneratorBase::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), PatternedMeshGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), GeneratedMeshGenerator::GeneratedMeshGenerator(), GenericFunctorGradientMaterialTempl< is_ad >::GenericFunctorGradientMaterialTempl(), GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl(), GenericFunctorTimeDerivativeMaterialTempl< is_ad >::GenericFunctorTimeDerivativeMaterialTempl(), GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl(), PropertyReadFile::getBlockData(), ComponentBoundaryConditionInterface::getBoundaryCondition(), MultiApp::getCommandLineArgs(), PropertyReadFile::getData(), PropertyReadFile::getFileNames(), Sampler::getGlobalSamples(), ComponentInitialConditionInterface::getInitialCondition(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), Sampler::getLocalSamples(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), Sampler::getNextLocalRow(), FEProblemSolve::getParamFromNonlinearSystemVectorParam(), PostprocessorInterface::getPostprocessorNameInternal(), PostprocessorInterface::getPostprocessorValueInternal(), MultiAppNearestNodeTransfer::getTargetLocalNodes(), UserObjectInterface::getUserObjectBase(), UserObjectInterface::getUserObjectName(), HFEMDirichletBC::HFEMDirichletBC(), AddVariableAction::init(), MultiApp::init(), DistributedPositions::initialize(), BlockWeightedPartitioner::initialize(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), PhysicsBase::initializePhysics(), MultiAppCloneReporterTransfer::initialSetup(), ElementSubdomainModifierBase::initialSetup(), SideFVFluxBCIntegral::initialSetup(), MultiAppVariableValueSamplePostprocessorTransfer::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), HistogramVectorPostprocessor::initialSetup(), ReferenceResidualConvergence::initialSetup(), PiecewiseConstantFromCSV::initialSetup(), LibtorchControlValuePostprocessor::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), AddMetaDataGenerator::inputChecker(), IntegratedBC::IntegratedBC(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceValueUserObjectAux::InterfaceValueUserObjectAux(), InterpolatedStatefulMaterialTempl< T >::InterpolatedStatefulMaterialTempl(), InversePowerMethod::InversePowerMethod(), IterationAdaptiveDT::IterationAdaptiveDT(), MultiApp::keepSolutionDuringRestore(), Kernel::Kernel(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), LinearCombinationFunction::LinearCombinationFunction(), LowerDIntegratedBC::LowerDIntegratedBC(), PNGOutput::makeMeshFunc(), MatCoupledForce::MatCoupledForce(), MaterialADConverterTempl< T >::MaterialADConverterTempl(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), PatternedMeshGenerator::mergeSubdomainNameMaps(), MeshCollectionGenerator::MeshCollectionGenerator(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MeshDivisionAux::MeshDivisionAux(), MeshGenerator::MeshGenerator(), MeshGeneratorComponent::MeshGeneratorComponent(), MooseLinearVariableFV< Real >::MooseLinearVariableFV(), UserObjectInterface::mooseObjectError(), MoosePreconditioner::MoosePreconditioner(), MooseVariableBase::MooseVariableBase(), MortarConstraintBase::MortarConstraintBase(), MortarNodalAuxKernelTempl< ComputeValueType >::MortarNodalAuxKernelTempl(), MultiApp::moveApp(), MoveNodeGenerator::MoveNodeGenerator(), MultiApp::MultiApp(), MultiAppCloneReporterTransfer::MultiAppCloneReporterTransfer(), MultiAppGeneralFieldNearestLocationTransfer::MultiAppGeneralFieldNearestLocationTransfer(), MultiAppGeneralFieldShapeEvaluationTransfer::MultiAppGeneralFieldShapeEvaluationTransfer(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppGeometricInterpolationTransfer::MultiAppGeometricInterpolationTransfer(), MultiAppNearestNodeTransfer::MultiAppNearestNodeTransfer(), MultiAppPostprocessorInterpolationTransfer::MultiAppPostprocessorInterpolationTransfer(), MultiAppPostprocessorToAuxScalarTransfer::MultiAppPostprocessorToAuxScalarTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppProjectionTransfer::MultiAppProjectionTransfer(), MultiAppReporterTransfer::MultiAppReporterTransfer(), MultiAppScalarToAuxScalarTransfer::MultiAppScalarToAuxScalarTransfer(), MultiAppShapeEvaluationTransfer::MultiAppShapeEvaluationTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), MultiAppVariableValueSampleTransfer::MultiAppVariableValueSampleTransfer(), MultiAppVectorPostprocessorTransfer::MultiAppVectorPostprocessorTransfer(), MultiSystemSolveObject::MultiSystemSolveObject(), NestedDivision::NestedDivision(), NodalBC::NodalBC(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalPatchRecoveryAux::NodalPatchRecoveryAux(), NodalValueSampler::NodalValueSampler(), Output::Output(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedElementDeletionGenerator::ParsedElementDeletionGenerator(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), ParsedGenerateNodeset::ParsedGenerateNodeset(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedNodeTransformGenerator::ParsedNodeTransformGenerator(), PatternedMeshGenerator::PatternedMeshGenerator(), PenaltyPeriodicSegmentalConstraint::PenaltyPeriodicSegmentalConstraint(), PeriodicSegmentalConstraint::PeriodicSegmentalConstraint(), PIDTransientControl::PIDTransientControl(), PlaneDeletionGenerator::PlaneDeletionGenerator(), PlaneIDMeshGenerator::PlaneIDMeshGenerator(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), PolyLineMeshGenerator::PolyLineMeshGenerator(), ReporterInterface::possiblyCheckHasReporter(), VectorPostprocessorInterface::possiblyCheckHasVectorPostprocessor(), LibmeshPartitioner::prepareBlocksForSubdomainPartitioner(), ProjectedMaterialPropertyNodalPatchRecoveryAux::ProjectedMaterialPropertyNodalPatchRecoveryAux(), ProjectionAux::ProjectionAux(), PropertyReadFile::PropertyReadFile(), RandomIC::RandomIC(), MultiApp::readCommandLineArguments(), PropertyReadFile::readData(), SolutionUserObjectBase::readXda(), ReferenceResidualConvergence::ReferenceResidualConvergence(), RefineBlockGenerator::RefineBlockGenerator(), RefineSidesetGenerator::RefineSidesetGenerator(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), ReporterPointSource::ReporterPointSource(), SecondTimeDerivativeAux::SecondTimeDerivativeAux(), FEProblemBase::setNonlinearConvergenceNames(), MooseMesh::setPartitioner(), NodeSetsGeneratorBase::setup(), SideSetsGeneratorBase::setup(), TimeSequenceStepperBase::setupSequence(), SidesetAroundSubdomainUpdater::SidesetAroundSubdomainUpdater(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SingleRankPartitioner::SingleRankPartitioner(), SphericalGridDivision::SphericalGridDivision(), SymmetryTransformGenerator::SymmetryTransformGenerator(), Terminator::Terminator(), TimeDerivativeAux::TimeDerivativeAux(), Transfer::Transfer(), TransformGenerator::TransformGenerator(), TransientMultiApp::TransientMultiApp(), ParsedCurveGenerator::tSectionSpaceDefiner(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), UserObject::UserObject(), Checkpoint::validateExecuteOn(), ParsedAux::validateGenericVectorNames(), ParsedMaterialBase::validateVectorNames(), FunctorIC::value(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), VolumeAux::VolumeAux(), WebServerControl::WebServerControl(), XYDelaunayGenerator::XYDelaunayGenerator(), XYMeshLineCutter::XYMeshLineCutter(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

238 {
239  Moose::show_trace = false;
240  _moose_base.callMooseError(paramErrorMsg(param, std::forward<Args>(args)...),
241  /* with_prefix = */ false);
242  Moose::show_trace = true;
243 }
bool show_trace
Set to true (the default) to print the stack trace with error and warning messages - false to omit it...
Definition: Moose.C:707
const MooseBase & _moose_base
The MooseBase object that inherits this class.
std::string paramErrorMsg(const std::string &param, Args... args) const
void callMooseError(std::string msg, const bool with_prefix) const
Calls moose error with the message msg.
Definition: MooseBase.C:33

◆ paramErrorMsg()

template<typename... Args>
std::string MooseBaseParameterInterface::paramErrorMsg ( const std::string &  param,
Args...  args 
) const
inlineprivate

Definition at line 175 of file MooseBaseParameterInterface.h.

Referenced by paramError(), paramInfo(), and paramWarning().

176  {
177  auto param_prefix = paramErrorPrefix(_pars, param);
178 
179  // With no input location information, append object info (name + type)
180  const std::string object_prefix =
181  _pars.inputLocation(param).empty() ? _moose_base.errorPrefix("parameter error") : "";
182 
183  std::ostringstream oss;
184  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
185  std::string msg = oss.str();
186 
187  // Wrap error message to a separate line from param_prefix if it is about to
188  // blow past 100 chars. But only wrap if the param_prefix is long enough (12
189  // chars) for the wrap to buy us much extra length. We don't check object_prefix
190  // here because it will go before the parameter error
191  if ((param_prefix.size() > 12 && msg.size() + param_prefix.size() > 99) ||
192  msg.find("\n") != std::string::npos)
193  {
194  if (param_prefix.size() > 0 && param_prefix[param_prefix.size() - 1] != ':')
195  param_prefix += ":";
196  return object_prefix + param_prefix + "\n " + MooseUtils::replaceAll(msg, "\n", "\n ");
197  }
198  return object_prefix + param_prefix + " " + msg;
199  }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:94
const MooseBase & _moose_base
The MooseBase object that inherits this class.
std::string errorPrefix(const std::string &error_type) const
Definition: MooseBase.C:43
std::string inputLocation(const std::string &param) const
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
std::string replaceAll(std::string str, const std::string &from, const std::string &to)
Replaces all occurrences of from in str with to and returns the result.
Definition: MooseUtils.C:141
std::string paramErrorPrefix(const InputParameters &params, const std::string &param)
Get canonical paramError prefix for param-related error/warning/info messages.

◆ parameters()

const InputParameters& MooseBaseParameterInterface::parameters ( ) const
inline

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 62 of file MooseBaseParameterInterface.h.

Referenced by AddDefaultConvergenceAction::act(), SetupDebugAction::act(), AddActionComponentAction::act(), CommonOutputAction::act(), Action::Action(), FEProblemBase::addAnyRedistributers(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), FEProblemBase::addBoundaryCondition(), FEProblemBase::addConstraint(), FEProblemBase::addConvergence(), FEProblemBase::addDamper(), ReferenceResidualProblem::addDefaultNonlinearConvergence(), FEProblemBase::addDefaultNonlinearConvergence(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), FEProblemBase::addFunction(), FEProblemBase::addFunctorMaterial(), FEProblemBase::addFVBC(), FEProblemBase::addFVInitialCondition(), FEProblemBase::addFVInterfaceKernel(), FEProblemBase::addFVKernel(), FEProblemBase::addHDGIntegratedBC(), FEProblemBase::addHDGKernel(), FEProblemBase::addIndicator(), FEProblemBase::addInitialCondition(), DiffusionPhysicsBase::addInitialConditions(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addInterfaceMaterial(), FEProblemBase::addKernel(), FEProblemBase::addLinearFVBC(), FEProblemBase::addLinearFVKernel(), FEProblem::addLineSearch(), FEProblemBase::addMarker(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMeshDivision(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObject(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addOutput(), FEProblemBase::addPostprocessor(), FEProblemBase::addPredictor(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), DisplacedProblem::addVariable(), FEProblemBase::addVectorPostprocessor(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), AdvancedOutput::AdvancedOutput(), ADVectorFunctionDirichletBC::ADVectorFunctionDirichletBC(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), Action::associateWithParameter(), AuxKernelTempl< Real >::AuxKernelTempl(), AuxScalarKernel::AuxScalarKernel(), BoundsBase::BoundsBase(), MooseMesh::buildTypedMesh(), PostprocessorInterface::checkParam(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), OversampleOutput::cloneMesh(), LibtorchNeuralNetControl::conditionalParameterError(), Console::Console(), CommonOutputAction::create(), MultiApp::createApp(), Postprocessor::declareValue(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), DumpObjectsProblem::DumpObjectsProblem(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), ElementMaterialSampler::ElementMaterialSampler(), ExamplePatchMeshGenerator::ExamplePatchMeshGenerator(), Executor::Executor(), Exodus::Exodus(), FEProblem::FEProblem(), FEProblemBase::FEProblemBase(), FixedPointSolve::FixedPointSolve(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), GapValueAux::GapValueAux(), ParsedSubdomainMeshGenerator::generate(), getCheckedPointerParam(), ActionWarehouse::getCurrentActionName(), ExecutorInterface::getExecutor(), Material::getMaterial(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), UserObjectInterface::getUserObjectName(), VectorPostprocessorInterface::getVectorPostprocessorName(), GhostingUserObject::GhostingUserObject(), AttribSystem::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), FullSolveMultiApp::initialSetup(), FEProblemBase::initNullSpaceVectors(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), isValid(), IterationAdaptiveDT::IterationAdaptiveDT(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), MooseObject::MooseObject(), UserObjectInterface::mooseObjectError(), MooseVariableInterface< Real >::MooseVariableInterface(), MultiApp::MultiApp(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), NodeFaceConstraint::NodeFaceConstraint(), OverlayMeshGenerator::OverlayMeshGenerator(), PenetrationAux::PenetrationAux(), PicardSolve::PicardSolve(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), ProjectedStatefulMaterialStorageAction::processProperty(), PropertyReadFile::PropertyReadFile(), PseudoTimestep::PseudoTimestep(), RandomIC::RandomIC(), ReferenceResidualConvergence::ReferenceResidualConvergence(), InputParameterWarehouse::removeInputParameters(), OutputWarehouse::resetFileBase(), FEProblem::setInputParametersFEProblem(), FEProblemBase::setInputParametersFEProblem(), FEProblemBase::setResidualObjectParamsAndLog(), SideSetsGeneratorBase::setup(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SteffensenSolve::SteffensenSolve(), Moose::PetscSupport::storePetscOptions(), DumpObjectsProblem::stringifyParameters(), TaggingInterface::TaggingInterface(), Transfer::Transfer(), TransientBase::TransientBase(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), and VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl().

62 { return _pars; }
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ paramInfo()

template<typename... Args>
void MooseBaseParameterInterface::paramInfo ( const std::string &  param,
Args...  args 
) const

Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseInfo - only printing a message using the given args.

Definition at line 254 of file MooseBaseParameterInterface.h.

Referenced by GridPartitioner::_do_partition(), ComboMarker::ComboMarker(), FunctorIC::FunctorIC(), and TransientMultiApp::TransientMultiApp().

255 {
256  mooseInfo(paramErrorMsg(param, std::forward<Args>(args)...));
257 }
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
Definition: MooseError.h:369
std::string paramErrorMsg(const std::string &param, Args... args) const

◆ paramWarning()

template<typename... Args>
void MooseBaseParameterInterface::paramWarning ( const std::string &  param,
Args...  args 
) const

Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseWarning - only printing a message using the given args.

Definition at line 247 of file MooseBaseParameterInterface.h.

Referenced by GridPartitioner::_do_partition(), EigenProblem::checkProblemIntegrity(), CombinerGenerator::copyIntoMesh(), MultiAppNearestNodeTransfer::execute(), FEProblemSolve::FEProblemSolve(), FixedPointSolve::FixedPointSolve(), UniqueExtraIDMeshGenerator::generate(), PlaneIDMeshGenerator::generate(), Terminator::initialSetup(), MooseMesh::MooseMesh(), FEProblemBase::setPreserveMatrixSparsityPattern(), and Terminator::Terminator().

248 {
249  mooseWarning(paramErrorMsg(param, std::forward<Args>(args)...));
250 }
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition: MooseError.h:336
std::string paramErrorMsg(const std::string &param, Args... args) const

◆ uniqueName()

MooseObjectName MooseBaseParameterInterface::uniqueName ( ) const
inline

The unique name for accessing input parameters of this object in the InputParameterWarehouse.

Definition at line 67 of file MooseBaseParameterInterface.h.

Referenced by connectControllableParams(), and Action::uniqueActionName().

68  {
69  return MooseObjectName(_pars.get<std::string>("_unique_name"));
70  }
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
A class for storing the names of MooseObject by tag and object name.

◆ uniqueParameterName()

MooseObjectParameterName MooseBaseParameterInterface::uniqueParameterName ( const std::string &  parameter_name) const
inline

The unique parameter name of a valid parameter of this object for accessing parameter controls.

Definition at line 52 of file MooseBaseParameterInterface.h.

53  {
55  _pars.get<std::string>("_moose_base"), _moose_base.name(), parameter_name);
56  }
const MooseBase & _moose_base
The MooseBase object that inherits this class.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
A class for storing an input parameter name.

Member Data Documentation

◆ _action_factory

ActionFactory& MooseBaseParameterInterface::_action_factory
protected

◆ _factory

Factory& MooseBaseParameterInterface::_factory
protected

◆ _moose_base

const MooseBase& MooseBaseParameterInterface::_moose_base
private

The MooseBase object that inherits this class.

Definition at line 172 of file MooseBaseParameterInterface.h.

Referenced by connectControllableParams(), getParam(), getRenamedParam(), paramError(), paramErrorMsg(), and uniqueParameterName().

◆ _pars

const InputParameters& MooseBaseParameterInterface::_pars
protected

Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

Definition at line 162 of file MooseBaseParameterInterface.h.

Referenced by AddFVICAction::act(), AddICAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), SetupMeshAction::act(), ComposeTimeStepperAction::act(), SetupDebugAction::act(), AddAuxKernelAction::act(), AddVariableAction::act(), CommonOutputAction::act(), AddPeriodicBCAction::act(), FunctorMaterial::addFunctorPropertyByBlocks(), FVFluxKernel::adjustRMGhostLayers(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), PiecewiseTabularBase::buildFromFile(), PNGOutput::calculateRescalingValues(), connectControllableParams(), Console::Console(), AddVariableAction::createInitialConditionAction(), MaterialBase::declareADProperty(), MaterialBase::declareProperty(), FEProblemSolve::FEProblemSolve(), FunctionMaterialBase< is_ad >::FunctionMaterialBase(), FVAdvection::FVAdvection(), FVAnisotropicDiffusion::FVAnisotropicDiffusion(), FVDiffusion::FVDiffusion(), FileMeshGenerator::generate(), MaterialBase::getGenericZeroMaterialProperty(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), getParam(), getRenamedParam(), MeshGenerator::hasGenerateData(), AddVariableAction::init(), AdvancedOutput::initExecutionTypes(), Console::initialSetup(), isParamSetByUser(), isParamValid(), MultiApp::keepSolutionDuringRestore(), MooseBaseParameterInterface(), paramErrorMsg(), GlobalParamsAction::parameters(), parameters(), MooseMesh::prepare(), Eigenvalue::prepareSolverOptions(), MooseMesh::setCoordSystem(), MooseMesh::setPartitionerHelper(), SetupMeshAction::setupMesh(), TransientBase::setupTimeIntegrator(), uniqueName(), and uniqueParameterName().


The documentation for this class was generated from the following files: