COPASI API  4.40.278
CNewtonMethod Class Reference

#include <CNewtonMethod.h>

Inheritance diagram for CNewtonMethod:
[legend]

Public Types

enum class  eTargetCriterion { DistanceAndRate , Distance , Rate , __SIZE }
 
- Public Types inherited from CSteadyStateMethod
enum  ReturnCode { notFound = 0 , found , foundEquilibrium , foundNegative }
 
- Public Types inherited from CCopasiParameterGroup
typedef CDataObjectMap::const_type_iterator< CCopasiParameterconst_name_iterator
 
typedef std::vector< CCopasiParameter * > elements
 
typedef elements::iterator index_iterator
 
typedef CDataObjectMap::type_iterator< CCopasiParametername_iterator
 
- Public Types inherited from CCopasiParameter
enum class  eUserInterfaceFlag { editable , basic , unsupported , __SIZE }
 
enum class  Type {
  DOUBLE = 0 , UDOUBLE , INT , UINT ,
  BOOL , GROUP , STRING , CN ,
  KEY , FILE , EXPRESSION , INVALID ,
  __SIZE
}
 
typedef CFlags< eUserInterfaceFlagUserInterfaceFlag
 
- Public Types inherited from CDataContainer
typedef CDataObjectMap objectMap
 
- Public Types inherited from CDataObject
typedef std::set< const CDataObject * > DataObjectSet
 
enum  Flag {
  Container , Vector , Matrix , NameVector ,
  Reference , ValueBool , ValueInt , ValueInt64 ,
  ValueDbl , NonUniqueName , StaticString , ValueString ,
  Separator , DisplayName , ModelEntity , Array ,
  DataModel , Root , Gui , __SIZE
}
 
- Public Types inherited from CObjectInterface
typedef std::vector< const CDataContainer * > ContainerList
 
typedef std::set< const CObjectInterface * > ObjectSet
 

Public Member Functions

 CNewtonMethod (const CDataContainer *pParent, const CTaskEnum::Method &methodType=CTaskEnum::Method::Newton, const CTaskEnum::Task &taskType=CTaskEnum::Task::steadyState)
 
 CNewtonMethod (const CNewtonMethod &src, const CDataContainer *pParent)
 
virtual bool elevateChildren ()
 
virtual bool initialize (const CSteadyStateProblem *pProblem)
 
bool isSteadyState (const C_FLOAT64 &value) const
 
virtual bool isValidProblem (const CCopasiProblem *pProblem)
 
virtual void load (CReadConfig &configBuffer, CReadConfig::Mode mode=CReadConfig::SEARCH)
 
virtual CSteadyStateMethod::ReturnCode processInternal ()
 
C_FLOAT64 targetFunction ()
 
 ~CNewtonMethod ()
 
- Public Member Functions inherited from CSteadyStateMethod
 CSteadyStateMethod (const CSteadyStateMethod &src, const CDataContainer *pParent)
 
void doJacobian (CMatrix< C_FLOAT64 > &jacobian, CMatrix< C_FLOAT64 > &jacobianX)
 
bool elevateChildren ()
 
std::string getMethodLog () const
 
C_FLOAT64 getStabilityResolution ()
 
CSteadyStateMethod::ReturnCode process (CVectorCore< C_FLOAT64 > &State, CMatrix< C_FLOAT64 > &jacobianX, CProcessReportLevel handler)
 
 ~CSteadyStateMethod ()
 
- Public Member Functions inherited from CCopasiMethod
 CCopasiMethod (const CCopasiMethod &src, const CDataContainer *pParent)
 
virtual void clearCallBack ()
 
const CProcessReportLevelgetCallBack () const
 
CMathContainergetMathContainer () const
 
const CTaskEnum::MethodgetSubType () const
 
const CTaskEnum::TaskgetType () const
 
CCopasiMethodoperator= (const CCopasiMethod &rhs)
 
virtual void print (std::ostream *ostream) const
 
virtual void printResult (std::ostream *ostream) const
 
virtual bool setCallBack (CProcessReportLevel callBack)
 
void setMathContainer (CMathContainer *pContainer)
 
virtual ~CCopasiMethod ()
 
- Public Member Functions inherited from CCopasiParameterGroup
bool addGroup (const std::string &name)
 
void addParameter (CCopasiParameter *pParameter)
 
bool addParameter (const CCopasiParameter &parameter)
 
