#include <SteadyState.h>
Public Member Functions | |
SteadyState () | |
~SteadyState () | |
Id | getStoich () const |
void | setStoich (Id s) |
bool | badStoichiometry () const |
bool | isInitialized () const |
unsigned int | getRank () const |
unsigned int | getNumVarPools () const |
unsigned int | getNiter () const |
unsigned int | getMaxIter () const |
void | setMaxIter (unsigned int value) |
string | getStatus () const |
double | getConvergenceCriterion () const |
void | setConvergenceCriterion (double value) |
double | getTotal (const unsigned int i) const |
void | setTotal (const unsigned int i, double val) |
double | getEigenvalue (const unsigned int i) const |
void | setEigenvalue (double val, const unsigned int i) |
unsigned int | getStateType () const |
unsigned int | getNnegEigenvalues () const |
unsigned int | getNposEigenvalues () const |
unsigned int | getSolutionStatus () const |
void | setupMatrix () |
void | settleFunc () |
void | resettleFunc () |
void | settle (bool forceSetup) |
void | showMatricesFunc () |
void | showMatrices () |
void | randomizeInitialCondition (const Eref &e) |
void | classifyState (const double *T) |
Static Public Member Functions | |
static void | assignY (double *S) |
static void | setMolN (double y, unsigned int i) |
static const Cinfo * | initCinfo () |
Static Public Attributes | |
static const double | EPSILON = 1e-9 |
static const double | DELTA = 1e-6 |
SteadyState::SteadyState | ( | ) |
SteadyState::~SteadyState | ( | ) |
void SteadyState::assignY | ( | double * | S | ) | [static] |
bool SteadyState::badStoichiometry | ( | ) | const |
Referenced by initCinfo().
void SteadyState::classifyState | ( | const double * | T | ) |
This does the iteration, using the specified method. First try gsl_multiroot_fsolver_hybrids If that doesn't work try gsl_multiroot_fsolver_dnewton Returns the gsl status.
References DELTA, EPSILON, Stoich::getKsolve(), isNaN(), and VoxelPools::updateRates().
Referenced by settle().
double SteadyState::getConvergenceCriterion | ( | ) | const |
Referenced by initCinfo().
double SteadyState::getEigenvalue | ( | const unsigned int | i | ) | const |
Referenced by initCinfo().
unsigned int SteadyState::getMaxIter | ( | ) | const |
Referenced by initCinfo().
unsigned int SteadyState::getNiter | ( | ) | const |
Referenced by initCinfo().
unsigned int SteadyState::getNnegEigenvalues | ( | ) | const |
Referenced by initCinfo().
unsigned int SteadyState::getNposEigenvalues | ( | ) | const |
Referenced by initCinfo().
unsigned int SteadyState::getNumVarPools | ( | ) | const |
Referenced by initCinfo().
unsigned int SteadyState::getRank | ( | ) | const |
Referenced by initCinfo().
unsigned int SteadyState::getSolutionStatus | ( | ) | const |
Referenced by initCinfo().
unsigned int SteadyState::getStateType | ( | ) | const |
Referenced by initCinfo().
string SteadyState::getStatus | ( | ) | const |
Referenced by initCinfo().
Id SteadyState::getStoich | ( | ) | const |
Referenced by initCinfo().
double SteadyState::getTotal | ( | const unsigned int | i | ) | const |
Referenced by initCinfo().
const Cinfo * SteadyState::initCinfo | ( | ) | [static] |
This picks up the entire Stoich data structure static Finfo* gslShared[] = { new SrcFinfo( "reinitSrc", Ftype0::global() ), new DestFinfo( "assignStoich", Ftype1< void* >::global(), RFCAST( &SteadyState::assignStoichFunc ) ), new DestFinfo( "setMolN", Ftype2< double, unsigned int >::global(), RFCAST( &SteadyState::setMolN ) ), new SrcFinfo( "requestYsrc", Ftype0::global() ), new DestFinfo( "assignY", Ftype1< double* >::global(), RFCAST( &SteadyState::assignY ) ), };
These are the fields of the SteadyState class
References badStoichiometry(), getConvergenceCriterion(), getEigenvalue(), getMaxIter(), getNiter(), getNnegEigenvalues(), getNposEigenvalues(), getNumVarPools(), getRank(), getSolutionStatus(), getStateType(), getStatus(), getStoich(), getTotal(), Neutral::initCinfo(), isInitialized(), randomizeInitialCondition(), resettleFunc(), setConvergenceCriterion(), setMaxIter(), setStoich(), settle(), settleFunc(), setTotal(), setupMatrix(), and showMatrices().
bool SteadyState::isInitialized | ( | ) | const |
Referenced by initCinfo().
void SteadyState::randomizeInitialCondition | ( | const Eref & | me | ) |
Generates a new set of values for the S vector that is a) random and b) obeys the conservation rules.
References EPSILON, reac_info::rank, and y.
Referenced by initCinfo().
void SteadyState::resettleFunc | ( | ) |
void SteadyState::setConvergenceCriterion | ( | double | value | ) |
Referenced by initCinfo().
void SteadyState::setEigenvalue | ( | double | val, | |
const unsigned int | i | |||
) |
void SteadyState::setMaxIter | ( | unsigned int | value | ) |
Referenced by initCinfo().
static void SteadyState::setMolN | ( | double | y, | |
unsigned int | i | |||
) | [static] |
void SteadyState::setStoich | ( | Id | s | ) |
References Element::cinfo(), Eref::data(), Id::element(), Id::eref(), Stoich::getCompartment(), Stoich::getNumCoreRates(), Stoich::getRateTerms(), Cinfo::isA(), VoxelPools::setStoich(), VoxelPoolsBase::setVolume(), and VoxelPools::updateAllRateTerms().
Referenced by initCinfo().
void SteadyState::settle | ( | bool | forceSetup | ) |
The settle function computes the steady state nearest the initial conditions.
References classifyState(), reac_info::convergenceCriterion, reac_info::nIter, reac_info::num_mols, reac_info::num_reacs, reac_info::nVec, reac_info::pool, reac_info::rank, and reac_info::T.
Referenced by initCinfo(), resettleFunc(), and settleFunc().
void SteadyState::settleFunc | ( | ) |
void SteadyState::setTotal | ( | const unsigned int | i, | |
double | val | |||
) |
Referenced by initCinfo().
void SteadyState::setupMatrix | ( | ) |
Referenced by initCinfo().
void SteadyState::showMatrices | ( | ) |
Referenced by initCinfo().
void SteadyState::showMatricesFunc | ( | ) |
const double SteadyState::DELTA = 1e-6 [static] |
Referenced by classifyState().
const double SteadyState::EPSILON = 1e-9 [static] |
Referenced by classifyState(), and randomizeInitialCondition().