/** * Constructor. * * @param a the value of the parameter mA */ OdeSystemForCoupledHeatEquationWithSource(double a) : AbstractOdeSystemForCoupledPdeSystem(1,1), mA(a) { mpSystemInfo = OdeSystemInformation<OdeSystemForCoupledHeatEquationWithSource>::Instance(); SetStateVariables(GetInitialConditions()); }
MyOdeSystem(std::vector<double> stateVariables=std::vector<double>()) : AbstractOdeSystem(2) { mpSystemInfo = OdeSystemInformation<MyOdeSystem>::Instance(); if (stateVariables != std::vector<double>()) { SetStateVariables(stateVariables); } }
TysonNovak2001OdeSystem::TysonNovak2001OdeSystem(std::vector<double> stateVariables) : AbstractOdeSystemWithAnalyticJacobian(6) { mpSystemInfo = OdeSystemInformation<TysonNovak2001OdeSystem>::Instance(); Init(); if (stateVariables != std::vector<double>()) { SetStateVariables(stateVariables); } }
Alarcon2004OxygenBasedCellCycleOdeSystem::Alarcon2004OxygenBasedCellCycleOdeSystem(double oxygenConcentration, bool isLabelled, std::vector<double> stateVariables) : AbstractOdeSystem(6), mOxygenConcentration(oxygenConcentration), mIsLabelled(isLabelled) { mpSystemInfo.reset(new CellwiseOdeSystemInformation<Alarcon2004OxygenBasedCellCycleOdeSystem>); /** * State variables * * 0. x = Cdh1-APC complexes * 1. y = cyclin-CDK * 2. z = p27 * 3. m = mass * 4. u = RBNP * 5. oxygenConcentration */ Init(); // set up parameters // Parameter values are taken from the Alarcon et al. (2004) paper if (mIsLabelled) // labelled "cancer" cells { ma1 = 0.04; mc1 = 0.007; mxThreshold = 0.004; myThreshold = 0.05; } else // normal cells { ma1 = 0.05; mc1 = 0.1; mxThreshold = 0.004; myThreshold = 0.2; } // Cell-specific initial conditions SetDefaultInitialCondition(3, 0.5*mMstar); SetDefaultInitialCondition(5, oxygenConcentration); if (stateVariables != std::vector<double>()) { SetStateVariables(stateVariables); } }
Mirams2010WntOdeSystem::Mirams2010WntOdeSystem(double wntLevel, boost::shared_ptr<AbstractCellMutationState> pMutationState, std::vector<double> stateVariables) : AbstractOdeSystem(3), mpMutationState(pMutationState), mWntLevel(wntLevel) { mpSystemInfo.reset(new CellwiseOdeSystemInformation<Mirams2010WntOdeSystem>); /** * State variables. * * 0. b1 = Beta-Catenin (1st allele's copy) * 1. b2 = Beta-Catenin (2nd allele's copy) * 2. wntLevel */ Init(); // set up parameter values // Set up rough guesses for the initial steady states in this Wnt conc. double b1 = 0; double b2 = 0; b1 = (mA/2.0) / (((wntLevel + mB)/(mC*wntLevel + mD)) + mF); if (!mpMutationState) { // No mutations specified } else if (mpMutationState->IsType<BetaCateninOneHitCellMutationState>()) { b2 = (mA/2.0)/mF; } else { b2 = (mA/2.0) / (((wntLevel + mB)/(mC*wntLevel + mD)) + mF); } SetDefaultInitialCondition(0, b1); SetDefaultInitialCondition(1, b2); SetDefaultInitialCondition(2, wntLevel); if (stateVariables != std::vector<double>()) { SetStateVariables(stateVariables); } }
WntCellCycleOdeSystem::WntCellCycleOdeSystem(double wntLevel, boost::shared_ptr<AbstractCellMutationState> pMutationState, std::vector<double> stateVariables) : AbstractOdeSystem(9), mpMutationState(pMutationState), mWntLevel(wntLevel) { mpSystemInfo.reset(new CellwiseOdeSystemInformation<WntCellCycleOdeSystem>); /** * State variables. * * 0. r = pRb * 1. e = E2F1 (This is the S-phase indicator) * 2. i = CycD (inactive) * 3. j = CycD (active) * 4. p = pRb-p * 5. c = APC (Active) * 6. b1 = Beta-Catenin (1st allele's copy) * 7. b2 = Beta-Catenin (2nd allele's copy) * 8. wntLevel */ Init(); // set up parameter values // Set up a Wnt signalling pathway in a steady state double destruction_level = ma5d/(ma4d*wntLevel+ma5d); double beta_cat_level_1 = -1.0; double beta_cat_level_2 = -1.0; if (!mpMutationState) { // No mutations specified } else if (mpMutationState && mpMutationState->IsType<ApcOneHitCellMutationState>()) { // APC +/- : only half are active beta_cat_level_1 = 0.5*ma2d/(ma2d+0.5*ma3d*destruction_level); beta_cat_level_2 = 0.5*ma2d/(ma2d+0.5*ma3d*destruction_level); } else if (mpMutationState && mpMutationState->IsType<ApcTwoHitCellMutationState>()) { // APC -/- destruction_level = 0.0; // no active destruction complex beta_cat_level_1 = 0.5; // fully active beta-catenin beta_cat_level_2 = 0.5; // fully active beta-catenin } else if (mpMutationState && mpMutationState->IsType<BetaCateninOneHitCellMutationState>()) { // Beta-cat delta 45 beta_cat_level_1 = 0.5*ma2d/(ma2d+ma3d*destruction_level); beta_cat_level_2 = 0.5; } else { // healthy cells beta_cat_level_1 = 0.5*ma2d/(ma2d+ma3d*destruction_level); beta_cat_level_2 = 0.5*ma2d/(ma2d+ma3d*destruction_level); } // Cell-specific initial conditions SetDefaultInitialCondition(5, destruction_level); SetDefaultInitialCondition(6, beta_cat_level_1); SetDefaultInitialCondition(7, beta_cat_level_2); SetDefaultInitialCondition(8, wntLevel); if (stateVariables != std::vector<double>()) { SetStateVariables(stateVariables); } }
void FSDEMatViscoT::TakeParameterList(const ParameterListT& list) { /* inherited */ FSSolidMatT::TakeParameterList(list); fMu = list.GetParameter("mu"); fElectricPermittivity = list.GetParameter("epsilon"); fNrig = list.GetParameter("Nrig"); fLambda = list.GetParameter("lambda"); /* write into vector to pass to C code for stress/modulus calculations */ fParams.Dimension(3); fParams[0] = fMu; fParams[1] = fLambda; fParams[2] = fElectricPermittivity; fParams[3] = fNrig; /* dimension work space */ fTangentMechanical.Dimension(kStressDim); fTangentMechanicalElec.Dimension(kStressDim); fStress.Dimension(kNumDOF); fTangentElectrical.Dimension(kNumDOF); fTangentElectromechanical.Dimension(kStressDim, kNumDOF); fElectricDisplacement.Dimension(kNumDOF); fElectricField.Dimension(kNumDOF); /* Code from RGSplitT2.cpp */ StringT caller = "FSDEMatViscoT::TakeParameterList"; int num_neq = list.NumLists("rg_neq_potential"); int num_shear_visc = list.NumLists("rg_shear_viscosity"); int num_bulk_visc = list.NumLists("rg_bulk_viscosity"); if (num_neq != num_shear_visc || num_neq != num_bulk_visc) ExceptionT::GeneralFail("FSDEMatViscoT::TakeParameterList", "number of matrix viscosity functions does not match number of matrix nonequilibrium potentials"); fNumProcess = list.NumLists("rg_shear_viscosity"); /* inherited from RGViscoelasticityT.cpp */ /* Default Dimension state variable arrays - from RGViscoelasticityT.cpp */ if (fNumProcess > 0) SetStateVariables(fNumProcess); fPot.Dimension(fNumProcess+1); fVisc_s.Dimension(fNumProcess); fVisc_b.Dimension(fNumProcess); /* For some reason, dimensioning these in TakeParameterList works better */ fF_M.Dimension(NumSD()); fF_T_inv.Dimension(NumSD()); fF3D.Dimension(3); fInverse.Dimension(3); fb.Dimension(3); fbe.Dimension(3); fb_tr.Dimension(3); fEigs_dev.Dimension(3); fEigs.Dimension(3); fEigs_e.Dimension(3); fEigs_tr.Dimension(3); ftau_EQ.Dimension(3); ftau_NEQ.Dimension(3); fStressNEQ.Dimension(NumSD()); fStress3D.Dimension(3); fDtauDe_EQ.Dimension(3); fDtauDe_NEQ.Dimension(3); fiKAB.Dimension(3); fCalg.Dimension(3); fModulus3D.Dimension(6); fModMat.Dimension(6); fModulusNEQ.Dimension(dSymMatrixT::NumValues(NumSD())); const ParameterListT& eq_pot = list.GetListChoice(*this, "rg_eq_potential"); if(eq_pot.Name() == "neo-hookean") fPot[0] = new NeoHookean; else if(eq_pot.Name() == "mooney-rivlin") fPot[0] = new MooneyRivlin; else if(eq_pot.Name() == "veronda-westmann") fPot[0] = new VWPotentialT; else if(eq_pot.Name() == "fung-potential") fPot[0] = new FungPotentialT; else if(eq_pot.Name() == "arruda-boyce") fPot[0] = new ArrudaBoyce; else ExceptionT::GeneralFail(caller, "no such potential"); if (!fPot[0]) ExceptionT::GeneralFail(caller, "could not construct \"%s\"", eq_pot.Name().Pointer()); fPot[0]->TakeParameterList(eq_pot); for (int i = 0; i < fNumProcess; i++) { const ParameterListT& pot_neq = list.GetListChoice(*this, "rg_neq_potential",i); if(pot_neq.Name() == "mooney-rivlin") fPot[i+1] = new MooneyRivlin; else if(pot_neq.Name() == "neo-hookean") fPot[i+1] = new NeoHookean; else if(pot_neq.Name() == "veronda-westmann") fPot[i+1] = new VWPotentialT; else if(pot_neq.Name() == "fung-potential") fPot[i+1] = new FungPotentialT; else if(pot_neq.Name() == "arruda-boyce") fPot[i+1] = new ArrudaBoyce; else ExceptionT::GeneralFail(caller, "no such potential"); if (!fPot[i+1]) ExceptionT::GeneralFail(caller, "could not construct \"%s\"", pot_neq.Name().Pointer()); fPot[i+1]->TakeParameterList(pot_neq); const ParameterListT& shear_visc = list.GetListChoice(*this, "rg_shear_viscosity", i); if (shear_visc.Name() == "linear_exponential") fVisc_s[i] = new LinearExponentialT; #ifdef __DEVELOPMENT__ else if (shear_visc.Name() == "scaled-csch") fVisc_s[i] = new ScaledCsch; #endif else ExceptionT::GeneralFail(caller, "no such potential"); if (!fVisc_s[i]) throw ExceptionT::kOutOfMemory; fVisc_s[i]->TakeParameterList(shear_visc); const ParameterListT& bulk_visc = list.GetListChoice(*this, "rg_bulk_viscosity", i); if (bulk_visc.Name() == "linear_exponential") fVisc_b[i] = new LinearExponentialT; #ifdef __DEVELOPMENT__ else if (bulk_visc.Name() == "scaled-csch") fVisc_b[i] = new ScaledCsch; #endif else ExceptionT::GeneralFail(caller, "no such potential"); if (!fVisc_b[i]) throw ExceptionT::kOutOfMemory; fVisc_b[i]->TakeParameterList(bulk_visc); } /* set dimension of workspaces */ // Initialize(); }
void AbstractParameterisedSystem<VECTOR>::ResetToInitialConditions() { VECTOR inits = GetInitialConditions(); SetStateVariables(inits); DeleteVector(inits); }