Diana  0.8.3
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
SingAnalyser Class Reference

#include <SingAnalyser.hpp>

Inheritance diagram for SingAnalyser:
DianaContinuation IDianaContinuation DianaNumericSolver IDianaNumericSolver IDianaNumericSolver ICapeNumericSolver ICapeNumericSolver ICapeIdentification ICapeUtilities ICapeIdentification ICapeUtilities

List of all members.

Public Member Functions

 SingAnalyser (Numeric::Solvers::Model::ICapeNumericModel *_pModel)
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)
Common::Types::CapeString GetVariableName (Common::Types::CapeLong index) throw (Common::Error::ECapeUnknown)

Protected Member Functions

int getModelEquations ()
int getModelVariables ()
void packModelBoundaries (Common::Types::CapeArrayDouble &arrMinY, Common::Types::CapeArrayDouble &arrMaxY)
void packModelVector (Common::Types::CapeArrayDouble &modelVector)
void unpackModelVector (const Common::Types::CapeArrayDouble &modelVector)
void packModelResidual (Common::Types::CapeArrayDouble &modelResidual)
void packModelJacobian (Diana::DianaSparseArray &Jaco)
void addDerivativeByParameter (Diana::DianaSparseArray &Jaco, int nJacCol, int nParamIndex)
CapeBoolean calcTestCondition (CapeBoolean bFirstCall=false)
bool areEigenVectorsConsistent (IDianaLinearAlgebraSolver &dssaA)
CapeBoolean calcInitialEigenpairs ()
void calcArpackEigenpairs (CapeBoolean bTranspose, IDianaLinearAlgebraSolver &dssA, Common::Types::CapeDouble &dblEigenvalue, Common::Types::CapeArrayDouble &arrEigenvector)
void calcLapackEigenpairs (const Diana::DianaSparseArray &dsaA)
Common::Types::CapeLong getLambdaParameterIndex ()
void getConditionCheckParameters ()
double calcGx ()
void addGxJacobianRow (int nPosRow, Diana::DianaSparseArray &dsa)
double calcGxx ()
void addGxxJacobianRow (int nPosRow, Diana::DianaSparseArray &dsa)
void addGxxJacobianRowS (int nPosRow, Diana::DianaSparseArray &dsa)
void addGxxJacobianRowFD (int nPosRow, Diana::DianaSparseArray &dsa)
double calcGp (int nParamIndex)
double calcGp ()
void addGpJacobianRow (int nPosRow, Diana::DianaSparseArray &dsa)
double calcGxp ()
void addGxpJacobianRow (int nPosRow, Diana::DianaSparseArray &dsa)
void calcLm1EPhi (int nParamIndex, Common::Types::CapeArrayDouble &vecLm1EResult)

Protected Attributes

Common::Types::CapeLong nConditionCheck
Common::Types::CapeLong nConditionShow
Common::Types::CapeLong nConditionCurrent
Common::Types::CapeDouble dblTestGx
Common::Types::CapeDouble dblTestGxx
DianaParameterparTestGp
Common::Types::CapeArrayDouble vecTestGp
DianaArray arrTestGp
Common::Types::CapeDouble dblTestGxp
Common::Types::CapeLong nSingularityEquations
DianaParameterparLambdaParameter
DianaParameterparConditionCheckParameters
DianaParameterparConditionParameter
Common::Types::CapeLong nLambdaParameter
Common::Types::CapeArrayString arrConditionCheckParametersNames
Common::Types::CapeArrayLong arrConditionCheckParameters

Private Attributes

Common::Types::CapeDouble dblNAN
Common::Types::CapeLong nESOSize
Common::Types::CapeArrayDouble arrEigenvector
Common::Types::CapeArrayDouble arrAdjEigenvector
Common::Types::CapeDouble dblBeta
Common::Types::CapeDouble dblGamma
DianaSparseSolver dssEigJacobian
DianaLSQRSolver dssLm1E

Detailed Description

Continuation class definition

Author:
Michael Krasnyk

Constructor & Destructor Documentation

