Loading OpenSimRoot/src/modules/CarbonModule/Carbon2DryWeight.cpp +11 −7 Original line number Diff line number Diff line Loading @@ -33,7 +33,10 @@ CinDryWeight::CinDryWeight(SimulaDynamic* const pSD): std::string plantType; pSD->getSibling("plantType")->get(plantType); //param SimulaBase* param(GETPLANTPARAMETERS(plantType)->getChild("resources")->existingChild("CtoDryWeightRatio","100%")); SimulaBase * r=GETPLANTPARAMETERS(plantType)->existingChild("resources"), * param; if(r){ param=r->existingChild("carbonToDryWeightRatio","100%"); if(!param) param=r->existingChild("CtoDryWeightRatio","100%"); //value if(param){ param->get(cdw); Loading @@ -42,6 +45,7 @@ CinDryWeight::CinDryWeight(SimulaDynamic* const pSD): msg::warning("CinDryWeight: CtoDryWeightRatio parameter not found in the resource section of plant "+plantType+". Using default of 0.42.", 1); } } } void CinDryWeight::calculate(const Time &t, double&r){ r=cdw; } Loading Loading
OpenSimRoot/src/modules/CarbonModule/Carbon2DryWeight.cpp +11 −7 Original line number Diff line number Diff line Loading @@ -33,7 +33,10 @@ CinDryWeight::CinDryWeight(SimulaDynamic* const pSD): std::string plantType; pSD->getSibling("plantType")->get(plantType); //param SimulaBase* param(GETPLANTPARAMETERS(plantType)->getChild("resources")->existingChild("CtoDryWeightRatio","100%")); SimulaBase * r=GETPLANTPARAMETERS(plantType)->existingChild("resources"), * param; if(r){ param=r->existingChild("carbonToDryWeightRatio","100%"); if(!param) param=r->existingChild("CtoDryWeightRatio","100%"); //value if(param){ param->get(cdw); Loading @@ -42,6 +45,7 @@ CinDryWeight::CinDryWeight(SimulaDynamic* const pSD): msg::warning("CinDryWeight: CtoDryWeightRatio parameter not found in the resource section of plant "+plantType+". Using default of 0.42.", 1); } } } void CinDryWeight::calculate(const Time &t, double&r){ r=cdw; } Loading