Ceetron Data Provider Framework
Public Member Functions | List of all members
CDPMetaData Class Referenceabstract

Public Member Functions

virtual void setSimulationInfo (const CDPString &title, const CDPString &description, CDPSimulationType simulationType, CDPSolutionType solutionType)=0
 
virtual CDPGeometryInfoaddGeometryInfo ()=0
 
virtual CDPStateInfoaddStateInfo (cdp_int_t stateId, const CDPString &name, cdp_double_t referenceValue)=0
 
virtual bool addStateGroupingInfo (cdp_int_t groupId, const CDPString &name)=0
 
virtual bool addSetInfo (CDPSetType setType, cdp_int_t setId, const CDPString &name)=0
 
virtual CDPResultInfoaddResultInfo (CDPResultType resultType, cdp_int_t resultId, const CDPString &name, CDPResultMappingType mapping)=0
 
virtual void setHasRigidBodyTransformations (bool hasTransformations)=0
 
virtual void setHasElementVisibilityResults (bool hasVisibilityResults)=0
 

Detailed Description

The meta data functions as a table of contents for the given analysis. It is used to inform the host application about what the current simulation can provide of data. The meta data is usually used by the host to populate a UI. The data provider will only be asked for data that has been reported in the meta data returned in this class.

The meta data consists of information about:

Member Function Documentation

CDPGeometryInfo * CDPMetaData::addGeometryInfo ( )
pure virtual

Add information about a geometry

All simulations need at least one geometry. Use this method to add the CDPGeometryInfo to the meta data and use the returned object to fill in information about the geometry.

See also
CDPGeometryInfo
CDPResultInfo * CDPMetaData::addResultInfo ( CDPResultType  resultType,
cdp_int_t  resultId,
const CDPString name,
CDPResultMappingType  mapping 
)
pure virtual

Add information about a result in the analysis.

Use this method to add information about a result in the simulation.

Results are defined per item (node, element, element node, element surface) according to the result mapping. Each item must be assigned a result value. A result value consists of one or more components depending on the result type.

The following result mappings are supported:

  • CDP_PER_NODE. One result value per node
  • CDP_PER_ELEMENT. One result value per element
  • CDP_PER_ELEMENT_NODE. One result value per element node.
  • CDP_PER_ELEMENT_SURFACE- One result value per element surface.

The following result types are supported:

  • CDP_RESTYPE_SCALAR. Scalar result with one component per item.
  • CDP_RESTYPE_VECTOR. Vector result with three components per item.
  • CDP_RESTYPE_DISPLACEMENT. Displacement result with three components per item (node). Displacements can be relative (default) or absolute.
  • CDP_RESTYPE_STRESS_TENSOR. Stress tensor result with six components per item.
  • CDP_RESTYPE_STRAIN_TENSOR. Strain tensor result with six components per item.

For displacement results, we support both absolute and relative displacements (default). To specify to use absolute displacements, use the returned CDPResultInfo object and call CDPResultInfo::setDisplacementsContainAbsoluteNodePositions(true).

Results need to have unique ids

bool CDPMetaData::addSetInfo ( CDPSetType  setType,
cdp_int_t  setId,
const CDPString name 
)
pure virtual

Add information of a predefined set.

Use this method to specify each pre defined set in the simulation. All sets needs to have a unique id.

Note
Currently, only Element sets are supported.
bool CDPMetaData::addStateGroupingInfo ( cdp_int_t  groupId,
const CDPString name 
)
pure virtual

Add information about a state group.

State groups are an optional way to group states. This information could be used by the host app to build a UI where the states are organized into groups. This is purely for UI and state groups will not be used when the provider is asked for geometry or results.

CDPStateInfo * CDPMetaData::addStateInfo ( cdp_int_t  stateId,
const CDPString name,
cdp_double_t  referenceValue 
)
pure virtual

Add information about a state

All simulations need at least one state. A state is a collection of geometry and results for a given time step, frequency, etc.

All state ids must be unique. A name should be provided, and optionally a reference value.

A state could be part of a state group. If so, use the returned object to specify the parent state group with the CDPStateInfo::setParentStateGroupingId() method.

void CDPMetaData::setHasElementVisibilityResults ( bool  hasVisibilityResults)
pure virtual

Specify if this simulation has a per element visibility result.

If set to true, the host will query for visibility results for each state using the CDPDataProvider::getVisibilityResult(). This allows for efficient removal of elements in some states without having to provide a full new geometry for each state.

void CDPMetaData::setHasRigidBodyTransformations ( bool  hasTransformations)
pure virtual

Specify if this simulation has a rigid body transformation result.

If set to true, the host will query for transformation results for each state using the CDPDataProvider::getRigidBodyTransformations(). This allows for efficient movement of element groups (only one 4*4 matrix per group) without having to provide displacements for each node.

void CDPMetaData::setSimulationInfo ( const CDPString title,
const CDPString description,
CDPSimulationType  simulationType,
CDPSolutionType  solutionType 
)
pure virtual

Specify information about the simulation.

This information will be available as meta data in the client app. It is only used for information purposes.


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