b2api
B2000++ API Reference Manual, VERSION 4.6
 
Loading...
Searching...
No Matches
b2000::SolverHints Class Reference

#include "b2solver.H"

Inheritance diagram for b2000::SolverHints:
Collaboration diagram for b2000::SolverHints:

Public Types

enum  Hints {
  none = 0 , unfinished = 1 , diverge = 2 , degradation = 4 ,
  terminate_analysis = 5
}
 

Public Member Functions

SolverHintsclear ()
 
SolverHintsadd (const Hints &other_hints)
 
SolverHintsadd (const SolverHints &other)
 
SolverHintsoperator|= (const Hints &other_hints)
 
SolverHintsoperator|= (const SolverHints &other)
 
int operator* () const
 
- Public Member Functions inherited from b2000::Object
virtual const std::string & get_object_name () const
 
virtual ~Object ()
 

Additional Inherited Members

- Static Public Attributes inherited from b2000::Object
static ObjectType type
 

Detailed Description

Element, ElementProperty, and BoundaryCondition instances may specify hints to the (nonlinear) Solver instance. Hints may be combined.

This class is implemented in thread-safe manner.

Example

A fracture element could specify hints to the Solver instance in the following way in the Element::get_value() function:

const double ed = equilibrium_solution.distance_to_iterative_convergence;
if (energy >= 1.0 && ed >= 0.0 && ed <= 1)
solver_hints->add(SolverHints::degradation);
else if (ed < 0 || ed > 1)
solver_hints->add(SolverHints::unfinished);
@ unfinished
Definition b2solver.H:179
@ degradation
Definition b2solver.H:188

Member Enumeration Documentation

◆ Hints

Defines what hints may be specified.

Enumerator
none 

No hints.

unfinished 

Tell the Solver instance to perform another Newton iteration, even if the convergence criteria will be met after the current Newton iteration. Used for progressive damage and fracture, for example.

diverge 

Tell the Solver instance to consider the current iteration diverged.

degradation 

Inform the Solver instance that degradation was performed in the current Newton iteration. The Solver instance will re-set the convergence statistics.

terminate_analysis 

Inform the Solver instance that the analysis should be terminated. Used in multi-disciplinary loose-coupling analysis where the solver is steered externally via a dedicated boundary condition object.

Member Function Documentation

◆ add() [1/2]

SolverHints & b2000::SolverHints::add ( const Hints other_hints)
inline

Add hints. Hints may be combined by means of binary-or.

◆ add() [2/2]

SolverHints & b2000::SolverHints::add ( const SolverHints other)
inline

Add hints from another SolverHints instance.

◆ clear()

SolverHints & b2000::SolverHints::clear ( )
inline

Remove any hints. Should not be used except by Solver instances.

◆ operator*()

int b2000::SolverHints::operator* ( ) const
inline
Returns
The hints combined with binary-or.

◆ operator|=() [1/2]

SolverHints & b2000::SolverHints::operator|= ( const Hints other_hints)
inline

Add hints. Hints may be combined by means of binary-or.

◆ operator|=() [2/2]

SolverHints & b2000::SolverHints::operator|= ( const SolverHints other)
inline

Add hints from another SolverHints instance.


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