Version: 6.5.0
Public Member Functions | Static Public Member Functions | List of all members
ParaMEDMEM::DataArrayInt Class Reference
Inheritance diagram for ParaMEDMEM::DataArrayInt:
Inheritance graph
[legend]
Collaboration diagram for ParaMEDMEM::DataArrayInt:
Collaboration graph
[legend]

Public Member Functions

bool isAllocated () const
void checkAllocated () const throw (INTERP_KERNEL::Exception)
void setInfoAndChangeNbOfCompo (const std::vector< std::string > &info) throw (INTERP_KERNEL::Exception)
int intValue () const throw (INTERP_KERNEL::Exception)
int getHashCode () const throw (INTERP_KERNEL::Exception)
bool empty () const throw (INTERP_KERNEL::Exception)
DataArrayIntdeepCpy () const
DataArrayIntperformCpy (bool deepCpy) const
void cpyFrom (const DataArrayInt &other) throw (INTERP_KERNEL::Exception)
void alloc (int nbOfTuple, int nbOfCompo) throw (INTERP_KERNEL::Exception)
void allocIfNecessary (int nbOfTuple, int nbOfCompo)
bool isEqual (const DataArrayInt &other) const
bool isEqualWithoutConsideringStr (const DataArrayInt &other) const
bool isEqualWithoutConsideringStrAndOrder (const DataArrayInt &other) const throw (INTERP_KERNEL::Exception)
DataArrayIntbuildPermutationArr (const DataArrayInt &other) const throw (INTERP_KERNEL::Exception)
void sort () throw (INTERP_KERNEL::Exception)
void reverse () throw (INTERP_KERNEL::Exception)
void fillWithZero () throw (INTERP_KERNEL::Exception)
void fillWithValue (int val) throw (INTERP_KERNEL::Exception)
void iota (int init=0) throw (INTERP_KERNEL::Exception)
std::string repr () const
std::string reprZip () const
void writeVTK (std::ostream &ofs, int indent, const char *type, const char *nameInFile) const throw (INTERP_KERNEL::Exception)
void reprStream (std::ostream &stream) const
void reprZipStream (std::ostream &stream) const
void reprWithoutNameStream (std::ostream &stream) const
void reprZipWithoutNameStream (std::ostream &stream) const
void transformWithIndArr (const int *indArrBg, const int *indArrEnd) throw (INTERP_KERNEL::Exception)
DataArrayInttransformWithIndArrR (const int *indArrBg, const int *indArrEnd) const throw (INTERP_KERNEL::Exception)
void splitByValueRange (const int *arrBg, const int *arrEnd, DataArrayInt *&castArr, DataArrayInt *&rankInsideCast, DataArrayInt *&castsPresent) const throw (INTERP_KERNEL::Exception)
DataArrayIntinvertArrayO2N2N2O (int newNbOfElem) const
DataArrayIntinvertArrayN2O2O2N (int oldNbOfElem) const
void reAlloc (int nbOfTuples) throw (INTERP_KERNEL::Exception)
DataArrayDoubleconvertToDblArr () const
DataArrayIntfromNoInterlace () const throw (INTERP_KERNEL::Exception)
DataArrayInttoNoInterlace () const throw (INTERP_KERNEL::Exception)
void renumberInPlace (const int *old2New)
void renumberInPlaceR (const int *new2Old)
DataArrayIntrenumber (const int *old2New) const
DataArrayIntrenumberR (const int *new2Old) const
DataArrayIntrenumberAndReduce (const int *old2NewBg, int newNbOfTuple) const
DataArrayIntselectByTupleId (const int *new2OldBg, const int *new2OldEnd) const
DataArrayIntselectByTupleIdSafe (const int *new2OldBg, const int *new2OldEnd) const throw (INTERP_KERNEL::Exception)
DataArrayIntselectByTupleId2 (int bg, int end, int step) const throw (INTERP_KERNEL::Exception)
DataArrayIntselectByTupleRanges (const std::vector< std::pair< int, int > > &ranges) const throw (INTERP_KERNEL::Exception)
DataArrayIntcheckAndPreparePermutation () const throw (INTERP_KERNEL::Exception)
void changeSurjectiveFormat (int targetNb, DataArrayInt *&arr, DataArrayInt *&arrI) const throw (INTERP_KERNEL::Exception)
DataArrayIntbuildPermArrPerLevel () const throw (INTERP_KERNEL::Exception)
bool isIdentity () const throw (INTERP_KERNEL::Exception)
bool isUniform (int val) const throw (INTERP_KERNEL::Exception)
DataArrayIntsubstr (int tupleIdBg, int tupleIdEnd=-1) const throw (INTERP_KERNEL::Exception)
void rearrange (int newNbOfCompo) throw (INTERP_KERNEL::Exception)
void transpose () throw (INTERP_KERNEL::Exception)
DataArrayIntchangeNbOfComponents (int newNbOfComp, int dftValue) const throw (INTERP_KERNEL::Exception)
DataArrayIntkeepSelectedComponents (const std::vector< int > &compoIds) const throw (INTERP_KERNEL::Exception)
void meldWith (const DataArrayInt *other) throw (INTERP_KERNEL::Exception)
void setSelectedComponents (const DataArrayInt *a, const std::vector< int > &compoIds) throw (INTERP_KERNEL::Exception)
void setPartOfValues1 (const DataArrayInt *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true) throw (INTERP_KERNEL::Exception)
void setPartOfValuesSimple1 (int a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp) throw (INTERP_KERNEL::Exception)
void setPartOfValues2 (const DataArrayInt *a, const int *bgTuples, const int *endTuples, const int *bgComp, const int *endComp, bool strictCompoCompare=true) throw (INTERP_KERNEL::Exception)
void setPartOfValuesSimple2 (int a, const int *bgTuples, const int *endTuples, const int *bgComp, const int *endComp) throw (INTERP_KERNEL::Exception)
void setPartOfValues3 (const DataArrayInt *a, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true) throw (INTERP_KERNEL::Exception)
void setPartOfValuesSimple3 (int a, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp) throw (INTERP_KERNEL::Exception)
void setPartOfValuesAdv (const DataArrayInt *a, const DataArrayInt *tuplesSelec) throw (INTERP_KERNEL::Exception)
void setContigPartOfSelectedValues (int tupleIdStart, const DataArrayInt *a, const DataArrayInt *tuplesSelec) throw (INTERP_KERNEL::Exception)
void setContigPartOfSelectedValues2 (int tupleIdStart, const DataArrayInt *a, int bg, int end2, int step) throw (INTERP_KERNEL::Exception)
void getTuple (int tupleId, int *res) const
int getIJ (int tupleId, int compoId) const
int getIJSafe (int tupleId, int compoId) const throw (INTERP_KERNEL::Exception)
int back () const throw (INTERP_KERNEL::Exception)
void setIJ (int tupleId, int compoId, int newVal)
void setIJSilent (int tupleId, int compoId, int newVal)
int * getPointer ()
const int * getConstPointer () const
DataArrayIntIteratoriterator ()
const int * begin () const
const int * end () const
DataArrayIntgetIdsEqual (int val) const throw (INTERP_KERNEL::Exception)
DataArrayIntgetIdsNotEqual (int val) const throw (INTERP_KERNEL::Exception)
DataArrayIntgetIdsEqualList (const std::vector< int > &vals) const throw (INTERP_KERNEL::Exception)
DataArrayIntgetIdsNotEqualList (const std::vector< int > &vals) const throw (INTERP_KERNEL::Exception)
int changeValue (int oldValue, int newValue) throw (INTERP_KERNEL::Exception)
bool presenceOfValue (const std::vector< int > &vals) const throw (INTERP_KERNEL::Exception)
int getMaxValue (int &tupleId) const throw (INTERP_KERNEL::Exception)
int getMaxValueInArray () const throw (INTERP_KERNEL::Exception)
int getMinValue (int &tupleId) const throw (INTERP_KERNEL::Exception)
int getMinValueInArray () const throw (INTERP_KERNEL::Exception)
void abs () throw (INTERP_KERNEL::Exception)
void applyLin (int a, int b, int compoId) throw (INTERP_KERNEL::Exception)
void applyLin (int a, int b) throw (INTERP_KERNEL::Exception)
void applyInv (int numerator) throw (INTERP_KERNEL::Exception)
DataArrayIntnegate () const throw (INTERP_KERNEL::Exception)
void applyDivideBy (int val) throw (INTERP_KERNEL::Exception)
void applyModulus (int val) throw (INTERP_KERNEL::Exception)
void applyRModulus (int val) throw (INTERP_KERNEL::Exception)
DataArrayIntbuildComplement (int nbOfElement) const throw (INTERP_KERNEL::Exception)
DataArrayIntbuildSubstraction (const DataArrayInt *other) const throw (INTERP_KERNEL::Exception)
DataArrayIntbuildUnion (const DataArrayInt *other) const throw (INTERP_KERNEL::Exception)
DataArrayIntbuildIntersection (const DataArrayInt *other) const throw (INTERP_KERNEL::Exception)
DataArrayIntdeltaShiftIndex () const throw (INTERP_KERNEL::Exception)
void computeOffsets () throw (INTERP_KERNEL::Exception)
void computeOffsets2 () throw (INTERP_KERNEL::Exception)
DataArrayIntbuildExplicitArrByRanges (const DataArrayInt *offsets) const throw (INTERP_KERNEL::Exception)
std::set< int > getDifferentValues () const throw (INTERP_KERNEL::Exception)
void useArray (const int *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo)
void writeOnPlace (int id, int element0, const int *others, int sizeOfOthers)
void addEqual (const DataArrayInt *other) throw (INTERP_KERNEL::Exception)
void substractEqual (const DataArrayInt *other) throw (INTERP_KERNEL::Exception)
void multiplyEqual (const DataArrayInt *other) throw (INTERP_KERNEL::Exception)
void divideEqual (const DataArrayInt *other) throw (INTERP_KERNEL::Exception)
void modulusEqual (const DataArrayInt *other) throw (INTERP_KERNEL::Exception)
void updateTime () const
void getTinySerializationIntInformation (std::vector< int > &tinyInfo) const
void getTinySerializationStrInformation (std::vector< std::string > &tinyInfo) const
bool resizeForUnserialization (const std::vector< int > &tinyInfoI)
void finishUnserialization (const std::vector< int > &tinyInfoI, const std::vector< std::string > &tinyInfoS)
- Public Member Functions inherited from ParaMEDMEM::DataArray
void setName (const char *name)
void copyStringInfoFrom (const DataArray &other) throw (INTERP_KERNEL::Exception)
void copyPartOfStringInfoFrom (const DataArray &other, const std::vector< int > &compoIds) throw (INTERP_KERNEL::Exception)
void copyPartOfStringInfoFrom2 (const std::vector< int > &compoIds, const DataArray &other) throw (INTERP_KERNEL::Exception)
bool areInfoEquals (const DataArray &other) const
std::string getName () const
const std::vector< std::string > & getInfoOnComponents () const
std::vector< std::string > & getInfoOnComponents ()
void setInfoOnComponents (const std::vector< std::string > &info) throw (INTERP_KERNEL::Exception)
std::vector< std::string > getVarsOnComponent () const
std::vector< std::string > getUnitsOnComponent () const
std::string getInfoOnComponent (int i) const throw (INTERP_KERNEL::Exception)
std::string getVarOnComponent (int i) const throw (INTERP_KERNEL::Exception)
std::string getUnitOnComponent (int i) const throw (INTERP_KERNEL::Exception)
void setInfoOnComponent (int i, const char *info) throw (INTERP_KERNEL::Exception)
int getNumberOfComponents () const
int getNumberOfTuples () const
int getNbOfElems () const
void checkNbOfTuplesAndComp (const DataArray &other, const char *msg) const throw (INTERP_KERNEL::Exception)
void checkNbOfTuplesAndComp (int nbOfTuples, int nbOfCompo, const char *msg) const throw (INTERP_KERNEL::Exception)
void checkNbOfElems (int nbOfElems, const char *msg) const throw (INTERP_KERNEL::Exception)
- Public Member Functions inherited from ParaMEDMEM::RefCountObject
bool decrRef () const
void incrRef () const
- Public Member Functions inherited from ParaMEDMEM::TimeLabel
TimeLabeloperator= (const TimeLabel &other)
void declareAsNew () const
unsigned int getTimeOfThis () const

