Back to index

salome-med  6.5.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Private Attributes
ParaMEDMEM::DataArray Class Reference

#include <MEDCouplingMemArray.hxx>

Inheritance diagram for ParaMEDMEM::DataArray:
Inheritance graph
[legend]
Collaboration diagram for ParaMEDMEM::DataArray:
Collaboration graph
[legend]

List of all members.

Public Member Functions

MEDCOUPLING_EXPORT void setName (const char *name)
MEDCOUPLING_EXPORT void copyStringInfoFrom (const DataArray &other) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void copyPartOfStringInfoFrom (const DataArray &other, const std::vector< int > &compoIds) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void copyPartOfStringInfoFrom2 (const std::vector< int > &compoIds, const DataArray &other) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT bool areInfoEquals (const DataArray &other) const
MEDCOUPLING_EXPORT void reprWithoutNameStream (std::ostream &stream) const
MEDCOUPLING_EXPORT std::string getName () const
MEDCOUPLING_EXPORT const
std::vector< std::string > & 
getInfoOnComponents () const
MEDCOUPLING_EXPORT std::vector
< std::string > & 
getInfoOnComponents ()
MEDCOUPLING_EXPORT void setInfoOnComponents (const std::vector< std::string > &info) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT std::vector
< std::string > 
getVarsOnComponent () const
MEDCOUPLING_EXPORT std::vector
< std::string > 
getUnitsOnComponent () const
MEDCOUPLING_EXPORT std::string getInfoOnComponent (int i) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT std::string getVarOnComponent (int i) const throw (INTERP_KERNEL::Exception)
 In the info part of i_th component this method returns the var part.
MEDCOUPLING_EXPORT std::string getUnitOnComponent (int i) const throw (INTERP_KERNEL::Exception)
 In the info part of i_th component this method returns the var part.
MEDCOUPLING_EXPORT void setInfoOnComponent (int i, const char *info) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT int getNumberOfComponents () const
MEDCOUPLING_EXPORT int getNumberOfTuples () const
MEDCOUPLING_EXPORT int getNbOfElems () const
MEDCOUPLING_EXPORT void checkNbOfTuplesAndComp (const DataArray &other, const char *msg) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void checkNbOfTuplesAndComp (int nbOfTuples, int nbOfCompo, const char *msg) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void checkNbOfElems (int nbOfElems, const char *msg) const throw (INTERP_KERNEL::Exception)
def __init__
def setName
def copyStringInfoFrom
def areInfoEquals
def reprWithoutNameStream
def getName
def getInfoOnComponents
def setInfoOnComponents
def getVarsOnComponent
def getUnitsOnComponent
def getInfoOnComponent
def getVarOnComponent
def getUnitOnComponent
def setInfoOnComponent
def getNumberOfComponents
def getNumberOfTuples
def getNbOfElems
def checkNbOfTuplesAndComp
def checkNbOfElems
def GetNumberOfItemGivenBES
def GetNumberOfItemGivenBESRelative
def GetVarNameFromInfo
def GetUnitFromInfo
def copyPartOfStringInfoFrom
def copyPartOfStringInfoFrom2
def incrRef
def getHiddenCppPointer
def assign
def declareAsNew
def updateTime
def getTimeOfThis

Static Public Member Functions

static MEDCOUPLING_EXPORT int GetNumberOfItemGivenBES (int begin, int end, int step, const char *msg) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT int GetNumberOfItemGivenBESRelative (int begin, int end, int step, const char *msg) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT
std::string 
GetVarNameFromInfo (const std::string &info) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT
std::string 
GetUnitFromInfo (const std::string &info) throw (INTERP_KERNEL::Exception)

Protected Member Functions

 DataArray ()

Static Protected Member Functions

static void CheckValueInRange (int ref, int value, const char *msg) throw (INTERP_KERNEL::Exception)
static void CheckClosingParInRange (int ref, int value, const char *msg) throw (INTERP_KERNEL::Exception)

Protected Attributes

int _nb_of_tuples
std::string _name
std::vector< std::string > _info_on_compo

Static Private Attributes

dictionary __swig_setmethods__ = {}
tuple __setattr__ = lambdaself,name,value:_swig_setattr(self, DataArray, name, value)
dictionary __swig_getmethods__ = {}
tuple __getattr__ = lambdaself,name:_swig_getattr(self, DataArray, name)
 __repr__ = _swig_repr
 __swig_destroy__ = _ParaMEDMEM.delete_DataArray

