Back to index

salome-med  6.5.0
Public Types | Public Member Functions | Private Attributes | Friends
MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY > Class Template Reference

#include <MEDMEM_nArray.hxx>

Collaboration diagram for MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef ARRAY_ELEMENT_TYPE ElementType
typedef INTERLACING_POLICY InterlacingPolicy
typedef CHECKING_POLICY CheckingPolicy

Public Member Functions

 MEDMEM_Array ()
 ~MEDMEM_Array ()
 MEDMEM_Array (int dim, int nbelem)
 MEDMEM_Array (int dim, int nbelem, int nbtypegeo, const int *const nbelgeoc)
 MEDMEM_Array (ElementType *values, int dim, int nbelem, bool shallowCopy=false, bool ownershipOfValues=false)
 MEDMEM_Array (ElementType *values, int dim, int nbelem, int nbtypegeo, const int *const nbelgeoc, bool shallowCopy=false, bool ownershipOfValues=false)
 MEDMEM_Array (int dim, int nbelem, int nbtypegeo, const int *const nbelgeoc, const int *const nbgaussgeo)
 MEDMEM_Array (ElementType *values, int dim, int nbelem, int nbtypegeo, const int *const nbelgeoc, const int *const nbgaussgeo, bool shallowCopy=false, bool ownershipOfValues=false)
 MEDMEM_Array (const MEDMEM_Array &array, bool shallowCopy=false)
MEDMEM_Array< ElementType,
InterlacingPolicy,
CheckingPolicy > & 
operator= (const MEDMEM_Array &array)
MED_EN::medModeSwitch getInterlacingType () const
bool getGaussPresence () const
ElementTypegetPtr ()
const ElementTypegetPtr () const
void setPtr (ElementType *values, bool shallowCopy=false, bool ownershipOfValues=false)
const ElementTypegetRow (int i) const
void setRow (int i, const ElementType *const value)
const ElementTypegetColumn (int j) const
void setColumn (int j, const ElementType *const value)
const ElementTypegetIJ (int i, int j) const
const ElementTypegetIJK (int i, int j, int k) const
const ElementTypegetIJByType (int i, int j, int t) const
const ElementTypegetIJKByType (int i, int j, int k, int t) const
void setIJ (int i, int j, const ElementType &value)
void setIJByType (int i, int j, int t, const ElementType &value)
void setIJK (int i, int j, int k, const ElementType &value)
void setIJKByType (int i, int j, int k, int t, const ElementType &value)
bool operator== (const MEDMEM_Array &array) const

Private Attributes

PointerOf< ElementType_array

Friends

ostream & operator<< (ostream &os, const MEDMEM_Array &array)

Detailed Description

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
class MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >

Definition at line 47 of file MEDMEM_nArray.hxx.


Member Typedef Documentation

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
typedef CHECKING_POLICY MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::CheckingPolicy

Definition at line 53 of file MEDMEM_nArray.hxx.

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
typedef ARRAY_ELEMENT_TYPE MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::ElementType

Definition at line 51 of file MEDMEM_nArray.hxx.

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
typedef INTERLACING_POLICY MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::InterlacingPolicy

Definition at line 52 of file MEDMEM_nArray.hxx.


Constructor & Destructor Documentation

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::MEDMEM_Array ( ) [inline]

Definition at line 56 of file MEDMEM_nArray.hxx.

:_array( ( ElementType *) NULL)  {}; //Interdit le constructeur par défaut, peut pas à  cause du FIELD
template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::~MEDMEM_Array ( ) [inline]

Definition at line 58 of file MEDMEM_nArray.hxx.

                  {
    // PointerOf s'occupe de la desallocation.
  };
template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::MEDMEM_Array ( int  dim,
int  nbelem 
) [inline]

Definition at line 65 of file MEDMEM_nArray.hxx.

                                           : InterlacingPolicy(nbelem,dim)
  {
    CHECKING_POLICY::checkMoreThanZero("MEDMEM_Array",nbelem);
    CHECKING_POLICY::checkMoreThanZero("MEDMEM_Array",dim);
    _array.set(InterlacingPolicy::_arraySize);
  };

