Diana  0.8.3
Public Member Functions | Protected Attributes | Friends
DianaNLAESO Class Reference

#include <DianaNLAESO.hpp>

Inheritance diagram for DianaNLAESO:
IDianaNLAESO ICapeNumericNLAESO ICapeNumericESO ICapeIdentification ICapeUtilities

List of all members.

Public Member Functions

 DianaNLAESO (const CapeString &_name, const CapeString &_description, Numeric::Solvers::Eso::ICapeNumericDAESO *_pESO)
virtual ~DianaNLAESO ()
const Common::Types::CapeStringGetComponentName () const throw (Common::Error::ECapeUnknown)
void SetComponentName (const Common::Types::CapeString &_name) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument)
const Common::Types::CapeStringGetComponentDescription () const throw (Common::Error::ECapeUnknown)
void Initialize () throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeOutOfResources, Common::Error::ECapeLicenceError, Common::Error::ECapeBadInvOrder)
const
Common::Types::CapeArrayDouble
GetAllVariables () throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder)
void SetAllVariables (const Common::Types::CapeArrayDouble &varValues) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeBadInvOrder, Common::Error::ECapeOutOfBounds)
void SetSimulationContext (Common::Identification::ICapeIdentification *simContextManager) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeNoImpl)
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)
void Terminate () throw (Common::Error::ECapeUnknown, Common::Error::ECapeOutOfResources, Common::Error::ECapeBadInvOrder)
const
Common::Types::CapeArrayDouble
GetLowerBounds () throw (Common::Error::ECapeUnknown)
const
Common::Types::CapeArrayDouble
GetUpperBounds () throw (Common::Error::ECapeUnknown)
void SetComponentDescription (const Common::Types::CapeString &_description) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument)
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)
Common::Types::CapeArrayDouble GetVariables (const Common::Types::CapeArrayLong &varIndices) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeBadInvOrder, Common::Error::ECapeOutOfBounds)
Common::Collection::ICapeCollectionGetParameters () throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation)
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)
const
Common::Types::CapeArrayDouble
GetAllResiduals () throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder, Common::Error::ECapeFailedInitialisation)
const Diana::DianaSparseArrayGetAllJacobianValues () throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl)
Common::Types::CapeArrayDouble GetJacobianValues (const Common::Types::CapeArrayLong &indices) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeNoImpl, Common::Error::ECapeOutOfBounds)
const Diana::DianaSparseArrayGetJacobianStruct () throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl)
Common::Types::CapeLong GetNumEqns () throw (Common::Error::ECapeUnknown)
Common::Types::CapeLong GetNumVars () throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder)
void SetVariablesIndex (const Common::Types::CapeArrayLong &varIndexes) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeOutOfBounds, Common::Error::ECapeNoImpl)

Protected Attributes

Common::Types::CapeBoolean bInitialized
Common::Types::CapeString name
 NLAESO name.
Common::Types::CapeString description
 NLAESO description.
Diana::DianaCollection collParameters
 collections of the exported parameters
Common::Types::CapeArrayDouble arrStates
 state variables array= массив сохраненных значений Xd
Common::Types::CapeArrayLong arrDifferentialVarIndexes
 indexes of differential variables - массив индексов для дифф переменных
Diana::DianaSparseArray JacobianMatrix
Common::Types::CapeArrayDouble arrVariables
 structure of jacobian matrix
Common::Types::CapeArrayDouble arrDerivatives
Numeric::Solvers::Eso::ICapeNumericDAESOm_pESO

Friends

class DianaParameter

Detailed Description

Diana realization of the ICapeNumericNLAESO interface


Constructor & Destructor Documentation

DianaNLAESO ( const CapeString &  _name,
const CapeString &  _description,
Numeric::Solvers::Eso::ICapeNumericDAESO _pESO 
)

Constructor. Allocates memory for internal arrays.

virtual ~DianaNLAESO ( ) [virtual]

Destructor. Frees memory.


Member Function Documentation

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).

Implements ICapeNumericESO.

Gets the value of all the residuals.

Implements ICapeNumericESO.

Gets the value of all variables.

Implements ICapeNumericESO.

gets the description of the component.

Implements ICapeIdentification.

gets the name of the component.

Implements ICapeIdentification.

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 :

  • -1.0 indicates an entry which cannot be computed by the ESO.
  • 0.0 indicates an entry which will always be zero.
  • Any other value indicates a nonzero, computable entry.

Implements ICapeNumericESO.

Gets the values of selected entries of the Jacobian, at the current variable values of the ESO.

Parameters:
indicesthe indices of selected elements. The semantics are those of the matrix's GetValues method.

Implements ICapeNumericESO.

Returns array of lower bounds for the state vector.

Implements ICapeNumericESO.

Gets the number of equations in this ESO.

Implements ICapeNumericESO.

Gets the number of variables of this NLAESO.

Implements ICapeNumericESO.

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.

Gets the value of a subset of the residuals.

Parameters:
eqnIndicesthe indices of the equations we wish to get the residuals from.

Implements ICapeNumericESO.

Returns array of upper bounds for the state vector.

Implements ICapeNumericESO.

Gets the value of a subset of the variables.

Parameters:
varIndicesthe indices of the variables we wish to get.

Implements ICapeNumericESO.

The environment will order the component to get initialized through this method. Any initialisation that could fail must be placed here. Initialize is guaranteed to be the first method called by the client (except low level methods such as class constructors or initialization persistence methods). Initialize has to be called once when the component is instantiated in a particular flowsheet. When the initialization 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.

Sets the value of all variables of this ESO.

Parameters:
varValuesthe values of all the variables we wish to set

Implements ICapeNumericESO.

sets the description of the component.

Parameters:
_descriptionthe description of the component

Implements ICapeIdentification.

sets the name of the component.

Parameters:
_namethe name of the component

Implements ICapeIdentification.

Sets the value of some variables and marks these variables as fixed.

Parameters:
varIndicesthe indices of the variables we wish to set
varValuesthe values of the variables we wish to set

Implements ICapeNumericESO.

Allows the environment to convey the component a reference to the former's 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.

Parameters:
simContextManagerthe 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.

Sets the value of some variables.

Parameters:
varIndicesthe indices of the variables we wish to set
varValuesthe values of all the variables we wish to set

Implements ICapeNumericESO.

Currently not implemented.

Implements ICapeNumericESO.

The environment will order the component to get destroyed through this method. Any uninitialization 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.


Friends And Related Function Documentation

friend class DianaParameter [friend]

This friend declaration is used only for the parameters internal pointers.


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