svMultiPhysics
Loading...
Searching...
No Matches
Public Member Functions | List of all members
svmp::FE::ConvergenceException Class Reference

Iterative process failed to converge. More...

#include <FEException.h>

Inheritance diagram for svmp::FE::ConvergenceException:
[legend]

Public Member Functions

 ConvergenceException (const std::string &message, int iteration=-1, double residual=0.0)
 Construct with a message and optional iteration context.
 
int iteration () const noexcept
 Iteration at which the failure was detected.
 
double residual () const noexcept
 Final residual value.
 
- Public Member Functions inherited from svmp::FE::FEException
 FEException (const std::string &message, StatusCode status=StatusCode::Unknown)
 Construct with a message and optional status code.
 
StatusCode status () const noexcept
 Status code classifying the failure.
 
- Public Member Functions inherited from svmp::ExceptionBase
const char * what () const noexcept override
 
StatusCode status_code () const noexcept
 
const std::string & message () const noexcept
 
const ExceptionContext & context () const noexcept
 
void add_context (const std::string &context)
 
void set_source_location (const SourceLocation &location)
 Record the originating source location and refresh what().
 

Additional Inherited Members

- Protected Member Functions inherited from svmp::ExceptionBase
 ExceptionBase (std::string message, StatusCode status, std::string_view subsystem_label, const char *file="", int line=0, const char *function="")
 
void rebuild_what ()
 
- Protected Attributes inherited from svmp::ExceptionBase
std::string message_
 
ExceptionContext context_
 
std::string_view subsystem_label_
 
std::string what_
 

Detailed Description

Iterative process failed to converge.

Records the iteration count and final residual so error reports can show how far the iteration progressed.

Constructor & Destructor Documentation

◆ ConvergenceException()

svmp::FE::ConvergenceException::ConvergenceException ( const std::string &  message,
int  iteration = -1,
double  residual = 0.0 
)
inline

Construct with a message and optional iteration context.

Parameters
messageHuman-readable error description.
iterationIteration at which the failure was detected; appended to the message when non-negative.
residualFinal residual; appended to the message when positive.

Member Function Documentation

◆ iteration()

int svmp::FE::ConvergenceException::iteration ( ) const
inlinenoexcept

Iteration at which the failure was detected.

Returns
Iteration count; -1 when not provided.

◆ residual()

double svmp::FE::ConvergenceException::residual ( ) const
inlinenoexcept

Final residual value.

Returns
Residual; 0.0 when not provided.

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