Here is the call graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::MEDMEM_Array ( int  dim,
int  nbelem,
int  nbtypegeo,
const int *const  nbelgeoc 
) [inline]

Definition at line 75 of file MEDMEM_nArray.hxx.

    : InterlacingPolicy(nbelem, dim, nbtypegeo, nbelgeoc)
  {
    CHECKING_POLICY::checkMoreThanZero("MEDMEM_Array",nbelem);
    CHECKING_POLICY::checkMoreThanZero("MEDMEM_Array",dim);
    _array.set(InterlacingPolicy::_arraySize);
  };

Here is the call graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::MEDMEM_Array ( ElementType values,
int  dim,
int  nbelem,
bool  shallowCopy = false,
bool  ownershipOfValues = false 
) [inline]

Definition at line 87 of file MEDMEM_nArray.hxx.

                                                     : InterlacingPolicy(nbelem,dim)
  {
    CHECKING_POLICY::checkMoreThanZero("MEDMEM_Array",nbelem);
    CHECKING_POLICY::checkMoreThanZero("MEDMEM_Array",dim);
    if(shallowCopy)

      if(ownershipOfValues)
        _array.setShallowAndOwnership((const ElementType *)values);
      else
        _array.set((const ElementType*)values);

    else // Cas par défaut
      _array.set(InterlacingPolicy::_arraySize,values);

  }

Here is the call graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::MEDMEM_Array ( ElementType values,
int  dim,
int  nbelem,
int  nbtypegeo,
const int *const  nbelgeoc,
bool  shallowCopy = false,
bool  ownershipOfValues = false 
) [inline]

Definition at line 108 of file MEDMEM_nArray.hxx.

    : InterlacingPolicy(nbelem, dim, nbtypegeo, nbelgeoc)
  {
    CHECKING_POLICY::checkMoreThanZero("MEDMEM_Array",nbelem);
    CHECKING_POLICY::checkMoreThanZero("MEDMEM_Array",dim);
    if(shallowCopy)

      if(ownershipOfValues)
        _array.setShallowAndOwnership((const ElementType *)values);
      else
        _array.set((const ElementType*)values);

    else // Cas par défaut
      _array.set(InterlacingPolicy::_arraySize,values);

  }

Here is the call graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::MEDMEM_Array ( int  dim,
int  nbelem,
int  nbtypegeo,
const int *const  nbelgeoc,
const int *const  nbgaussgeo 
) [inline]

Definition at line 131 of file MEDMEM_nArray.hxx.

    : InterlacingPolicy(nbelem, dim, nbtypegeo, nbelgeoc, nbgaussgeo)
  {
    CHECKING_POLICY::checkMoreThanZero("MEDMEM_Array",nbelem);
    CHECKING_POLICY::checkMoreThanZero("MEDMEM_Array",dim);
    CHECKING_POLICY::checkMoreThanZero("MEDMEM_Array",nbtypegeo);
    _array.set(InterlacingPolicy::_arraySize);
  };

Here is the call graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::MEDMEM_Array ( ElementType values,
int  dim,
int  nbelem,
int  nbtypegeo,
const int *const  nbelgeoc,
const int *const  nbgaussgeo,
bool  shallowCopy = false,
bool  ownershipOfValues = false 
) [inline]

Definition at line 145 of file MEDMEM_nArray.hxx.

    : InterlacingPolicy(nbelem, dim, nbtypegeo, nbelgeoc, nbgaussgeo)
  {
    CHECKING_POLICY::checkMoreThanZero("MEDMEM_Array",nbelem);
    CHECKING_POLICY::checkMoreThanZero("MEDMEM_Array",dim);
    CHECKING_POLICY::checkMoreThanZero("MEDMEM_Array",nbtypegeo);

    if(shallowCopy)

      if(ownershipOfValues)
        _array.setShallowAndOwnership((const ElementType *)values);
      else
        _array.set((const ElementType*)values);

    else
      _array.set(InterlacingPolicy::_arraySize,values);

  };

Here is the call graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::MEDMEM_Array ( const MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY > &  array,
bool  shallowCopy = false 
) [inline]

