Diana
0.8.3
|
#include <DianaNLAESO.hpp>
Public Member Functions | |
DianaNLAESO (const CapeString &_name, const CapeString &_description, Numeric::Solvers::Eso::ICapeNumericDAESO *_pESO) | |
virtual | ~DianaNLAESO () |
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 | 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::ICapeCollection * | GetParameters () 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::DianaSparseArray & | GetAllJacobianValues () 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::DianaSparseArray & | GetJacobianStruct () 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::ICapeNumericDAESO * | m_pESO |
Friends | |
class | DianaParameter |
Diana realization of the ICapeNumericNLAESO interface
DianaNLAESO | ( | const CapeString & | _name, |
const CapeString & | _description, | ||
Numeric::Solvers::Eso::ICapeNumericDAESO * | _pESO | ||
) |
Constructor. Allocates memory for internal arrays.
virtual ~DianaNLAESO | ( | ) | [virtual] |
Destructor. Frees memory.
const Diana::DianaSparseArray& GetAllJacobianValues | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl) [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).
Implements ICapeNumericESO.
const Common::Types::CapeArrayDouble& GetAllResiduals | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder, Common::Error::ECapeFailedInitialisation) [virtual] |
Gets the value of all the residuals.
Implements ICapeNumericESO.
const Common::Types::CapeArrayDouble& GetAllVariables | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder) [virtual] |
Gets the value of all variables.
Implements ICapeNumericESO.
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] |
gets the name of the component.
Implements ICapeIdentification.
const Diana::DianaSparseArray& GetJacobianStruct | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl) [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 :
Implements ICapeNumericESO.
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. |
Implements ICapeNumericESO.
const Common::Types::CapeArrayDouble& GetLowerBounds | ( | ) | throw (Common::Error::ECapeUnknown) [virtual] |
Returns array of lower bounds for the state vector.
Implements ICapeNumericESO.
Common::Types::CapeLong GetNumEqns | ( | ) | throw (Common::Error::ECapeUnknown) [virtual] |
Gets the number of equations in this ESO.
Implements ICapeNumericESO.
Common::Types::CapeLong GetNumVars | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder) [virtual] |
Gets the number of variables of this NLAESO.
Implements ICapeNumericESO.
Common::Collection::ICapeCollection* GetParameters | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation) [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.
Gets the value of a subset of the residuals.
eqnIndices | the indices of the equations we wish to get the residuals from. |
Implements ICapeNumericESO.
const Common::Types::CapeArrayDouble& GetUpperBounds | ( | ) | throw (Common::Error::ECapeUnknown) [virtual] |
Returns array of upper bounds for the state vector.
Implements ICapeNumericESO.
Common::Types::CapeArrayDouble GetVariables | ( | const Common::Types::CapeArrayLong & | varIndices | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeBadInvOrder, Common::Error::ECapeOutOfBounds) [virtual] |
Gets the value of a subset of the variables.
varIndices | the 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.
void SetAllVariables | ( | const Common::Types::CapeArrayDouble & | varValues | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeBadInvOrder, Common::Error::ECapeOutOfBounds) [virtual] |
Sets the value of all variables of this ESO.
varValues | the values of all the variables we wish to set |
Implements ICapeNumericESO.
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.
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.
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) [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 |
Implements ICapeNumericESO.
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 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.
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.
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) [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 |
Implements ICapeNumericESO.
void SetVariablesIndex | ( | const Common::Types::CapeArrayLong & | varIndexes | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeOutOfBounds, Common::Error::ECapeNoImpl) [virtual] |
Currently not implemented.
Implements ICapeNumericESO.
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 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.
friend class DianaParameter [friend] |
This friend declaration is used only for the parameters internal pointers.