Diana
0.8.3
|
#include <DianaContinuation.hpp>
Public Member Functions | |
DianaContinuation (Numeric::Solvers::Model::ICapeNumericModel *_pModel) | |
virtual | ~DianaContinuation () |
const Common::Types::CapeString & | GetComponentName () const throw (Common::Error::ECapeUnknown) |
void | SetComponentName (const Common::Types::CapeString &_name) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
const Common::Types::CapeString & | GetComponentDescription () const throw (Common::Error::ECapeUnknown) |
void | SetComponentDescription (const Common::Types::CapeString &_description) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
Common::Collection::ICapeCollection * | GetParameters () throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeNoImpl) |
void | SetSimulationContext (Common::Identification::ICapeIdentification *simContextManager) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeNoImpl) |
void | Initialize () throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeOutOfResources, Common::Error::ECapeLicenceError, Common::Error::ECapeBadInvOrder) |
void | Terminate () throw (Common::Error::ECapeUnknown, Common::Error::ECapeOutOfResources, Common::Error::ECapeBadInvOrder) |
Common::Types::CapeArrayDouble | GetSolution () throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder) |
void | Destroy () throw (Common::Error::ECapeUnknown) |
Numeric::Solvers::Solver::SolveReturn | Solve () throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder, Common::Error::ECapeSolvingError, Common::Error::ECapeOutOfResources) |
ContiReturn | Continuate () throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) |
void | AddFreeParameter (const Common::Types::CapeString &strParName, Common::Types::CapeDouble minValue=0.0, Common::Types::CapeDouble maxValue=0.0) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
void | RemoveFreeParameter (const Common::Types::CapeString &strParName) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
Common::Types::CapeString | GetVariableName (Common::Types::CapeLong index) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
Protected Member Functions | |
void | initSystemVariables () |
initialises internal system variables for the PETSc library, such as vecY, matJacobian etc. | |
void | destroySystemVariables () |
destroys internal system variables for the PETSc library | |
ContiReturn | makeContinuation (const Common::Types::CapeArrayDouble &vecYI, Common::Types::CapeDouble initialDirection) throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) |
Numeric::Solvers::Solver::SolveReturn | doNewtonSolve (Common::Types::CapeArrayDouble &Y, int nMaxIterations, const DianaINTSignalHandler &inthandler) throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) |
Numeric::Solvers::Solver::SolveReturn | doNewtonSolve_ (Common::Types::CapeArrayDouble &Y, int nMaxIterations, const DianaINTSignalHandler &inthandler) throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) |
void | restoreInitialValues () throw (Common::Error::ECapeUnknown) |
Restores initial values in the continuation object. | |
virtual int | getModelEquations ()=0 |
virtual int | getModelVariables ()=0 |
virtual CapeBoolean | calcTestCondition (CapeBoolean bFirstCall=false) |
CapeBoolean | checkIsolaCondition (const CapeArrayDouble &vecY0, const CapeArrayDouble &vecY1, const CapeArrayDouble &vecY2) |
void | formFunction (const Common::Types::CapeArrayDouble &Y, Common::Types::CapeArrayDouble &Res) |
virtual void | packModelVector (Common::Types::CapeArrayDouble &modelVector)=0 |
virtual void | packModelBoundaries (Common::Types::CapeArrayDouble &arrMinY, Common::Types::CapeArrayDouble &arrMaxY)=0 |
virtual void | unpackModelVector (const Common::Types::CapeArrayDouble &modelVector)=0 |
virtual void | packModelResidual (Common::Types::CapeArrayDouble &modelResidual)=0 |
virtual void | packModelJacobian (Diana::DianaSparseArray &Jaco) |
virtual void | addDerivativeByParameter (Diana::DianaSparseArray &Jaco, int nJacCol, int nParamIndex) |
int | checkVariableFiniteness (const Common::Types::CapeArrayDouble &Y) |
void | calcTangentVector (const Common::Types::CapeArrayDouble &Y, Common::Types::CapeArrayDouble &T, PredictorType type) |
CapeBoolean | checkVariableBoundaries (const Common::Types::CapeArrayDouble &Y) |
int | makeBoundaryCorrection (Common::Types::CapeArrayDouble &Y, const DianaINTSignalHandler &inthandler) |
Check variable boundaries and tries to make a correction on a boundary. If return value is 1, Y will contain corrected state vector. | |
Common::Types::CapeDouble | vecNorm2 (const Common::Types::CapeArrayDouble &dblY) |
Common::Types::CapeBoolean | isZeroValue (Common::Types::CapeDouble value) |
Common::Types::CapeDouble | calcCosAngle (const Common::Types::CapeArrayDouble &Y1, const Common::Types::CapeArrayDouble &Y0, const Common::Types::CapeArrayDouble &Ym1) |
void | printVector (const Common::Types::CapeString &name, const Common::Types::CapeArrayDouble &vec) |
void | calcArpackSMEigenpair (Diana::DianaSparseArray &dsaA, Common::Types::CapeArrayDouble &arrEigenvector) |
std::vector< std::complex < Common::Types::CapeDouble > > | GetEigenvalues () throw (Common::Error::ECapeUnknown) |
ContiReturn | init (const Common::Types::CapeArrayDouble &vecYI, Common::Types::CapeDouble initialDirection, const int nInitialCorrectionDir, const DianaINTSignalHandler &inthandler) |
ContiReturn | one_step (const DianaINTSignalHandler &inthandler) |
Protected Attributes | |
Common::Types::CapeString | strName |
Common::Types::CapeString | strDescription |
Numeric::Solvers::Model::ICapeNumericModel * | pModel |
CapeOpen model object. | |
Diana::IDianaDAESO * | pESO |
CapeOpen model active ESO object. | |
Diana::DianaCollection * | pESORealParameters |
Diana::DianaCollection | collSolverParameters |
collections of the exported solver parameters | |
CapeBoolean | bInitialized |
flag shows that Initialize() was called | |
CapeBoolean | bstart |
CapeBoolean | bintermediate |
Common::Types::CapeArrayLong | arrFreeParams |
array of all free parameters | |
Common::Types::CapeArrayDouble | arrFreeParamsMin |
array of free parameters minimum values | |
Common::Types::CapeArrayDouble | arrFreeParamsMax |
array of free parameters maximum values | |
Common::Types::CapeArrayDouble | dblMinY |
variables lower boundaries array | |
Common::Types::CapeArrayDouble | dblMaxY |
variables upper boundaries array | |
Common::Types::CapeLong | nVerboseLevel |
print level 0-no output, ... | |
Common::Types::CapeBoolean | bBidirectional |
initial direction -1.0 or 1.0 | |
Common::Types::CapeDouble | dblInitialDirection |
initial direction -1.0 or 1.0 | |
Common::Types::CapeDouble | dblStepSize |
current step size | |
Common::Types::CapeDouble | dblInitialStepSize |
initial step size | |
Common::Types::CapeDouble | dblFailedStepScale |
failed step size scaling | |
Common::Types::CapeDouble | dblSucceededStepScale |
succeeded step size scaling | |
Common::Types::CapeDouble | dblMinStepSize |
minimal continuation step size | |
Common::Types::CapeDouble | dblMaxStepSize |
maximal continuation step size | |
Common::Types::CapeLong | nMaxStepsAmount |
maximum amount of steps | |
Common::Types::CapeLong | nStepNumber |
current step number | |
Common::Types::CapeLong | nMaxNewtonIts |
maximal amount of Newton iterations | |
Common::Types::CapeDouble | dblTol |
required relative precision in the argument space | |
Common::Types::CapeDouble | dblTolF |
required relative precision in the function space | |
Common::Types::CapeLong | nSuccessIts |
amount of Newton iterations of successful step | |
Common::Types::CapeLong | nBoundaryVariableIdx |
Common::Types::CapeDouble | dblFDEpsilon |
epsilon value for the finite difference approximation | |
Common::Types::CapeDouble | dblUround |
machine upper round value | |
Common::Types::CapeDouble | dblIsolaTrustInterval |
isola trust interval | |
Common::Types::CapeBoolean | bOrthogonalBranch |
Common::Types::CapeBoolean | bCheckVariablesBoundaries |
include model variables to boundary checks | |
Private Member Functions | |
void | packVector (Common::Types::CapeArrayDouble &work_vector) |
void | unpackVector (const Common::Types::CapeArrayDouble &work_vector) |
void | packFreeParameters (int nFreeParamsPos, Common::Types::CapeArrayDouble &modelVector) |
void | unpackFreeParameters (int nFreeParamsPos, const Common::Types::CapeArrayDouble &modelVector) |
void | getParameterBoundaries (Common::Parameter::ICapeParameter *param, Common::Types::CapeDouble &dblMin, Common::Types::CapeDouble &dblMax) |
void | setNoneParameterisation () |
prepare system to solve without parameterisation | |
void | setLocalParameterisation (CapeLong idx, CapeDouble val, CapeDouble sign) |
prepare system to solve with local parameterisation | |
Common::Types::CapeDouble | calcLocalParameterisation (const Common::Types::CapeArrayDouble &dblY) |
calculate residual entries for the local parameterisation of the system | |
void | addLocalParameterisationJacRow (Diana::DianaSparseArray &Jaco, int nRow) |
add Jacobian entries for the local parameterisation of the system | |
void | setPseudoParameterisation () |
prepare system to solve with pseudo-arclength parameterisation | |
Common::Types::CapeDouble | calcPseudoParameterisation (const Common::Types::CapeArrayDouble &dblY) |
calculate residual entries for the pseudo-arclength parameterisation of the system | |
void | addPseudoParameterisationJacRow (Diana::DianaSparseArray &Jaco, int nRow) |
calculate residual entries for the pseudo-arclength parameterisation of the system | |
void | formJacobianMatrix (const Common::Types::CapeArrayDouble &Y) |
Private Attributes | |
Common::Types::CapeArrayDouble | dblScaleY |
variables scaling array | |
int | nVars |
number of variables in the whole system | |
int | nModelVars |
number of variables in the subclass system | |
int | nModelEqns |
number of equations in the subclass system | |
Common::Types::CapeArrayDouble | vecY |
total state variables vector Y | |
Common::Types::CapeArrayDouble | vecYBC |
currently accepted state vector for the boundary correction | |
Common::Types::CapeArrayDouble | vecRes |
total residual vector | |
Common::Types::CapeArrayDouble | vecEye |
auxiliary eye vector of type [0..0 1] | |
Common::Types::CapeArrayDouble | vecY0 |
currently accepted state vector | |
Common::Types::CapeArrayDouble | vecT0 |
tangent at point Y0 | |
Common::Types::CapeArrayDouble | vecYm1 |
state vector on the prevoius step | |
Common::Types::CapeArrayDouble | vecYStart |
state vector at the first point | |
Diana::DianaSparseArray | matJacobian |
total Jacobi matrix | |
Diana::DianaSparseSolver | spmNewton |
ResidualType | nResidualType |
Common::Types::CapeLong | nParameterisationType |
specified type of the parameterisation | |
Common::Types::CapeLong | nPredictorType |
specified type of the predictor | |
Common::Parameter::ICapeParameter * | prmParameterisationType |
Common::Parameter::ICapeParameter * | prmPredictorType |
Common::Parameter::ICapeParameter * | prmInitialCorrection |
CapeDouble | dblLocalXk |
value of the fixed variable | |
CapeLong | indLocalXk |
index of the fixed variable in the vector Y |
Continuation class definition
Constructor
_pModel | Pointer to the CAPE-ESO model in the implicit form ![]() |
References DianaCollection::AddIndexed(), CapeVariant::asDouble(), DianaContinuation::bBidirectional, DianaContinuation::bCheckVariablesBoundaries, Common::Parameter::CAPE_INPUT, Common::Parameter::CAPE_INPUT_OUTPUT, Common::Parameter::CAPE_OUTPUT, DianaContinuation::collSolverParameters, DianaContinuation::dblFailedStepScale, DianaContinuation::dblFDEpsilon, DianaContinuation::dblInitialDirection, DianaContinuation::dblInitialStepSize, DianaContinuation::dblIsolaTrustInterval, DianaContinuation::dblMaxStepSize, DianaContinuation::dblMinStepSize, DianaContinuation::dblStepSize, DianaContinuation::dblSucceededStepScale, DianaContinuation::dblTol, DianaContinuation::dblTolF, DianaContinuation::dblUround, Common::Error::ECodeError, Common::Error::ECodeNone, ICapeNumericModel::GetActiveESO(), Diana::GetDianaMain(), IDianaMain::GetParameters(), IDianaDAESO::GetRealParameters(), ICapeParameter::GetValue(), ICapeCollection::ItemByName(), DianaContinuation::nBoundaryVariableIdx, DianaContinuation::nMaxNewtonIts, DianaContinuation::nMaxStepsAmount, DianaContinuation::nStepNumber, DianaContinuation::nSuccessIts, DianaContinuation::nVerboseLevel, DianaContinuation::pESO, and DianaContinuation::pModel.
~DianaContinuation | ( | ) | [virtual] |
Destructor
References DianaContinuation::Terminate().
void addDerivativeByParameter | ( | Diana::DianaSparseArray & | Jaco, |
int | nJacCol, | ||
int | nParamIndex | ||
) | [protected, virtual] |
Adds derivative by the parameter to the Jacobi matrix
nJacCol | column where to place derivative vector. |
param | parameter pointer. |
Reimplemented in SingAnalyser.
References sparray::append(), CapeVariant::asDouble(), ICapeParameter::GetValue(), and ICapeParameter::SetValue().
void AddFreeParameter | ( | const Common::Types::CapeString & | strParName, |
Common::Types::CapeDouble | minValue = 0.0 , |
||
Common::Types::CapeDouble | maxValue = 0.0 |
||
) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) [virtual] |
Adds "free" parameter (the possible variants are continuation parameter, unfolding parameters, etc). Such parameters are sused as state variables in the continuation.
strParName | is the name of the continuation parameter. |
maxValue | parameter maximum value. |
minValue | parameter minimum value. |
Implements IDianaContinuation.
References Common::Error::ECodeNone.
void calcTangentVector | ( | const Common::Types::CapeArrayDouble & | Y, |
Common::Types::CapeArrayDouble & | T, | ||
PredictorType | type | ||
) | [protected] |
Function calcTangentVector calculates tangent T for the point Y
References ECapeUser::code, ECapeUser::description, Common::Error::ECodeNone, ECapeUser::interfaceName, ECapeUser::moreInfo, ECapeUser::operation, and ECapeUser::scope.
CapeBoolean calcTestCondition | ( | CapeBoolean | bFirstCall = false | ) | [protected, virtual] |
Evaluates specified test conditions during continuation.
Dummy function, returns false
Reimplemented in SingAnalyser, and SteadyStateContinuation.
CapeBoolean checkVariableBoundaries | ( | const Common::Types::CapeArrayDouble & | Y | ) | [protected] |
Check variable boundaries.
Y | current state vector |
int checkVariableFiniteness | ( | const Common::Types::CapeArrayDouble & | Y | ) | [protected] |
Function checkVariableFiniteness checks input vector Y for finite values
ContiReturn Continuate | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) [virtual] |
Main continuation method.
Implements IDianaContinuation.
Reimplemented in SingAnalyser, and HopfPointContinuation.
void Destroy | ( | ) | throw (Common::Error::ECapeUnknown) [virtual] |
Deletes the Solver Component and all the objects associated to this particular Solver Component.
Implements ICapeNumericSolver.
References DianaContinuation::Terminate().
Numeric::Solvers::Solver::SolveReturn doNewtonSolve | ( | Common::Types::CapeArrayDouble & | Y, |
int | nMaxIterations, | ||
const DianaINTSignalHandler & | inthandler | ||
) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) [protected] |
Solves nonlinear system with help of the Newton method, uses static members formFunction and formJacobian to generate residual vector and Jacobi matrix of the system.
Y | initial vector for the solution iterations. If the Newton iterations will be succeeded, then this vector will contain result of the iterations. |
bCheckIterations | if this flag is equal true, then nSuccessIts used to check success of the iterations. If total number more then nSuccessIts, will be returned error SolveTooManyIterations, even if the method successfully converged. |
void formFunction | ( | const Common::Types::CapeArrayDouble & | Y, |
Common::Types::CapeArrayDouble & | Res | ||
) | [protected] |
Function fills vector Res with a residual of the current system
Y | current state vector of the system. |
Res | residual vector. |
References Common::Error::ECodeNone.
const Common::Types::CapeString & GetComponentDescription | ( | ) | const throw (Common::Error::ECapeUnknown) [virtual] |
gets the description of the component.
Implements ICapeIdentification.
const Common::Types::CapeString & GetComponentName | ( | ) | const throw (Common::Error::ECapeUnknown) [virtual] |
returns the name of the component.
Implements ICapeIdentification.
std::vector< std::complex< Common::Types::CapeDouble > > GetEigenvalues | ( | ) | throw (Common::Error::ECapeUnknown) [protected, virtual] |
Returns eigenvalues of the generalized eigenvalues problem (PhD thesis, section 2.3) or Floquet multipliers (PhD thesis, section 3.2 )
Implements IDianaContinuation.
Reimplemented in SteadyStateContinuation.
References Common::Error::ECodeNone.
virtual int getModelEquations | ( | ) | [protected, pure virtual] |
Returns size of the problem residual vector.
Implemented in SingAnalyser, HopfPointContinuation, and SteadyStateContinuation.
Referenced by DianaContinuation::initSystemVariables().
virtual int getModelVariables | ( | ) | [protected, pure virtual] |
Returns size of the problem variables subvector.
Implemented in SingAnalyser, HopfPointContinuation, and SteadyStateContinuation.
Referenced by DianaContinuation::initSystemVariables().
void getParameterBoundaries | ( | Common::Parameter::ICapeParameter * | param, |
Common::Types::CapeDouble & | dblMin, | ||
Common::Types::CapeDouble & | dblMax | ||
) | [private] |
Returns parameter boundaries from the specification
References ICapeRealParameterSpec::DefaultValue(), Common::Error::ECodeNone, ICapeIdentification::GetComponentName(), ICapeRealParameterSpec::LowerBound(), ICapeParameter::Specification(), and ICapeRealParameterSpec::UpperBound().
ICapeCollection * GetParameters | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeNoImpl) [virtual] |
Returns an ICapeCollection interface. This interface will contain a collection of ICapeParameter interfaces. This method allows any client to access all the Cape Open Parameters exposed by a model component. If the model component does not support exposing its parameters, it should raise the ECapeNoImpl error, instead of returning a NULL reference or an empty Collection. But if the PMC supports parameters but has for this call no parameters, it should return a valid ICapeCollection reference exposing zero parameters.
Implements ICapeUtilities.
Common::Types::CapeArrayDouble GetSolution | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder) [virtual] |
Returns the current solution point. Size of the vector depends on the solver parameters such as ParameterisationType etc.
Implements ICapeNumericSolver.
References Common::Error::ECodeNone.
CapeString GetVariableName | ( | Common::Types::CapeLong | index | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) [virtual] |
Returns name of the variable by index.
Implements IDianaContinuation.
Reimplemented in SingAnalyser, HopfPointContinuation, and SteadyStateContinuation.
References Common::Error::ECodeNone.
Referenced by SteadyStateContinuation::GetVariableName(), HopfPointContinuation::GetVariableName(), and SingAnalyser::GetVariableName().
The environment will order the component to get initialised through this method. Any initialisation that could fail must be placed here. Initialise is guaranteed to be the first method called by the client (except low level methods such as class constructors or initialisation persistence methods). Initialise has to be called once when the component is instantiated in a particular flowsheet. When the initialisation fails, before signalling an error, the component must free all the resources that were allocated before the failure occurred. When the environment receives this error, it may not use the component anymore. The method terminate of the current interface must not either be called. Hence, the environment may only release the component through the middleware native mechanisms.
Implements ICapeUtilities.
References DianaContinuation::bInitialized, DianaContinuation::initSystemVariables(), DianaContinuation::packVector(), and DianaContinuation::vecY.
int makeBoundaryCorrection | ( | Common::Types::CapeArrayDouble & | Y, |
const DianaINTSignalHandler & | inthandler | ||
) | [protected] |
Check variable boundaries and tries to make a correction on a boundary. If return value is 1, Y will contain corrected state vector.
Y | current state vector |
void packFreeParameters | ( | int | nFreeParamsPos, |
Common::Types::CapeArrayDouble & | modelVector | ||
) | [private] |
Copy continuation parameters from the ESO to the pVector.
References DianaContinuation::arrFreeParams, CapeVariant::asDouble(), Common::Error::ECodeNone, ICapeParameter::GetValue(), and DianaCollection::ItemByIndex().
Referenced by DianaContinuation::packVector().
virtual void packModelBoundaries | ( | Common::Types::CapeArrayDouble & | arrMinY, |
Common::Types::CapeArrayDouble & | arrMaxY | ||
) | [protected, pure virtual] |
Update boundary arrays dblMinY, dblMaxY. Before call of this function this array this array should have size at least getModelVariables() entries.
Implemented in SingAnalyser, HopfPointContinuation, and SteadyStateContinuation.
Referenced by DianaContinuation::initSystemVariables().
void packModelJacobian | ( | Diana::DianaSparseArray & | Jaco | ) | [protected, virtual] |
Calculate Jacobian and set data to the matrix with help of addJacobianEntry function.
Reimplemented in SingAnalyser, HopfPointContinuation, and SteadyStateContinuation.
References sparray::append(), and sparray::clear().
virtual void packModelResidual | ( | Common::Types::CapeArrayDouble & | modelResidual | ) | [protected, pure virtual] |
Calculate residual and copy data to the pVector (ESO.Residual -> pVector).
Implemented in SingAnalyser, HopfPointContinuation, and SteadyStateContinuation.
virtual void packModelVector | ( | Common::Types::CapeArrayDouble & | modelVector | ) | [protected, pure virtual] |
Copy data from the subclass to the pVector (ESO -> pVector).
Implemented in SingAnalyser, HopfPointContinuation, and SteadyStateContinuation.
Referenced by DianaContinuation::packVector().
void packVector | ( | Common::Types::CapeArrayDouble & | work_vector | ) | [private] |
Copy data in the vector from the model.
References DianaContinuation::nModelVars, DianaContinuation::packFreeParameters(), and DianaContinuation::packModelVector().
Referenced by DianaContinuation::Initialize().
void RemoveFreeParameter | ( | const Common::Types::CapeString & | strParName | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) [virtual] |
Removes "free" parameter.
strParName | is the name of the parameter |
Implements IDianaContinuation.
References Common::Error::ECodeNone.
void SetComponentDescription | ( | const Common::Types::CapeString & | _description | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) [virtual] |
sets the description of the component.
_description | the description of the component |
Implements ICapeIdentification.
References Common::Error::ECodeNone.
void SetComponentName | ( | const Common::Types::CapeString & | _name | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) [virtual] |
sets the name of the component.
_name | the name of the component |
Implements ICapeIdentification.
References Common::Error::ECodeNone.
void SetSimulationContext | ( | Common::Identification::ICapeIdentification * | simContextManager | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeNoImpl) [virtual] |
Allows the environment to convey the component a reference to the formers simulation context. The simulation context will be environment objects which will expose a given set of Cape Open interfaces. Each of these interfaces will allow the component to call back the environment in order to benefit from its exposed services (such as creation of material templates, diagnostics or measurement unit conversion). If the component does not support accessing the simulation context, it is recommended to raise the ECapeNoImpl error.
simContextManager | the reference to the environment's simulation context class. For the component to use this class, this reference will have to be converted to each of the defined Cape Open Simulation Context interfaces. |
Implements ICapeUtilities.
References Common::Error::ECodeNone.
Numeric::Solvers::Solver::SolveReturn Solve | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder, Common::Error::ECapeSolvingError, Common::Error::ECapeOutOfResources) [virtual] |
Method solves system of nonlinear equations contained in CAPE-ESO model. Initial values from the pESO state vector. If it succeeds, vecY and pESO will contain found point, otherwise it will be initial point
Implements ICapeNumericSolver.
Reimplemented in SingAnalyser, and HopfPointContinuation.
References Common::Error::ECodeError, and Common::Error::ECodeNone.
void Terminate | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeOutOfResources, Common::Error::ECapeBadInvOrder) [virtual] |
The environment will order the component to get destroyed through this method. Any uninitialisation that could fail must be placed here. Terminate is guaranteed to be the last method called by the client (except low level methods such as class destructors). Terminate may be called at any time, but may be only called once. When this method returns an error, the environment should report the user. However, after that the environment is not allowed to use the component anymore.
Implements ICapeUtilities.
References DianaContinuation::destroySystemVariables().
Referenced by DianaContinuation::Destroy(), and DianaContinuation::~DianaContinuation().
void unpackFreeParameters | ( | int | nFreeParamsPos, |
const Common::Types::CapeArrayDouble & | modelVector | ||
) | [private] |
Copy continuation parameters from the the pVector to ESO data structures.
References DianaContinuation::arrFreeParams, Common::Error::ECodeNone, DianaCollection::ItemByIndex(), and ICapeParameter::SetValue().
Referenced by DianaContinuation::unpackVector().
virtual void unpackModelVector | ( | const Common::Types::CapeArrayDouble & | modelVector | ) | [protected, pure virtual] |
Copy data from the the pVector to subclass data structures (pVector -> ESO).
Implemented in SingAnalyser, HopfPointContinuation, and SteadyStateContinuation.
Referenced by DianaContinuation::unpackVector().
void unpackVector | ( | const Common::Types::CapeArrayDouble & | work_vector | ) | [private] |
Copy data from the vector in the model.
References DianaContinuation::nModelVars, DianaContinuation::unpackFreeParameters(), and DianaContinuation::unpackModelVector().
Common::Types::CapeLong nBoundaryVariableIdx [protected] |
if exit code Continuate is OkAchievedBoundary, InitialPointNaN or InitialPointNotInRange variable nBoundaryVariableIdx contains index of the variable.
Referenced by DianaContinuation::DianaContinuation().
ResidualType nResidualType [private] |
type of the residual, for internal use in formFunction and formJacobian