bool addParameter (const std::string &name, const CCopasiParameter::Type type, const CCopasiParameter::UserInterfaceFlag &flag=CCopasiParameter::UserInterfaceFlag::All)
 
template<class CType >
bool addParameter (const std::string &name, const CCopasiParameter::Type type, const CType &value, const CCopasiParameter::UserInterfaceFlag &flag=CCopasiParameter::UserInterfaceFlag::All)
 
virtual bool applyData (const CData &data, CUndoData::CChangeSet &changes)
 
CCopasiParameterGroupassertGroup (const std::string &name, const CCopasiParameter::UserInterfaceFlag &flag=CCopasiParameter::UserInterfaceFlag::All)
 
template<class CType >
CType * assertParameter (const std::string &name, const CCopasiParameter::Type type, const CType &defaultValue, const CCopasiParameter::UserInterfaceFlag &flag=CCopasiParameter::UserInterfaceFlag::All)
 
index_iterator beginIndex () const
 
const_name_iterator beginName () const
 
 CCopasiParameterGroup (const CCopasiParameterGroup &src, const CDataContainer *pParent=NULL)
 
 CCopasiParameterGroup (const std::string &name, const CDataContainer *pParent=NO_PARENT, const std::string &objectType="ParameterGroup")
 
void clear ()
 
virtual void createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const
 
index_iterator endIndex () const
 
const_name_iterator endName () const
 
CCopasiParameterGroupgetElementTemplates ()
 
const CCopasiParameterGroupgetElementTemplates () const
 
CCopasiParameterGroupgetGroup (const size_t &index)
 
const CCopasiParameterGroupgetGroup (const size_t &index) const
 
CCopasiParameterGroupgetGroup (const std::string &name)
 
const CCopasiParameterGroupgetGroup (const std::string &name) const
 
virtual size_t getIndex (const CDataObject *pObject) const
 
size_t getIndex (const std::string &name) const
 
std::string getKey (const size_t &index) const
 
std::string getKey (const std::string &name) const
 
virtual const std::string & getName (const size_t &index) const
 
virtual const CObjectInterfacegetObject (const CCommonName &cn) const
 
CCopasiParametergetParameter (const size_t &index)
 
const CCopasiParametergetParameter (const size_t &index) const
 
CCopasiParametergetParameter (std::string name)
 
const CCopasiParametergetParameter (std::string name) const
 
CCopasiParameter::Type getType (const size_t &index) const
 
CCopasiParameter::Type getType (const std::string &name) const
 
std::string getUniqueParameterName (const CCopasiParameter *pParameter) const
 
template<class CType >
CType & getValue (const size_t &index)
 
template<class CType >
const CType & getValue (const size_t &index) const
 
template<class CType >
CType & getValue (const std::string &name)
 
template<class CType >
const CType & getValue (const std::string &name) const
 
bool haveTemplate () const
 
virtual CUndoObjectInterfaceinsert (const CData &data)
 
CCopasiParameterGroupoperator= (const CCopasiParameterGroup &rhs)
 
virtual bool remove (CDataObject *pObject)
 
bool removeParameter (CCopasiParameter *pParameter)
 
bool removeParameter (const size_t &index)
 
bool removeParameter (const std::string &name)
 
virtual void setUserInterfaceFlag (const UserInterfaceFlag &flag)
 
template<class CType >
bool setValue (const size_t &index, const CType &value)
 
template<class CType >
bool setValue (const std::string &name, const CType &value)
 
size_t size (const UserInterfaceFlag &require=UserInterfaceFlag::None, const UserInterfaceFlag &exclude=UserInterfaceFlag::None) const
 
bool swap (const size_t &iFrom, const size_t &iTo)
 
bool swap (index_iterator &from, index_iterator &to)
 
virtual CData toData () const
 
virtual void updateIndex (const size_t &index, const CUndoObjectInterface *pUndoObject)
 
virtual ~CCopasiParameterGroup ()
 
- Public Member Functions inherited from CCopasiParameter
 CCopasiParameter (const CCopasiParameter &src, const CDataContainer *pParent)
 
 CCopasiParameter (const std::string &name, const Type &type, const void *pValue=NULL, const CDataContainer *pParent=NO_PARENT, const std::string &objectType="Parameter")
 
virtual CCommonName getCN () const override
 
template<class CType >
const CType & getDefault () const
 
virtual const std::string & getKey () const override
 
virtual std::string getObjectDisplayName () const override
 
