svMultiPhysics
Loading...
Searching...
No Matches
svmp::FE::DofException Class Reference

Degree-of-freedom numbering or lookup failure. More...

#include <FEException.h>

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

Public Member Functions

 DofException (const std::string &message, long long dof_index=invalid_dof_index())
 Construct with a message and optional DOF-index context.
long long dof_index () const noexcept
 Offending DOF index.
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().

Static Public Member Functions

static constexpr long long invalid_dof_index () noexcept
 Sentinel meaning "no DOF index attached".

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

Degree-of-freedom numbering or lookup failure.

Records the offending DOF index so error reports can name it.

Constructor & Destructor Documentation

◆ DofException()

svmp::FE::DofException::DofException ( const std::string & message,
long long dof_index = invalid_dof_index() )
inline

Construct with a message and optional DOF-index context.

Parameters
messageHuman-readable error description.
dof_indexOffending DOF index; appended to the message unless it equals invalid_dof_index().

Member Function Documentation

◆ dof_index()

long long svmp::FE::DofException::dof_index ( ) const
inlinenoexcept

Offending DOF index.

Returns
DOF index; invalid_dof_index() when not provided.

◆ invalid_dof_index()

constexpr long long svmp::FE::DofException::invalid_dof_index ( )
inlinestaticconstexprnoexcept

Sentinel meaning "no DOF index attached".

Returns
The sentinel value -1.

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