Constructor

Parameters:
_pModelPointer to the CAPE-ESO model in the implicit form $G(x,\dot{x},t)=0$. For the steady-state continuation are used assumptions $\dot{x}=0$ and $t=0$.

References DianaCollection::AddIndexed(), Common::Parameter::CAPE_INPUT, Common::Parameter::CAPE_OUTPUT, DianaContinuation::collSolverParameters, Common::Error::ECodeNone, ICapeNumericESO::GetNumEqns(), and DianaContinuation::pESO.


Member Function Documentation

void addDerivativeByParameter ( Diana::DianaSparseArray Jaco,
int  nJacCol,
int  nParamIndex 
) [protected, virtual]

Adds derivative by the parameter to the Jacobi matrix

Parameters:
nJacColcolumn where to place derivative vector.
paramparameter pointer.

Reimplemented from DianaContinuation.

References sparray::append(), CapeVariant::asDouble(), sparray::begin_cm(), DianaContinuation::dblFDEpsilon, Common::Error::ECodeNone, sparray::end_cm(), ICapeParameter::GetValue(), DianaCollection::ItemByIndex(), DianaContinuation::pESO, and ICapeParameter::SetValue().

CapeBoolean calcTestCondition ( CapeBoolean  bFirstCall = false) [protected, virtual]

Evaluates specified test conditions during continuation.

Returns:
true if the condition occurs.

Dummy function, returns false

Reimplemented from DianaContinuation.

References DianaContinuation::dblUround, and DianaParameter::SetValue().

Main continuation method.

Returns:
Continuation return code ContiReturn

Reimplemented from DianaContinuation.

References ECapeUser::code, ECapeUser::description, Common::Error::ECodeError, ECapeUser::interfaceName, ECapeUser::moreInfo, ECapeUser::operation, and ECapeUser::scope.

int getModelEquations ( ) [protected, virtual]

Returns size of the problem residual vector.

Implements DianaContinuation.

Referenced by SingAnalyser::packModelResidual().

int getModelVariables ( ) [protected, virtual]

Returns size of the problem variables subvector.

Implements DianaContinuation.

Referenced by SingAnalyser::packModelBoundaries(), SingAnalyser::packModelVector(), and SingAnalyser::unpackModelVector().

CapeString GetVariableName ( Common::Types::CapeLong  index) throw (Common::Error::ECapeUnknown) [virtual]
void packModelBoundaries ( Common::Types::CapeArrayDouble arrMinY,
Common::Types::CapeArrayDouble arrMaxY 
) [protected, virtual]

Update boundary arrays dblMinY, dblMaxY. Before call of this function this array should have size at least getModelVariables() entries.

Implements DianaContinuation.

References DianaContinuation::dblMaxY, DianaContinuation::dblMinY, Common::Error::ECodeNone, ICapeNumericESO::GetLowerBounds(), SingAnalyser::getModelVariables(), ICapeNumericESO::GetUpperBounds(), and DianaContinuation::pESO.

void packModelJacobian ( Diana::DianaSparseArray Jaco) [protected, virtual]
void packModelResidual ( Common::Types::CapeArrayDouble modelResidual) [protected, virtual]
void packModelVector ( Common::Types::CapeArrayDouble modelVector) [protected, virtual]

Method solves system of nonlinear equations $G(x,0,0)=0$ 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

Returns:
Solve return code SolveReturn

Reimplemented from DianaContinuation.

References ECapeUser::code, ECapeUser::description, Common::Error::ECodeError, ECapeUser::interfaceName, ECapeUser::moreInfo, ECapeUser::operation, and ECapeUser::scope.

void unpackModelVector ( const Common::Types::CapeArrayDouble modelVector) [protected, virtual]

Copy data from the the pVector to subclass data structures (pVector -> ESO).

Implements DianaContinuation.

References Common::Error::ECodeNone, SingAnalyser::getModelVariables(), DianaContinuation::nVars, DianaContinuation::pESO, and ICapeNumericESO::SetAllVariables().


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