-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2021 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
static MCAuto< typename Traits<T>::ArrayTypeCh > NewFromArray(const T *arrBegin, const T *arrEnd);
std::vector< MCAuto< typename Traits<T>::ArrayTypeCh > > explodeComponents() const;
//
+ void printForDebug(std::ostream& oss) const
+ {
+ this->checkAllocated();
+ char comma[3] = {'\0',' ','\0'};
+ std::for_each(this->begin(),this->end(),[&comma,&oss](const T& elt) { oss << comma << elt; comma[0]=','; } );
+ oss << std::endl;
+ }
std::size_t getHeapMemorySizeWithoutChildren() const;
void updateTime() const { }
//
T getIJ(std::size_t tupleId, std::size_t compoId) const { return _mem[tupleId*_info_on_compo.size()+compoId]; }
void setIJ(std::size_t tupleId, std::size_t compoId, T newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; declareAsNew(); }
void setIJSilent(std::size_t tupleId, std::size_t compoId, T newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; }
- T *getPointer() { return _mem.getPointer(); declareAsNew(); }
+ T *getPointer() { declareAsNew(); return getPointerSilent(); }
+ T *getPointerSilent() { return _mem.getPointer(); }
void pack() const;
bool isAllocated() const override;
void checkAllocated() const;
bool resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI);
void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<std::string>& tinyInfoS);
public:
- template<mcIdType SPACEDIM>
+ template<int SPACEDIM>
void findCommonTuplesAlg(const double *bbox, mcIdType nbNodes, mcIdType limitNodeId, double prec, DataArrayIdType *c, DataArrayIdType *cI) const;
- template<mcIdType SPACEDIM>
+ template<int SPACEDIM>
static void FindClosestTupleIdAlg(const BBTreePts<SPACEDIM,mcIdType>& myTree, double dist, const double *pos, mcIdType nbOfTuples, const double *thisPt, mcIdType thisNbOfTuples, mcIdType *res);
- template<mcIdType SPACEDIM>
+ template<int SPACEDIM>
static void FindTupleIdsNearTuplesAlg(const BBTreePts<SPACEDIM,mcIdType>& myTree, const double *pos, mcIdType nbOfTuples, double eps,
DataArrayIdType *c, DataArrayIdType *cI);
private:
DataArrayInt32 *deepCopy() const;
DataArrayInt32 *copySorted(bool asc=true) const override { return this->copySortedImpl(asc); }
DataArrayInt32 *buildNewEmptyInstance() const { return DataArrayInt32::New(); }
+ MCAuto<DataArrayInt64> convertToInt64Arr() const;
public:
DataArrayInt32 *selectByTupleId(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const { return this->mySelectByTupleId(new2OldBg,new2OldEnd); }
DataArrayInt32 *selectByTupleId(const DataArrayIdType& di) const { return this->mySelectByTupleId(di); }
DataArrayInt64 *deepCopy() const;
DataArrayInt64 *copySorted(bool asc=true) const override { return this->copySortedImpl(asc); }
DataArrayInt64 *buildNewEmptyInstance() const { return DataArrayInt64::New(); }//ok
+ MCAuto<DataArrayInt32> convertToInt32Arr() const;
public:
DataArrayInt64 *selectByTupleId(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const { return this->mySelectByTupleId(new2OldBg,new2OldEnd); }
DataArrayInt64 *selectByTupleId(const DataArrayIdType& di) const { return this->mySelectByTupleId(di); }