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 MooseObject *const moose_object)
 
 SolutionInvalidInterface (const SolutionInvalidInterface &object, const Moose::Kokkos::FunctorCopy &key)
 Special constructor used for Kokkos functor copy during parallel dispatch. More...
 

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 MooseObject_si_moose_object
 The MooseObject that owns this interface. More...
 
const FEProblemBase_si_problem
 A reference to FEProblem base. More...
 

Detailed Description

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

Definition at line 37 of file SolutionInvalidInterface.h.

Constructor & Destructor Documentation

◆ SolutionInvalidInterface() [1/2]

SolutionInvalidInterface::SolutionInvalidInterface ( const MooseObject *const  moose_object)

Definition at line 17 of file SolutionInvalidInterface.C.

18  : _si_moose_object(*moose_object),
21 {
22 }
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
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...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const FEProblemBase & _si_problem
A reference to FEProblem base.
const MooseObject & _si_moose_object
The MooseObject 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 25 of file SolutionInvalidInterface.C.

28 {
29 }
const FEProblemBase & _si_problem
A reference to FEProblem base.
const MooseObject & _si_moose_object
The MooseObject 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 35 of file SolutionInvalidInterface.C.

37 {
38  mooseAssert(
39  warning == moose::internal::getSolutionInvalidityRegistry().item(invalid_solution_id).warning,
40  "Inconsistent warning flag");
41  auto & solution_invalidity = _si_moose_object.getMooseApp().solutionInvalidity();
42  if constexpr (!warning)
44  solution_invalidity.printDebug(invalid_solution_id);
45  return solution_invalidity.flagInvalidSolutionInternal(invalid_solution_id);
46 }
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
const FEProblemBase & _si_problem
A reference to FEProblem base.
const MooseObject & _si_moose_object
The MooseObject that owns this interface.
SolutionInvalidityRegistry & getSolutionInvalidityRegistry()
Get the global SolutionInvalidityRegistry singleton.
bool immediatelyPrintInvalidSolution() const
Whether or not the solution invalid warnings are printed out immediately.

◆ registerInvalidSolutionInternal()

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

Definition at line 49 of file SolutionInvalidInterface.C.

51 {
53  _si_moose_object.type(), message, warning);
54 }
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
const MooseObject & _si_moose_object
The MooseObject that owns this interface.
SolutionInvalidityRegistry & getSolutionInvalidityRegistry()
Get the global SolutionInvalidityRegistry singleton.

Member Data Documentation

◆ _si_moose_object

const MooseObject& SolutionInvalidInterface::_si_moose_object
private

The MooseObject that owns this interface.

Definition at line 60 of file SolutionInvalidInterface.h.

Referenced by flagInvalidSolutionInternal(), and registerInvalidSolutionInternal().

◆ _si_problem

const FEProblemBase& SolutionInvalidInterface::_si_problem
private

A reference to FEProblem base.

Definition at line 63 of file SolutionInvalidInterface.h.

Referenced by flagInvalidSolutionInternal().


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