Definition at line 169 of file MEDMEM_nArray.hxx.

    :InterlacingPolicy(array,shallowCopy)
  {
    if (shallowCopy)
      this->_array.set(array._array); // Le propriétaire reste le ARRAY initial
    else
      this->_array.set(InterlacingPolicy::_arraySize,array._array);
  }

Here is the call graph for this function:


Member Function Documentation

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
const ElementType* MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::getColumn ( int  j) const [inline]

Definition at line 249 of file MEDMEM_nArray.hxx.

                                                    {
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_dim,j);
    CHECKING_POLICY::checkEquality("MEDMEM_Array (Interlace test)",
                                   MED_EN::MED_FULL_INTERLACE, InterlacingPolicy::_interlacing );
    return &(_array[ InterlacingPolicy::getIndex(1,j) ]);
  }

Here is the caller graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
bool MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::getGaussPresence ( ) const [inline]

Definition at line 197 of file MEDMEM_nArray.hxx.

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
const ElementType& MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::getIJ ( int  i,
int  j 
) const [inline]

Definition at line 272 of file MEDMEM_nArray.hxx.

                                                        {
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_nbelem,i);
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_dim,j);
    return _array[ InterlacingPolicy::getIndex(i,j) ];
  }

Here is the caller graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
const ElementType& MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::getIJByType ( int  i,
int  j,
int  t 
) const [inline]

Definition at line 286 of file MEDMEM_nArray.hxx.

                                                                     {
    if ( getInterlacingType() != MED_EN::MED_NO_INTERLACE_BY_TYPE )
      throw MEDEXCEPTION(LOCALIZED(STRING("Wrong interlacing type ") << getInterlacingType()));
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_nbelem,i);
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_dim,j);
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::getNbGeoType(),t);
    if ( InterlacingPolicy::getGaussPresence() )
      return _array[ ((NoInterlaceByTypeGaussPolicy*)this)->getIndexByType(i,j,t) ];
    else
      return _array[ ((NoInterlaceByTypeNoGaussPolicy*)this)->getIndexByType(i,j,t) ];
  }

Here is the call graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
const ElementType& MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::getIJK ( int  i,
int  j,
int  k 
) const [inline]

Definition at line 278 of file MEDMEM_nArray.hxx.

                                                                {
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_nbelem,i);
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_dim,j);
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::getNbGauss(i),k);

    return _array[ InterlacingPolicy::getIndex(i,j,k) ];
  };

Here is the caller graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
const ElementType& MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::getIJKByType ( int  i,
int  j,
int  k,
int  t 
) const [inline]

Definition at line 298 of file MEDMEM_nArray.hxx.

                                                                            {
    if ( getInterlacingType() != MED_EN::MED_NO_INTERLACE_BY_TYPE )
      throw MEDEXCEPTION(LOCALIZED(STRING("Wrong interlacing type ") << getInterlacingType()));
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_nbelem,i);
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::getNbGeoType(),t);
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_dim,j);

    if ( InterlacingPolicy::getGaussPresence() ) {
        // not compilable on Debian40
//       CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",
//                             1,((NoInterlaceByTypeGaussPolicy*)this)->getNbGaussByType(t),k);
      int kmax = ((NoInterlaceByTypeGaussPolicy*)this)->getNbGaussByType(t);
      if ( k < 1 || k > kmax )
        throw MEDEXCEPTION(LOCALIZED(STRING("MEDMEM_Array::getIJKByType(), ")
                                     << " k : " << k << " not in rang [1," << kmax <<"]"));
      return _array[ ((NoInterlaceByTypeGaussPolicy*)this)->getIndexByType(i,j,k,t) ];
    }
    else {
      CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::getNbGauss(i),k);
      return _array[ ((NoInterlaceByTypeNoGaussPolicy*)this)->getIndexByType(i,j,k,t) ];
    }
  };

Here is the call graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
MED_EN::medModeSwitch MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::getInterlacingType ( ) const [inline]

Definition at line 193 of file MEDMEM_nArray.hxx.