Static Public Member Functions

static DataArrayIntNew ()
static DataArrayIntBuildOld2NewArrayFromSurjectiveFormat2 (int nbOfOldTuples, const DataArrayInt *arr, const DataArrayInt *arrI, int &newNbOfTuples) throw (INTERP_KERNEL::Exception)
static void SetArrayIn (DataArrayInt *newArray, DataArrayInt *&arrayToSet)
static DataArrayIntAggregate (const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2)
static DataArrayIntAggregate (const std::vector< const DataArrayInt * > &a) throw (INTERP_KERNEL::Exception)
static DataArrayIntMeld (const DataArrayInt *a1, const DataArrayInt *a2) throw (INTERP_KERNEL::Exception)
static DataArrayIntMeld (const std::vector< const DataArrayInt * > &a) throw (INTERP_KERNEL::Exception)
static DataArrayIntMakePartition (const std::vector< const DataArrayInt * > &groups, int newNb, std::vector< std::vector< int > > &fidsOfGroups)
static DataArrayIntBuildUnion (const std::vector< const DataArrayInt * > &a) throw (INTERP_KERNEL::Exception)
static DataArrayIntBuildIntersection (const std::vector< const DataArrayInt * > &a) throw (INTERP_KERNEL::Exception)
static DataArrayIntAdd (const DataArrayInt *a1, const DataArrayInt *a2) throw (INTERP_KERNEL::Exception)
static DataArrayIntSubstract (const DataArrayInt *a1, const DataArrayInt *a2) throw (INTERP_KERNEL::Exception)
static DataArrayIntMultiply (const DataArrayInt *a1, const DataArrayInt *a2) throw (INTERP_KERNEL::Exception)
static DataArrayIntDivide (const DataArrayInt *a1, const DataArrayInt *a2) throw (INTERP_KERNEL::Exception)
static DataArrayIntModulus (const DataArrayInt *a1, const DataArrayInt *a2) throw (INTERP_KERNEL::Exception)
static int * CheckAndPreparePermutation (const int *start, const int *end)
static DataArrayIntRange (int begin, int end, int step) throw (INTERP_KERNEL::Exception)
- Static Public Member Functions inherited from ParaMEDMEM::DataArray
static int GetNumberOfItemGivenBES (int begin, int end, int step, const char *msg) throw (INTERP_KERNEL::Exception)
static int GetNumberOfItemGivenBESRelative (int begin, int end, int step, const char *msg) throw (INTERP_KERNEL::Exception)
static std::string GetVarNameFromInfo (const std::string &info) throw (INTERP_KERNEL::Exception)
static std::string GetUnitFromInfo (const std::string &info) throw (INTERP_KERNEL::Exception)

Additional Inherited Members

- Protected Member Functions inherited from ParaMEDMEM::DataArray
 DataArray ()
- Static Protected Member Functions inherited from ParaMEDMEM::DataArray
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 inherited from ParaMEDMEM::DataArray
int _nb_of_tuples
std::string _name
std::vector< std::string > _info_on_compo

Member Function Documentation

DataArrayInt * DataArrayInt::New ( )
static

Referenced by Add(), Aggregate(), ParaMEDMEM::MEDCouplingUMesh::Build0DMeshFromCoords(), buildComplement(), ParaMEDMEM::DataArrayIntTuple::buildDAInt(), buildExplicitArrByRanges(), BuildIntersection(), BuildOld2NewArrayFromSurjectiveFormat2(), buildPermArrPerLevel(), buildPermutationArr(), ParaMEDMEM::MEDCouplingUMesh::buildSetInstanceFromThis(), ParaMEDMEM::MEDCouplingUMesh::buildSlice3D(), ParaMEDMEM::MEDCouplingUMesh::buildSlice3DSurf(), buildSubstraction(), BuildUnion(), changeNbOfComponents(), changeSurjectiveFormat(), checkAndPreparePermutation(), ParaMEDMEM::MEDCouplingUMesh::checkDeepEquivalOnSameNodesWith(), ParaMEDMEM::MEDCouplingUMesh::checkDeepEquivalWith(), ParaMEDMEM::MEDFileField1TSWithoutDAS::CheckSBTMesh(), ParaMEDMEM::MEDCouplingUMesh::checkTypeConsistencyAndContig(), ParaMEDMEM::MEDCouplingUMesh::computeNeighborsOfCells(), ParaMEDMEM::MEDCouplingUMesh::convertCellArrayPerGeoType(), convertToDblArr(), deltaShiftIndex(), Divide(), ParaMEDMEM::MEDCouplingUMesh::emulateMEDMEMBDC(), ParaMEDMEM::DataArrayDouble::findCommonTuples(), fromNoInterlace(), ParaMEDMEM::MEDCouplingUMesh::getCellIdsCrossingPlane(), ParaMEDMEM::MEDCouplingMesh::getCellIdsFullyIncludedInNodeIds(), getIdsEqual(), getIdsEqualList(), ParaMEDMEM::DataArrayDouble::getIdsInRange(), getIdsNotEqual(), getIdsNotEqualList(), ParaMEDMEM::MEDCouplingUMesh::getLevArrPerCellTypes(), ParaMEDMEM::MEDCouplingUMesh::getNodeIdsInUse(), invertArrayN2O2O2N(), invertArrayO2N2N2O(), ParaMEDMEM::MEDCouplingUMesh::keepCellIdsByType(), keepSelectedComponents(), MakePartition(), Meld(), Modulus(), Multiply(), negate(), Range(), renumber(), renumberAndReduce(), ParaMEDMEM::MEDCouplingUMesh::renumberCells(), renumberR(), selectByTupleId(), selectByTupleId2(), selectByTupleIdSafe(), selectByTupleRanges(), ParaMEDMEM::MEDFileUMesh::setCoords(), splitByValueRange(), substr(), Substract(), ParaMEDMEM::MEDCouplingUMesh::tessellate2D(), ParaMEDMEM::MEDCouplingUMesh::tessellate2DCurve(), toNoInterlace(), transformWithIndArrR(), and ParaMEDMEM::MEDCouplingUMesh::zipConnectivityTraducer().