Detailed Description

1

Definition at line 88 of file MEDCouplingMemArray.hxx.


Constructor & Destructor Documentation

ParaMEDMEM::DataArray::DataArray ( ) [inline, protected]

Definition at line 118 of file MEDCouplingMemArray.hxx.

:_nb_of_tuples(-1) { }
def ParaMEDMEM.DataArray.__init__ (   self,
  args,
  kwargs 
)

Reimplemented from ParaMEDMEM.TimeLabel.

Reimplemented in ParaMEDMEM::DataArrayInt, and ParaMEDMEM::DataArrayDouble.

Definition at line 869 of file ParaMEDMEM.py.

00869 
    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")

Member Function Documentation

bool DataArray::areInfoEquals ( const DataArray other) const

Definition at line 121 of file MEDCouplingMemArray.cxx.

{
  if(_nb_of_tuples!=other._nb_of_tuples)
    return false;
  if(_name!=other._name)
    return false;
  return _info_on_compo==other._info_on_compo;
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.areInfoEquals (   self,
  args 
)
areInfoEquals(self, DataArray other) -> bool

1

Definition at line 887 of file ParaMEDMEM.py.

00887 
00888     def areInfoEquals(self, *args):
00889         """
00890         areInfoEquals(self, DataArray other) -> bool
00891 
00892         1
00893         """
00894         return _ParaMEDMEM.DataArray_areInfoEquals(self, *args)

Here is the call graph for this function:

def ParaMEDMEM.TimeLabel.assign (   self,
  args 
) [inherited]
assign(self, TimeLabel other) -> TimeLabel

1

Reimplemented in ParaMEDMEM.MEDCouplingFieldDouble.

Definition at line 284 of file ParaMEDMEM.py.

00284 
00285     def assign(self, *args):
00286         """
00287         assign(self, TimeLabel other) -> TimeLabel
00288 
00289         1
00290         """
00291         return _ParaMEDMEM.TimeLabel_assign(self, *args)

void DataArray::CheckClosingParInRange ( int  ref,
int  value,
const char *  msg 
) throw (INTERP_KERNEL::Exception) [static, protected]

Definition at line 294 of file MEDCouplingMemArray.cxx.

{
  if(value<0 || value>ref)
    {
      std::ostringstream oss; oss << "DataArray::CheckClosingParInRange : " << msg  << " ! Expected a range in [0," << ref << "] having closing open parenthesis " << value << " !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}

Here is the caller graph for this function:

void DataArray::checkNbOfElems ( int  nbOfElems,
const char *  msg 
) const throw (INTERP_KERNEL::Exception)

Definition at line 276 of file MEDCouplingMemArray.cxx.

{
  if(getNbOfElems()!=nbOfElems)
    {
      std::ostringstream oss; oss << msg << " : mismatch number of elems : Expected " << nbOfElems << " having " << getNbOfElems() << " !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.checkNbOfElems (   self,
  args 
)
checkNbOfElems(self, int nbOfElems, char msg)

1

Definition at line 1009 of file ParaMEDMEM.py.

01009 
01010     def checkNbOfElems(self, *args):
01011         """
01012         checkNbOfElems(self, int nbOfElems, char msg)
01013 
01014         1
01015         """
01016         return _ParaMEDMEM.DataArray_checkNbOfElems(self, *args)

Here is the call graph for this function:

void DataArray::checkNbOfTuplesAndComp ( const DataArray other,
const char *  msg 
) const throw (INTERP_KERNEL::Exception)

Definition at line 248 of file MEDCouplingMemArray.cxx.

{
   if(getNumberOfTuples()!=other.getNumberOfTuples())
    {
      std::ostringstream oss; oss << msg << " : mismatch number of tuples : expected " <<  other.getNumberOfTuples() << " having " << getNumberOfTuples() << " !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
  if(getNumberOfComponents()!=other.getNumberOfComponents())
    {
      std::ostringstream oss; oss << msg << " : mismatch number of components : expected " << other.getNumberOfComponents() << " having " << getNumberOfComponents() << " !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}

Here is the caller graph for this function:

void DataArray::checkNbOfTuplesAndComp ( int  nbOfTuples,
int  nbOfCompo,
const char *  msg 
) const throw (INTERP_KERNEL::Exception)

Definition at line 262 of file MEDCouplingMemArray.cxx.

{
  if(getNumberOfTuples()!=nbOfTuples)
    {
      std::ostringstream oss; oss << msg << " : mismatch number of tuples : expected " <<  nbOfTuples << " having " << getNumberOfTuples() << " !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
  if(getNumberOfComponents()!=nbOfCompo)
    {
      std::ostringstream oss; oss << msg << " : mismatch number of components : expected " << nbOfCompo << " having " << getNumberOfComponents() << " !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}
def ParaMEDMEM.DataArray.checkNbOfTuplesAndComp (   self,
  args 
)
checkNbOfTuplesAndComp(self, DataArray other, char msg)
checkNbOfTuplesAndComp(self, int nbOfTuples, int nbOfCompo, char msg)

1

Definition at line 1000 of file ParaMEDMEM.py.

01000 
01001     def checkNbOfTuplesAndComp(self, *args):
01002         """
01003         checkNbOfTuplesAndComp(self, DataArray other, char msg)
01004         checkNbOfTuplesAndComp(self, int nbOfTuples, int nbOfCompo, char msg)
01005 
01006         1
01007         """
01008         return _ParaMEDMEM.DataArray_checkNbOfTuplesAndComp(self, *args)

Here is the call graph for this function:

void DataArray::CheckValueInRange ( int  ref,
int  value,
const char *  msg 
) throw (INTERP_KERNEL::Exception) [static, protected]

Definition at line 285 of file MEDCouplingMemArray.cxx.

{
  if(value<0 || value>=ref)
    {
      std::ostringstream oss; oss << "DataArray::CheckValueInRange : " << msg  << " ! Expected in range [0," << ref << "[ having " << value << " !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}

Here is the caller graph for this function:

void DataArray::copyPartOfStringInfoFrom ( const DataArray other,
const std::vector< int > &  compoIds 
) throw (INTERP_KERNEL::Exception)

Definition at line 91 of file MEDCouplingMemArray.cxx.

{
  int nbOfCompoOth=other.getNumberOfComponents();
  std::size_t newNbOfCompo=compoIds.size();
  for(std::size_t i=0;i<newNbOfCompo;i++)
    if(compoIds[i]>=nbOfCompoOth || compoIds[i]<0)
      {
        std::ostringstream oss; oss << "Specified component id is out of range (" << compoIds[i] << ") compared with nb of actual components (" << nbOfCompoOth << ")";
        throw INTERP_KERNEL::Exception(oss.str().c_str());
      }
  for(std::size_t i=0;i<newNbOfCompo;i++)
    setInfoOnComponent((int)i,other.getInfoOnComponent(compoIds[i]).c_str());
}

Here is the call graph for this function:

Here is the caller graph for this function:

copyPartOfStringInfoFrom(self, DataArray other, ivec compoIds)
copyPartOfStringInfoFrom(self, DataArray other, PyObject li)

1

Definition at line 1057 of file ParaMEDMEM.py.

01057 
01058     def copyPartOfStringInfoFrom(self, *args):
01059         """
01060         copyPartOfStringInfoFrom(self, DataArray other, ivec compoIds)
01061         copyPartOfStringInfoFrom(self, DataArray other, PyObject li)
01062 
01063         1
01064         """
01065         return _ParaMEDMEM.DataArray_copyPartOfStringInfoFrom(self, *args)

Here is the call graph for this function:

void DataArray::copyPartOfStringInfoFrom2 ( const std::vector< int > &  compoIds,
const DataArray other 
) throw (INTERP_KERNEL::Exception)

Definition at line 105 of file MEDCouplingMemArray.cxx.

{
  int nbOfCompo=getNumberOfComponents();
  std::size_t partOfCompoToSet=compoIds.size();
  if((int)partOfCompoToSet!=other.getNumberOfComponents())
    throw INTERP_KERNEL::Exception("Given compoIds has not the same size as number of components of given array !");
  for(std::size_t i=0;i<partOfCompoToSet;i++)
    if(compoIds[i]>=nbOfCompo || compoIds[i]<0)
      {
        std::ostringstream oss; oss << "Specified component id is out of range (" << compoIds[i] << ") compared with nb of actual components (" << nbOfCompo << ")";
        throw INTERP_KERNEL::Exception(oss.str().c_str());
      }
  for(std::size_t i=0;i<partOfCompoToSet;i++)
    setInfoOnComponent(compoIds[i],other.getInfoOnComponent((int)i).c_str());
}

Here is the caller graph for this function:

copyPartOfStringInfoFrom2(self, ivec compoIds, DataArray other)
copyPartOfStringInfoFrom2(self, PyObject li, DataArray other)

1

Definition at line 1066 of file ParaMEDMEM.py.

01066 
01067     def copyPartOfStringInfoFrom2(self, *args):
01068         """
01069         copyPartOfStringInfoFrom2(self, ivec compoIds, DataArray other)
01070         copyPartOfStringInfoFrom2(self, PyObject li, DataArray other)
01071 
01072         1
01073         """
01074         return _ParaMEDMEM.DataArray_copyPartOfStringInfoFrom2(self, *args)

Here is the call graph for this function:

void DataArray::copyStringInfoFrom ( const DataArray other) throw (INTERP_KERNEL::Exception)

Definition at line 83 of file MEDCouplingMemArray.cxx.

{
  if(_info_on_compo.size()!=other._info_on_compo.size())
    throw INTERP_KERNEL::Exception("Size of arrays mismatches on copyStringInfoFrom !");
  _name=other._name;
  _info_on_compo=other._info_on_compo;
}
def ParaMEDMEM.DataArray.copyStringInfoFrom (   self,
  args 
)
copyStringInfoFrom(self, DataArray other)

1

Definition at line 879 of file ParaMEDMEM.py.

00879 
00880     def copyStringInfoFrom(self, *args):
00881         """
00882         copyStringInfoFrom(self, DataArray other)
00883 
00884         1
00885         """
00886         return _ParaMEDMEM.DataArray_copyStringInfoFrom(self, *args)

Here is the call graph for this function:

def ParaMEDMEM.TimeLabel.declareAsNew (   self) [inherited]
declareAsNew(self)

1

Definition at line 292 of file ParaMEDMEM.py.

00292 
00293     def declareAsNew(self):
00294         """
00295         declareAsNew(self)
00296 
00297         1
00298         """
00299         return _ParaMEDMEM.TimeLabel_declareAsNew(self)

Here is the caller graph for this function:

getHiddenCppPointer(self) -> string

1

Definition at line 345 of file ParaMEDMEM.py.

00345 
00346     def getHiddenCppPointer(self):
00347         """
00348         getHiddenCppPointer(self) -> string
00349 
00350         1
00351         """
00352         return _ParaMEDMEM.RefCountObject_getHiddenCppPointer(self)

std::string DataArray::getInfoOnComponent ( int  i) const throw (INTERP_KERNEL::Exception)

Definition at line 167 of file MEDCouplingMemArray.cxx.

{
  if(i<(int)_info_on_compo.size() && i>=0)
    return _info_on_compo[i];
  else
    {
      std::ostringstream oss; oss << "DataArray::getInfoOnComponent : Specified component id is out of range (" << i << ") compared with nb of actual components (" << (int) _info_on_compo.size();
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.getInfoOnComponent (   self,
  args 
)
getInfoOnComponent(self, int i) -> string

1

Definition at line 944 of file ParaMEDMEM.py.

00944 
00945     def getInfoOnComponent(self, *args):
00946         """
00947         getInfoOnComponent(self, int i) -> string
00948 
00949         1
00950         """
00951         return _ParaMEDMEM.DataArray_getInfoOnComponent(self, *args)

Here is the call graph for this function:

MEDCOUPLING_EXPORT const std::vector<std::string>& ParaMEDMEM::DataArray::getInfoOnComponents ( ) const [inline]

Definition at line 98 of file MEDCouplingMemArray.hxx.

{ return _info_on_compo; }

Here is the caller graph for this function:

MEDCOUPLING_EXPORT std::vector<std::string>& ParaMEDMEM::DataArray::getInfoOnComponents ( ) [inline]

Definition at line 99 of file MEDCouplingMemArray.hxx.

{ return _info_on_compo; }
def ParaMEDMEM.DataArray.getInfoOnComponents (   self,
  args 
)
getInfoOnComponents(self) -> svec
getInfoOnComponents(self) -> svec

1

Definition at line 911 of file ParaMEDMEM.py.

00911 
00912     def getInfoOnComponents(self, *args):
00913         """
00914         getInfoOnComponents(self) -> svec
00915         getInfoOnComponents(self) -> svec
00916 
00917         1
00918         """
00919         return _ParaMEDMEM.DataArray_getInfoOnComponents(self, *args)

Here is the call graph for this function:

MEDCOUPLING_EXPORT std::string ParaMEDMEM::DataArray::getName ( ) const [inline]

Definition at line 97 of file MEDCouplingMemArray.hxx.

{ return _name; }

Here is the caller graph for this function:

getName(self) -> string

1

Definition at line 903 of file ParaMEDMEM.py.

00903 
00904     def getName(self):
00905         """
00906         getName(self) -> string
00907 
00908         1
00909         """
00910         return _ParaMEDMEM.DataArray_getName(self)

Here is the call graph for this function:

Definition at line 109 of file MEDCouplingMemArray.hxx.

{ return ((int)_info_on_compo.size())*_nb_of_tuples; }
getNbOfElems(self) -> int

1

Definition at line 992 of file ParaMEDMEM.py.

00992 
00993     def getNbOfElems(self):
00994         """
00995         getNbOfElems(self) -> int
00996 
00997         1
00998         """
00999         return _ParaMEDMEM.DataArray_getNbOfElems(self)

Here is the call graph for this function:

Definition at line 107 of file MEDCouplingMemArray.hxx.

{ return (int)_info_on_compo.size(); }
getNumberOfComponents(self) -> int

1

Definition at line 976 of file ParaMEDMEM.py.

00976 
00977     def getNumberOfComponents(self):
00978         """
00979         getNumberOfComponents(self) -> int
00980 
00981         1
00982         """
00983         return _ParaMEDMEM.DataArray_getNumberOfComponents(self)

Here is the call graph for this function:

int DataArray::GetNumberOfItemGivenBES ( int  begin,
int  end,
int  step,
const char *  msg 
) throw (INTERP_KERNEL::Exception) [static]

Definition at line 303 of file MEDCouplingMemArray.cxx.

{
  if(end<begin)
    {
      std::ostringstream oss; oss << msg << " : end before begin !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
  if(step<=0)
    {
      std::ostringstream oss; oss << msg << " : invalid step should be > 0 !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
  return (end-1-begin)/step+1;
}

Here is the caller graph for this function:

GetNumberOfItemGivenBES(int begin, int end, int step, char msg) -> int

1

Definition at line 1017 of file ParaMEDMEM.py.

01017 
01018     def GetNumberOfItemGivenBES(*args):
01019         """
01020         GetNumberOfItemGivenBES(int begin, int end, int step, char msg) -> int
01021 
01022         1
01023         """
01024         return _ParaMEDMEM.DataArray_GetNumberOfItemGivenBES(*args)

Here is the call graph for this function:

int DataArray::GetNumberOfItemGivenBESRelative ( int  begin,
int  end,
int  step,
const char *  msg 
) throw (INTERP_KERNEL::Exception) [static]

Definition at line 318 of file MEDCouplingMemArray.cxx.

{
  if(step==0)
    throw INTERP_KERNEL::Exception("DataArray::GetNumberOfItemGivenBES : step=0 is not allowed !");
  if(end<begin && step>0)
    {
      std::ostringstream oss; oss << msg << " : end before begin whereas step is positive !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
  if(begin<end && step<0)
    {
      std::ostringstream oss; oss << msg << " : invalid step should be > 0 !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
  if(begin!=end)
    return (std::max(begin,end)-1-std::min(begin,end))/std::abs(step)+1;
  else
    return 0;
}

Here is the caller graph for this function:

GetNumberOfItemGivenBESRelative(int begin, int end, int step, char msg) -> int

1

Definition at line 1027 of file ParaMEDMEM.py.

01027 
01028     def GetNumberOfItemGivenBESRelative(*args):
01029         """
01030         GetNumberOfItemGivenBESRelative(int begin, int end, int step, char msg) -> int
01031 
01032         1
01033         """
01034         return _ParaMEDMEM.DataArray_GetNumberOfItemGivenBESRelative(*args)

Here is the call graph for this function:

Definition at line 108 of file MEDCouplingMemArray.hxx.

{ return _nb_of_tuples; }
getNumberOfTuples(self) -> int

1

Definition at line 984 of file ParaMEDMEM.py.

00984 
00985     def getNumberOfTuples(self):
00986         """
00987         getNumberOfTuples(self) -> int
00988 
00989         1
00990         """
00991         return _ParaMEDMEM.DataArray_getNumberOfTuples(self)

Here is the call graph for this function:

def ParaMEDMEM.TimeLabel.getTimeOfThis (   self) [inherited]
getTimeOfThis(self) -> unsigned int

1

Definition at line 308 of file ParaMEDMEM.py.

00308 
00309     def getTimeOfThis(self):
00310         """
00311         getTimeOfThis(self) -> unsigned int
00312 
00313         1
00314         """
00315         return _ParaMEDMEM.TimeLabel_getTimeOfThis(self)

Here is the caller graph for this function:

std::string DataArray::GetUnitFromInfo ( const std::string &  info) throw (INTERP_KERNEL::Exception) [static]

Definition at line 226 of file MEDCouplingMemArray.cxx.

{
  std::size_t p1=info.find_last_of('[');
  std::size_t p2=info.find_last_of(']');
  if(p1==std::string::npos || p2==std::string::npos)
    return std::string();
  if(p1>p2)
    return std::string();
  return info.substr(p1+1,p2-p1-1);
}

Here is the caller graph for this function:

GetUnitFromInfo(string info) -> string

1

Definition at line 1047 of file ParaMEDMEM.py.

01047 
01048     def GetUnitFromInfo(*args):
01049         """
01050         GetUnitFromInfo(string info) -> string
01051 
01052         1
01053         """
01054         return _ParaMEDMEM.DataArray_GetUnitFromInfo(*args)

Here is the call graph for this function:

std::string DataArray::getUnitOnComponent ( int  i) const throw (INTERP_KERNEL::Exception)

In the info part of i_th component this method returns the var part.

For example, if getInfoOnComponent(0) return "SIGXY (N/m^2)", getUnitOnComponent(0) will return "N/m^2"

Definition at line 199 of file MEDCouplingMemArray.cxx.

{
  if(i<(int)_info_on_compo.size() && i>=0)
    {
      return GetUnitFromInfo(_info_on_compo[i]);
    }
  else
    {
      std::ostringstream oss; oss << "DataArray::getUnitOnComponent : Specified component id is out of range  (" << i << ") compared with nb of actual components (" << (int) _info_on_compo.size();
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.getUnitOnComponent (   self,
  args 
)
getUnitOnComponent(self, int i) -> string

1

Definition at line 960 of file ParaMEDMEM.py.

00960 
00961     def getUnitOnComponent(self, *args):
00962         """
00963         getUnitOnComponent(self, int i) -> string
00964 
00965         1
00966         """
00967         return _ParaMEDMEM.DataArray_getUnitOnComponent(self, *args)

Here is the call graph for this function:

std::vector< std::string > DataArray::getUnitsOnComponent ( ) const

Definition at line 158 of file MEDCouplingMemArray.cxx.

{
  int nbOfCompo=(int)_info_on_compo.size();
  std::vector<std::string> ret(nbOfCompo);
  for(int i=0;i<nbOfCompo;i++)
    ret[i]=getUnitOnComponent(i);
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

getUnitsOnComponent(self) -> svec

1

Definition at line 936 of file ParaMEDMEM.py.

00936 
00937     def getUnitsOnComponent(self):
00938         """
00939         getUnitsOnComponent(self) -> svec
00940 
00941         1
00942         """
00943         return _ParaMEDMEM.DataArray_getUnitsOnComponent(self)

Here is the call graph for this function:

std::string DataArray::GetVarNameFromInfo ( const std::string &  info) throw (INTERP_KERNEL::Exception) [static]

Definition at line 212 of file MEDCouplingMemArray.cxx.

{
  std::size_t p1=info.find_last_of('[');
  std::size_t p2=info.find_last_of(']');
  if(p1==std::string::npos || p2==std::string::npos)
    return info;
  if(p1>p2)
    return info;
  if(p1==0)
    return std::string();
  std::size_t p3=info.find_last_not_of(' ',p1-1);
  return info.substr(0,p3+1);
}

Here is the caller graph for this function:

GetVarNameFromInfo(string info) -> string

1

Definition at line 1037 of file ParaMEDMEM.py.

01037 
01038     def GetVarNameFromInfo(*args):
01039         """
01040         GetVarNameFromInfo(string info) -> string
01041 
01042         1
01043         """
01044         return _ParaMEDMEM.DataArray_GetVarNameFromInfo(*args)

Here is the call graph for this function:

std::string DataArray::getVarOnComponent ( int  i) const throw (INTERP_KERNEL::Exception)

In the info part of i_th component this method returns the var part.

For example, if getInfoOnComponent(0) return "SIGXY (N/m^2)", getVarOnComponent(0) will return "SIGXY"

Definition at line 182 of file MEDCouplingMemArray.cxx.

{
  if(i<(int)_info_on_compo.size() && i>=0)
    {
      return GetVarNameFromInfo(_info_on_compo[i]);
    }
  else
    {
      std::ostringstream oss; oss << "DataArray::getVarOnComponent : Specified component id is out of range  (" << i << ") compared with nb of actual components (" << (int) _info_on_compo.size();
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.getVarOnComponent (   self,
  args 
)
getVarOnComponent(self, int i) -> string

1

Definition at line 952 of file ParaMEDMEM.py.

00952 
00953     def getVarOnComponent(self, *args):
00954         """
00955         getVarOnComponent(self, int i) -> string
00956 
00957         1
00958         """
00959         return _ParaMEDMEM.DataArray_getVarOnComponent(self, *args)

Here is the call graph for this function:

std::vector< std::string > DataArray::getVarsOnComponent ( ) const

Definition at line 149 of file MEDCouplingMemArray.cxx.

{
  int nbOfCompo=(int)_info_on_compo.size();
  std::vector<std::string> ret(nbOfCompo);
  for(int i=0;i<nbOfCompo;i++)
    ret[i]=getVarOnComponent(i);
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

getVarsOnComponent(self) -> svec

1

Definition at line 928 of file ParaMEDMEM.py.

00928 
00929     def getVarsOnComponent(self):
00930         """
00931         getVarsOnComponent(self) -> svec
00932 
00933         1
00934         """
00935         return _ParaMEDMEM.DataArray_getVarsOnComponent(self)

Here is the call graph for this function:

def ParaMEDMEM.RefCountObject.incrRef (   self) [inherited]
incrRef(self)

1

Definition at line 337 of file ParaMEDMEM.py.

00337 
00338     def incrRef(self):
00339         """
00340         incrRef(self)
00341 
00342         1
00343         """
00344         return _ParaMEDMEM.RefCountObject_incrRef(self)

void DataArray::reprWithoutNameStream ( std::ostream &  stream) const

Reimplemented in ParaMEDMEM::DataArrayInt, and ParaMEDMEM::DataArrayDouble.

Definition at line 130 of file MEDCouplingMemArray.cxx.

{
  stream << "Number of components : "<< getNumberOfComponents() << "\n";
  stream << "Info of these components : ";
  for(std::vector<std::string>::const_iterator iter=_info_on_compo.begin();iter!=_info_on_compo.end();iter++)
    stream << "\"" << *iter << "\"   ";
  stream << "\n";
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.reprWithoutNameStream (   self,
  args 
)
reprWithoutNameStream(self, std::ostream stream)

1

Reimplemented in ParaMEDMEM::DataArrayInt, and ParaMEDMEM::DataArrayDouble.

Definition at line 895 of file ParaMEDMEM.py.

00895 
00896     def reprWithoutNameStream(self, *args):
00897         """
00898         reprWithoutNameStream(self, std::ostream stream)
00899 
00900         1
00901         """
00902         return _ParaMEDMEM.DataArray_reprWithoutNameStream(self, *args)

Here is the call graph for this function:

void DataArray::setInfoOnComponent ( int  i,
const char *  info 
) throw (INTERP_KERNEL::Exception)

Definition at line 237 of file MEDCouplingMemArray.cxx.

{
  if(i<(int)_info_on_compo.size() && i>=0)
    _info_on_compo[i]=info;
  else
    {
      std::ostringstream oss; oss << "DataArray::setInfoOnComponent : Specified component id is out of range  (" << i << ") compared with nb of actual components (" << (int) _info_on_compo.size();
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}
def ParaMEDMEM.DataArray.setInfoOnComponent (   self,
  args 
)
setInfoOnComponent(self, int i, char info)

1

Definition at line 968 of file ParaMEDMEM.py.

00968 
00969     def setInfoOnComponent(self, *args):
00970         """
00971         setInfoOnComponent(self, int i, char info)
00972 
00973         1
00974         """
00975         return _ParaMEDMEM.DataArray_setInfoOnComponent(self, *args)

Here is the call graph for this function:

void DataArray::setInfoOnComponents ( const std::vector< std::string > &  info) throw (INTERP_KERNEL::Exception)

Definition at line 139 of file MEDCouplingMemArray.cxx.

{
  if(getNumberOfComponents()!=(int)info.size())
    {
      std::ostringstream oss; oss << "DataArray::setInfoOnComponents : input is of size " << info.size() << " whereas number of components is equal to " << getNumberOfComponents() << " !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
  _info_on_compo=info;
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.setInfoOnComponents (   self,
  args 
)
setInfoOnComponents(self, svec info)

1

Definition at line 920 of file ParaMEDMEM.py.

00920 
00921     def setInfoOnComponents(self, *args):
00922         """
00923         setInfoOnComponents(self, svec info)
00924 
00925         1
00926         """
00927         return _ParaMEDMEM.DataArray_setInfoOnComponents(self, *args)

Here is the call graph for this function:

void DataArray::setName ( const char *  name)

Definition at line 78 of file MEDCouplingMemArray.cxx.

{
  _name=name;
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.setName (   self,
  args 
)
setName(self, char name)

1

Definition at line 871 of file ParaMEDMEM.py.

00871 
00872     def setName(self, *args):
00873         """
00874         setName(self, char name)
00875 
00876         1
00877         """
00878         return _ParaMEDMEM.DataArray_setName(self, *args)

Here is the call graph for this function:

def ParaMEDMEM.TimeLabel.updateTime (   self) [inherited]
updateTime(self)

1

Reimplemented in ParaMEDMEM.MEDCouplingFieldDouble, ParaMEDMEM::MEDCouplingUMesh, ParaMEDMEM.MEDCouplingPointSet, ParaMEDMEM.MEDCouplingFieldDiscretization, ParaMEDMEM.MEDCouplingTwoTimeSteps, ParaMEDMEM.MEDCouplingTimeDiscretization, ParaMEDMEM::DataArrayInt, and ParaMEDMEM::DataArrayDouble.

Definition at line 300 of file ParaMEDMEM.py.

00300 
00301     def updateTime(self):
00302         """
00303         updateTime(self)
00304 
00305         1
00306         """
00307         return _ParaMEDMEM.TimeLabel_updateTime(self)


Member Data Documentation

tuple ParaMEDMEM.DataArray.__getattr__ = lambdaself,name:_swig_getattr(self, DataArray, name) [static, private]

Reimplemented from ParaMEDMEM.TimeLabel.

Reimplemented in ParaMEDMEM::DataArrayInt, and ParaMEDMEM::DataArrayDouble.

Definition at line 868 of file ParaMEDMEM.py.

Reimplemented from ParaMEDMEM.TimeLabel.

Reimplemented in ParaMEDMEM::DataArrayInt, and ParaMEDMEM::DataArrayDouble.

Definition at line 870 of file ParaMEDMEM.py.

tuple ParaMEDMEM.DataArray.__setattr__ = lambdaself,name,value:_swig_setattr(self, DataArray, name, value) [static, private]

Reimplemented from ParaMEDMEM.TimeLabel.

Reimplemented in ParaMEDMEM::DataArrayInt, and ParaMEDMEM::DataArrayDouble.

Definition at line 865 of file ParaMEDMEM.py.

ParaMEDMEM.DataArray.__swig_destroy__ = _ParaMEDMEM.delete_DataArray [static, private]

Reimplemented in ParaMEDMEM::DataArrayInt, and ParaMEDMEM::DataArrayDouble.

Definition at line 1075 of file ParaMEDMEM.py.

dictionary ParaMEDMEM.DataArray.__swig_getmethods__ = {} [static, private]

Reimplemented from ParaMEDMEM.TimeLabel.

Reimplemented in ParaMEDMEM::DataArrayInt, and ParaMEDMEM::DataArrayDouble.

Definition at line 866 of file ParaMEDMEM.py.

dictionary ParaMEDMEM.DataArray.__swig_setmethods__ = {} [static, private]

Reimplemented from ParaMEDMEM.TimeLabel.

Reimplemented in ParaMEDMEM::DataArrayInt, and ParaMEDMEM::DataArrayDouble.

Definition at line 863 of file ParaMEDMEM.py.

std::vector<std::string> ParaMEDMEM::DataArray::_info_on_compo [protected]

Definition at line 125 of file MEDCouplingMemArray.hxx.

std::string ParaMEDMEM::DataArray::_name [protected]

Definition at line 124 of file MEDCouplingMemArray.hxx.

Definition at line 123 of file MEDCouplingMemArray.hxx.


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