Diana
0.8.3
|
#include <CapeESO.hpp>
Public Member Functions | |
virtual | ~ICapeNumericESO () |
virtual Common::Types::CapeLong | GetNumVars ()=0 throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder) |
virtual Common::Types::CapeLong | GetNumEqns ()=0 throw (Common::Error::ECapeUnknown) |
virtual void | SetFixedVariables (const Common::Types::CapeArrayLong &varIndices, const Common::Types::CapeArrayDouble &varValues)=0 throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeBadInvOrder, Common::Error::ECapeOutOfBounds, Common::Error::ECapeNoImpl) |
virtual void | SetAllVariables (const Common::Types::CapeArrayDouble &varValues)=0 throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeBadInvOrder, Common::Error::ECapeOutOfBounds) |
virtual void | SetVariables (const Common::Types::CapeArrayLong &varIndices, const Common::Types::CapeArrayDouble &varValues)=0 throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeBadInvOrder, Common::Error::ECapeOutOfBounds) |
virtual const Common::Types::CapeArrayDouble & | GetAllVariables ()=0 throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder) |
virtual Common::Types::CapeArrayDouble | GetVariables (const Common::Types::CapeArrayLong &varIndices)=0 throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeBadInvOrder, Common::Error::ECapeOutOfBounds) |
virtual const Common::Types::CapeArrayDouble & | GetAllResiduals ()=0 throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder, Common::Error::ECapeFailedInitialisation) |
virtual Common::Types::CapeArrayDouble | GetResiduals (const Common::Types::CapeArrayLong &eqnIndices)=0 throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeOutOfBounds, Common::Error::ECapeBadInvOrder, Common::Error::ECapeFailedInitialisation) |
virtual const Diana::DianaSparseArray & | GetJacobianStruct ()=0 throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl) |
virtual const Diana::DianaSparseArray & | GetAllJacobianValues ()=0 throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl) |
virtual Common::Types::CapeArrayDouble | GetJacobianValues (const Common::Types::CapeArrayLong &indices)=0 throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeNoImpl, Common::Error::ECapeOutOfBounds) |
virtual void | SetVariablesIndex (const Common::Types::CapeArrayLong &varIndexes)=0 throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeOutOfBounds, Common::Error::ECapeNoImpl) |
virtual const Common::Types::CapeArrayDouble & | GetLowerBounds ()=0 throw (Common::Error::ECapeUnknown) |
virtual const Common::Types::CapeArrayDouble & | GetUpperBounds ()=0 throw (Common::Error::ECapeUnknown) |
Friends | |
std::ostream & | operator<< (std::ostream &out_file, const ICapeNumericESO &eso) |
This is the interface of the Equation Set Object which in the most general case represents a set of equations of the form:
In general, a set described by an ESO can be rectangular, i.e. the number of variables does not have to be the same as the number of equations.
The variables in an ESO are characterised by their current values (that can be changed via the provided interface), and also lower and upper bounds. Usually, these bounds relate to the domain of definition of the equations or physical reality. For this reason, any attempt to set one or more variables to values outside these bounds is considered to be illegal and will, therefore, be rejected. The equations in an ESO are assumed to be sparse, i.e. any given equation will involve only a subset of the variables in the ESO. Consequently, only a (usually small) subset of the partial derivatives are going to be nonzero for ant set of values of the variables
. The sparsity pattern of the ESO refers to the number of such nonzero elements, and the row
(i.e. equation
) and column
(i.e. variable
) to which each such nonzero corresponds. The way in which information on this structure is defined is entirely analogous to that for linear systems. The interface defined in this section provided mechanisms for obtaining information on the current values and bounds of the variables
, as well as the sparsity pattern of the ESO. It also allows the modification of the variable values, and the computation of the values («residuals») of the equations
for the current values of
and of the nonzero elements of the matrix
.
virtual ~ICapeNumericESO | ( | ) | [inline, virtual] |
Virtual default destructor.
virtual const Diana::DianaSparseArray& GetAllJacobianValues | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl) [pure virtual] |
Returns a matrix object whose GetValues method will provide the Jacobian values at the ESO's current variable values each time it is called (the values of entries indicated as uncomputable in the matrix returned by GetJacobianStruct will be meaningless, but the call to GetValues will not cause an error simply because such entries exist).
Implemented in DiffitModel, DianaDAESO, DianaSensDAESO, IDianaSensDAESO, and DianaNLAESO.
Referenced by SteadyStateContinuation::packModelJacobian(), HopfPointContinuation::packModelJacobian(), SingAnalyser::packModelJacobian(), HopfPointContinuation::packModelResidual(), and SingAnalyser::packModelResidual().
virtual const Common::Types::CapeArrayDouble& GetAllResiduals | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder, Common::Error::ECapeFailedInitialisation) [pure virtual] |
Gets the value of all the residuals.
Implemented in DianaDAESO, DianaSensDAESO, IDianaSensDAESO, and DianaNLAESO.
Referenced by SteadyStateContinuation::packModelResidual(), HopfPointContinuation::packModelResidual(), and SingAnalyser::packModelResidual().
virtual const Common::Types::CapeArrayDouble& GetAllVariables | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder) [pure virtual] |
Gets the value of all variables.
Implemented in DianaSensDAESO, DianaDAESO, IDianaSensDAESO, and DianaNLAESO.
Referenced by SteadyStateContinuation::packModelVector(), HopfPointContinuation::packModelVector(), and SingAnalyser::packModelVector().
virtual const Diana::DianaSparseArray& GetJacobianStruct | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl) [pure virtual] |
Returns a matrix object which contains information on the structure of the Jacobian matrix. The GetValues method of this object will provide values encoded as follows :
Implemented in DianaDAESO, DianaSensDAESO, IDianaSensDAESO, and DianaNLAESO.
virtual Common::Types::CapeArrayDouble GetJacobianValues | ( | const Common::Types::CapeArrayLong & | indices | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeNoImpl, Common::Error::ECapeOutOfBounds) [pure virtual] |
Gets the values of selected entries of the Jacobian, at the current variable values of the ESO.
indices | the indices of selected elements. The semantics are those of the matrix's GetValues method. |
Implemented in DianaDAESO, and DianaNLAESO.
virtual const Common::Types::CapeArrayDouble& GetLowerBounds | ( | ) | throw (Common::Error::ECapeUnknown) [pure virtual] |
Returns array of lower bounds for the state vector.
Implemented in DianaDAESO, DianaSensDAESO, IDianaSensDAESO, and DianaNLAESO.
Referenced by SteadyStateContinuation::packModelBoundaries(), HopfPointContinuation::packModelBoundaries(), and SingAnalyser::packModelBoundaries().
virtual Common::Types::CapeLong GetNumEqns | ( | ) | throw (Common::Error::ECapeUnknown) [pure virtual] |
Gets the number of equations in this ESO.
Implemented in DianaNLAESO, and DianaDAESO.
Referenced by SteadyStateContinuation::getModelEquations(), HopfPointContinuation::HopfPointContinuation(), SingAnalyser::SingAnalyser(), and SteadyStateContinuation::SteadyStateContinuation().
virtual Common::Types::CapeLong GetNumVars | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder) [pure virtual] |
Gets the number of variables of this ESO.
Implemented in DianaNLAESO, and DianaDAESO.
Referenced by SteadyStateContinuation::calcTestCondition(), SteadyStateContinuation::getModelVariables(), HopfPointContinuation::HopfPointContinuation(), and SteadyStateContinuation::SteadyStateContinuation().
virtual Common::Types::CapeArrayDouble GetResiduals | ( | const Common::Types::CapeArrayLong & | eqnIndices | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeOutOfBounds, Common::Error::ECapeBadInvOrder, Common::Error::ECapeFailedInitialisation) [pure virtual] |
Gets the value of a subset of the residuals.
eqnIndices | the indices of the equations we wish to get the residuals from. |
Implemented in DianaDAESO, and DianaNLAESO.
virtual const Common::Types::CapeArrayDouble& GetUpperBounds | ( | ) | throw (Common::Error::ECapeUnknown) [pure virtual] |
Returns array of upper bounds for the state vector.
Implemented in DianaDAESO, DianaSensDAESO, IDianaSensDAESO, and DianaNLAESO.
Referenced by SteadyStateContinuation::packModelBoundaries(), HopfPointContinuation::packModelBoundaries(), and SingAnalyser::packModelBoundaries().
virtual Common::Types::CapeArrayDouble GetVariables | ( | const Common::Types::CapeArrayLong & | varIndices | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeBadInvOrder, Common::Error::ECapeOutOfBounds) [pure virtual] |
Gets the value of a subset of the variables.
varIndices | the indices of the variables we wish to get. |
Implemented in DianaSensDAESO, DianaDAESO, IDianaSensDAESO, and DianaNLAESO.
virtual void SetAllVariables | ( | const Common::Types::CapeArrayDouble & | varValues | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeBadInvOrder, Common::Error::ECapeOutOfBounds) [pure virtual] |
Sets the value of all variables of this ESO.
varValues | the values of all the variables we wish to set |
Implemented in DianaSensDAESO, DianaDAESO, IDianaSensDAESO, and DianaNLAESO.
Referenced by SteadyStateContinuation::unpackModelVector(), HopfPointContinuation::unpackModelVector(), and SingAnalyser::unpackModelVector().
virtual void SetFixedVariables | ( | const Common::Types::CapeArrayLong & | varIndices, |
const Common::Types::CapeArrayDouble & | varValues | ||
) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeBadInvOrder, Common::Error::ECapeOutOfBounds, Common::Error::ECapeNoImpl) [pure virtual] |
Sets the value of some variables and marks these variables as fixed.
varIndices | the indices of the variables we wish to set |
varValues | the values of the variables we wish to set |
Implemented in DianaSensDAESO, DianaDAESO, IDianaSensDAESO, and DianaNLAESO.
virtual void SetVariables | ( | const Common::Types::CapeArrayLong & | varIndices, |
const Common::Types::CapeArrayDouble & | varValues | ||
) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeBadInvOrder, Common::Error::ECapeOutOfBounds) [pure virtual] |
Sets the value of some variables.
varIndices | the indices of the variables we wish to set |
varValues | the values of all the variables we wish to set |
Implemented in DianaSensDAESO, DianaDAESO, IDianaSensDAESO, and DianaNLAESO.
virtual void SetVariablesIndex | ( | const Common::Types::CapeArrayLong & | varIndexes | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeOutOfBounds, Common::Error::ECapeNoImpl) [pure virtual] |
Currently not implemented.
Implemented in DianaDAESO, DianaSensDAESO, IDianaSensDAESO, and DianaNLAESO.
std::ostream& operator<< | ( | std::ostream & | out_file, |
const ICapeNumericESO & | eso | ||
) | [friend] |
ostream output operator for the ICapeNumericESO class.