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

#include "b2type.H"

Public Member Functions

 EquilibriumSolution (signed char input_level_, signed char output_level_, double distance_to_iterative_convergence_=-1)
 
 EquilibriumSolution (bool b)
 
 operator bool () const
 

Public Attributes

double distance_to_iterative_convergence
 
signed char input_level
 
signed char output_level
 

Detailed Description

Contains information about iterative analysis and for Element, ElementProperty, and BoundaryCondition instances that are path-dependent.

Example of how to use input and output levels

Input and output levels are important for the state management performed by the Solver instance. This state management allows e.g. for re-starting the current load increment with a previous state (the state of the last converged load increment).

Path-dependent objects should attempt to "know" what value for input_level or output_level means what solver state. Instead, they should group the information describing a state (e.g. damage variable or element-updated reference frame) in a structure and have 3 of them arranged in an array:

struct State {
double damage;
State() : damage(0) {}
};
State states[3];

These states are then used as follows: In the function performing the work (e.g. Element::get_value()), the input state must be first copied to the output state, and from then on, work should performed with the output state only.

states[equilibrium_solution.output_level] =
states[equilibrium_solution.input_level];
State& s = states[equilibrium_solution.output_level];
s.damage = ...

Constructor & Destructor Documentation

◆ EquilibriumSolution() [1/2]

b2000::EquilibriumSolution::EquilibriumSolution ( signed char  input_level_,
signed char  output_level_,
double  distance_to_iterative_convergence_ = -1 
)
inline

Initialized by the Solver object.

◆ EquilibriumSolution() [2/2]

b2000::EquilibriumSolution::EquilibriumSolution ( bool  b)
inline

Initialized by the Solver object.

Member Function Documentation

◆ operator bool()

b2000::EquilibriumSolution::operator bool ( ) const
inline

Whether equilibrium has been reached. This is used by Element, ElementProperty, and BoundaryCondition instances to change their stateful data, e.g. to re-compute the element-updated reference frame.

Member Data Documentation

◆ distance_to_iterative_convergence

double b2000::EquilibriumSolution::distance_to_iterative_convergence

A double giving a measure of the distance of the current solution to the expected convergence tolerance. 1 or less means that the solution is converged. A negative value (-1) indicates that the distance is not (yet) defined.

◆ input_level

signed char b2000::EquilibriumSolution::input_level

The input level.

◆ output_level

signed char b2000::EquilibriumSolution::output_level

The output level.


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