const CCopasiParameter::TypegetType () const
 
const UserInterfaceFlaggetUserInterfaceFlag () const
 
template<class CType >
std::vector< std::pair< CType, CType > > & getValidValues ()
 
template<class CType >
const std::vector< std::pair< CType, CType > > & getValidValues () const
 
void * getValidValuesPointer () const
 
template<class CType >
CType & getValue ()
 
template<class CType >
const CType & getValue () const
 
virtual void * getValuePointer () const override
 
CDataObjectgetValueReference () const
 
bool hasValidValues () const
 
bool isBasic () const
 
bool isDefault () const
 
bool isEditable () const
 
bool isUnsupported () const
 
bool isValidValue (const bool &value) const
 
bool isValidValue (const C_FLOAT64 &value) const
 
bool isValidValue (const C_INT32 &value) const
 
bool isValidValue (const CCommonName &value) const
 
template<class CType >
bool isValidValue (const CType &) const
 
bool isValidValue (const std::string &value) const
 
bool isValidValue (const std::vector< CCopasiParameter * > &value) const
 
bool isValidValue (const unsigned C_INT32 &value) const
 
CCopasiParameteroperator= (const CCopasiParameter &rhs)
 
template<class CType >
bool setDefault (const CType &defaultValue)
 
bool setDefault (const std::vector< CCopasiParameter * > &defaultValue)
 
virtual bool setObjectParent (const CDataContainer *pParent) override
 
template<class CType , class Enum >
bool setValidValues (const CEnumAnnotation< CType, Enum > &validValues)
 
template<class CType >
bool setValidValues (const std::vector< std::pair< CType, CType > > &validValues)
 
template<class CType >
bool setValue (const CType &value)
 
bool setValue (const std::vector< CCopasiParameter * > &value)
 
virtual ~CCopasiParameter ()
 
- Public Member Functions inherited from CDataContainer
virtual bool add (CDataObject *pObject, const bool &adopt=true)
 
virtual bool appendDeletedDependentData (CUndoData &undoData) const
 
 CDataContainer (const CDataContainer &src, const CDataContainer *pParent)
 
 CDataContainer (const std::string &name, const CDataContainer *pParent=NO_PARENT, const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None)
 
virtual std::string getChildObjectUnits (const CDataObject *pObject) const
 
void getDescendants (CDataObject::DataObjectSet &descendants, const bool &recursive=false) const
 
virtual objectMapgetObjects ()
 
virtual const objectMapgetObjects () const
 
virtual const std::string getUnits () const override
 
virtual const CDataObjectgetValueObject () const override
 
void objectRenamed (CDataObject *pObject, const std::string &oldName)
 
virtual ~CDataContainer ()
 
- Public Member Functions inherited from CDataObject
void addIssue (const CIssue &issue)
 
void addReference (const CDataContainer *pReference)
 
virtual void calculateValue () override
 
 CDataObject (const CDataObject &src, const CDataContainer *pParent=NULL)
 
virtual void destruct () override
 
virtual const CDataObjectgetDataObject () const override
 
CDataContainergetObjectAncestor (const std::string &type) const
 
CDataModelgetObjectDataModel () const
 
const CObjectInterfacegetObjectFromCN (const CCommonName &cn) const
 
const std::string & getObjectName () const
 
CDataContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const CObjectInterface::ObjectSetgetPrerequisites () const override
 
virtual const CValiditygetValidity () const override
 
bool hasFlag (const Flag &flag) const
 