Here is the caller graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
ElementType* MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::getPtr ( ) [inline]

Definition at line 201 of file MEDMEM_nArray.hxx.

                         {
    return  _array;
  }

Here is the caller graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
const ElementType* MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::getPtr ( ) const [inline]

Definition at line 205 of file MEDMEM_nArray.hxx.

                                     {
    return  _array;
  }
template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
const ElementType* MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::getRow ( int  i) const [inline]

Definition at line 223 of file MEDMEM_nArray.hxx.

                                                 {
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_nbelem,i);
    // Empêche l'utilisation de getRow en mode MED_NO_INTERLACE
    // Ne devrait pas dépendre de la politique check
    CHECKING_POLICY::checkEquality("MEDMEM_Array (Interlace test)",
                                   MED_EN::MED_NO_INTERLACE,
                                   InterlacingPolicy::_interlacing );
    return &(_array[ InterlacingPolicy::getIndex(i,1) ]);

  }

Here is the caller graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
MEDMEM_Array<ElementType,InterlacingPolicy,CheckingPolicy>& MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::operator= ( const MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY > &  array) [inline]

Definition at line 182 of file MEDMEM_nArray.hxx.

                                                {
    if ( this == &array) return *this;
  const char* LOC = "MEDMEM_Array  operator =";
  BEGIN_OF_MED(LOC);
    InterlacingPolicy::operator=(array); //Appel des classes de base ?

    this->_array.set(array._array); // Le propriétaire reste le ARRAY initial

    return *this;
  }

Here is the call graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
bool MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::operator== ( const MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY > &  array) const [inline]

Definition at line 372 of file MEDMEM_nArray.hxx.

                                                       {

    if ( this == &array ) return true;

    int size = array.getArraySize();
    if ( size != this->getArraySize() ) return false;

    ARRAY_ELEMENT_TYPE * arrayPtr =
      const_cast<MEDMEM_Array &>(array).getPtr();
    for (int i=0; i < size; ++i)
      if (_array[i] != arrayPtr[i]) return false;

    return true;
  }

Here is the call graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
void MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::setColumn ( int  j,
const ElementType *const  value 
) [inline]

Definition at line 256 of file MEDMEM_nArray.hxx.

                                                         {
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_dim,j);
    // setColumn fonctionne
    // dans les deux modes d'entrelacement.

    int index = -1;
    for (int i=1; i <= InterlacingPolicy::getNbElem(); i++) {
      for (int k = 1 ; k <= InterlacingPolicy::getNbGauss(i); k++) {
        //_array[InterlacingPolicy::getIndex(i,j,k)] = value[InterlacingPolicy::getIndex(i,1,k)];
        index++;
        _array[InterlacingPolicy::getIndex(i,j,k)] = value[index];
      }
    }
  }

Here is the caller graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
void MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::setIJ ( int  i,
int  j,
const ElementType value 
) [inline]

Definition at line 321 of file MEDMEM_nArray.hxx.

                                                             {   //autre signature avec
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_nbelem,i);
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_dim,j);

    _array[ InterlacingPolicy::getIndex(i,j) ] = value;                      // retour ElementType & ?
  };

Here is the caller graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
void MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::setIJByType ( int  i,
int  j,
int  t,
const ElementType value 
) [inline]

Definition at line 328 of file MEDMEM_nArray.hxx.

                                                                          {   //autre signature avec
    if ( getInterlacingType() != MED_EN::MED_NO_INTERLACE_BY_TYPE )
      throw MEDEXCEPTION(LOCALIZED(STRING("Wrong interlacing type ") << getInterlacingType()));
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_nbelem,i);
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_dim,j);
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::getNbGeoType(),t);

    if ( InterlacingPolicy::getGaussPresence() )
      _array[ ((NoInterlaceByTypeGaussPolicy*)this)->getIndexByType(i,j,t) ] = value;
    else
      _array[ ((NoInterlaceByTypeNoGaussPolicy*)this)->getIndexByType(i,j,t) ] = value;
  };

Here is the call graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
void MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::setIJK ( int  i,
int  j,
int  k,
const ElementType value 
) [inline]

