Back to index

salome-med  6.5.0
Public Types | Public Member Functions | Public Attributes
MED::TTMeshValue< TValueType > Struct Template Reference

The class is a helper one. It provide safe and flexible way to get access to values for a MED TimeStamp. More...

#include <MED_Structures.hxx>

List of all members.

Public Types

typedef TValueType TValue
typedef TValueType::value_type TElement
typedef TSlice< TElementTValueSlice
typedef TCSlice< TElementTCValueSlice
typedef TVector< TCValueSliceTCValueSliceArr
typedef TVector< TValueSliceTValueSliceArr

Public Member Functions

void Allocate (TInt theNbElem, TInt theNbGauss, TInt theNbComp, EModeSwitch theMode=eFULL_INTERLACE)
 Initialize the class.
virtual unsigned char * GetValuePtr ()
 Returns bare pointer on the internal value representation.
virtual TElementGetPointer ()
 Returns bare pointer on the internal value representation.
virtual const TElementGetPointer () const
 Returns bare pointer on the internal value representation.
TCValueSliceArr GetGaussValueSliceArr (TInt theElemId) const
 Iteration through Gauss Points by their components.
TValueSliceArr GetGaussValueSliceArr (TInt theElemId)
 Iteration through Gauss Points by their components.
TCValueSliceArr GetCompValueSliceArr (TInt theElemId) const
 Iteration through components by corresponding Gauss Points.
TValueSliceArr GetCompValueSliceArr (TInt theElemId)
 Iteration through components by corresponding Gauss Points.

Public Attributes

TValue myValue

Detailed Description

template<class TValueType>
struct MED::TTMeshValue< TValueType >

The class is a helper one. It provide safe and flexible way to get access to values for a MED TimeStamp.

Definition at line 605 of file MED_Structures.hxx.


Member Typedef Documentation

template<class TValueType >
typedef TCSlice<TElement> MED::TTMeshValue< TValueType >::TCValueSlice

Definition at line 612 of file MED_Structures.hxx.

template<class TValueType >
typedef TVector<TCValueSlice> MED::TTMeshValue< TValueType >::TCValueSliceArr

Definition at line 614 of file MED_Structures.hxx.

template<class TValueType >
typedef TValueType::value_type MED::TTMeshValue< TValueType >::TElement

Definition at line 609 of file MED_Structures.hxx.

template<class TValueType >
typedef TValueType MED::TTMeshValue< TValueType >::TValue

Definition at line 608 of file MED_Structures.hxx.

template<class TValueType >
typedef TSlice<TElement> MED::TTMeshValue< TValueType >::TValueSlice

Definition at line 611 of file MED_Structures.hxx.

template<class TValueType >
typedef TVector<TValueSlice> MED::TTMeshValue< TValueType >::TValueSliceArr

Definition at line 615 of file MED_Structures.hxx.


Member Function Documentation

template<class TValueType >
void MED::TTMeshValue< TValueType >::Allocate ( TInt  theNbElem,
TInt  theNbGauss,
TInt  theNbComp,
EModeSwitch  theMode = eFULL_INTERLACE 
) [inline]

Initialize the class.

Definition at line 621 of file MED_Structures.hxx.

    {
      TMeshValueBase::Allocate(theNbElem, theNbGauss, theNbComp, theMode);
      myValue.resize(theNbElem * this->GetStep());
    }
template<class TValueType >
TCValueSliceArr MED::TTMeshValue< TValueType >::GetCompValueSliceArr ( TInt  theElemId) const [inline]

Iteration through components by corresponding Gauss Points.

Definition at line 700 of file MED_Structures.hxx.

    {
      TCValueSliceArr aValueSliceArr(myNbComp);
      if(GetModeSwitch() == eFULL_INTERLACE){
        TInt anId = theElemId*myStep;
        for(TInt aCompId = 0; aCompId < myNbComp; aCompId++){
          aValueSliceArr[aCompId] =
            TCValueSlice(myValue, std::slice(anId, myNbGauss, myNbComp));
          anId += 1;
        }
      }
      else{
        for(TInt aCompId = 0; aCompId < myNbComp; aCompId++){
          aValueSliceArr[aCompId] =
            TCValueSlice(myValue, std::slice(theElemId, myNbGauss, myStep));
        }
      }
      return aValueSliceArr;
    }
