SIMLIB/C++
3.07
|
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 More... | |
Integrator (Input i, double initvalue=0) | |
constructor More... | |
Integrator (Integrator &i, double initvalue=0) | |
special copy constructor needed for i1(i2) connection More... | |
~Integrator () | |
destructor removes integrator from list More... | |
void | Init (double initvalue) |
set initial value of integrator More... | |
void | Init () |
use preset initial value More... | |
void | Set (double value) |
set the integrator status value (step change) More... | |
Integrator & | operator= (double x) |
set integrator state value More... | |
Input | SetInput (Input inp) |
set integrator input block expression More... | |
void | Eval () override |
evaluate integrator input More... | |
double | Value () override |
the state of integrator More... | |
double | InputValue () |
current input value More... | |
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) |
![]() | |
aContiBlock () | |
virtual void | _Eval () |
evaluate block (with loop detection) More... | |
![]() | |
bool | TestAndSetFlag (bool new_value, unsigned n) |
internal method for flag manipulation is used for algebraic loop checking in continuous blocks More... | |
SimObject () | |
constructor More... | |
virtual | ~SimObject () |
virtual destructor More... | |
void * | operator new (size_t size) |
allocate object, set _flags More... | |
void | operator delete (void *ptr) |
deallocate object More... | |
void * | operator new[] (size_t size)=delete |
void | operator delete[] (void *ptr)=delete |
bool | isAllocated () const |
virtual std::string | Name () const |
get object name More... | |
bool | HasName () const |
void | SetName (const std::string &name) |
assign the name More... | |
virtual void | Output () const |
print object to default output More... | |
Protected Member Functions | |
void | CtrInit () |
Protected Attributes | |
Input | input |
input expression: f(t,y) More... | |
double | initval |
initial value: y(t0) More... | |
IntegratorContainer::iterator | it_list |
position in list of integrators More... | |
![]() | |
bool | isEvaluated |
![]() | |
unsigned | _flags |
bool flags for internal use (TODO bitfield?) More... | |
Private Member Functions | |
Integrator & | operator= (const Integrator &x)=delete |
Private Attributes | |
double | dd |
double | ddl |
double | ss |
double | ssl |
Additional Inherited Members | |
![]() | |
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 simlib3::CantDestroyIntg, Dprintf, simlib3::IntegratorContainer::Erase(), it_list, simlib3::SIMLIB_error(), and simlib3::IntegratorContainer::Size().
|
protected |
Definition at line 154 of file intg.cc.
References simlib3::CantCreateIntg, simlib3::IntegratorContainer::Insert(), it_list, simlib3::SIMLIB_error(), and simlib3::SIMLIB_Integrator_0input.
Referenced by Integrator().
|
overridevirtual |
evaluate integrator input
Reimplemented from simlib3::aContiBlock.
Definition at line 239 of file intg.cc.
References dd, and InputValue().
void simlib3::Integrator::Init | ( | double | initvalue | ) |
set initial value of integrator
Definition at line 222 of file intg.cc.
Referenced by simlib3::Integrator3D::Init().
|
inline |
|
inline |
current input value
Definition at line 1314 of file simlib.h.
References simlib3::Input::Value().
Referenced by Eval().
|
privatedelete |
|
inline |
void simlib3::Integrator::Set | ( | double | value | ) |
set integrator input block expression
Definition at line 1311 of file simlib.h.
References simlib3::Input::Set().
|
overridevirtual |
the state of integrator
get integrator status (output value)
Implements simlib3::aContiBlock.
Definition at line 249 of file intg.cc.
References simlib3::SimObject::HasName(), simlib3::IntegratorContainer::ListPtr, simlib3::SimObject::Name(), simlib3::SIMLIB_create_tmp_name(), and ss.
Referenced by Sample(), simlib3::Integrator2D::Value(), and simlib3::Integrator3D::Value().
|
private |
|
protected |
initial value: y(t0)
Definition at line 1296 of file simlib.h.
Referenced by Init(), and Integrator().
|
protected |
|
protected |
position in list of integrators
Definition at line 1298 of file simlib.h.
Referenced by CtrInit(), simlib3::Status::CtrInit(), and ~Integrator().
|
private |