virtual bool isPrerequisiteForContext (const CObjectInterface *pObject, const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const override
 
bool prerequisitsContains (const DataObjectSet &objects) const
 
void removeIssue (const CIssue &issue)
 
void removeReference (const CDataContainer *pReference)
 
bool setObjectName (const std::string &name)
 
void validityChanged (const CValidity &changedValidity) override
 
void validityRemoved (const CValidity &changedValidity)
 
virtual ~CDataObject ()
 
- Public Member Functions inherited from CObjectInterface
 CObjectInterface ()
 
 CObjectInterface (const CObjectInterface &src)
 
virtual ~CObjectInterface ()
 
- Public Member Functions inherited from CUndoObjectInterface
 CUndoObjectInterface ()
 
 CUndoObjectInterface (const CUndoObjectInterface &src)
 
bool generateUuid ()
 
const xg::Guid & getUuid () const
 
bool setUuid (const std::string &uuid)
 
bool setUuid (const xg::Guid &uuid)
 
virtual ~CUndoObjectInterface ()
 

Static Public Attributes

static const CEnumAnnotation< std::string, eTargetCriterionTargetCriterion
 
- Static Public Attributes inherited from CCopasiParameter
static const CEnumAnnotation< std::string, TypeTypeName
 
static const CEnumAnnotation< std::string, TypeXMLType
 
- Static Public Attributes inherited from CDataContainer
static const CObjectInterface::ContainerList EmptyList
 

Private Types

enum  NewtonResultCode {
  found = 0 , notFound , iterationLimitExceeded , dampingLimitExceeded ,
  singularJacobian , negativeValueFound , stepSuccesful
}
 

Private Member Functions

void calculateDerivativesX ()
 
void cleanup ()
 
 CNewtonMethod ()
 
bool containsNaN () const
 
CNewtonMethod::NewtonResultCode doIntegration (bool forward)
 
CNewtonMethod::NewtonResultCode doNewtonStep (C_FLOAT64 &currentValue)
 
void initializeParameter ()
 
CNewtonMethod::NewtonResultCode processNewton ()
 
C_FLOAT64 targetFunctionDistance ()
 
C_FLOAT64 targetFunctionRate ()
 
std::string targetValueToString () const
 

Private Attributes

bool mAcceptNegative
 
size_t mDimension
 
CVectorCore< C_FLOAT64mdxdt
 
bool mForceNewton
 
CVector< C_FLOAT64mH
 
unsigned C_INT32 mIterationLimit
 
bool mKeepProtocol
 
C_FLOAT64 mMaxDurationBackward
 
C_FLOAT64 mMaxDurationForward
 
CTrajectoryTaskmpTrajectory
 
C_FLOAT64mpX
 
CVector< C_FLOAT64mStartState
 
eTargetCriterion mTargetCriterion
 
C_FLOAT64 mTargetDistance
 
C_FLOAT64 mTargetRate
 
CCore::CUpdateSequence mUpdateConcentrations
 
bool mUseBackIntegration
 
bool mUseIntegration
 
bool mUseNewton
 
CVector< C_FLOAT64mXold
 

Additional Inherited Members

- Static Public Member Functions inherited from CCopasiParameter
static void allocateValidValues (const Type &type, void *&pValidValues)
 
static void allocateValue (const Type &type, void *&pValue)
 
static void assignValue (const Type &type, void *&pValue, const void *pNewValue)
 
static void deleteValidValues (const Type &type, void *&pValidValues)
 
static void deleteValue (const Type &type, void *&pValue)
 
static CCopasiParameterfromData (const CData &data, CUndoObjectInterface *pParent)
 
- Static Public Member Functions inherited from CDataContainer
static CDataContainerfromData (const CData &data, CUndoObjectInterface *pParent)
 
- Static Public Member Functions inherited from CDataObject
static CDataObjectfromData (const CData &data, CUndoObjectInterface *pParent)
 
static void sanitizeObjectName (std::string &name)
 
- Static Public Member Functions inherited from CObjectInterface
static const CDataObjectDataObject (const CObjectInterface *pInterface)
 
static CObjectInterfaceGetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName)
 
- Static Public Member Functions inherited from CUndoObjectInterface
template<class CType >
static CType * fromData (const CData &, CUndoObjectInterface *)
 
- Protected Member Functions inherited from CSteadyStateMethod
bool allPositive ()
 
void calculateJacobian (const C_FLOAT64 &oldMaxRate, const bool &reduced)
 
 CSteadyStateMethod (const CDataContainer *pParent, const CTaskEnum::Method &methodType, const CTaskEnum::Task &taskType=CTaskEnum::Task::steadyState)
 
 CSteadyStateMethod (CTaskEnum::Method subType, const CDataContainer *pParent=NO_PARENT)
 
void initializeParameter ()
 
bool isEquilibrium (const C_FLOAT64 &resolution) const
 
virtual CSteadyStateMethod::ReturnCode returnProcess (bool steadyStateFound)
 
- Protected Member Functions inherited from CCopasiMethod
 CCopasiMethod (const CCopasiMethod &src)
 
 CCopasiMethod (const CDataContainer *pParent, const CTaskEnum::Method &methodType, const CTaskEnum::Task &taskType)
 
virtual void signalMathContainerChanged ()
 
- Protected Member Functions inherited from CCopasiParameterGroup
 CCopasiParameterGroup ()
 