Definition at line 341 of file MEDMEM_nArray.hxx.

                                                                     {   //autre signature avec
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_nbelem,i);
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_dim,j);
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::getNbGauss(i),k);

    _array[ InterlacingPolicy::getIndex(i,j,k) ] = value;                      // retour ElementType & ?
  };

Here is the caller graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
void MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::setIJKByType ( int  i,
int  j,
int  k,
int  t,
const ElementType value 
) [inline]

Definition at line 349 of file MEDMEM_nArray.hxx.

                                                                                  {   //autre signature avec
    if ( getInterlacingType() != MED_EN::MED_NO_INTERLACE_BY_TYPE )
      throw MEDEXCEPTION(LOCALIZED(STRING("Wrong interlacing type ") << getInterlacingType()));
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_nbelem,i);
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_dim,j);
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::getNbGeoType(),t);

    if ( InterlacingPolicy::getGaussPresence() ) {
        // not compilable on Debian40
//       CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",
//                             1,((NoInterlaceByTypeGaussPolicy*)this)->getNbGaussByType(t),k);
      int kmax = ((NoInterlaceByTypeGaussPolicy*)this)->getNbGaussByType(t);
      if ( k < 1 || k > kmax )
        throw MEDEXCEPTION(LOCALIZED(STRING("MEDMEM_Array::getIJKByType(), ")
                                     << " k : " << k << " not in rang [1," << kmax <<"]"));
      _array[ ((NoInterlaceByTypeGaussPolicy*)this)->getIndexByType(i,j,k,t) ] = value;
    }
    else {
      CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::getNbGauss(i),k);
      _array[ ((NoInterlaceByTypeNoGaussPolicy*)this)->getIndexByType(i,j,k,t) ] = value;
    }
  };

Here is the call graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
void MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::setPtr ( ElementType values,
bool  shallowCopy = false,
bool  ownershipOfValues = false 
) [inline]

Definition at line 209 of file MEDMEM_nArray.hxx.

                                            {

    if(shallowCopy)

      if(ownershipOfValues)
        _array.setShallowAndOwnership((const ElementType *)values);
      else
        _array.set((const ElementType*)values);

    else
      _array.set(InterlacingPolicy::_arraySize,values);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
void MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::setRow ( int  i,
const ElementType *const  value 
) [inline]

Definition at line 234 of file MEDMEM_nArray.hxx.

                                                     {
    CHECKING_POLICY::checkInInclusiveRange("MEDMEM_Array",1,InterlacingPolicy::_nbelem,i);
    // setRow fonctionne
    // dans les deux modes d'entrelacement.

    // int index = -1;
    for (int j =1; j <= InterlacingPolicy::getDim(); j++) {
      for (int k = 1 ; k <= InterlacingPolicy::getNbGauss(i); k++) {
        _array[InterlacingPolicy::getIndex(i,j,k)] = value[InterlacingPolicy::getIndex(1,j,k)];
        //index++;
        //_array[InterlacingPolicy::getIndex(i,j,k)] = value[index];
      }
    }
  }

Here is the caller graph for this function:


Friends And Related Function Documentation

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
ostream& operator<< ( ostream &  os,
const MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY > &  array 
) [friend]

Definition at line 387 of file MEDMEM_nArray.hxx.

                                                                        {

    for (int i=1;i<=array.getNbElem();++i) {
      for (int j=1; j<=array.getDim();++j)
        for (int k=1;k<=array.getNbGauss(i);++k)
          os << "Value [" << i << "," << j << "," << k << "] = " << array.getIJK(i,j,k) << ", ";
      os << endl;
    }
    return os;
  }

Member Data Documentation

template<class ARRAY_ELEMENT_TYPE, class INTERLACING_POLICY = FullInterlaceNoGaussPolicy, class CHECKING_POLICY = IndexCheckPolicy>
PointerOf<ElementType> MEDMEM::MEDMEM_Array< ARRAY_ELEMENT_TYPE, INTERLACING_POLICY, CHECKING_POLICY >::_array [private]

Definition at line 400 of file MEDMEM_nArray.hxx.


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