bool DataArrayInt::isAllocated ( ) const
void DataArrayInt::checkAllocated ( ) const throw (INTERP_KERNEL::Exception)
void DataArrayInt::setInfoAndChangeNbOfCompo ( const std::vector< std::string > &  info) throw (INTERP_KERNEL::Exception)

This method differs from DataArray::setInfoOnComponents in the sense that if 'this->getNumberOfComponents()!=info.size()' and if 'this' is not allocated it will change the number of components of 'this'. If 'this->getNumberOfComponents()==info.size()' the behaviour is the same than DataArray::setInfoOnComponents method. If 'this->getNumberOfComponents()!=info.size()' and the 'this' is already allocated an exception will be thrown.

int DataArrayInt::intValue ( ) const throw (INTERP_KERNEL::Exception)

This method returns the only one value in 'this', if and only if number of elements (nb of tuples * nb of components) is equal to 1, and that 'this' is allocated. If one or more conditions is not fulfilled an exception will be thrown.

References getConstPointer(), ParaMEDMEM::DataArray::getNbOfElems(), and isAllocated().

int DataArrayInt::getHashCode ( ) const throw (INTERP_KERNEL::Exception)

This method expects that this is well allocated. If not an INTERP_KERNEL::Exception will be thrown. This method is useful for a quick comparison of many instances of DataArrayInt.

References begin(), checkAllocated(), and ParaMEDMEM::DataArray::getNbOfElems().

bool DataArrayInt::empty ( ) const throw (INTERP_KERNEL::Exception)

This method should be called on an allocated DataArrayInt instance. If not an exception will be throw ! This method checks the number of tupes. If it is equal to 0, it returns true, if not false is returned.

References checkAllocated(), and ParaMEDMEM::DataArray::getNumberOfTuples().

Referenced by ParaMEDMEM::MEDFileField1TSWithoutDAS::addNewEntryIfNecessary().

DataArrayInt * DataArrayInt::deepCpy ( ) const
DataArrayInt * DataArrayInt::performCpy ( bool  deepCpy) const
void DataArrayInt::cpyFrom ( const DataArrayInt other) throw (INTERP_KERNEL::Exception)
void DataArrayInt::alloc ( int  nbOfTuple,
int  nbOfCompo 
) throw (INTERP_KERNEL::Exception)

Referenced by Add(), Aggregate(), ParaMEDMEM::MEDCouplingUMesh::allocateCells(), allocIfNecessary(), buildComplement(), ParaMEDMEM::MEDCouplingFieldDiscretizationPerCell::buildDiscrPerCellIfNecessary(), BuildIntersection(), BuildOld2NewArrayFromSurjectiveFormat2(), ParaMEDMEM::MEDCouplingFieldDiscretizationP0::buildSubMeshData(), buildSubstraction(), BuildUnion(), changeNbOfComponents(), ParaMEDMEM::MEDCouplingUMesh::checkTypeConsistencyAndContig(), ParaMEDMEM::MEDCouplingFieldDiscretizationP0::computeMeshRestrictionFromTupleIds(), ParaMEDMEM::MEDCouplingUMesh::convertCellArrayPerGeoType(), ParaMEDMEM::DataArrayDouble::convertToIntArr(), ParaMEDMEM::MEDCouplingUMesh::convertToPolyTypes(), deltaShiftIndex(), Divide(), ParaMEDMEM::MEDCouplingCMesh::fill1DUnstructuredMesh(), ParaMEDMEM::MEDCouplingCMesh::fill2DUnstructuredMesh(), ParaMEDMEM::MEDCouplingCMesh::fill3DUnstructuredMesh(), ParaMEDMEM::MEDCouplingUMesh::findCellsIdsOnBoundary(), ParaMEDMEM::MEDCouplingUMesh::FuseUMeshesOnSameCoords(), ParaMEDMEM::MEDCouplingUMesh::getCellIdsFullyIncludedInNodeIds(), ParaMEDMEM::MEDCouplingMesh::getCellIdsFullyIncludedInNodeIds(), ParaMEDMEM::MEDCouplingUMesh::getCellIdsLyingOnNodes(), getIdsEqual(), getIdsEqualList(), ParaMEDMEM::DataArrayDouble::getIdsInRange(), getIdsNotEqual(), getIdsNotEqualList(), ParaMEDMEM::MEDCouplingUMesh::getNodeIdsInUse(), ParaMEDMEM::MEDCouplingFieldDiscretizationP0::getOffsetArr(), ParaMEDMEM::MEDCouplingFieldDiscretizationP1::getOffsetArr(), ParaMEDMEM::MEDCouplingFieldDiscretizationGauss::getOffsetArr(), ParaMEDMEM::MEDCouplingFieldDiscretizationGaussNE::getOffsetArr(), invertArrayN2O2O2N(), invertArrayO2N2N2O(), ParaMEDMEM::MEDCouplingUMesh::keepCellIdsByType(), MakePartition(), ParaMEDMEM::MEDCouplingUMesh::MergeUMeshesOnSameCoords(), Modulus(), Multiply(), negate(), ParaMEDMEM::MEDCouplingUMesh::rearrange2ConsecutiveCellTypes(), renumber(), renumberAndReduce(), ParaMEDMEM::MEDCouplingUMesh::renumberCells(), renumberR(), ParaMEDMEM::MEDCouplingUMeshDesc::resizeForUnserialization(), ParaMEDMEM::MEDCouplingUMesh::resizeForUnserialization(), ParaMEDMEM::MEDCouplingExtrudedMesh::resizeForUnserialization(), ParaMEDMEM::MEDCouplingCMesh::resizeForUnserialization(), ParaMEDMEM::MEDCouplingFieldDiscretizationGauss::resizeForUnserialization(), resizeForUnserialization(), selectByTupleId(), selectByTupleRanges(), ParaMEDMEM::MEDCouplingUMeshDesc::serialize(), ParaMEDMEM::MEDCouplingUMesh::serialize(), ParaMEDMEM::MEDCouplingExtrudedMesh::serialize(), ParaMEDMEM::MEDCouplingCMesh::serialize(), ParaMEDMEM::MEDCouplingFieldDiscretizationGauss::splitIntoSingleGaussDicrPerCellType(), substr(), Substract(), ParaMEDMEM::MEDCouplingUMeshDesc::unserialization(), ParaMEDMEM::MEDCouplingUMesh::unserialization(), ParaMEDMEM::MEDCouplingExtrudedMesh::unserialization(), and ParaMEDMEM::MEDCouplingUMesh::zipConnectivityTraducer().

void DataArrayInt::allocIfNecessary ( int  nbOfTuple,
int  nbOfCompo 
)
bool DataArrayInt::isEqual ( const DataArrayInt other) const
bool DataArrayInt::isEqualWithoutConsideringStr ( const DataArrayInt other) const
bool DataArrayInt::isEqualWithoutConsideringStrAndOrder ( const DataArrayInt other) const throw (INTERP_KERNEL::Exception)
DataArrayInt * DataArrayInt::buildPermutationArr ( const DataArrayInt other) const throw (INTERP_KERNEL::Exception)

This method expects that 'this' and 'other' have the same number of tuples and exactly one component both. If not an exception will be thrown. This method retrieves a newly created array with same number of tuples than 'this' and 'other' with one component. The returned array 'ret' contains the correspondance from 'this' to 'other' that is to say for every i so that 0<=i<getNumberOfTuples() other.getIJ(i,0)==this->getIJ(ret->getIJ(i),0) If such permutation is not possible because it exists some elements in 'other' not in 'this', an exception will be thrown.

References New().

void DataArrayInt::sort ( ) throw (INTERP_KERNEL::Exception)
void DataArrayInt::reverse ( ) throw (INTERP_KERNEL::Exception)
void DataArrayInt::fillWithZero ( ) throw (INTERP_KERNEL::Exception)
void DataArrayInt::fillWithValue ( int  val) throw (INTERP_KERNEL::Exception)
void DataArrayInt::iota ( int  init = 0) throw (INTERP_KERNEL::Exception)
std::string DataArrayInt::repr ( ) const

References reprStream().

std::string DataArrayInt::reprZip ( ) const

References reprZipStream().

void DataArrayInt::writeVTK ( std::ostream &  ofs,
int  indent,
const char *  type,
const char *  nameInFile 
) const throw (INTERP_KERNEL::Exception)
void DataArrayInt::reprStream ( std::ostream &  stream) const
void DataArrayInt::reprZipStream ( std::ostream &  stream) const
void DataArrayInt::reprWithoutNameStream ( std::ostream &  stream) const
void DataArrayInt::reprZipWithoutNameStream ( std::ostream &  stream) const
void DataArrayInt::transformWithIndArr ( const int *  indArrBg,
const int *  indArrEnd 
) throw (INTERP_KERNEL::Exception)

