MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <SteadyStateBoost.h>
Public Member Functions | |
bool | badStoichiometry () const |
bool | badStoichiometry () const |
void | classifyState (const double *T) |
void | classifyState (const double *T) |
void | fitConservationRules (boost::numeric::ublas::matrix< value_type_ > &U, const vector< value_type_ > &eliminatedTotal, vector< value_type_ > &yi) |
double | getConvergenceCriterion () const |
double | getConvergenceCriterion () const |
double | getEigenvalue (const unsigned int i) const |
double | getEigenvalue (const unsigned int i) const |
unsigned int | getMaxIter () const |
unsigned int | getMaxIter () const |
unsigned int | getNiter () const |
unsigned int | getNiter () const |
unsigned int | getNnegEigenvalues () const |
unsigned int | getNnegEigenvalues () const |
unsigned int | getNposEigenvalues () const |
unsigned int | getNposEigenvalues () const |
unsigned int | getNumVarPools () const |
unsigned int | getNumVarPools () const |
unsigned int | getRank () const |
unsigned int | getRank () const |
unsigned int | getSolutionStatus () const |
unsigned int | getSolutionStatus () const |
unsigned int | getStateType () const |
unsigned int | getStateType () const |
string | getStatus () const |
string | getStatus () const |
Id | getStoich () const |
Id | getStoich () const |
double | getTotal (const unsigned int i) const |
double | getTotal (const unsigned int i) const |
bool | isInitialized () const |
bool | isInitialized () const |
void | randomizeInitialCondition (const Eref &e) |
void | randomizeInitialCondition (const Eref &e) |
void | resettleFunc () |
void | resettleFunc () |
void | setConvergenceCriterion (double value) |
void | setConvergenceCriterion (double value) |
void | setEigenvalue (double val, const unsigned int i) |
void | setEigenvalue (double val, const unsigned int i) |
void | setMaxIter (unsigned int value) |
void | setMaxIter (unsigned int value) |
void | setStoich (Id s) |
void | setStoich (Id s) |
void | settle (bool forceSetup) |
void | settle (bool forceSetup) |
void | settleFunc () |
void | settleFunc () |
void | setTotal (const unsigned int i, double val) |
void | setTotal (const unsigned int i, double val) |
void | setupMatrix () |
void | setupMatrix () |
void | showMatrices () |
void | showMatrices () |
void | showMatricesFunc () |
void | showMatricesFunc () |
SteadyState () | |
SteadyState () | |
~SteadyState () | |
~SteadyState () | |
Static Public Member Functions | |
static void | assignY (double *S) |
static void | assignY (double *S) |
static const Cinfo * | initCinfo () |
static const Cinfo * | initCinfo () |
static void | setMolN (double y, unsigned int i) |
static void | setMolN (double y, unsigned int i) |
Static Public Attributes | |
static const double | DELTA = 1e-6 |
static const double | EPSILON = 1e-9 |
Private Member Functions | |
void | setupSSmatrix () |
void | setupSSmatrix () |
Private Attributes | |
bool | badStoichiometry_ |
double | convergenceCriterion_ |
vector< double > | eigenvalues_ |
boost::numeric::ublas::matrix < value_type_ > | gamma_ |
bool | isInitialized_ |
bool | isSetup_ |
boost::numeric::ublas::matrix < value_type_ > | LU_ |
unsigned int | maxIter_ |
unsigned int | nIter_ |
unsigned int | nNegEigenvalues_ |
unsigned int | nPosEigenvalues_ |
boost::numeric::ublas::matrix < value_type_ > | Nr_ |
unsigned int | nReacs_ |
unsigned int | numFailed_ |
unsigned int | numVarPools_ |
size_t | numVarPools_ |
VoxelPools | pool_ |
unsigned int | rank_ |
bool | reassignTotal_ |
unsigned int | solutionStatus_ |
unsigned int | stateType_ |
string | status_ |
Id | stoich_ |
vector< double > | total_ |
Definition at line 20 of file SteadyStateBoost.h.
SteadyState::SteadyState | ( | ) |
Definition at line 322 of file SteadyStateBoost.cpp.
SteadyState::~SteadyState | ( | ) |
Definition at line 344 of file SteadyStateBoost.cpp.
SteadyState::SteadyState | ( | ) |
SteadyState::~SteadyState | ( | ) |
|
static |
|
static |
Definition at line 505 of file SteadyStateBoost.cpp.
bool SteadyState::badStoichiometry | ( | ) | const |
bool SteadyState::badStoichiometry | ( | ) | const |
Definition at line 380 of file SteadyStateBoost.cpp.
References badStoichiometry_.
Referenced by initCinfo().
void SteadyState::classifyState | ( | const double * | T | ) |
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.
Definition at line 609 of file SteadyStateBoost.cpp.
References Eref::data(), DELTA, eigenvalues_, EPSILON, Id::eref(), Stoich::getKsolve(), nNegEigenvalues_, nPosEigenvalues_, numVarPools_, pool_, rank_, solutionStatus_, stateType_, stoich_, and VoxelPools::updateRates().
void SteadyState::fitConservationRules | ( | boost::numeric::ublas::matrix< value_type_ > & | U, |
const vector< value_type_ > & | eliminatedTotal, | ||
vector< value_type_ > & | yi | ||
) |
This does the actual work of generating random numbers and making sure they fit.
Definition at line 1030 of file SteadyStateBoost.cpp.
References EPSILON, moose::mtrand(), numVarPools_, and total_.
Referenced by randomizeInitialCondition().
double SteadyState::getConvergenceCriterion | ( | ) | const |
double SteadyState::getConvergenceCriterion | ( | ) | const |
Definition at line 450 of file SteadyStateBoost.cpp.
References convergenceCriterion_.
Referenced by initCinfo().
double SteadyState::getEigenvalue | ( | const unsigned int | i | ) | const |
double SteadyState::getEigenvalue | ( | const unsigned int | i | ) | const |
Definition at line 476 of file SteadyStateBoost.cpp.
References eigenvalues_.
Referenced by initCinfo().
unsigned int SteadyState::getMaxIter | ( | ) | const |
unsigned int SteadyState::getMaxIter | ( | ) | const |
Definition at line 400 of file SteadyStateBoost.cpp.
References maxIter_.
Referenced by initCinfo().
unsigned int SteadyState::getNiter | ( | ) | const |
unsigned int SteadyState::getNiter | ( | ) | const |
Definition at line 390 of file SteadyStateBoost.cpp.
References nIter_.
Referenced by initCinfo().
unsigned int SteadyState::getNnegEigenvalues | ( | ) | const |
unsigned int SteadyState::getNnegEigenvalues | ( | ) | const |
Definition at line 425 of file SteadyStateBoost.cpp.
References nNegEigenvalues_.
Referenced by initCinfo().
unsigned int SteadyState::getNposEigenvalues | ( | ) | const |
unsigned int SteadyState::getNposEigenvalues | ( | ) | const |
Definition at line 430 of file SteadyStateBoost.cpp.
References nPosEigenvalues_.
Referenced by initCinfo().
unsigned int SteadyState::getNumVarPools | ( | ) | const |
unsigned int SteadyState::getNumVarPools | ( | ) | const |
Definition at line 415 of file SteadyStateBoost.cpp.
References numVarPools_.
Referenced by initCinfo().
unsigned int SteadyState::getRank | ( | ) | const |
unsigned int SteadyState::getRank | ( | ) | const |
Definition at line 410 of file SteadyStateBoost.cpp.
References rank_.
Referenced by initCinfo().
unsigned int SteadyState::getSolutionStatus | ( | ) | const |
unsigned int SteadyState::getSolutionStatus | ( | ) | const |
Definition at line 435 of file SteadyStateBoost.cpp.
References solutionStatus_.
Referenced by initCinfo().
unsigned int SteadyState::getStateType | ( | ) | const |
unsigned int SteadyState::getStateType | ( | ) | const |
Definition at line 420 of file SteadyStateBoost.cpp.
References stateType_.
Referenced by initCinfo().
string SteadyState::getStatus | ( | ) | const |
string SteadyState::getStatus | ( | ) | const |
Definition at line 395 of file SteadyStateBoost.cpp.
References status_.
Referenced by initCinfo().
Id SteadyState::getStoich | ( | ) | const |
Id SteadyState::getStoich | ( | ) | const |
Definition at line 353 of file SteadyStateBoost.cpp.
References stoich_.
Referenced by initCinfo().
double SteadyState::getTotal | ( | const unsigned int | i | ) | const |
double SteadyState::getTotal | ( | const unsigned int | i | ) | const |
Definition at line 455 of file SteadyStateBoost.cpp.
References total_.
Referenced by initCinfo().
|
static |
|
static |
This picks up the entire Stoich data structure static Finfo* gslShared[] = { new SrcFinfo( "reinitSrc", Ftype0() ), new DestFinfo( "assignStoich", Ftype1< void* >(), RFCAST( &SteadyState::assignStoichFunc ) ), new DestFinfo( "setMolN", Ftype2< double, unsigned int >(), RFCAST( &SteadyState::setMolN ) ), new SrcFinfo( "requestYsrc", Ftype0() ), new DestFinfo( "assignY", Ftype1< double* >(), RFCAST( &SteadyState::assignY ) ), };
These are the fields of the SteadyState class
Definition at line 86 of file SteadyStateBoost.cpp.
References badStoichiometry(), getConvergenceCriterion(), getEigenvalue(), getMaxIter(), getNiter(), getNnegEigenvalues(), getNposEigenvalues(), getNumVarPools(), getRank(), getSolutionStatus(), getStateType(), getStatus(), getStoich(), getTotal(), Neutral::initCinfo(), isInitialized(), randomizeInitialCondition(), resettleFunc(), setConvergenceCriterion(), setMaxIter(), setStoich(), settleFunc(), setTotal(), setupMatrix(), showMatrices(), and steadyStateCinfo.
bool SteadyState::isInitialized | ( | ) | const |
bool SteadyState::isInitialized | ( | ) | const |
Definition at line 385 of file SteadyStateBoost.cpp.
References isInitialized_.
Referenced by initCinfo().
void SteadyState::randomizeInitialCondition | ( | const Eref & | e | ) |
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.
Definition at line 968 of file SteadyStateBoost.cpp.
References checkAboveZero(), EPSILON, fitConservationRules(), gamma_, Field< A >::get(), numVarPools_, rankUsingBoost(), recalcTotal(), stoich_, and total_.
Referenced by initCinfo().
void SteadyState::resettleFunc | ( | ) |
void SteadyState::resettleFunc | ( | ) |
Definition at line 499 of file SteadyStateBoost.cpp.
References settle().
Referenced by initCinfo().
void SteadyState::setConvergenceCriterion | ( | double | value | ) |
void SteadyState::setConvergenceCriterion | ( | double | value | ) |
Definition at line 440 of file SteadyStateBoost.cpp.
References convergenceCriterion_, and value.
Referenced by initCinfo().
void SteadyState::setEigenvalue | ( | double | val, |
const unsigned int | i | ||
) |
void SteadyState::setEigenvalue | ( | double | val, |
const unsigned int | i | ||
) |
void SteadyState::setMaxIter | ( | unsigned int | value | ) |
void SteadyState::setMaxIter | ( | unsigned int | value | ) |
Definition at line 405 of file SteadyStateBoost.cpp.
References maxIter_, and value.
Referenced by initCinfo().
|
static |
|
static |
void SteadyState::setStoich | ( | Id | s | ) |
void SteadyState::setStoich | ( | Id | s | ) |
Definition at line 358 of file SteadyStateBoost.cpp.
References Element::cinfo(), Eref::data(), Id::element(), Id::eref(), Field< A >::get(), LookupField< L, A >::get(), Stoich::getCompartment(), Stoich::getNumCoreRates(), Stoich::getRateTerms(), Cinfo::isA(), isInitialized_, nReacs_, numVarPools_, pool_, VoxelPools::setStoich(), setupSSmatrix(), VoxelPoolsBase::setVolume(), stoich_, VoxelPools::updateAllRateTerms(), and value.
Referenced by initCinfo().
void SteadyState::settle | ( | bool | forceSetup | ) |
void SteadyState::settle | ( | bool | forceSetup | ) |
The settle function computes the steady state nearest the initial conditions.
Definition at line 735 of file SteadyStateBoost.cpp.
References convergenceCriterion_, gamma_, Field< A >::get(), init(), isInitialized_, isSetup_, isSolutionValid(), Nr_, nReacs_, numVarPools_, pool_, rank_, reassignTotal_, setupSSmatrix(), solutionStatus_, status_, stoich_, and total_.
Referenced by resettleFunc(), and settleFunc().
void SteadyState::settleFunc | ( | ) |
void SteadyState::settleFunc | ( | ) |
Definition at line 494 of file SteadyStateBoost.cpp.
References settle().
Referenced by initCinfo().
void SteadyState::setTotal | ( | const unsigned int | i, |
double | val | ||
) |
void SteadyState::setTotal | ( | const unsigned int | i, |
double | val | ||
) |
Definition at line 464 of file SteadyStateBoost.cpp.
References reassignTotal_, and total_.
Referenced by initCinfo().
void SteadyState::setupMatrix | ( | ) |
void SteadyState::setupMatrix | ( | ) |
Definition at line 490 of file SteadyStateBoost.cpp.
References setupSSmatrix().
Referenced by initCinfo().
|
private |
|
private |
Definition at line 525 of file SteadyStateBoost.cpp.
References gamma_, Field< A >::get(), isSetup_, LU_, Nr_, nReacs_, numVarPools_, rank_, rankUsingBoost(), stoich_, and total_.
Referenced by setStoich(), settle(), and setupMatrix().
void SteadyState::showMatrices | ( | ) |
void SteadyState::showMatrices | ( | ) |
Definition at line 509 of file SteadyStateBoost.cpp.
References gamma_, isInitialized_, LU_, Nr_, numVarPools_, rank_, and total_.
Referenced by initCinfo().
void SteadyState::showMatricesFunc | ( | ) |
void SteadyState::showMatricesFunc | ( | ) |
|
private |
Definition at line 103 of file SteadyStateBoost.h.
Referenced by badStoichiometry().
|
private |
Definition at line 107 of file SteadyStateBoost.h.
Referenced by getConvergenceCriterion(), setConvergenceCriterion(), and settle().
|
static |
Definition at line 90 of file SteadyStateBoost.h.
Referenced by classifyState().
|
private |
Definition at line 122 of file SteadyStateBoost.h.
Referenced by classifyState(), and getEigenvalue().
|
static |
Definition at line 89 of file SteadyStateBoost.h.
Referenced by classifyState(), eliminateRowsBelow(), fitConservationRules(), randomizeInitialCondition(), and reorderRows().
|
private |
Definition at line 111 of file SteadyStateBoost.h.
Referenced by randomizeInitialCondition(), settle(), setupSSmatrix(), and showMatrices().
|
private |
Definition at line 105 of file SteadyStateBoost.h.
Referenced by isInitialized(), setStoich(), settle(), and showMatrices().
|
private |
Definition at line 106 of file SteadyStateBoost.h.
Referenced by settle(), and setupSSmatrix().
|
private |
Definition at line 109 of file SteadyStateBoost.h.
Referenced by setupSSmatrix(), and showMatrices().
|
private |
Definition at line 102 of file SteadyStateBoost.h.
Referenced by getMaxIter(), and setMaxIter().
|
private |
Definition at line 101 of file SteadyStateBoost.h.
Referenced by getNiter().
|
private |
Definition at line 120 of file SteadyStateBoost.h.
Referenced by classifyState(), and getNnegEigenvalues().
|
private |
Definition at line 121 of file SteadyStateBoost.h.
Referenced by classifyState(), and getNposEigenvalues().
|
private |
Definition at line 110 of file SteadyStateBoost.h.
Referenced by settle(), setupSSmatrix(), and showMatrices().
|
private |
Definition at line 115 of file SteadyStateBoost.h.
Referenced by setStoich(), settle(), and setupSSmatrix().
|
private |
Definition at line 125 of file SteadyStateBoost.h.
|
private |
Definition at line 108 of file SteadyStateGsl.h.
|
private |
Definition at line 114 of file SteadyStateBoost.h.
Referenced by classifyState(), fitConservationRules(), getNumVarPools(), randomizeInitialCondition(), setStoich(), settle(), setupSSmatrix(), and showMatrices().
|
private |
Definition at line 126 of file SteadyStateBoost.h.
Referenced by classifyState(), setStoich(), and settle().
|
private |
Definition at line 116 of file SteadyStateBoost.h.
Referenced by classifyState(), getRank(), settle(), setupSSmatrix(), and showMatrices().
|
private |
Definition at line 119 of file SteadyStateBoost.h.
Referenced by settle(), and setTotal().
|
private |
Definition at line 124 of file SteadyStateBoost.h.
Referenced by classifyState(), getSolutionStatus(), and settle().
|
private |
Definition at line 123 of file SteadyStateBoost.h.
Referenced by classifyState(), and getStateType().
|
private |
Definition at line 104 of file SteadyStateBoost.h.
Referenced by getStatus(), and settle().
|
private |
Definition at line 113 of file SteadyStateBoost.h.
Referenced by classifyState(), getStoich(), randomizeInitialCondition(), setStoich(), settle(), and setupSSmatrix().
|
private |
Definition at line 118 of file SteadyStateBoost.h.
Referenced by fitConservationRules(), getTotal(), randomizeInitialCondition(), settle(), setTotal(), setupSSmatrix(), and showMatrices().