https://mooseframework.inl.gov
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
SolutionInvalidInterface Class Reference

An interface that allows the marking of invalid solutions during a solve. More...

#include <SolutionInvalidInterface.h>

Inheritance diagram for SolutionInvalidInterface:
[legend]

Public Member Functions

 SolutionInvalidInterface (const MooseBase *const moose_base, const InputParameters &params)
 
 SolutionInvalidInterface (const SolutionInvalidInterface &object, const Moose::Kokkos::FunctorCopy &key)
 Special constructor used for Kokkos functor copy during parallel dispatch. More...
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 
template<typename... Args>
void mooseWarningNonPrefixed (Args &&... args) const
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args) const
 

Protected Member Functions

template<bool warning>
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 Set solution invalid mark for the given solution ID. More...
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 

Private Attributes

const MooseBase_si_moose_base
 The MooseBase that owns this interface. More...
 
const FEProblemBase_si_problem
 A pointer to FEProblem base. More...
 

Detailed Description

An interface that allows the marking of invalid solutions during a solve.

Definition at line 59 of file SolutionInvalidInterface.h.

Constructor & Destructor Documentation

◆ SolutionInvalidInterface() [1/2]

SolutionInvalidInterface::SolutionInvalidInterface ( const MooseBase *const  moose_base,
const InputParameters params 
)

Definition at line 17 of file SolutionInvalidInterface.C.

19  : _si_moose_base(*moose_base),
21  parameters.isParamValid("_fe_problem_base") ?
22  // MooseObjects get the problem that way
23  parameters.get<FEProblemBase *>("_fe_problem_base")
24  :
25  // Actions get the problem that way
26  parameters.getCheckedPointerParam<ActionWarehouse *>("awh")->problemBase().get())
27 {
28 }
const FEProblemBase * _si_problem
A pointer to FEProblem base.
Storage for action instances.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
std::shared_ptr< FEProblemBase > & problemBase()
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...
Definition: MooseBase.h:432
const MooseBase & _si_moose_base
The MooseBase that owns this interface.

◆ SolutionInvalidInterface() [2/2]

SolutionInvalidInterface::SolutionInvalidInterface ( const SolutionInvalidInterface object,
const Moose::Kokkos::FunctorCopy key 
)

Special constructor used for Kokkos functor copy during parallel dispatch.

Definition at line 31 of file SolutionInvalidInterface.C.

34 {
35 }
const FEProblemBase * _si_problem
A pointer to FEProblem base.
const MooseBase & _si_moose_base
The MooseBase that owns this interface.

Member Function Documentation

◆ flagInvalidSolutionInternal()

template<bool warning>
template void SolutionInvalidInterface::flagInvalidSolutionInternal< false > ( const InvalidSolutionID  invalid_solution_id) const
protected

Set solution invalid mark for the given solution ID.

Definition at line 41 of file SolutionInvalidInterface.C.

43 {
44  mooseAssert(
45  warning == moose::internal::getSolutionInvalidityRegistry().item(invalid_solution_id).warning,
46  "Inconsistent warning flag");
47  auto & solution_invalidity = _si_moose_base.getMooseApp().solutionInvalidity();
48  if constexpr (!warning)
50  solution_invalidity.printDebug(invalid_solution_id);
51  return solution_invalidity.flagInvalidSolutionInternal(invalid_solution_id);
52 }
const FEProblemBase * _si_problem
A pointer to FEProblem base.
void printDebug(InvalidSolutionID _invalid_solution_id) const
Immediately print the section and message for debug purpose.
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:87
SolutionInvalidity & solutionInvalidity()
Get the SolutionInvalidity for this app.
Definition: MooseApp.h:179
SolutionInvalidityRegistry & getSolutionInvalidityRegistry()
Get the global SolutionInvalidityRegistry singleton.
bool immediatelyPrintInvalidSolution() const
Whether or not the solution invalid warnings are printed out immediately.
const MooseBase & _si_moose_base
The MooseBase that owns this interface.

◆ mooseDeprecated()

template<typename... Args>
void SolutionInvalidInterface::mooseDeprecated ( Args &&...  args) const
inline

Definition at line 87 of file SolutionInvalidInterface.h.

Referenced by FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), FEProblemBase::advanceMultiApps(), MultiApp::appProblem(), ChangeOverTimestepPostprocessor::ChangeOverTimestepPostprocessor(), AddVariableAction::determineType(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), MooseMesh::elem(), UserForcingFunction::f(), FaceFaceConstraint::FaceFaceConstraint(), FunctionDT::FunctionDT(), RandomICBase::generateRandom(), MooseMesh::getBoundariesToElems(), Control::getExecuteOptions(), FEProblemBase::getNonlinearSystem(), FEProblemBase::getUserObjects(), FEProblemBase::hasPostprocessor(), MatDiffusionBase< Real >::MatDiffusionBase(), MultiAppNearestNodeTransfer::MultiAppNearestNodeTransfer(), MultiAppShapeEvaluationTransfer::MultiAppShapeEvaluationTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NodalScalarKernel::NodalScalarKernel(), MooseMesh::node(), FixedPointSolve::numPicardIts(), RelationshipManager::operator>=(), PercentChangePostprocessor::PercentChangePostprocessor(), ReferenceResidualConvergence::ReferenceResidualConvergence(), Residual::Residual(), MooseMesh::setBoundaryToNormalMap(), Exodus::setOutputDimension(), TagVectorAux::TagVectorAux(), UserForcingFunction::UserForcingFunction(), and VariableResidual::VariableResidual().

88  {
89  _si_moose_base.MooseBase::mooseDeprecated(std::forward<Args>(args)...);
90  flagSolutionWarningMultipleRegistration(_si_moose_base.name() + ": deprecation");
91  }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
const MooseBase & _si_moose_base
The MooseBase that owns this interface.