This method expects a number of components equal to 1. This method sweeps all the values (tuples) in 'this' (it should be allocated) and for each value v is replaced by indArr[v] where 'indArr' is defined by ['indArrBg','indArrEnd'). This method is safe that is to say if there is a value in 'this' not in [0,std::distance('indArrBg','indArrEnd')) an exception will be thrown.

DataArrayInt * DataArrayInt::transformWithIndArrR ( const int *  indArrBg,
const int *  indArrEnd 
) const throw (INTERP_KERNEL::Exception)

This method expects a number of components equal to 1. This method sweeps all the values (tuples) in 'this' (it should be allocated) and for each value v on place i, place indArr[v] will have value i. indArr[v] where 'indArr' is defined by ['indArrBg','indArrEnd'). This method is half/safe that is to say if there is location i so that indArr[v] is not in [0,this->getNumberOfTuples()) an exception will be thrown.

References New().

void DataArrayInt::splitByValueRange ( const int *  arrBg,
const int *  arrEnd,
DataArrayInt *&  castArr,
DataArrayInt *&  rankInsideCast,
DataArrayInt *&  castsPresent 
) const throw (INTERP_KERNEL::Exception)

'this' should be allocated and with numberOfComponents set to one. If not an exception will be thrown. This method takes as input an array defined by ['arrBg','arrEnd'). The size of the array (std::distance(arrBg,arrEnd)) is equal to the number of cast + 1. The values contained in ['arrBg','arrEnd') should be sorted ascendently. No check of this will be done. If not the result is not waranted. For each cast j the value range that defines the cast is equal to [arrBg[j],arrBg[j+1]). This method returns three arrays (to be managed by the caller). This method is typically usefull for entity number spliting by types for example. Example : If 'this' contains [6,5,0,3,2,7,8,1,4] and if ['arrBg','arrEnd') contains [0,4,9] then the output of this method will be :

  • 'castArr' : [1,1,0,0,0,1,1,0,1]
  • 'rankInsideCast' : [2,1,0,3,2,3,4,1,0]
  • 'return' : [0,1]
Parameters
castArris a returned param has the same number of tuples than 'this' and number of components set to one. In case of sucess, this param contains for each tuple in 'this' in which cast it holds.
rankInsideCastis an another returned param has the same number of tuples than 'this' and number of components set to one too. In case of sucess, this param contains for each tuple its rank inside its cast.
castsPresentthe casts that 'this' contains.
Exceptions
ifa value in 'this' is greater or equal to the last value of ['arrBg','arrEnd')

References New().

Referenced by ParaMEDMEM::MEDCouplingUMesh::splitProfilePerType().

DataArrayInt * DataArrayInt::invertArrayO2N2N2O ( int  newNbOfElem) const

This method invert array 'di' that is a conversion map from Old to New numbering to New to Old numbering.

References alloc(), getConstPointer(), ParaMEDMEM::DataArray::getNumberOfTuples(), getPointer(), and New().

Referenced by ParaMEDMEM::MEDCouplingFieldDiscretizationP1::buildSubMeshData().

DataArrayInt * DataArrayInt::invertArrayN2O2O2N ( int  oldNbOfElem) const

This method invert array 'di' that is a conversion map from New to old numbering to Old to New numbering.

References alloc(), getConstPointer(), ParaMEDMEM::DataArray::getNumberOfTuples(), getPointer(), and New().

void DataArrayInt::reAlloc ( int  nbOfTuples) throw (INTERP_KERNEL::Exception)
DataArrayDouble * DataArrayInt::convertToDblArr ( ) const
DataArrayInt * DataArrayInt::fromNoInterlace ( ) const throw (INTERP_KERNEL::Exception)
DataArrayInt * DataArrayInt::toNoInterlace ( ) const throw (INTERP_KERNEL::Exception)
void DataArrayInt::renumberInPlace ( const int *  old2New)
void DataArrayInt::renumberInPlaceR ( const int *  new2Old)
DataArrayInt * DataArrayInt::renumber ( const int *  old2New) const

This method expects that 'this' is allocated, if not an exception is thrown. This method in case of success returns a newly created array the user should deal with. In the case of having a renumber array in "old to new" format. More info on renumbering here.

References alloc(), ParaMEDMEM::DataArray::copyStringInfoFrom(), getConstPointer(), ParaMEDMEM::DataArray::getNumberOfComponents(), ParaMEDMEM::DataArray::getNumberOfTuples(), getPointer(), and New().

Referenced by ParaMEDMEM::MEDCouplingFieldDiscretizationPerCell::renumberCells().

DataArrayInt * DataArrayInt::renumberR ( const int *  new2Old) const
DataArrayInt * DataArrayInt::renumberAndReduce ( const int *  old2New,
int  newNbOfTuple 
) const

Idem DataArrayDouble::renumber method except that the number of tuples is reduced. That is to say that it is expected that newNbOfTuple<this->getNumberOfTuples(). ['old2New','old2New'+getNumberOfTuples()) defines a range containing old to new array. For every negative value in ['old2NewBg','old2New'getNumberOfTuples()) the corresponding tuple is omitted.

References alloc(), ParaMEDMEM::DataArray::copyStringInfoFrom(), getConstPointer(), ParaMEDMEM::DataArray::getNumberOfComponents(), ParaMEDMEM::DataArray::getNumberOfTuples(), getPointer(), and New().

DataArrayInt * DataArrayInt::selectByTupleId ( const int *  new2OldBg,
const int *  new2OldEnd 
) const

This method is a generalization of DataArrayDouble::substr method because a not contigous range can be specified here. This method is equavalent to DataArrayInt::renumberAndReduce except that convention in input is new2old and not old2new.

References alloc(), ParaMEDMEM::DataArray::copyStringInfoFrom(), getConstPointer(), ParaMEDMEM::DataArray::getNumberOfComponents(), getPointer(), and New().

DataArrayInt * DataArrayInt::selectByTupleIdSafe ( const int *  new2OldBg,
const int *  new2OldEnd 
) const throw (INTERP_KERNEL::Exception)

This method is equivalent to DataArrayInt::selectByTupleId except that an analyze to the content of input range to check that it will not lead to memory corruption !

References New().

Referenced by ParaMEDMEM::MEDFileUMesh::addNodeGroup().

DataArrayInt * DataArrayInt::selectByTupleId2 ( int  bg,
int  end2,
int  step 
) const throw (INTERP_KERNEL::Exception)

Idem than DataArrayInt::selectByTupleIdSafe except that the input array is not constructed explicitely. The convention is as python one. ['bg','end2') with steps of 'step'. Returns a newly created array.

References New().

DataArrayInt * DataArrayInt::selectByTupleRanges ( const std::vector< std::pair< int, int > > &  ranges) const throw (INTERP_KERNEL::Exception)

This method returns a newly allocated array that is the concatenation of all tuples ranges in param 'ranges'. Each pair in input 'ranges' is in [begin,end) format. If there is a range in 'ranges' so that end is before begin an exception will be thrown. If there is a range in 'ranges' so that end is greater than number of tuples of 'this', an exception will be thrown too.

References alloc(), checkAllocated(), ParaMEDMEM::DataArray::copyStringInfoFrom(), deepCpy(), getConstPointer(), ParaMEDMEM::DataArray::getNumberOfComponents(), ParaMEDMEM::DataArray::getNumberOfTuples(), and New().

DataArrayInt * DataArrayInt::checkAndPreparePermutation ( ) const throw (INTERP_KERNEL::Exception)

This method works only for arrays having single component. If this contains the array a1 containing [9,10,0,6,4,11,3,7] this method returns an array a2 [5,6,0,3,2,7,1,4]. By doing a1.renumber(a2) the user will obtain array a3 equal to a1 sorted. This method is useful for renumbering (in MED file for example). This method is used by MEDCouplingFieldDouble::renumberCells when check is set to true. This method throws an exception if more 2 or more elements in 'this' are same.

References checkAllocated(), CheckAndPreparePermutation(), ParaMEDMEM::CPP_DEALLOC, getConstPointer(), ParaMEDMEM::DataArray::getNumberOfComponents(), ParaMEDMEM::DataArray::getNumberOfTuples(), New(), and useArray().

Referenced by ParaMEDMEM::MEDFileField1TSWithoutDAS::CheckSBTMesh().

void DataArrayInt::changeSurjectiveFormat ( int  targetNb,
DataArrayInt *&  arr,
DataArrayInt *&  arrI 
) const throw (INTERP_KERNEL::Exception)

This method makes the assumption that 'this' is correctly set, and has exactly one component. If not an exception will be thrown. Given a sujective application defined by 'this' from a set of size this->getNumberOfTuples() to a set of size targetNb. 'targetNb'<this->getNumberOfTuples(). 'this' should be surjective that is to say for each id in [0,'targetNb') it exists at least one tupleId tid so that this->getIJ(tid,0)==id. If not an exception will be thrown. This method returns 2 newly allocated arrays 'arr' and 'arrI', corresponding respectively to array and its corresponding index. This method is usefull for methods that returns old2New numbering concecutive to a reduction ( MEDCouplingUMesh::zipConnectivityTraducer, MEDCouplingUMesh::zipConnectivityTraducer for example) Example : if 'this' equals [0,3,2,3,2,2,1,2] this method will return arrI=[0,1,2,6,8] arr=[0, 6, 2,4,5,7, 1,3] That is to say elt id 2 has arrI[2+1]-arrI[2]=4 places in 'this'. The corresponding tuple ids are [2,4,5,7].

