Delegate methods of the Reactor class to external functions. More...
#include <ReactorDelegator.h>
Delegate methods of the Reactor class to external functions.
Definition at line 59 of file ReactorDelegator.h.
Public Member Functions | |
ReactorDelegator (shared_ptr< Solution > contents, const string &name="(none)") | |
string | type () const override |
void | initialize (double t0) override |
void | syncState () override |
void | getState (double *y) override |
void | updateState (double *y) override |
void | updateSurfaceState (double *y) override |
void | getSurfaceInitialConditions (double *y) override |
void | updateConnected (bool updatePressure) override |
void | eval (double t, double *LHS, double *RHS) override |
void | evalWalls (double t) override |
void | evalSurfaces (double *LHS, double *RHS, double *sdot) override |
string | componentName (size_t k) override |
size_t | componentIndex (const string &nm) const override |
size_t | speciesIndex (const string &nm) const override |
void | setNEq (size_t n) override |
Set the number of equations represented by this reactor. | |
double | expansionRate () const override |
Get the net rate of volume change (for example, from moving walls) [m^3/s]. | |
void | setExpansionRate (double v) override |
Set the net rate of volume change (for example, from moving walls) [m^3/s]. | |
double | heatRate () const override |
Get the net heat transfer rate (for example, through walls) into the reactor [W]. | |
void | setHeatRate (double q) override |
Set the net heat transfer rate (for example, through walls) into the reactor [W]. | |
void | restoreThermoState () override |
Set the state of the thermo object to correspond to the state of the reactor. | |
void | restoreSurfaceState (size_t n) override |
Set the state of the thermo object for surface n to correspond to the state of that surface. | |
![]() | |
string | delegatorName () const |
Get the name of the user-defined class in the extension language. | |
void | setDelegatorName (const string &delegatorName) |
Set the name of the user-defined class in the extension language. | |
void | setDelegate (const string &name, const function< void()> &func, const string &when) |
Set delegates for member functions with the signature void() . | |
void | setDelegate (const string &name, const function< void(bool)> &func, const string &when) |
set delegates for member functions with the signature void(bool) | |
void | setDelegate (const string &name, const function< void(double)> &func, const string &when) |
set delegates for member functions with the signature void(double) | |
void | setDelegate (const string &name, const function< void(AnyMap &)> &func, const string &when) |
set delegates for member functions with the signature void(AnyMap&) | |
void | setDelegate (const string &name, const function< void(const AnyMap &, const UnitStack &)> &func, const string &when) |
set delegates for member functions with the signature void(AnyMap&, UnitStack&) | |
void | setDelegate (const string &name, const function< void(const string &, void *)> &func, const string &when) |
set delegates for member functions with the signature void(const string&, void*) | |
void | setDelegate (const string &name, const function< void(std::array< size_t, 1 >, double *)> &func, const string &when) |
Set delegates for member functions with the signature void(double*) | |
void | setDelegate (const string &name, const function< void(std::array< size_t, 1 >, double, double *)> &func, const string &when) |
Set delegates for member functions with the signature void(double, double*) | |
void | setDelegate (const string &name, const function< void(std::array< size_t, 2 >, double, double *, double *)> &func, const string &when) |
Set delegates for member functions with the signature void(double, double*, double*) | |
void | setDelegate (const string &name, const function< void(std::array< size_t, 3 >, double *, double *, double *)> &func, const string &when) |
Set delegates for member functions with the signature void(double*, double*, double*) | |
void | setDelegate (const string &name, const function< int(double &, void *)> &func, const string &when) |
set delegates for member functions with the signature double(void*) | |
void | setDelegate (const string &name, const function< int(string &, size_t)> &func, const string &when) |
Set delegates for member functions with the signature string(size_t) | |
void | setDelegate (const string &name, const function< int(size_t &, const string &)> &func, const string &when) |
Set delegates for member functions with the signature size_t(string) | |
void | holdExternalHandle (const string &name, const shared_ptr< ExternalHandle > &handle) |
Store a handle to a wrapper for the delegate from an external language interface. | |
shared_ptr< ExternalHandle > | getExternalHandle (const string &name) const |
Get the handle for a wrapper for the delegate from the external language interface specified by name. | |
virtual void | setNEq (size_t n)=0 |
Set the number of equations represented by this reactor. | |
virtual double | expansionRate () const =0 |
Get the net rate of volume change (for example, from moving walls) [m^3/s]. | |
virtual void | setExpansionRate (double v)=0 |
Set the net rate of volume change (for example, from moving walls) [m^3/s]. | |
virtual double | heatRate () const =0 |
Get the net heat transfer rate (for example, through walls) into the reactor [W]. | |
virtual void | setHeatRate (double q)=0 |
Set the net heat transfer rate (for example, through walls) into the reactor [W]. | |
virtual void | restoreThermoState ()=0 |
Set the state of the thermo object to correspond to the state of the reactor. | |
virtual void | restoreSurfaceState (size_t n)=0 |
Set the state of the thermo object for surface n to correspond to the state of that surface. | |
Private Attributes | |
function< void(double)> | m_initialize |
function< void()> | m_syncState |
function< void(std::array< size_t, 1 >, double *)> | m_getState |
function< void(std::array< size_t, 1 >, double *)> | m_updateState |
function< void(std::array< size_t, 1 >, double *)> | m_updateSurfaceState |
function< void(std::array< size_t, 1 >, double *)> | m_getSurfaceInitialConditions |
function< void(bool)> | m_updateConnected |
function< void(std::array< size_t, 2 >, double, double *, double *)> | m_eval |
function< void(double)> | m_evalWalls |
function< void(std::array< size_t, 3 >, double *, double *, double *)> | m_evalSurfaces |
function< string(size_t)> | m_componentName |
function< size_t(const string &)> | m_componentIndex |
function< size_t(const string &)> | m_speciesIndex |
Additional Inherited Members | |
![]() | |
void | install (const string &name, function< void()> &target, const function< void()> &func) |
Install a function with the signature void() as being delegatable. | |
void | install (const string &name, function< void(bool)> &target, const function< void(bool)> &func) |
Install a function with the signature void(bool) as being delegatable. | |
void | install (const string &name, function< void(double)> &target, const function< void(double)> &func) |
Install a function with the signature void(double) as being delegatable. | |
void | install (const string &name, function< void(AnyMap &)> &target, const function< void(AnyMap &)> &func) |
Install a function with the signature void(AnyMap&) as being delegatable. | |
void | install (const string &name, function< void(const AnyMap &, const UnitStack &)> &target, const function< void(const AnyMap &, const UnitStack &)> &func) |
Install a function with the signature void(const AnyMap&, const UnitStack&) as being delegatable. | |
void | install (const string &name, function< void(const string &, void *)> &target, const function< void(const string &, void *)> &func) |
Install a function with the signature `void(const string&, void*) as being delegatable. | |
void | install (const string &name, function< void(std::array< size_t, 1 >, double *)> &target, const function< void(std::array< size_t, 1 >, double *)> &func) |
Install a function with the signature void(double*) as being delegatable. | |
void | install (const string &name, function< void(std::array< size_t, 1 >, double, double *)> &target, const function< void(std::array< size_t, 1 >, double, double *)> &func) |
Install a function with the signature void(double, double*) as being delegatable. | |
void | install (const string &name, function< void(std::array< size_t, 2 >, double, double *, double *)> &target, const function< void(std::array< size_t, 2 >, double, double *, double *)> &func) |
Install a function with the signature void(double, double*, double*) as being delegatable. | |
void | install (const string &name, function< void(std::array< size_t, 3 >, double *, double *, double *)> &target, const function< void(std::array< size_t, 3 >, double *, double *, double *)> &base) |
Install a function with the signature void(double*, double*, double*) as being delegatable. | |
void | install (const string &name, function< double(void *)> &target, const function< double(void *)> &func) |
Install a function with the signature double(void*) as being delegatable. | |
void | install (const string &name, function< string(size_t)> &target, const function< string(size_t)> &base) |
Install a function with the signature string(size_t) as being delegatable. | |
void | install (const string &name, function< size_t(const string &)> &target, const function< size_t(const string &)> &base) |
Install a function with the signature size_t(string) as being delegatable. | |
template<typename BaseFunc , class ... Args> | |
function< void(Args ...)> | makeDelegate (const function< void(Args ...)> &func, const string &when, BaseFunc base) |
Create a delegate for a function with no return value. | |
template<typename ReturnType , class ... Args> | |
function< ReturnType(Args ...)> | makeDelegate (const string &name, const function< int(ReturnType &, Args ...)> &func, const string &when, const function< ReturnType(Args ...)> &base) |
Create a delegate for a function with a return value. | |
![]() | |
map< string, shared_ptr< ExternalHandle > > | m_handles |
Handles to wrappers for the delegated object in external language interfaces. | |
string | m_delegatorName |
Name of the class in the extension language. | |
map< string, function< void()> * > | m_funcs_v |
map< string, function< void(bool)> * > | m_funcs_v_b |
map< string, function< void(double)> * > | m_funcs_v_d |
map< string, function< void(AnyMap &)> * > | m_funcs_v_AMr |
map< string, function< void(const AnyMap &, const UnitStack &)> * > | m_funcs_v_cAMr_cUSr |
map< string, function< void(const string &, void *)> * > | m_funcs_v_csr_vp |
map< string, function< void(std::array< size_t, 1 >, double *)> * > | m_funcs_v_dp |
map< string, function< void(std::array< size_t, 1 >, double, double *)> * > | m_funcs_v_d_dp |
map< string, function< void(std::array< size_t, 2 >, double, double *, double *)> * > | m_funcs_v_d_dp_dp |
map< string, function< void(std::array< size_t, 3 >, double *, double *, double *)> * > | m_funcs_v_dp_dp_dp |
map< string, function< double(void *)> > | m_base_d_vp |
map< string, function< double(void *)> * > | m_funcs_d_vp |
map< string, function< string(size_t)> > | m_base_s_sz |
map< string, function< string(size_t)> * > | m_funcs_s_sz |
map< string, function< size_t(const string &)> > | m_base_sz_csr |
map< string, function< size_t(const string &)> * > | m_funcs_sz_csr |
|
inline |
Definition at line 62 of file ReactorDelegator.h.
|
inlineoverride |
Definition at line 101 of file ReactorDelegator.h.
|
inlineoverride |
Definition at line 105 of file ReactorDelegator.h.
|
inlineoverride |
Definition at line 109 of file ReactorDelegator.h.
|
inlineoverride |
Definition at line 113 of file ReactorDelegator.h.
|
inlineoverride |
Definition at line 118 of file ReactorDelegator.h.
|
inlineoverride |
Definition at line 123 of file ReactorDelegator.h.
|
inlineoverride |
Definition at line 128 of file ReactorDelegator.h.
|
inlineoverride |
Definition at line 133 of file ReactorDelegator.h.
|
inlineoverride |
Definition at line 137 of file ReactorDelegator.h.
|
inlineoverride |
Definition at line 142 of file ReactorDelegator.h.
|
inlineoverride |
Definition at line 146 of file ReactorDelegator.h.
|
inlineoverride |
Definition at line 151 of file ReactorDelegator.h.
|
inlineoverride |
Definition at line 155 of file ReactorDelegator.h.
|
inlineoverride |
Definition at line 159 of file ReactorDelegator.h.
|
inlineoverridevirtual |
Set the number of equations represented by this reactor.
Implements ReactorAccessor.
Definition at line 165 of file ReactorDelegator.h.
|
inlineoverridevirtual |
Get the net rate of volume change (for example, from moving walls) [m^3/s].
Implements ReactorAccessor.
Definition at line 169 of file ReactorDelegator.h.
|
inlineoverridevirtual |
Set the net rate of volume change (for example, from moving walls) [m^3/s].
Implements ReactorAccessor.
Definition at line 173 of file ReactorDelegator.h.
|
inlineoverridevirtual |
Get the net heat transfer rate (for example, through walls) into the reactor [W].
This value is initialized and calculated as part of Reactor::evalWalls().
Implements ReactorAccessor.
Definition at line 177 of file ReactorDelegator.h.
|
inlineoverridevirtual |
Set the net heat transfer rate (for example, through walls) into the reactor [W].
For a value set using this method to affect the calculations done by Reactor::eval, this method should be called in either a "replace" or "after" delegate for Reactor::evalWalls().
Implements ReactorAccessor.
Definition at line 181 of file ReactorDelegator.h.
|
inlineoverridevirtual |
Set the state of the thermo object to correspond to the state of the reactor.
Implements ReactorAccessor.
Definition at line 185 of file ReactorDelegator.h.
|
inlineoverridevirtual |
Set the state of the thermo object for surface n to correspond to the state of that surface.
Implements ReactorAccessor.
Definition at line 189 of file ReactorDelegator.h.
|
private |
Definition at line 194 of file ReactorDelegator.h.
|
private |
Definition at line 195 of file ReactorDelegator.h.
|
private |
Definition at line 196 of file ReactorDelegator.h.
|
private |
Definition at line 197 of file ReactorDelegator.h.
|
private |
Definition at line 198 of file ReactorDelegator.h.
|
private |
Definition at line 199 of file ReactorDelegator.h.
|
private |
Definition at line 200 of file ReactorDelegator.h.
|
private |
Definition at line 201 of file ReactorDelegator.h.
|
private |
Definition at line 202 of file ReactorDelegator.h.
|
private |
Definition at line 203 of file ReactorDelegator.h.
|
private |
Definition at line 204 of file ReactorDelegator.h.
|
private |
Definition at line 205 of file ReactorDelegator.h.
|
private |
Definition at line 206 of file ReactorDelegator.h.