Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

MDOChemical.cpp

Go to the documentation of this file.
00001 // MDOChemical.cpp: implementation of the CMDOChemical class.
00002 //
00004 
00005 #include "MDOChemical.h"
00006 
00008 // Construction/Destruction
00010 
00011 CMDOChemical::CMDOChemical(int chemicalNumber, std::string name, std::vector<Chemical *> chemRefVector, std::vector<RateConstant *> rateRefVector)
00012 :CAlgebraicChemical(chemicalNumber,name,chemRefVector,rateRefVector)
00013 {
00014 
00015 }
00016 
00017 CMDOChemical::~CMDOChemical()
00018 {
00019 
00020 }
00021 
00022 void CMDOChemical::ComputeAmount()
00023 {
00024         double temp = 0.0;
00025         temp = m_vpRateRefVector[2]->GetValue()*(m_vpChemRefVector[0]->GetAmount()/m_vpChemRefVector[0]->GetInitialAmount());
00026         temp -= m_vpRateRefVector[0]->GetValue();
00027         temp -= m_vpRateRefVector[1]->GetValue();
00028         amount = temp;
00029 }
00030 
00031 void CMDOChemical::ComputeInitialAmount()
00032 {
00033         double temp = 0.0;
00034         temp = m_vpRateRefVector[2]->GetValue() - m_vpRateRefVector[0]->GetValue() - m_vpRateRefVector[1]->GetValue();
00035         initialAmount = temp;
00036 }
00037 
00038 void CMDOChemical::ComputeErrorInInitialAmount()
00039 {
00040         // temporary
00041         errorInInitialAmount = 1.0;
00042 }

Generated on Mon Nov 3 09:37:58 2003 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002