References New().

DataArrayInt * DataArrayInt::BuildOld2NewArrayFromSurjectiveFormat2 ( int  nbOfOldTuples,
const DataArrayInt arr,
const DataArrayInt arrI,
int &  newNbOfTuples 
) throw (INTERP_KERNEL::Exception)
static

This static method computes a old 2 new format DataArrayInt instance from a zip representation of a surjective format (retrived by DataArrayDouble::findCommonTuples for example) The retrieved array minimizes the permutation. Let's take an example : If 'nbOfOldTuples'==10 and 'arr'==[0,3, 5,7,9] and 'arrI'==[0,2,5] it returns the following array [0,1,2,0,3,4,5,4,6,4] and newNbOfTuples==7.

Parameters
nbOfOldTuplesis the number of tuples in initial array.
arris the list of tuples ids grouped by 'arrI' array
arrIis the entry point of 'arr' array. arrI->getNumberOfTuples()-1 is the number of common groups > 1 tuple.
newNbOfTuplesoutput parameter that retrieves the new number of tuples after surjection application

References alloc(), getPointer(), and New().

Referenced by ParaMEDMEM::MEDCouplingPointSet::buildNewNumberingFromCommonNodesFormat(), ParaMEDMEM::DataArrayDouble::getDifferentValues(), and ParaMEDMEM::MEDCouplingUMesh::MergeNodesOnUMeshesSharingSameCoords().

DataArrayInt * DataArrayInt::buildPermArrPerLevel ( ) const throw (INTERP_KERNEL::Exception)

This method expects that 'this' is allocated and with only one component. If not an exception will be thrown. This method returns a newly created array with 'this->getNumberOfTuples()' tuples and 1 component. This methods returns an 'old2New' corresponding array that allows to follow the following rules :

  • Lower a value in tuple in 'this' is, higher is its priority.
  • If two tuples i and j have same value if i<j then ret[i]<ret[j]
  • The first tuple with the lowest value will have the value 0, inversely the last tuple with highest value will have value 'this->getNumberOfTuples()-1'

Example if 'this' contains the following array : [2,0,1,1,0,1,2,0,1,1,0,0] this method returns [10,0,5,6,1,7,11,2,8,9,3,4]

References checkAllocated(), getConstPointer(), ParaMEDMEM::DataArray::getNumberOfComponents(), ParaMEDMEM::DataArray::getNumberOfTuples(), and New().

bool DataArrayInt::isIdentity ( ) const throw (INTERP_KERNEL::Exception)

This method checks that 'this' is with numberofcomponents == 1 and that it is equal to stdext::iota() of size getNumberOfTuples. This method is particalary usefull for DataArrayInt instances that represents a renumbering array to check the real need in renumbering.

References checkAllocated(), getConstPointer(), ParaMEDMEM::DataArray::getNumberOfComponents(), and ParaMEDMEM::DataArray::getNumberOfTuples().

bool DataArrayInt::isUniform ( int  val) const throw (INTERP_KERNEL::Exception)
DataArrayInt * DataArrayInt::substr ( int  tupleIdBg,
int  tupleIdEnd = -1 
) const throw (INTERP_KERNEL::Exception)

This methods has a similar behaviour than std::string::substr. This method returns a newly created DataArrayInt that is part of this with same number of components. The intervall is specified by [tupleIdBg,tupleIdEnd) except if tupleIdEnd ==-1 in this case the [tupleIdBg,this->end()) will be kept. This method check that interval is valid regarding this, if not an exception will be thrown.

References alloc(), ParaMEDMEM::DataArray::copyStringInfoFrom(), getPointer(), and New().

void DataArrayInt::rearrange ( int  newNbOfCompo) throw (INTERP_KERNEL::Exception)

Contrary to DataArrayInt::changeNbOfComponents method this method is not const. The content This method do not change the content of data but changes the splitting of this data seen by the caller. This method makes the assumption that 'this' is already allocated. If not an exception will be thrown. This method checks that getNbOfElems()newNbOfCompo==0. If not an exception will be throw ! This method erases all components info set before call !

Referenced by transpose().

void DataArrayInt::transpose ( ) throw (INTERP_KERNEL::Exception)

This method makes the assumption that this is allocated. If not an INTERP_KERNEL::Exception will be raised. This method does not echange the values stored in this. Simply, the number of components before the call becomes the number of tuples and inversely the number of tuples becomes the number of components. WARNING the info on components can be alterated by this method.

References checkAllocated(), ParaMEDMEM::DataArray::getNumberOfTuples(), and rearrange().

DataArrayInt * DataArrayInt::changeNbOfComponents ( int  newNbOfComp,
int  dftValue 
) const throw (INTERP_KERNEL::Exception)

This method builds a new instance of DataArrayInt (to deal with) that is reduction or an extension of 'this'. if 'newNbOfComp' < this->getNumberOfComponents() a reduction is done and for each tuple 'newNbOfComp' first components are kept. If 'newNbOfComp' > this->getNumberOfComponents() an extension is done, and for each components i such that i > getNumberOfComponents() 'dftValue' parameter is taken.

References alloc(), getPointer(), New(), ParaMEDMEM::DataArray::setInfoOnComponent(), and ParaMEDMEM::DataArray::setName().

DataArrayInt * DataArrayInt::keepSelectedComponents ( const std::vector< int > &  compoIds) const throw (INTERP_KERNEL::Exception)
void DataArrayInt::meldWith ( const DataArrayInt other) throw (INTERP_KERNEL::Exception)

This method melds the components of 'this' with components of 'other'. After this call in case of success, 'this' will contain a number of components equal to the sum of 'this' before the call and the number of components of 'other'. This method expects that 'this' and 'other' have exactly the same number of tuples. If not an exception is thrown.

References ParaMEDMEM::CPP_DEALLOC.

void DataArrayInt::setSelectedComponents ( const DataArrayInt a,
const std::vector< int > &  compoIds 
) throw (INTERP_KERNEL::Exception)
void DataArrayInt::setPartOfValues1 ( const DataArrayInt a,
int  bgTuples,
int  endTuples,
int  stepTuples,
int  bgComp,
int  endComp,
int  stepComp,
bool  strictCompoCompare = true 
) throw (INTERP_KERNEL::Exception)

This method performs a partial assignment of 'this' using 'a' as input. Other input parameters specifies the subpart being considered by the assignment. 'strictCompoCompare' specifies if DataArray 'a' should have exactly same number of components and tuples than 'this' (true) or not (false). By default set to true with maximal test.

References ParaMEDMEM::DataArray::CheckClosingParInRange(), ParaMEDMEM::DataArray::CheckValueInRange(), and ParaMEDMEM::DataArray::GetNumberOfItemGivenBES().

void DataArrayInt::setPartOfValuesSimple1 ( int  a,
int  bgTuples,
int  endTuples,
int  stepTuples,
int  bgComp,
int  endComp,
int  stepComp 
) throw (INTERP_KERNEL::Exception)

This method performs a partial assignment of 'this' using 'a' as input. Other input parameters specifies the subpart being considered by the assignment.

References ParaMEDMEM::DataArray::CheckClosingParInRange(), ParaMEDMEM::DataArray::CheckValueInRange(), and ParaMEDMEM::DataArray::GetNumberOfItemGivenBES().

void DataArrayInt::setPartOfValues2 ( const DataArrayInt a,
const int *  bgTuples,
const int *  endTuples,
const int *  bgComp,
const int *  endComp,
bool  strictCompoCompare = true 
) throw (INTERP_KERNEL::Exception)

This method performs a partial assignment of 'this' using 'a' as input. Other input parameters specifies the subpart being considered by the assignment. 'strictCompoCompare' specifies if DataArray 'a' should have exactly same number of components and tuples than 'this' (true) or not (false). By default set to true with maximal test.

References ParaMEDMEM::DataArray::CheckValueInRange().

void DataArrayInt::setPartOfValuesSimple2 ( int  a,
const int *  bgTuples,
const int *  endTuples,
const int *  bgComp,
const int *  endComp 
) throw (INTERP_KERNEL::Exception)

This method performs a partial assignment of 'this' using 'a' as input. Other input parameters specifies the subpart being considered by the assignment.

References ParaMEDMEM::DataArray::CheckValueInRange().

void DataArrayInt::setPartOfValues3 ( const DataArrayInt a,
const int *  bgTuples,
const int *  endTuples,
int  bgComp,
int  endComp,
int  stepComp,
bool  strictCompoCompare = true 
) throw (INTERP_KERNEL::Exception)

