MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ZeroOrder Class Reference

#include <RateTerm.h>

+ Inheritance diagram for ZeroOrder:
+ Collaboration diagram for ZeroOrder:

Public Member Functions

RateTermcopyWithVolScaling (double vol, double sub, double prd) const
 
double getR1 () const
 Used by Zombie to return rate terms. More...
 
double getR2 () const
 Used by Zombie to return rate terms. More...
 
unsigned int getReactants (vector< unsigned int > &molIndex) const
 
double operator() (const double *S) const
 Computes the rate. The argument is the molecule array. More...
 
void rescaleVolume (short comptIndex, const vector< short > &compartmentLookup, double ratio)
 
void setK (double k)
 
void setR1 (double k1)
 Used by Zombie to assign rate terms. More...
 
void setR2 (double k2)
 Used by Zombie to assign rate terms. More...
 
void setRates (double k1, double k2)
 
 ZeroOrder (double k)
 
- Public Member Functions inherited from RateTerm
 RateTerm ()
 
virtual ~RateTerm ()
 

Protected Attributes

double k_
 

Additional Inherited Members

- Static Public Attributes inherited from RateTerm
static const double EPSILON = 1.0e-6
 

Detailed Description

Definition at line 254 of file RateTerm.h.

Constructor & Destructor Documentation

ZeroOrder::ZeroOrder ( double  k)
inline

Definition at line 257 of file RateTerm.h.

References k_.

Referenced by copyWithVolScaling().

258  : k_( k )
259  {
260  assert( !std::isnan( k_ ) );
261  }
double k_
Definition: RateTerm.h:311

+ Here is the caller graph for this function:

Member Function Documentation

RateTerm* ZeroOrder::copyWithVolScaling ( double  vol,
double  sub,
double  prd 
) const
inlinevirtual

Duplicates rate term and then applies volume scaling. Arguments are volume of reference voxel, product of vol/refVol for all substrates: applied to R1 product of vol/refVol for all products: applied to R2

Note that unless the reaction is cross-compartment, the vol/refVol will be one.

Implements RateTerm.

Reimplemented in StochNOrder, NOrder, StochSecondOrderSingleSubstrate, SecondOrder, FirstOrder, and Flux.

Definition at line 305 of file RateTerm.h.

References k_, and ZeroOrder().

Referenced by BidirectionalReaction::copyWithVolScaling().

307  {
308  return new ZeroOrder( k_ );
309  }
ZeroOrder(double k)
Definition: RateTerm.h:257
double k_
Definition: RateTerm.h:311

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double ZeroOrder::getR1 ( ) const
inlinevirtual

Used by Zombie to return rate terms.

Implements RateTerm.

Definition at line 286 of file RateTerm.h.

References k_.

Referenced by BidirectionalReaction::getR1(), and BidirectionalReaction::getR2().

286  {
287  return k_;
288  }
double k_
Definition: RateTerm.h:311

+ Here is the caller graph for this function:

double ZeroOrder::getR2 ( ) const
inlinevirtual

Used by Zombie to return rate terms.

Implements RateTerm.

Definition at line 290 of file RateTerm.h.

290  {
291  return 0.0;
292  }
unsigned int ZeroOrder::getReactants ( vector< unsigned int > &  molIndex) const
inlinevirtual

This function finds the reactant indices in the vector S. It returns the number of substrates found, which are the first entries in molIndex. The products are the remaining ones. Note that it does NOT find products for unidirectional reactions, which is a bit of a problem.

Implements RateTerm.

Reimplemented in NOrder, StochSecondOrderSingleSubstrate, SecondOrder, FirstOrder, and Flux.

Definition at line 294 of file RateTerm.h.

Referenced by BidirectionalReaction::getReactants(), Stoich::innerInstallReaction(), and Stoich::installEnzyme().

294  {
295  molIndex.resize( 0 );
296  return 0;
297  }

+ Here is the caller graph for this function:

double ZeroOrder::operator() ( const double *  S) const
inlinevirtual

Computes the rate. The argument is the molecule array.

Implements RateTerm.

Reimplemented in StochNOrder, NOrder, StochSecondOrderSingleSubstrate, SecondOrder, FirstOrder, and Flux.

Definition at line 263 of file RateTerm.h.

References k_.

263  {
264  assert( !std::isnan( k_ ) );
265  return k_;
266  }
double k_
Definition: RateTerm.h:311
void ZeroOrder::rescaleVolume ( short  comptIndex,
const vector< short > &  compartmentLookup,
double  ratio 
)
inlinevirtual

This is used to rescale the RateTerm kinetics when the compartment volume changes. This is needed because the kinetics are in extensive units, that is, mol numbers, rather than in intensive units like concentration. So when the volume changes the rate terms change. Each Rate term checks if any of its reactant molecules are affected, and if so, rescales. Ratio is newVol / oldVol

Implements RateTerm.

Reimplemented in NOrder, StochSecondOrderSingleSubstrate, SecondOrder, FirstOrder, and Flux.

Definition at line 299 of file RateTerm.h.

Referenced by BidirectionalReaction::rescaleVolume().

301  {
302  return; // Nothing needs to be scaled.
303  }

+ Here is the caller graph for this function:

void ZeroOrder::setK ( double  k)
inline

Definition at line 268 of file RateTerm.h.

References k_.

Referenced by setR1(), BidirectionalReaction::setR1(), BidirectionalReaction::setR2(), setRates(), and BidirectionalReaction::setRates().

268  {
269  assert( !std::isnan( k ) );
270  if ( k >= 0.0 )
271  k_ = k;
272  }
double k_
Definition: RateTerm.h:311

+ Here is the caller graph for this function:

void ZeroOrder::setR1 ( double  k1)
inlinevirtual

Used by Zombie to assign rate terms.

Implements RateTerm.

Definition at line 278 of file RateTerm.h.

References setK().

278  {
279  setK( k1 );
280  }
void setK(double k)
Definition: RateTerm.h:268

+ Here is the call graph for this function:

void ZeroOrder::setR2 ( double  k2)
inlinevirtual

Used by Zombie to assign rate terms.

Implements RateTerm.

Definition at line 282 of file RateTerm.h.

282  {
283  ;
284  }
void ZeroOrder::setRates ( double  k1,
double  k2 
)
inlinevirtual

Assign the rates.

Implements RateTerm.

Definition at line 274 of file RateTerm.h.

References setK().

274  {
275  setK( k1 );
276  }
void setK(double k)
Definition: RateTerm.h:268

+ Here is the call graph for this function:

Member Data Documentation


The documentation for this class was generated from the following file: