|
SIMLIB/C++ 3.09
|
block for numerical integration input is derivative, output is state More...
#include <simlib.h>


Public Member Functions | |
| Integrator () | |
| constructor for special cases (arrays of integrators) Input can be set using method Integrator::Set | |
| Integrator (Input i, double initvalue=0) | |
| constructor | |
| Integrator (Integrator &i, double initvalue=0) | |
| special copy constructor needed for i1(i2) connection | |
| ~Integrator () | |
| destructor removes integrator from list | |
| void | Init (double initvalue) |
| set initial value of integrator | |
| void | Init () |
| use preset initial value | |
| void | Set (double value) |
| set the integrator status value (step change) | |
| Integrator & | operator= (double x) |
| set integrator state value | |
| Input | SetInput (Input inp) |
| set integrator input block expression | |
| void | Eval () override |
| evaluate integrator input | |
| double | Value () override |
| the state of integrator | |
| double | InputValue () |
| current input value | |
| void | Save (void) |
| void | Restore (void) |
| void | SetState (double s) |
| double | GetState (void) |
| void | SetOldState (double s) |
| double | GetOldState (void) |
| void | SetDiff (double d) |
| double | GetDiff (void) |
| void | SetOldDiff (double d) |
| double | GetOldDiff (void) |
Public Member Functions inherited from simlib3::aContiBlock | |
| aContiBlock () | |
| virtual void | _Eval () |
| evaluate block (with loop detection) | |
| virtual double | Value ()=0 |
| get block output value this method should be defined in classes derived from aContiBlock | |
Public Member Functions inherited from simlib3::SimObject | |
| bool | TestAndSetFlag (bool new_value, unsigned n) |
| internal method for flag manipulation is used for algebraic loop checking in continuous blocks | |
| SimObject () | |
| constructor | |
| virtual | ~SimObject () |
| virtual destructor | |
| void * | operator new (size_t size) |
| allocate object, set _flags | |
| void | operator delete (void *ptr) |
| deallocate object | |
| void * | operator new[] (size_t size)=delete |
| void | operator delete[] (void *ptr)=delete |
| bool | isAllocated () const |
| virtual std::string | Name () const |
| get object name | |
| bool | HasName () const |
| void | SetName (const std::string &name) |
| assign the name | |
| virtual void | Output () const |
| print object to default output | |
Protected Member Functions | |
| void | CtrInit () |
Protected Attributes | |
| Input | input |
| input expression: f(t,y) | |
| double | initval |
| initial value: y(t0) | |
| IntegratorContainer::iterator | it_list |
| position in list of integrators | |
Protected Attributes inherited from simlib3::aContiBlock | |
| bool | isEvaluated |
Protected Attributes inherited from simlib3::SimObject | |
| unsigned | _flags |
| bool flags for internal use (TODO bitfield?) | |
Private Member Functions | |
| Integrator & | operator= (const Integrator &x)=delete |
Private Attributes | |
| double | dd |
| double | ddl |
| double | ss |
| double | ssl |
Additional Inherited Members | |
Public Types inherited from simlib3::SimObject | |
| enum | _Flags { _CLEAR_ALL_FLAGS = 0 , _ALLOCATED_FLAG = 1<<0 , _EVAL_FLAG = 1<<1 , _HAS_NAME_FLAG = 1<<2 } |
block for numerical integration input is derivative, output is state
| simlib3::Integrator::Integrator | ( | ) |
constructor for special cases (arrays of integrators) Input can be set using method Integrator::Set
Definition at line 174 of file intg.cc.
References CtrInit(), Dprintf, initval, and simlib3::IntegratorContainer::Size().
| simlib3::Integrator::Integrator | ( | Input | i, |
| double | initvalue = 0 |
||
| ) |
| simlib3::Integrator::Integrator | ( | Integrator & | i, |
| double | initvalue = 0 |
||
| ) |
| simlib3::Integrator::~Integrator | ( | ) |
destructor removes integrator from list
Definition at line 209 of file intg.cc.
References CantDestroyIntg, Dprintf, simlib3::IntegratorContainer::Erase(), it_list, simlib3::SIMLIB_DynamicFlag, simlib3::SIMLIB_error(), and simlib3::IntegratorContainer::Size().
|
protected |
Definition at line 154 of file intg.cc.
References CantCreateIntg, simlib3::IntegratorContainer::Insert(), it_list, simlib3::SIMLIB_DynamicFlag, simlib3::SIMLIB_error(), and simlib3::SIMLIB_ResetStatus.
Referenced by Integrator().
|
overridevirtual |
evaluate integrator input
Reimplemented from simlib3::aContiBlock.
Definition at line 239 of file intg.cc.
References dd, and InputValue().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void simlib3::Integrator::Init | ( | double | initvalue | ) |
set initial value of integrator
Definition at line 222 of file intg.cc.
References initval, simlib3::SIMLIB_ResetStatus, and ss.
Referenced by simlib3::Integrator3D::Init().
|
inline |
current input value
Definition at line 1314 of file simlib.h.
References input, and simlib3::Input::Value().
Referenced by Eval().
|
privatedelete |
|
inline |
|
inline |
|
inline |
| void simlib3::Integrator::Set | ( | double | value | ) |
set the integrator status value (step change)
Definition at line 230 of file intg.cc.
References simlib3::SIMLIB_ResetStatus, and ss.
Referenced by operator=().
|
inline |
set integrator input block expression
Definition at line 1311 of file simlib.h.
References input, and simlib3::Input::Set().
|
inline |
|
inline |
|
inline |
|
overridevirtual |
the state of integrator
get integrator status (output value)
Implements simlib3::aContiBlock.
Definition at line 249 of file intg.cc.
References ss.
Referenced by Sample(), simlib3::Integrator2D::Value(), and simlib3::Integrator3D::Value().
|
private |
|
private |
Definition at line 1291 of file simlib.h.
Referenced by GetOldDiff(), Restore(), Save(), and SetOldDiff().
|
protected |
initial value: y(t0)
Definition at line 1296 of file simlib.h.
Referenced by Init(), and Integrator().
|
protected |
input expression: f(t,y)
Definition at line 1295 of file simlib.h.
Referenced by InputValue(), and SetInput().
|
protected |
position in list of integrators
Definition at line 1298 of file simlib.h.
Referenced by CtrInit(), and ~Integrator().
|
private |
Definition at line 1292 of file simlib.h.
Referenced by GetState(), Init(), Restore(), Save(), Set(), SetState(), and Value().
|
private |
Definition at line 1293 of file simlib.h.
Referenced by GetOldState(), Restore(), Save(), and SetOldState().