This method performs a partial assignment of 'this' using 'a' as input. Other input parameters specifies the subpart being considered by the assignment. 'strictCompoCompare' specifies if DataArray 'a' should have exactly same number of components and tuples than 'this' (true) or not (false). By default set to true with maximal test.

References ParaMEDMEM::DataArray::CheckClosingParInRange(), ParaMEDMEM::DataArray::CheckValueInRange(), and ParaMEDMEM::DataArray::GetNumberOfItemGivenBES().

void DataArrayInt::setPartOfValuesSimple3 ( int  a,
const int *  bgTuples,
const int *  endTuples,
int  bgComp,
int  endComp,
int  stepComp 
) throw (INTERP_KERNEL::Exception)

This method performs a partial assignment of 'this' using 'a' as input. Other input parameters specifies the subpart being considered by the assignment.

References ParaMEDMEM::DataArray::CheckClosingParInRange(), ParaMEDMEM::DataArray::CheckValueInRange(), and ParaMEDMEM::DataArray::GetNumberOfItemGivenBES().

void DataArrayInt::setPartOfValuesAdv ( const DataArrayInt a,
const DataArrayInt tuplesSelec 
) throw (INTERP_KERNEL::Exception)

'this', 'a' and 'tuplesSelec' are expected to be defined. If not an exception will be thrown.

Parameters
ais an array having exactly the same number of components than 'this'
tuplesSelecis an array having exactly 2 components. The first one refers to the tuple ids of 'this' that will be set. The second one refers to the tuple ids of 'a' that will be used for setting.
void DataArrayInt::setContigPartOfSelectedValues ( int  tupleIdStart,
const DataArrayInt a,
const DataArrayInt tuplesSelec 
) throw (INTERP_KERNEL::Exception)

'this', 'a' and 'tuplesSelec' are expected to be defined. If not an exception will be thrown. This is a method that is a specialization to DataArrayInt::setPartOfValuesAdv method, except that here the tuple selection of 'a' is given by a range ('bg','end2' and 'step') rather than an explicite array of tuple ids (given by the 2nd component) and the feeding is done in 'this' contiguously starting from 'tupleIdStart'.

Parameters
ais an array having exactly the same number of components than 'this'
void DataArrayInt::setContigPartOfSelectedValues2 ( int  tupleIdStart,
const DataArrayInt a,
int  bg,
int  end2,
int  step 
) throw (INTERP_KERNEL::Exception)

'this' and 'a' are expected to be defined. If not an exception will be thrown. This is a method that is a specialization to DataArrayInt::setContigPartOfSelectedValues method, except that here the tuple selection is givenin a is done by a range ('bg','end2' and 'step') rather than an explicite array of tuple ids.

Parameters
ais an array having exactly the same number of components than 'this'

References ParaMEDMEM::DataArray::GetNumberOfItemGivenBES().

void ParaMEDMEM::DataArrayInt::getTuple ( int  tupleId,
int *  res 
) const
int ParaMEDMEM::DataArrayInt::getIJ ( int  tupleId,
int  compoId 
) const
int DataArrayInt::getIJSafe ( int  tupleId,
int  compoId 
) const throw (INTERP_KERNEL::Exception)

This method is equivalent to DataArrayInt::getIJ except that here tupleId is checked to be in [0,this->getNumberOfTuples()) and compoId to be in [0,this->getNumberOfComponents()). If one of these check fails an INTERP_KERNEL::Exception will be thrown. So this method is safe but expensive if used to go through all data of this.

int DataArrayInt::back ( ) const throw (INTERP_KERNEL::Exception)

This method returns the last element in 'this'. So this method makes the hypothesis that 'this' is allocated. This method works only for arrays that have exactly number of components equal to 1. If not an exception is thrown. And to finish this method works for arrays that have number of tuples >= 1.

References checkAllocated(), getConstPointer(), ParaMEDMEM::DataArray::getNumberOfComponents(), and ParaMEDMEM::DataArray::getNumberOfTuples().

Referenced by ParaMEDMEM::MEDCouplingFieldDiscretizationGauss::splitIntoSingleGaussDicrPerCellType().

void ParaMEDMEM::DataArrayInt::setIJ ( int  tupleId,
int  compoId,
int  newVal 
)
void ParaMEDMEM::DataArrayInt::setIJSilent ( int  tupleId,
int  compoId,
int  newVal 
)
int* ParaMEDMEM::DataArrayInt::getPointer ( )

Referenced by abs(), Add(), Aggregate(), ParaMEDMEM::MEDCouplingUMesh::allocateCells(), buildComplement(), ParaMEDMEM::MEDCouplingFieldDiscretizationPerCell::buildDiscrPerCellIfNecessary(), BuildIntersection(), BuildOld2NewArrayFromSurjectiveFormat2(), ParaMEDMEM::MEDCouplingFieldDiscretizationP0::buildSubMeshData(), buildSubstraction(), BuildUnion(), changeNbOfComponents(), ParaMEDMEM::MEDCouplingUMesh::checkTypeConsistencyAndContig(), ParaMEDMEM::MEDCouplingFieldDiscretizationP0::computeMeshRestrictionFromTupleIds(), computeOffsets(), ParaMEDMEM::MEDCouplingUMesh::convertCellArrayPerGeoType(), ParaMEDMEM::MEDCouplingUMesh::convertDegeneratedCells(), ParaMEDMEM::DataArrayDouble::convertToIntArr(), ParaMEDMEM::MEDCouplingUMesh::convertToPolyTypes(), ParaMEDMEM::DataArrayIntIterator::DataArrayIntIterator(), deltaShiftIndex(), Divide(), ParaMEDMEM::MEDCouplingCMesh::fill1DUnstructuredMesh(), ParaMEDMEM::MEDCouplingCMesh::fill2DUnstructuredMesh(), ParaMEDMEM::MEDCouplingCMesh::fill3DUnstructuredMesh(), ParaMEDMEM::MEDCouplingUMesh::findCellsIdsOnBoundary(), ParaMEDMEM::MEDCouplingUMesh::FuseUMeshesOnSameCoords(), ParaMEDMEM::MEDCouplingUMesh::getCellIdsFullyIncludedInNodeIds(), ParaMEDMEM::MEDCouplingMesh::getCellIdsFullyIncludedInNodeIds(), ParaMEDMEM::MEDCouplingUMesh::getCellIdsLyingOnNodes(), getIdsEqual(), getIdsEqualList(), ParaMEDMEM::DataArrayDouble::getIdsInRange(), getIdsNotEqual(), getIdsNotEqualList(), ParaMEDMEM::MEDCouplingUMesh::getNodeIdsInUse(), ParaMEDMEM::MEDCouplingFieldDiscretizationGauss::getOffsetArr(), ParaMEDMEM::MEDCouplingFieldDiscretizationGaussNE::getOffsetArr(), invertArrayN2O2O2N(), invertArrayO2N2N2O(), ParaMEDMEM::MEDCouplingUMesh::keepCellIdsByType(), MakePartition(), ParaMEDMEM::MEDCouplingUMeshCell::MEDCouplingUMeshCell(), ParaMEDMEM::MEDCouplingUMesh::MergeUMeshesOnSameCoords(), Modulus(), Multiply(), negate(), ParaMEDMEM::MEDCouplingUMesh::orientCorrectlyPolyhedrons(), ParaMEDMEM::MEDCouplingUMesh::rearrange2ConsecutiveCellTypes(), renumber(), renumberAndReduce(), ParaMEDMEM::MEDCouplingUMesh::renumberCells(), renumberInPlace(), renumberInPlaceR(), ParaMEDMEM::MEDCouplingUMesh::renumberNodesInConn(), renumberR(), selectByTupleId(), ParaMEDMEM::MEDCouplingUMeshDesc::serialize(), ParaMEDMEM::MEDCouplingUMesh::serialize(), ParaMEDMEM::MEDCouplingExtrudedMesh::serialize(), ParaMEDMEM::MEDCouplingFieldDiscretizationGauss::splitIntoSingleGaussDicrPerCellType(), substr(), Substract(), ParaMEDMEM::MEDCouplingUMesh::unPolyze(), ParaMEDMEM::MEDCouplingUMeshDesc::unserialization(), ParaMEDMEM::MEDCouplingUMesh::unserialization(), ParaMEDMEM::MEDCouplingExtrudedMesh::unserialization(), ParaMEDMEM::MEDCouplingUMesh::zipConnectivityTraducer(), and ParaMEDMEM::MEDCouplingFieldDiscretizationGauss::zipGaussLocalizations().

void DataArrayInt::SetArrayIn ( DataArrayInt newArray,
DataArrayInt *&  arrayToSet 
)
static
const int* ParaMEDMEM::DataArrayInt::getConstPointer ( ) const

