![]() |
|
|
|||||||||||||||||||||||||||||||||||||
|
FUNDER - Documentation |
|||||||||||||||||||||||||||||||||||||||
|
|
USER-DEFINED SYSTEMS This section describes how to create a user-defined
system by deriving a class from the abstract
class 1. Declare a new class
from
class UserSystem : public System
{
...
};
2. Write a constructor for the derived class that
constructs an object of the
class
UserSystem :: UserSystem() :
System(step, species, rates, input_species, output_rate)
{
...
InitSS();
}
Remember that the parameters of the constructor
of
3. Provide the
method
void UserSystem :: EvaluateSystem(void)
{
// Evaluation of the velocities
v[0] = ...;
...
v[numv-1] = ...;
// Differential equations
dc[0] = ...;
...
dc[numc-1] = ...;
}
In addition, the user may want to define additional
data types and methods that support the constructor
and
|
||||||||||||||||||||||||||||||||||||||
