Diana
0.8.3
|
#include <SingAnalyser.hpp>
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 |
DianaParameter * | parTestGp |
Common::Types::CapeArrayDouble | vecTestGp |
DianaArray | arrTestGp |
Common::Types::CapeDouble | dblTestGxp |
Common::Types::CapeLong | nSingularityEquations |
DianaParameter * | parLambdaParameter |
DianaParameter * | parConditionCheckParameters |
DianaParameter * | parConditionParameter |
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 |
Continuation class definition
SingAnalyser | ( | Numeric::Solvers::Model::ICapeNumericModel * | _pModel | ) |
Constructor
_pModel | Pointer to the CAPE-ESO model in the implicit form ![]() ![]() ![]() |
References DianaCollection::AddIndexed(), Common::Parameter::CAPE_INPUT, Common::Parameter::CAPE_OUTPUT, DianaContinuation::collSolverParameters, Common::Error::ECodeNone, ICapeNumericESO::GetNumEqns(), and DianaContinuation::pESO.
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 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.
Dummy function, returns false
Reimplemented from DianaContinuation.
References DianaContinuation::dblUround, and DianaParameter::SetValue().
ContiReturn Continuate | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) [virtual] |
Main continuation method.
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] |
Returns name of the variable by index.
Reimplemented from DianaContinuation.
References ECapeUser::code, ECapeUser::description, Common::Error::ECodeError, Common::Error::ECodeNone, ICapeIdentification::GetComponentName(), DianaContinuation::GetVariableName(), ECapeUser::interfaceName, ICapeCollection::ItemByIndex(), ECapeUser::moreInfo, ECapeUser::operation, and ECapeUser::scope.
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] |
Calculate Jacobian and set data to the matrix.
Reimplemented from DianaContinuation.
References sparray::append(), Common::Error::ECodeError, Common::Error::ECodeNone, ICapeNumericESO::GetAllJacobianValues(), DianaContinuation::nVerboseLevel, DianaContinuation::pESO, sparray::rank(), and sparray::size().
void packModelResidual | ( | Common::Types::CapeArrayDouble & | modelResidual | ) | [protected, virtual] |
Calculate residual and copy data to the pVector (ESO.Residual -> pVector).
Implements DianaContinuation.
References Common::Error::ECodeNone, ICapeNumericESO::GetAllJacobianValues(), ICapeNumericESO::GetAllResiduals(), SingAnalyser::getModelEquations(), DianaContinuation::nVerboseLevel, DianaContinuation::pESO, and sparray::size().
void packModelVector | ( | Common::Types::CapeArrayDouble & | modelVector | ) | [protected, virtual] |
Copy data from the subclass to the pVector (ESO -> pVector).
Implements DianaContinuation.
References Common::Error::ECodeNone, ICapeNumericESO::GetAllVariables(), SingAnalyser::getModelVariables(), DianaContinuation::nVars, and DianaContinuation::pESO.
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
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().