Referenced by Add(), ParaMEDMEM::MEDFileUMesh::addNodeGroup(), Aggregate(), ParaMEDMEM::MEDCouplingUMesh::areCellsEqual0(), ParaMEDMEM::MEDCouplingUMesh::areCellsEqual1(), ParaMEDMEM::MEDCouplingUMesh::areCellsEqual2(), ParaMEDMEM::MEDCouplingUMesh::areOnlySimplexCells(), back(), ParaMEDMEM::MEDCouplingExtrudedMesh::build3DUnstructuredMesh(), ParaMEDMEM::MEDCouplingUMesh::buildBoundaryMesh(), ParaMEDMEM::MEDCouplingFieldDiscretizationGauss::buildNbOfGaussPointPerCellField(), ParaMEDMEM::MEDCouplingUMesh::buildOrthogonalField(), ParaMEDMEM::MEDCouplingUMesh::buildPartOrthogonalField(), buildPermArrPerLevel(), ParaMEDMEM::MEDCouplingFieldDouble::buildSubPart(), ParaMEDMEM::MEDCouplingFieldDouble::changeUnderlyingMesh(), checkAndPreparePermutation(), ParaMEDMEM::MEDCouplingUMesh::checkButterflyCells(), ParaMEDMEM::MEDCouplingUMesh::checkConsecutiveCellTypes(), ParaMEDMEM::MEDCouplingUMesh::checkConsecutiveCellTypesAndOrder(), ParaMEDMEM::MEDFileField1TSWithoutDAS::CheckSBTMesh(), computeOffsets2(), ParaMEDMEM::MEDCouplingUMesh::computeTypes(), ParaMEDMEM::MEDCouplingUMesh::convertExtrudedPolyhedra(), ParaMEDMEM::MEDCouplingUMesh::convertQuadraticCellsToLinear(), convertToDblArr(), ParaMEDMEM::MEDCouplingUMesh::convertToPolyTypes(), deltaShiftIndex(), ParaMEDMEM::MEDCouplingUMesh::findBoundaryNodes(), ParaMEDMEM::MEDCouplingUMesh::findCellsIdsOnBoundary(), ParaMEDMEM::MEDCouplingUMesh::finishInsertingCells(), ParaMEDMEM::MEDCouplingUMesh::FuseUMeshesOnSameCoords(), ParaMEDMEM::MEDCouplingUMesh::getAspectRatioField(), ParaMEDMEM::MEDCouplingUMesh::getBarycenterAndOwner(), ParaMEDMEM::MEDCouplingUMesh::getBoundingBoxForBBTree(), ParaMEDMEM::MEDCouplingUMeshDesc::getCellsInBoundingBox(), ParaMEDMEM::MEDCouplingUMesh::getCellsInBoundingBox(), getDifferentValues(), ParaMEDMEM::MEDCouplingUMesh::getDistributionOfTypes(), ParaMEDMEM::MEDCouplingUMesh::getEdgeRatioField(), ParaMEDMEM::MEDCouplingExtrudedMesh::getMeasureField(), ParaMEDMEM::MEDCouplingUMesh::getMeasureField(), ParaMEDMEM::MEDCouplingUMesh::getMeasureFieldOnNode(), ParaMEDMEM::MEDCouplingUMesh::getNodeIdsOfCell(), ParaMEDMEM::MEDCouplingUMeshDesc::getNumberOfCellsWithType(), ParaMEDMEM::MEDCouplingUMesh::getNumberOfCellsWithType(), ParaMEDMEM::MEDCouplingUMesh::getNumberOfNodesInCell(), ParaMEDMEM::MEDCouplingFieldDiscretizationGauss::getNumberOfTuples(), ParaMEDMEM::MEDCouplingFieldDiscretizationGauss::getOffsetArr(), ParaMEDMEM::MEDCouplingUMesh::getPartBarycenterAndOwner(), ParaMEDMEM::MEDCouplingUMesh::getPartMeasureField(), ParaMEDMEM::MEDCouplingUMesh::getQuadraticStatus(), ParaMEDMEM::MEDCouplingUMesh::getSkewField(), ParaMEDMEM::MEDCouplingUMeshDesc::getTypeOfCell(), ParaMEDMEM::MEDCouplingExtrudedMesh::getTypeOfCell(), ParaMEDMEM::MEDCouplingUMesh::getTypeOfCell(), ParaMEDMEM::MEDCouplingUMesh::getWarpField(), intValue(), invertArrayN2O2O2N(), invertArrayO2N2N2O(), isAllocated(), ParaMEDMEM::MEDCouplingUMesh::isContiguous1D(), isIdentity(), ParaMEDMEM::MEDCouplingUMesh::mergeNodes(), ParaMEDMEM::MEDCouplingUMesh::mergeNodes2(), Multiply(), negate(), ParaMEDMEM::MEDCouplingUMeshCellByTypeIterator::nextt(), ParaMEDMEM::MEDCouplingUMesh::orientCorrectlyPolyhedrons(), ParaMEDMEM::MEDCouplingUMesh::rearrange2ConsecutiveCellTypes(), renumber(), renumberAndReduce(), renumberInPlace(), renumberInPlaceR(), ParaMEDMEM::MEDCouplingUMesh::renumberNodesInConn(), renumberR(), selectByTupleId(), selectByTupleRanges(), ParaMEDMEM::MEDCouplingUMeshDesc::serialize(), ParaMEDMEM::MEDCouplingUMesh::serialize(), ParaMEDMEM::MEDCouplingExtrudedMesh::serialize(), ParaMEDMEM::MEDCouplingUMesh::splitByType(), ParaMEDMEM::MEDCouplingFieldDiscretizationGauss::splitIntoSingleGaussDicrPerCellType(), ParaMEDMEM::MEDCouplingUMeshDesc::unserialization(), ParaMEDMEM::MEDCouplingUMesh::unserialization(), ParaMEDMEM::MEDCouplingExtrudedMesh::unserialization(), ParaMEDMEM::MEDCouplingUMesh::zipCoordsTraducer(), and ParaMEDMEM::MEDCouplingFieldDiscretizationGauss::zipGaussLocalizations().

DataArrayIntIterator * DataArrayInt::iterator ( )
const int* ParaMEDMEM::DataArrayInt::begin ( ) const
const int* ParaMEDMEM::DataArrayInt::end ( ) const
DataArrayInt * DataArrayInt::getIdsEqual ( int  val) const throw (INTERP_KERNEL::Exception)
DataArrayInt * DataArrayInt::getIdsNotEqual ( int  val) const throw (INTERP_KERNEL::Exception)
DataArrayInt * DataArrayInt::getIdsEqualList ( const std::vector< int > &  vals) const throw (INTERP_KERNEL::Exception)

References alloc(), getPointer(), and New().

DataArrayInt * DataArrayInt::getIdsNotEqualList ( const std::vector< int > &  vals) const throw (INTERP_KERNEL::Exception)

References alloc(), getPointer(), and New().

int DataArrayInt::changeValue ( int  oldValue,
int  newValue 
) throw (INTERP_KERNEL::Exception)

This method expects that 'this' is allocated. If not an exception will be thrown. This method expect that the number of components is exactly equal to 1. If not an exception will be thrown. For each element in 'this' equal to 'oldValue' will take the value 'newValue'.

Returns
number of elements impacted by the modification.
bool DataArrayInt::presenceOfValue ( const std::vector< int > &  vals) const throw (INTERP_KERNEL::Exception)

This method expects to be called when number of components of this is equal to one. This method returns true if it exists a tuple so that the value is contained in 'vals'. If not any tuple contains one of the values contained in 'vals' false is returned.

Referenced by ParaMEDMEM::MEDFileUMesh::getFamsNonEmptyLevelsExt().

int DataArrayInt::getMaxValue ( int &  tupleId) const throw (INTERP_KERNEL::Exception)
int DataArrayInt::getMaxValueInArray ( ) const throw (INTERP_KERNEL::Exception)

Idem to DataArrayInt::getMaxValue expect that here number of components can be >=1.

References begin(), checkAllocated(), and end().

int DataArrayInt::getMinValue ( int &  tupleId) const throw (INTERP_KERNEL::Exception)
int DataArrayInt::getMinValueInArray ( ) const throw (INTERP_KERNEL::Exception)

Idem to DataArrayInt::getMinValue expect that here number of components can be >=1.

References begin(), checkAllocated(), and end().

void DataArrayInt::abs ( ) throw (INTERP_KERNEL::Exception)
void DataArrayInt::applyLin ( int  a,
int  b,
int  compoId 
) throw (INTERP_KERNEL::Exception)
void DataArrayInt::applyLin ( int  a,
int  b 
) throw (INTERP_KERNEL::Exception)
void DataArrayInt::applyInv ( int  numerator) throw (INTERP_KERNEL::Exception)

This method applies the operation 'numerator/x' for each element 'x' in 'this'. If there is a value in 'this' exactly equal to 0. an exception is thrown. Warning if presence of null this is modified for each values previous than place where exception was thrown !

DataArrayInt * DataArrayInt::negate ( ) const throw (INTERP_KERNEL::Exception)

This method returns a newly allocated array containing the application of negate on this. This method throws an INTERP_KERNEL::Exception if this is not allocated.

References alloc(), checkAllocated(), ParaMEDMEM::DataArray::copyStringInfoFrom(), getConstPointer(), ParaMEDMEM::DataArray::getNumberOfComponents(), ParaMEDMEM::DataArray::getNumberOfTuples(), getPointer(), and New().