◆ mooseWarning()

template<typename... Args>
void SolutionInvalidInterface::mooseWarning ( Args &&...  args) const
inline

Definition at line 73 of file SolutionInvalidInterface.h.

Referenced by CopyMeshPartitioner::_do_partition(), AddKernelAction::act(), MeshOnlyAction::act(), AddFunctionAction::act(), MaterialOutputAction::act(), CommonOutputAction::act(), MFEMProblem::addFunction(), MooseMesh::addPeriodicVariable(), DiracKernelBase::addPoint(), BoundaryMarker::BoundaryMarker(), DistributedRectilinearMeshGenerator::buildCube(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), CartesianMeshGenerator::CartesianMeshGenerator(), CheckOutputAction::checkConsoleOutput(), MultiAppTransfer::checkMultiAppExecuteOn(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), ActionComponent::checkRequiredTasks(), PhysicsBase::checkRequiredTasks(), SampledOutput::cloneMesh(), MultiAppGeneralFieldTransfer::closestToPosition(), VariableValueElementSubdomainModifier::computeSubdomainID(), GapValueAux::computeValue(), MultiApp::createApp(), DebugResidualAux::DebugResidualAux(), MeshDiagnosticsGenerator::diagnosticsLog(), CylindricalGridDivision::divisionIndex(), SphericalGridDivision::divisionIndex(), CartesianGridDivision::divisionIndex(), ElementMaterialSampler::ElementMaterialSampler(), Postprocessor::evaluateDotWarning(), MeshDivisionFunctorReductionVectorPostprocessor::execute(), ElementQualityChecker::finalize(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FixedPointSolve::FixedPointSolve(), SubdomainPerElementGenerator::generate(), StitchMeshGenerator::generate(), ParsedGenerateSideset::generate(), MultiAppTransfer::getAppInfo(), FunctorBinnedValuesDivision::getBinIndex(), MFEMVectorFESpace::getFECName(), PointSamplerBase::getLocalElemContainingPoint(), FEProblemBase::getMaterial(), LineValueSampler::getValue(), Terminator::handleMessage(), IndicatorMarker::IndicatorMarker(), CylindricalGridDivision::initialize(), SphericalGridDivision::initialize(), ElementGroupCentroidPositions::initialize(), CartesianGridDivision::initialize(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), BoundsBase::initialSetup(), ReferenceResidualConvergence::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MaterialBase::initStatefulProperties(), LeastSquaresFit::LeastSquaresFit(), IterationAdaptiveDT::limitDTToPostprocessorValue(), FEProblemBase::mesh(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), NewmarkBeta::NewmarkBeta(), NodalPatchRecovery::NodalPatchRecovery(), NonlocalIntegratedBC::NonlocalIntegratedBC(), NonlocalKernel::NonlocalKernel(), Output::Output(), MaterialOutputAction::outputHelper(), MultiAppGeneralFieldTransfer::outputValueConflicts(), PiecewiseConstantFromCSV::PiecewiseConstantFromCSV(), Executioner::problem(), PropertyReadFile::readData(), TestSourceStepper::rejectStep(), PhysicsBase::reportPotentiallyMissedParameters(), MaterialBase::resetQpProperties(), SecondTimeDerivativeAux::SecondTimeDerivativeAux(), MooseMesh::setCoordSystem(), SidesetAroundSubdomainUpdater::SidesetAroundSubdomainUpdater(), FEProblemBase::sizeZeroes(), TransientMultiApp::solveStep(), Tecplot::Tecplot(), TimeDerivativeAux::TimeDerivativeAux(), Checkpoint::updateCheckpointFiles(), SampledOutput::updateSample(), PiecewiseConstantFromCSV::value(), and VariableCondensationPreconditioner::VariableCondensationPreconditioner().

74  {
75  _si_moose_base.MooseBase::mooseWarning(std::forward<Args>(args)...);
76  flagSolutionWarningMultipleRegistration(_si_moose_base.name() + ": warning");
77  }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
const MooseBase & _si_moose_base
The MooseBase that owns this interface.

◆ mooseWarningNonPrefixed()

template<typename... Args>
void SolutionInvalidInterface::mooseWarningNonPrefixed ( Args &&...  args) const
inline

Definition at line 80 of file SolutionInvalidInterface.h.

81  {
82  _si_moose_base.MooseBase::mooseWarningNonPrefixed(std::forward<Args>(args)...);
83  flagSolutionWarningMultipleRegistration(_si_moose_base.name() + ": warning");
84  }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
const MooseBase & _si_moose_base
The MooseBase that owns this interface.

◆ paramWarning()

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

◆ registerInvalidSolutionInternal()

InvalidSolutionID SolutionInvalidInterface::registerInvalidSolutionInternal ( const std::string &  message,
const bool  warning 
) const
protected

Definition at line 55 of file SolutionInvalidInterface.C.

57 {
59  _si_moose_base.type(), message, warning);
60 }
InvalidSolutionID registerInvalidity(const std::string &object_type, const std::string &message, const bool warning)
Call to register an invalid calculation.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
SolutionInvalidityRegistry & getSolutionInvalidityRegistry()
Get the global SolutionInvalidityRegistry singleton.
const MooseBase & _si_moose_base
The MooseBase that owns this interface.

Member Data Documentation

◆ _si_moose_base

const MooseBase& SolutionInvalidInterface::_si_moose_base
private

◆ _si_problem

const FEProblemBase* SolutionInvalidInterface::_si_problem
private

A pointer to FEProblem base.

Definition at line 114 of file SolutionInvalidInterface.h.

Referenced by flagInvalidSolutionInternal().


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