void CMathObject::calculate() { // This method should only be called if there is something to calculate, i.e. // mpExpression != NULL assert(mpExpression != NULL); *mpValue = mpExpression->value(); #ifdef COPASI_DEBUG // Check for NaN if (isnan(*mpValue)) { std::cout << "NaN Value for: " << getCN() << std::endl; } #endif // COPASI_DEBUG // For an extensive transient value of a dependent species we have 2 // possible assignments depending on the context. // 1) Conversion from the intensive property // 2) Dependent mass off a moiety // // The solution is that the moiety automatically updates the value in conjunction // with the dependency graph omitting the value in the update sequence if the context // is CMath::UseMoieties. }
const CCopasiObject *UndoData::getObject(const CCopasiDataModel *pModel) const { if (pModel == NULL) return NULL; return dynamic_cast<const CCopasiObject*>(pModel->getObject(getCN())); }