void DataArrayInt::applyDivideBy ( int  val) throw (INTERP_KERNEL::Exception)
void DataArrayInt::applyModulus ( int  val) throw (INTERP_KERNEL::Exception)
void DataArrayInt::applyRModulus ( int  val) throw (INTERP_KERNEL::Exception)

This method applies the operation 'numeratorx' for each element 'x' in 'this'. If there is a value in 'this' exactly equals or lower than 0. an exception is thrown. Warning if presence of null this is modified for each values previous than place where exception was thrown !

DataArrayInt * DataArrayInt::Aggregate ( const DataArrayInt a1,
const DataArrayInt a2,
int  offsetA2 
)
static
DataArrayInt * DataArrayInt::Aggregate ( const std::vector< const DataArrayInt * > &  a) throw (INTERP_KERNEL::Exception)
static
DataArrayInt * DataArrayInt::Meld ( const DataArrayInt a1,
const DataArrayInt a2 
) throw (INTERP_KERNEL::Exception)
static
DataArrayInt * DataArrayInt::Meld ( const std::vector< const DataArrayInt * > &  a) throw (INTERP_KERNEL::Exception)
static

References checkAllocated(), and New().

DataArrayInt * DataArrayInt::MakePartition ( const std::vector< const DataArrayInt * > &  groups,
int  newNb,
std::vector< std::vector< int > > &  fidsOfGroups 
)
static

This method create a minimal partition of groups 'groups' the std::iota array of size 'newNb'. This method returns an array of size 'newNb' that specifies for each item at which familyId it owns to, and this method returns for each group the familyId it contains. If an id so that id<newNb and that appears in no groups will appears with 0 in return array.

Parameters
groupsin arrays specifying ids of each groups.
newNbspecifies size of whole set. Must be at least equal to max eltid in 'groups'.
Returns
an array of size newNb specifying fid of each item.

References alloc(), end(), getPointer(), and New().

Referenced by ParaMEDMEM::MEDFileMesh::setGroupsAtLevel().

DataArrayInt * DataArrayInt::BuildUnion ( const std::vector< const DataArrayInt * > &  a) throw (INTERP_KERNEL::Exception)
static

References alloc(), getPointer(), and New().

DataArrayInt * DataArrayInt::BuildIntersection ( const std::vector< const DataArrayInt * > &  a) throw (INTERP_KERNEL::Exception)
static

References alloc(), getPointer(), and New().

DataArrayInt * DataArrayInt::buildComplement ( int  nbOfElement) const throw (INTERP_KERNEL::Exception)

References alloc(), getPointer(), and New().

DataArrayInt * DataArrayInt::buildSubstraction ( const DataArrayInt other) const throw (INTERP_KERNEL::Exception)

References alloc(), getPointer(), and New().

DataArrayInt * DataArrayInt::buildUnion ( const DataArrayInt other) const throw (INTERP_KERNEL::Exception)
DataArrayInt * DataArrayInt::buildIntersection ( const DataArrayInt other) const throw (INTERP_KERNEL::Exception)
DataArrayInt * DataArrayInt::deltaShiftIndex ( ) const throw (INTERP_KERNEL::Exception)

This method could be usefull for returned DataArrayInt marked as index. Some methods that generate such DataArrayInt instances:

References alloc(), checkAllocated(), getConstPointer(), ParaMEDMEM::DataArray::getNumberOfComponents(), ParaMEDMEM::DataArray::getNumberOfTuples(), getPointer(), and New().

Referenced by ParaMEDMEM::MEDCouplingUMesh::findCellsIdsOnBoundary().

void DataArrayInt::computeOffsets ( ) throw (INTERP_KERNEL::Exception)

This method performs the work on itself. This method works on array with number of component equal to one and allocated. If not an exception is thrown. This method conserves the number of tuples and number of components (1). No reallocation is done. For an array [3,5,1,2,0,8] it becomes [0,3,8,9,11,11]. For each i>0 new[i]=new[i-1]+old[i-1] for i==0 new[i]=0. This could be usefull for allToAllV in MPI with contiguous policy.

References checkAllocated(), ParaMEDMEM::TimeLabel::declareAsNew(), ParaMEDMEM::DataArray::getNumberOfComponents(), ParaMEDMEM::DataArray::getNumberOfTuples(), and getPointer().

void DataArrayInt::computeOffsets2 ( ) throw (INTERP_KERNEL::Exception)

Idem DataArrayInt::computeOffsets method execpt that 'this' changes its number of tuples. After the call in case of success new number of tuples is equal to old number of tuples +1. The content in 'this' for the first old number of tuples is exactly the same than those given by DataArrayInt::computeOffsets method. For an array [3,5,1,2,0,8] it becomes [0,3,8,9,11,11,19].

References checkAllocated(), ParaMEDMEM::CPP_DEALLOC, ParaMEDMEM::TimeLabel::declareAsNew(), getConstPointer(), ParaMEDMEM::DataArray::getNumberOfComponents(), ParaMEDMEM::DataArray::getNumberOfTuples(), and useArray().

DataArrayInt * DataArrayInt::buildExplicitArrByRanges ( const DataArrayInt offsets) const throw (INTERP_KERNEL::Exception)

This method works on array with number of component equal to one and allocated. If not an exception is thrown. 'offsets' should be monotic ascendently. If not, an exception will be thrown. This method retrives a newly created DataArrayInt instance with 1 component and this->getNumberOfTuples()-1 tuples. If 'this' contains [0,2,3] and 'offsets' [0,3,6,10,14,20] the returned array will contain [0,1,2,6,7,8,9,10,11,12,13]

References New().

std::set< int > DataArrayInt::getDifferentValues ( ) const throw (INTERP_KERNEL::Exception)
void DataArrayInt::useArray ( const int *  array,
bool  ownership,
DeallocType  type,
int  nbOfTuple,
int  nbOfCompo 
)
void ParaMEDMEM::DataArrayInt::writeOnPlace ( int  id,
int  element0,
const int *  others,
int  sizeOfOthers 
)

References writeOnPlace().

Referenced by writeOnPlace().

DataArrayInt * DataArrayInt::Add ( const DataArrayInt a1,
const DataArrayInt a2 
) throw (INTERP_KERNEL::Exception)
static
void DataArrayInt::addEqual ( const DataArrayInt other) throw (INTERP_KERNEL::Exception)
DataArrayInt * DataArrayInt::Substract ( const DataArrayInt a1,
const DataArrayInt a2 
) throw (INTERP_KERNEL::Exception)
static
void DataArrayInt::substractEqual ( const DataArrayInt other) throw (INTERP_KERNEL::Exception)
DataArrayInt * DataArrayInt::Multiply ( const DataArrayInt a1,
const DataArrayInt a2 
) throw (INTERP_KERNEL::Exception)
static
void DataArrayInt::multiplyEqual ( const DataArrayInt other) throw (INTERP_KERNEL::Exception)
DataArrayInt * DataArrayInt::Divide ( const DataArrayInt a1,
const DataArrayInt a2 
) throw (INTERP_KERNEL::Exception)
static
void DataArrayInt::divideEqual ( const DataArrayInt other) throw (INTERP_KERNEL::Exception)
DataArrayInt * DataArrayInt::Modulus ( const DataArrayInt a1,
const DataArrayInt a2 
) throw (INTERP_KERNEL::Exception)
static
void DataArrayInt::modulusEqual ( const DataArrayInt other) throw (INTERP_KERNEL::Exception)
void ParaMEDMEM::DataArrayInt::updateTime ( ) const
virtual

nothing to do here because this class does not aggregate any TimeLabel instance.

Implements ParaMEDMEM::TimeLabel.

int * DataArrayInt::CheckAndPreparePermutation ( const int *  start,
const int *  end 
)
static
DataArrayInt * DataArrayInt::Range ( int  begin,
int  end,
int  step 
) throw (INTERP_KERNEL::Exception)
static

References New().

void DataArrayInt::getTinySerializationIntInformation ( std::vector< int > &  tinyInfo) const

Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class. Server side.

References ParaMEDMEM::DataArray::getNumberOfComponents(), ParaMEDMEM::DataArray::getNumberOfTuples(), and isAllocated().

void DataArrayInt::getTinySerializationStrInformation ( std::vector< std::string > &  tinyInfo) const

Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class. Server side.

References ParaMEDMEM::DataArray::getInfoOnComponent(), ParaMEDMEM::DataArray::getName(), ParaMEDMEM::DataArray::getNumberOfComponents(), and isAllocated().

bool DataArrayInt::resizeForUnserialization ( const std::vector< int > &  tinyInfoI)

Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class. This method returns if a feeding is needed.

References alloc().

void DataArrayInt::finishUnserialization ( const std::vector< int > &  tinyInfoI,
const std::vector< std::string > &  tinyInfoS 
)

Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class. This method returns if a feeding is needed.

References ParaMEDMEM::DataArray::getNumberOfComponents(), isAllocated(), ParaMEDMEM::DataArray::setInfoOnComponent(), and ParaMEDMEM::DataArray::setName().

Copyright © 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS