CorriasBuistICCModified.hpp

00001 /*
00002 
00003 Copyright (C) University of Oxford, 2005-2011
00004 
00005 University of Oxford means the Chancellor, Masters and Scholars of the
00006 University of Oxford, having an administrative office at Wellington
00007 Square, Oxford OX1 2JD, UK.
00008 
00009 This file is part of Chaste.
00010 
00011 Chaste is free software: you can redistribute it and/or modify it
00012 under the terms of the GNU Lesser General Public License as published
00013 by the Free Software Foundation, either version 2.1 of the License, or
00014 (at your option) any later version.
00015 
00016 Chaste is distributed in the hope that it will be useful, but WITHOUT
00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
00019 License for more details. The offer of Chaste under the terms of the
00020 License is subject to the License being interpreted in accordance with
00021 English Law and subject to any action against the University of Oxford
00022 being under the jurisdiction of the English Courts.
00023 
00024 You should have received a copy of the GNU Lesser General Public License
00025 along with Chaste. If not, see <http://www.gnu.org/licenses/>.
00026 
00027 */
00028 
00029 #ifndef CorriasBuistICCModified_HPP_
00030 #define CorriasBuistICCModified_HPP_
00031 
00032 #include "ChasteSerialization.hpp"
00033 #include <boost/serialization/base_object.hpp>
00034 #include "AbstractCardiacCell.hpp"
00035 #include "AbstractStimulusFunction.hpp"
00036 
00052 class CorriasBuistICCModified : public AbstractCardiacCell
00053 {
00054     friend class boost::serialization::access;
00055     template<class Archive>
00056     void serialize(Archive & archive, const unsigned int version)
00057     {
00058         archive & boost::serialization::base_object<AbstractCardiacCell >(*this);
00059         archive &  mFractionOfVDDRInPU;
00060         archive &  mIP3Concentration;
00061         archive &  mScaleFactorSerca;
00062         archive &  mScaleFactorCarbonMonoxide;
00063     }
00064 
00065 private:
00066 
00068     double mFractionOfVDDRInPU;
00070     double mIP3Concentration;
00072     double mScaleFactorSerca;
00078     double mScaleFactorCarbonMonoxide;
00079 
00080     /* Concentrations */
00081     double Ca_o;
00082     double Cl_o;
00083     double K_o;
00084     double Na_o;
00086     /* Nernst parameters */
00087     double R;
00088     double T;
00089     double F;
00090     double FoRT;
00091     double RToF;
00093     double  Cm ;
00094     double Asurf_in_cm_square;
00095     double  Asurf ;
00096     double  Cl_i  ;
00097     double  K_i   ;
00098     double  Na_i    ;
00099     double  P_cyto;
00100     double  Vol  ;
00101     double  fc ;
00102     double  fe  ;
00103     double  fm ;
00104     double  Q10Ca ;
00105     double  Q10K ;
00106     double  Q10Na  ;
00107     double  T_exp  ;
00109     double  G_max_BK  ;
00110     double  G_max_CaCl  ;
00111     double  G_max_ERG  ;
00112     double  G_max_Ltype ;
00113     double  G_max_NSCC  ;
00114     double  G_max_Na ;
00115     double  G_max_VDDR ;
00116     double  G_max_bk    ;
00117     double  G_max_kv11 ;
00120     double  J_max_PMCA  ;
00121     double  J_max_PMCA_PU ;
00122     double  J_ERleak   ;
00123     double  J_max_leak ;
00124     double  Jmax_IP3  ;
00125     double  Jmax_NaCa ;
00126     double  Jmax_serca   ;
00127     double  Jmax_uni    ;
00129     double  NaPerm_o_Kperm   ;
00130     double  L    ;
00131     double  P_ER  ;
00132     double  P_PU   ;
00133     double  P_mito ;
00134     double  b ;
00135     double  na ;
00137     double  K_Ca   ;
00138     double  K_Na ;
00139     double  K_act ;
00140     double  K_trans   ;
00141     double  k_serca ;
00142     double  conc   ;
00143     double  d_ACT   ;
00144     double  d_IP3 ;
00145     double  d_INH  ;
00147     double  tau_d_CaCl;
00148     double  tau_d_NSCC ;
00149     double  tauh;
00151     double  deltaPsi_B;
00152     double  deltaPsi_star;
00153     double  deltaPsi;
00156 
00157      //Calculated constants
00159      /* Volumes */
00160      double V_cyto;              
00161      double V_ER;                
00162      double V_MITO;              
00163      double V_PU;                
00165      /* Temperature corrections */
00166      double T_correction_Ca;     
00167      double T_correction_K;      
00168      double T_correction_Na;     
00169      double T_correction_BK;     
00171      /* Nernst potentials */
00172      double E_Na;                
00173      double E_K;                 
00174      double E_Cl;                
00175      double E_NSCC;              
00177      /* Activation gate time constants */
00178      double tau_d_ERG;           
00179      double tau_d_Ltype;         
00180      double tau_d_Na;            
00181      double tau_d_VDDR;          
00182      double tau_d_kv11;          
00184      /* Inactivation gate time constants */
00185      double tau_f_Ltype;         
00186      double tau_f_Na;            
00187      double tau_f_VDDR;          
00188      double tau_f_ca_Ltype;      
00189      double tau_f_kv11;          
00191      /* Speed ups */
00192      double e2FoRTdPsiMdPsiS;
00193      double ebFoRTdPsiMdPsiS;
00196 public:
00203      CorriasBuistICCModified(boost::shared_ptr<AbstractIvpOdeSolver> pSolver, boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus);
00204 
00208     ~CorriasBuistICCModified();
00209 
00213     void VerifyStateVariables();
00214 
00221     double GetIIonic(const std::vector<double>* pStateVariables=NULL);
00222 
00230     void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY);
00231 
00237     void SetFractionOfVDDRInPU(double fraction);
00238 
00244     void SetIP3Concentration(double concentration);
00245 
00251     void SetSercaPumpScaleFactor(double scaleFactor);
00252 
00259     void SetCarbonMonoxideScaleFactor(double scaleFactor);
00260 
00264     double GetCarbonMonoxideScaleFactor();
00265 };
00266 
00267 
00268 // Needs to be included last
00269 #include "SerializationExportWrapper.hpp"
00270 CHASTE_CLASS_EXPORT(CorriasBuistICCModified)
00271 
00272 namespace boost
00273 {
00274     namespace serialization
00275     {
00276         template<class Archive>
00277         inline void save_construct_data(
00278             Archive & ar, const CorriasBuistICCModified * t, const unsigned int fileVersion)
00279         {
00280             const boost::shared_ptr<AbstractIvpOdeSolver> p_solver = t->GetSolver();
00281             const boost::shared_ptr<AbstractStimulusFunction> p_stimulus = t->GetStimulusFunction();
00282             ar << p_solver;
00283             ar << p_stimulus;
00284         }
00285 
00286         template<class Archive>
00287         inline void load_construct_data(
00288             Archive & ar, CorriasBuistICCModified * t, const unsigned int fileVersion)
00289         {
00290             boost::shared_ptr<AbstractIvpOdeSolver> p_solver;
00291             boost::shared_ptr<AbstractStimulusFunction> p_stimulus;
00292             ar >> p_solver;
00293             ar >> p_stimulus;
00294             ::new(t)CorriasBuistICCModified(p_solver, p_stimulus);
00295         }
00296 
00297     }
00298 
00299 }
00300 
00301 #endif // CorriasBuistICCModified_HPP_
Generated on Thu Dec 22 13:00:06 2011 for Chaste by  doxygen 1.6.3