kinetics/lookupVolumeFromMesh.cpp File Reference

#include "header.h"
#include "lookupVolumeFromMesh.h"
Include dependency graph for lookupVolumeFromMesh.cpp:

Functions

ObjId getCompt (Id id)
double lookupVolumeFromMesh (const Eref &e)
unsigned int getReactantVols (const Eref &reac, const SrcFinfo *pools, vector< double > &vols)
double convertConcToNumRateUsingMesh (const Eref &e, const SrcFinfo *pools, bool doPartialConversion)
double convertConcToNumRateUsingVol (const Eref &e, const SrcFinfo *pools, double volume, double scale, bool doPartialConversion)
double convertConcToNumRateInTwoCompts (double v1, unsigned int n1, double v2, unsigned int n2, double scale)

Function Documentation

double convertConcToNumRateInTwoCompts ( double  v1,
unsigned int  n1,
double  v2,
unsigned int  n2,
double  scale 
)

Generates conversion factor for rates from concentration to mol# units. This variant is used when the reactants are in different compartments or mesh entries, and may therefore have different volumes. We already know the reactants and their affiliations.

References NA.

double convertConcToNumRateUsingMesh ( const Eref e,
const SrcFinfo pools,
bool  doPartialConversion 
)

Returns conversion factor to convert rates from concentration to mol# units. Handles arbitrary combinations of volumes. Assumes that the reference volume for computing rates is the smallest volume. 26 Feb 2013: This is now changed to use the volume of the first entry. Should only be used for substrates. For products need to find the first substrate, separately, and use that to scale down the conv factor. Assumes all calculations are in SI: cubic metres and millimolar. 27 Feb 2013: This is changed to use the volume of a voxel of the the home compartment of the reac. Be warned: this can cause unexpected problems if the home compartment isn't according to convention. For example, if there is a single substrate and the home compartment is elsewhere, you will get very odd Kf:kf values. 9 Oct 2013: This is now changed to use the volume of the first substrate. Note that if the conversion is for products, then the routine has to look up the substrate list to get the first substrate. Reason is that the home compartment was often wrong in ReadKkit. Unfortunately this may yet cause problems with SBML. I don't know what conventions they use for cross-compartment reactions.

References Element::cinfo(), Eref::element(), Cinfo::findFinfo(), getReactantVols(), NA, and Finfo::name().

Referenced by ZombieEnz::vGetK1(), ZombieReac::vGetNumKb(), Reac::vGetNumKb(), ZombieReac::vGetNumKf(), Reac::vGetNumKf(), ZombieMMenz::vGetNumKm(), ZombieEnz::vGetNumKm(), MMenz::vGetNumKm(), Enz::vGetNumKm(), Reac::vReinit(), Reac::vRemesh(), MMenz::vRemesh(), Enz::vSetConcK1(), Reac::vSetConcKb(), Reac::vSetConcKf(), ZombieEnz::vSetK1(), Enz::vSetK1(), MMenz::vSetKm(), Enz::vSetKm(), ZombieReac::vSetNumKb(), Reac::vSetNumKb(), ZombieReac::vSetNumKf(), Reac::vSetNumKf(), ZombieMMenz::vSetNumKm(), ZombieEnz::vSetNumKm(), MMenz::vSetNumKm(), Enz::vSetNumKm(), and Enz::vSetRatio().

Here is the call graph for this function:

double convertConcToNumRateUsingVol ( const Eref e,
const SrcFinfo pools,
double  volume,
double  scale,
bool  doPartialConversion 
)

Generates conversion factor for rates from concentration to mol# units. This variant already knows the volume, but has to figure out # of reactants.

References Eref::element(), SrcFinfo::getBindIndex(), Element::getMsgAndFunc(), and NA.

Here is the call graph for this function:

ObjId getCompt ( Id  id  ) 

Returns the compartment in which the specified object is located. Traverses the tree toward the rood till it finds a compartment.

References Element::cinfo(), ObjId::element(), getCompt(), ObjId::id, Cinfo::isA(), and Neutral::parent().

Referenced by ReadKkit::assignPoolCompartments(), ReadKkit::assignReacCompartments(), findMeshOfEnz(), findParentComptOfReac(), getCompt(), and lookupVolumeFromMesh().

Here is the call graph for this function:

unsigned int getReactantVols ( const Eref reac,
const SrcFinfo pools,
vector< double > &  vols 
)

Figures out all the volumes of the substrates or products on the specified reaction 'reac'. The SrcFinfo is for the sub or prd msg. Returns the index of the smallest vol. Passes back a vector of volumes. The meshIndex is zero. Reasoning is as follows: both in the case of well-stirred (single mesh entry) models, and in the case of spatial models with consistent mesh sizes and alignments, the mesh entry volumes are in the same ratio. Cases with more complex arrangements may also use the current vols as a starting point, but will need to add index-specific scaling factors to their reaction system.

References Element::cinfo(), Msg::e2(), Eref::element(), SrcFinfo::getBindIndex(), Msg::getMsg(), Element::getMsgAndFunc(), Cinfo::isA(), and lookupVolumeFromMesh().

Referenced by convertConcToNumRateUsingMesh().

Here is the call graph for this function:

double lookupVolumeFromMesh ( const Eref e  ) 

Utility function to find the size of a pool. We assume one-to-one match between pool indices and mesh indices: that is what they are for.

References Eref::dataIndex(), LookupField< L, A >::get(), getCompt(), and Eref::id().

Referenced by getReactantVols(), PoolBase::setNinit(), ZombiePool::vGetConc(), Pool::vGetConc(), ZombiePool::vGetVolume(), Pool::vGetVolume(), ZombiePool::vSetConc(), ZombieBufPool::vSetConc(), Pool::vSetConc(), BufPool::vSetConc(), ZombiePool::vSetConcInit(), and Pool::vSetConcInit().

Here is the call graph for this function:


Generated on 1 Jul 2015 for MOOSE by  doxygen 1.6.1