- Protected Member Functions inherited from CCopasiParameter
 CCopasiParameter (const CCopasiParameter &src)
 
- Protected Member Functions inherited from CDataContainer
template<class CType >
CDataMatrixReference< CType > * addMatrixReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None)
 
template<class CType >
CDataObjectReference< CType > * addObjectReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None)
 
template<class CType >
CDataVectorReference< CType > * addVectorReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None)
 
 CDataContainer (const CDataContainer &src)
 
void initObjects ()
 
- Protected Member Functions inherited from CDataObject
 CDataObject ()
 
 CDataObject (const std::string &name, const CDataContainer *pParent=static_cast< CDataContainer * >((void *) 0), const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None)
 
- Protected Attributes inherited from CSteadyStateMethod
CVector< C_FLOAT64mAtol
 
CVector< C_FLOAT64 * > mCompartmentVolumes
 
CVectorCore< C_FLOAT64mContainerState
 
CVectorCore< C_FLOAT64mContainerStateReduced
 
std::ostringstream mMethodLog
 
C_FLOAT64mpContainerStateTime
 
C_FLOAT64mpDerivationFactor
 
C_FLOAT64mpDerivationResolution
 
CMatrix< C_FLOAT64 > * mpJacobian
 
CSteadyStateTaskmpParentTask
 
const CSteadyStateProblemmpProblem
 
C_FLOAT64mpSSResolution
 
CVector< C_FLOAT64mStartState
 
CVectorCore< C_FLOAT64mSteadyState
 
- Protected Attributes inherited from CCopasiMethod
CMathContainermpContainer
 
CProcessReportLevel mProcessReport
 
- Protected Attributes inherited from CCopasiParameter
std::string mKey
 
void * mpDefault
 
void * mpValidValues
 
void * mpValue
 
CDataObjectmpValueReference
 
UserInterfaceFlag mUserInterfaceFlag
 
- Protected Attributes inherited from CDataContainer
objectMap mObjects
 
- Protected Attributes inherited from CDataObject
ObjectSet mPrerequisits
 
std::set< CDataContainer * > mReferences
 
- Protected Attributes inherited from CObjectInterface
CValidity mValidity
 

Member Enumeration Documentation

◆ eTargetCriterion

Enumerator
DistanceAndRate 
Distance 
Rate 
__SIZE 

◆ NewtonResultCode

Enumerator
found 
notFound 
iterationLimitExceeded 
dampingLimitExceeded 
singularJacobian 
negativeValueFound 
stepSuccesful 

Constructor & Destructor Documentation

◆ CNewtonMethod() [1/3]

CNewtonMethod::CNewtonMethod ( )
private

Default constructor.

◆ CNewtonMethod() [2/3]

CNewtonMethod::CNewtonMethod ( const CDataContainer pParent,
const CTaskEnum::Method methodType = CTaskEnum::Method::Newton,
const CTaskEnum::Task taskType = CTaskEnum::Task::steadyState 
)

Specific constructor

Parameters
constCDataContainer * pParent
constCTaskEnum::Method & methodType (default: Newton)
constCTaskEnum::Task & taskType (default: steadyState)

References initializeParameter().

◆ CNewtonMethod() [3/3]

CNewtonMethod::CNewtonMethod ( const CNewtonMethod src,
const CDataContainer pParent 
)

Copy constructor.

Parameters
const CNewtonMethod &src
constCDataContainer * pParent (default: NULL)

References initializeParameter().

◆ ~CNewtonMethod()

CNewtonMethod::~CNewtonMethod ( )

Destructor.

References cleanup().

Member Function Documentation

◆ calculateDerivativesX()

void CNewtonMethod::calculateDerivativesX ( )
private

◆ cleanup()

void CNewtonMethod::cleanup ( )
private

References mpTrajectory, and pdelete.

Referenced by initialize(), and ~CNewtonMethod().

◆ containsNaN()

bool CNewtonMethod::containsNaN ( ) const
private

◆ doIntegration()

◆ doNewtonStep()

CNewtonMethod::NewtonResultCode CNewtonMethod::doNewtonStep ( C_FLOAT64 currentValue)
private

Do one newton step and subsequent damping. The value of the targetfunction before the step is provided by the calling method in currentValue, the value after the step is returned in currentValue. The step starts from the state in mpX (pointing to the independent variables of mpSteadyState). After the method returns mpX contains either the old state or the state after the step (if the step was succesful). mdxdt can be expected to be up to date. Possible return values are: dampingLimitExceeded, singularJacobian, stepSuccesful