template<class TValueType >
TValueSliceArr MED::TTMeshValue< TValueType >::GetCompValueSliceArr ( TInt  theElemId) [inline]

Iteration through components by corresponding Gauss Points.

Definition at line 722 of file MED_Structures.hxx.

    {
      if(GetModeSwitch() == eFULL_INTERLACE){
        TValueSliceArr aValueSliceArr(myNbComp);
        TInt anId = theElemId*myStep;
        for(TInt aCompId = 0; aCompId < myNbComp; aCompId++){
          aValueSliceArr[aCompId] =
            TValueSlice(myValue, std::slice(anId, myNbGauss, myNbComp));
          anId += 1;
        }
        return aValueSliceArr;
      }
      else{
        TValueSliceArr aValueSliceArr(myNbGauss);
        for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){
          aValueSliceArr[aGaussId] =
            TValueSlice(myValue,std::slice(theElemId, myNbComp, myStep));
        }
        return aValueSliceArr;
      }
    }
template<class TValueType >
TCValueSliceArr MED::TTMeshValue< TValueType >::GetGaussValueSliceArr ( TInt  theElemId) const [inline]

Iteration through Gauss Points by their components.

Definition at line 656 of file MED_Structures.hxx.

    {
      TCValueSliceArr aValueSliceArr(myNbGauss);
      if(GetModeSwitch() == eFULL_INTERLACE){
        TInt anId = theElemId * myStep;
        for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){
          aValueSliceArr[aGaussId] =
            TCValueSlice(myValue, std::slice(anId, myNbComp, 1));
          anId += myNbComp;
        }
      }
      else{
        for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){
          aValueSliceArr[aGaussId] =
            TCValueSlice(myValue, std::slice(theElemId, myNbComp, myStep));
        }
      }
      return aValueSliceArr;
    }
template<class TValueType >
TValueSliceArr MED::TTMeshValue< TValueType >::GetGaussValueSliceArr ( TInt  theElemId) [inline]

Iteration through Gauss Points by their components.

Definition at line 678 of file MED_Structures.hxx.

    {
      TValueSliceArr aValueSliceArr(myNbGauss);
      if(GetModeSwitch() == eFULL_INTERLACE){
        TInt anId = theElemId*myStep;
        for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){
          aValueSliceArr[aGaussId] =
            TValueSlice(myValue, std::slice(anId, myNbComp, 1));
          anId += myNbComp;
        }
      }
      else{
        for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){
          aValueSliceArr[aGaussId] =
            TValueSlice(myValue, std::slice(theElemId, myNbComp, myStep));
        }
      }
      return aValueSliceArr;
    }
template<class TValueType >
virtual TElement* MED::TTMeshValue< TValueType >::GetPointer ( ) [inline, virtual]

Returns bare pointer on the internal value representation.

Definition at line 641 of file MED_Structures.hxx.

    {
      return &myValue[0];
    }
template<class TValueType >
virtual const TElement* MED::TTMeshValue< TValueType >::GetPointer ( ) const [inline, virtual]

Returns bare pointer on the internal value representation.

Definition at line 649 of file MED_Structures.hxx.

    {
      return &myValue[0];
    }
template<class TValueType >
virtual unsigned char* MED::TTMeshValue< TValueType >::GetValuePtr ( ) [inline, virtual]

Returns bare pointer on the internal value representation.

Definition at line 633 of file MED_Structures.hxx.

    {
      return (unsigned char*)&myValue[0];
    }

Member Data Documentation

template<class TValueType >
TValue MED::TTMeshValue< TValueType >::myValue

Definition at line 617 of file MED_Structures.hxx.


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