References CSteadyStateMethod::allPositive(), CVectorCore< CType >::array(), C_FLOAT64, calculateDerivativesX(), CSteadyStateMethod::calculateJacobian(), dampingLimitExceeded, mAcceptNegative, mDimension, mdxdt, mH, mKeepProtocol, CSteadyStateMethod::mMethodLog, CSteadyStateMethod::mpJacobian, mpX, mXold, negativeValueFound, CMatrix< CType >::numCols(), singularJacobian, CVectorCore< CType >::size(), CLeastSquareSolution::solve(), stepSuccesful, targetFunction(), and targetValueToString().

Referenced by processNewton().

◆ elevateChildren()

bool CNewtonMethod::elevateChildren ( )
virtual

This methods must be called to elevate subgroups to derived objects. The default implementation does nothing.

Returns
bool success

Reimplemented from CCopasiParameterGroup.

References initializeParameter(), and CSteadyStateMethod::initializeParameter().

◆ initialize()

bool CNewtonMethod::initialize ( const CSteadyStateProblem pProblem)
virtual

Initialize the method must be called before process

Parameters
constCSteadyStateProblem * pProblem
Returns
bool success

Reimplemented from CSteadyStateMethod.

References CVectorCore< CType >::array(), C_FLOAT64, cleanup(), CTaskEnum::deterministic, DistanceAndRate, CMathContainer::getCompartment(), CMathObject::getCorrespondingProperty(), CMathContainer::getCountDependentSpecies(), CMathContainer::getCountFixedEventTargets(), CMathObject::getEntityType(), CMathContainer::getMathObject(), CCopasiTask::getMethod(), CDataObject::getObjectDataModel(), CCopasiTask::getProblem(), CMathContainer::getRate(), CMathContainer::getSimulationUpToDateObjects(), CMathContainer::getStateObjects(), CCopasiMethod::getSubType(), CDataModel::getTaskList(), CMathContainer::getTransientDependencies(), CMathDependencyGraph::getUpdateSequence(), CMathObject::getValuePointer(), CSteadyStateMethod::initialize(), CTrajectoryTask::initialize(), CVectorCore< CType >::initialize(), mAcceptNegative, CSteadyStateMethod::mCompartmentVolumes, CSteadyStateMethod::mContainerStateReduced, mDimension, mdxdt, mForceNewton, mH, mIterationLimit, mKeepProtocol, mMaxDurationBackward, mMaxDurationForward, CCopasiMethod::mpContainer, mpTrajectory, mpX, mTargetCriterion, mTargetDistance, mTargetRate, mUpdateConcentrations, mUseBackIntegration, mUseIntegration, mUseNewton, mXold, CCopasiTask::NO_OUTPUT, CVector< CType >::resize(), CCopasiTask::setMethodType(), CTrajectoryProblem::setStartInSteadyState(), CTrajectoryProblem::setStepNumber(), CVectorCore< CType >::size(), CMath::Species, TargetCriterion, CEnumAnnotation< Type, Enum >::toEnum(), and CCore::UseMoieties.

◆ initializeParameter()

◆ isSteadyState()

bool CNewtonMethod::isSteadyState ( const C_FLOAT64 value) const

◆ isValidProblem()

bool CNewtonMethod::isValidProblem ( const CCopasiProblem pProblem)
virtual

Check if the method is suitable for this problem

Returns
bool suitability of the method

Reimplemented from CSteadyStateMethod.

References CCopasiMessage::ERROR, CMathContainer::isAutonomous(), CSteadyStateMethod::isValidProblem(), MCSteadyState, CCopasiMethod::mpContainer, and CCopasiMessage::WARNING.

◆ load()

void CNewtonMethod::load ( CReadConfig configBuffer,
CReadConfig::Mode  mode = CReadConfig::SEARCH 
)
virtual

Load a list of parameters

Parameters
CReadConfig &configBuffer
CReadConfig::Modemode Default(CReadConfig::SEARCH)

Reimplemented from CCopasiMethod.

References C_FLOAT64, C_INT32, fatalError, CReadConfig::getVariable(), CReadConfig::getVersion(), CReadConfig::LOOP, CReadConfig::SEARCH, and CCopasiParameterGroup::setValue().

◆ processInternal()

CSteadyStateMethod::ReturnCode CNewtonMethod::processInternal ( )
virtual

This instructs the method to calculate a the steady state starting with the initialState given. The steady state is returned in the object pointed to by steadyState.

Parameters
CState& steadyState
constCState & initialState
Returns
CSteadyStateMethod::ReturnCode returnCode

Reimplemented from CSteadyStateMethod.

References doIntegration(), found, CSteadyStateMethod::mContainerState, mKeepProtocol, CSteadyStateMethod::mMethodLog, CCopasiMethod::mProcessReport, mStartState, mUseBackIntegration, mUseIntegration, mUseNewton, processNewton(), CSteadyStateMethod::returnProcess(), and CProcessReportLevel::setName().

◆ processNewton()

CNewtonMethod::NewtonResultCode CNewtonMethod::processNewton ( )
private

This instructs the method to calculate a the steady state starting with the initialState given. The steady state is returned in the object pointed to by steadyState.

Parameters
CState* steadyState
constCState * initialState
Returns
CNewtonMethod::NewtonReturnCode newtonReturnCode

References CProcessReportLevel::addItem(), C_FLOAT64, C_INT32, calculateDerivativesX(), dampingLimitExceeded, doNewtonStep(), CProcessReportLevel::finishItem(), found, isSteadyState(), iterationLimitExceeded, mForceNewton, mIterationLimit, mKeepProtocol, CSteadyStateMethod::mMethodLog, CCopasiMethod::mProcessReport, negativeValueFound, notFound, CProcessReportLevel::progressItem(), singularJacobian, stepSuccesful, targetFunction(), and targetValueToString().

Referenced by doIntegration(), and processInternal().

◆ targetFunction()

◆ targetFunctionDistance()

◆ targetFunctionRate()

◆ targetValueToString()

std::string CNewtonMethod::targetValueToString ( ) const
private

Member Data Documentation

◆ mAcceptNegative

bool CNewtonMethod::mAcceptNegative
private

◆ mDimension

size_t CNewtonMethod::mDimension
private

Referenced by doNewtonStep(), and initialize().

◆ mdxdt

CVectorCore< C_FLOAT64 > CNewtonMethod::mdxdt
private

◆ mForceNewton

bool CNewtonMethod::mForceNewton
private

Referenced by initialize(), and processNewton().

◆ mH

CVector< C_FLOAT64 > CNewtonMethod::mH
private

Referenced by doNewtonStep(), and initialize().

◆ mIterationLimit

unsigned C_INT32 CNewtonMethod::mIterationLimit
private

Referenced by initialize(), and processNewton().

◆ mKeepProtocol

bool CNewtonMethod::mKeepProtocol
private

◆ mMaxDurationBackward

C_FLOAT64 CNewtonMethod::mMaxDurationBackward
private

Referenced by doIntegration(), and initialize().

◆ mMaxDurationForward

C_FLOAT64 CNewtonMethod::mMaxDurationForward
private

Referenced by doIntegration(), and initialize().

◆ mpTrajectory

CTrajectoryTask* CNewtonMethod::mpTrajectory
private

Referenced by cleanup(), doIntegration(), and initialize().

◆ mpX

C_FLOAT64* CNewtonMethod::mpX
private

◆ mStartState

CVector< C_FLOAT64 > CNewtonMethod::mStartState
private

Referenced by doIntegration(), and processInternal().

◆ mTargetCriterion

◆ mTargetDistance

C_FLOAT64 CNewtonMethod::mTargetDistance
private

◆ mTargetRate

C_FLOAT64 CNewtonMethod::mTargetRate
private

◆ mUpdateConcentrations

CCore::CUpdateSequence CNewtonMethod::mUpdateConcentrations
private

Referenced by initialize(), and targetFunction().

◆ mUseBackIntegration

bool CNewtonMethod::mUseBackIntegration
private

Referenced by initialize(), and processInternal().

◆ mUseIntegration

bool CNewtonMethod::mUseIntegration
private

Referenced by initialize(), and processInternal().

◆ mUseNewton

bool CNewtonMethod::mUseNewton
private

◆ mXold

CVector< C_FLOAT64 > CNewtonMethod::mXold
private

Referenced by doNewtonStep(), and initialize().

◆ TargetCriterion

const CEnumAnnotation< std::string, CNewtonMethod::eTargetCriterion > CNewtonMethod::TargetCriterion
static

Referenced by initialize(), and initializeParameter().


The documentation for this class was generated from the following files: