Version: 9.12.0
MEDCoupling::DataArrayDouble Class Reference
Inheritance diagram for MEDCoupling::DataArrayDouble:
Collaboration diagram for MEDCoupling::DataArrayDouble:

Public Member Functions

void accumulate (double *res) const
 
double accumulate (std::size_t compId) const
 
DataArrayDoubleaccumulatePerChunck (const mcIdType *bgOfIndex, const mcIdType *endOfIndex) const
 
DataArrayDoubleapplyFunc (const std::string &func, bool isSafe=true) const
 
DataArrayDoubleapplyFunc (std::size_t nbOfComp, const std::string &func, bool isSafe=true) const
 
DataArrayDoubleapplyFunc (std::size_t nbOfComp, FunctionToEvaluate func) const
 
DataArrayDoubleapplyFuncCompo (std::size_t nbOfComp, const std::string &func, bool isSafe=true) const
 
void applyFuncFast32 (const std::string &func)
 
void applyFuncFast64 (const std::string &func)
 
DataArrayDoubleapplyFuncNamedCompo (std::size_t nbOfComp, const std::vector< std::string > &varsOrder, const std::string &func, bool isSafe=true) const
 
void applyFuncOnThis (const std::string &func, bool isSafe=true)
 
void applyInv (double numerator)
 
void applyPow (double val)
 
void applyRPow (double val)
 
bool areIncludedInMe (const DataArrayDouble *other, double prec, DataArrayIdType *&tupleIds) const
 
void asArcOfCircle (double center[2], double &radius, double &ang) const
 
DataArrayDoublebuildEuclidianDistanceDenseMatrix () const
 
DataArrayDoublebuildEuclidianDistanceDenseMatrixWith (const DataArrayDouble *other) const
 
DataArrayDoublebuildNewEmptyInstance () const
 
DataArrayDoublecartesianize (MEDCouplingAxisType atOfThis) const
 
void checkMonotonic (bool increasing, double eps) const
 
void checkNoNullValues () const
 
DataArrayDoublecomputeBBoxPerTuple (double epsilon=0.0) const
 
DataArrayIdType * computeNbOfInteractionsWith (const DataArrayDouble *otherBBoxFrmt, double eps) const
 
void computeTupleIdsNearTuples (const DataArrayDouble *other, double eps, DataArrayIdType *&c, DataArrayIdType *&cI) const
 
DataArrayDoublecopySorted (bool asc=true) const override
 
mcIdType count (double value, double eps) const
 
MCAuto< DataArrayDoublecumSum () const
 
DataArrayDoubledeepCopy () const
 
DataArrayDoubledeterminant () const
 
DataArrayDoubledeviator () const
 
double distanceToTuple (const double *tupleBg, const double *tupleEnd, mcIdType &tupleId) const
 
double doubleValue () const
 
DataArrayDoubledoublyContractedProduct () const
 
DataArrayDoubleeigenValues () const
 
DataArrayDoubleeigenVectors () const
 
DataArrayIdType * findClosestTupleId (const DataArrayDouble *other) const
 
void findCommonTuples (double prec, mcIdType limitTupleId, DataArrayIdType *&comm, DataArrayIdType *&commIndex) const
 
template<int SPACEDIM>
void findCommonTuplesAlg (const double *bbox, mcIdType nbNodes, mcIdType limitNodeId, double prec, DataArrayIdType *c, DataArrayIdType *cI) const
 
DataArrayIdType * findIdsInRange (double vmin, double vmax) const
 
DataArrayIdType * findIdsNotInRange (double vmin, double vmax) const
 
void finishUnserialization (const std::vector< mcIdType > &tinyInfoI, const std::vector< std::string > &tinyInfoS)
 
DataArrayDoublefromCartToCyl () const
 
DataArrayDoublefromCartToCylGiven (const DataArrayDouble *coords, const double center[3], const double vect[3]) const
 
DataArrayDoublefromCartToPolar () const
 
DataArrayDoublefromCartToSpher () const
 
DataArrayDoublefromCylToCart () const
 
DataArrayDoublefromPolarToCart () const
 
DataArrayDoublefromSpherToCart () const
 
double getAverageValue () const
 
std::string getClassName () const override
 
DataArrayDoublegetDifferentValues (double prec, mcIdType limitTupleId=-1) const
 
double getMaxValue2 (DataArrayIdType *&tupleIds) const
 
void getMinMaxPerComponent (double *bounds) const
 
double getMinValue2 (DataArrayIdType *&tupleIds) const
 
void getTinySerializationIntInformation (std::vector< mcIdType > &tinyInfo) const
 
void getTinySerializationStrInformation (std::vector< std::string > &tinyInfo) const
 
DataArrayDoubleinverse () const
 
bool isEqual (const DataArrayDouble &other, double prec) const
 
bool isEqualIfNotWhy (const DataArrayDouble &other, double prec, std::string &reason) const
 
bool isEqualWithoutConsideringStr (const DataArrayDouble &other, double prec) const
 
bool isMonotonic (bool increasing, double eps) const
 
DataArrayDoubleIteratoriterator ()
 
DataArrayDoublekeepSelectedComponents (const std::vector< std::size_t > &compoIds) const
 
DataArrayDoublemagnitude () const
 
DataArrayDoublemaxPerTuple () const
 
DataArrayDoublemaxPerTupleWithCompoId (DataArrayIdType *&compoIdOfMaxPerTuple) const
 
double minimalDistanceTo (const DataArrayDouble *other, mcIdType &thisTupleId, mcIdType &otherTupleId) const
 
DataArrayDoubleminPerTuple () const
 
double norm2 () const
 
double normMax () const
 
void normMaxPerComponent (double *res) const
 
double normMin () const
 
void powEqual (const DataArrayDouble *other)
 
void recenterForMaxPrecision (double eps)
 
void reprCppStream (const std::string &varName, std::ostream &stream) const
 
void reprQuickOverview (std::ostream &stream) const
 
void reprQuickOverviewData (std::ostream &stream, std::size_t maxNbOfByteInRepr) const
 
bool resizeForUnserialization (const std::vector< mcIdType > &tinyInfoI)
 
DataArrayDoubleselectByTupleId (const DataArrayIdType &di) const
 
DataArrayDoubleselectByTupleId (const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const
 
DataArrayDoubleselectByTupleIdSafe (const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const
 
DataArrayDoubleselectByTupleIdSafeSlice (mcIdType bg, mcIdType end2, mcIdType step) const
 
DataArrayDoubleselectByTupleRanges (const std::vector< std::pair< mcIdType, mcIdType > > &ranges) const
 
void setSelectedComponents (const DataArrayDouble *a, const std::vector< std::size_t > &compoIds)
 
void sortPerTuple (bool asc)
 
MCAuto< DataArrayDoublesymmetry3DPlane (const double point[3], const double normalVector[3]) const
 
std::vector< bool > toVectorOfBool (double eps) const
 
DataArrayDoubletrace () const
 
void writeVTK (std::ostream &ofs, mcIdType indent, const std::string &nameInFile, DataArrayByte *byteArr) const
 
- Public Member Functions inherited from MEDCoupling::DataArrayTemplateFP< double >
bool isUniform (double val, double eps) const
 
- Public Member Functions inherited from MEDCoupling::DataArrayTemplateClassic< T >
void abs ()
 
void addEqual (const typename Traits< T >::ArrayType *other)
 
void aggregate (const typename Traits< T >::ArrayType *other)
 
void applyLin (T a, T b)
 
void applyLin (T a, T b, std::size_t compoId)
 
Traits< T >::ArrayType * computeAbs () const
 
MCAuto< DataArrayDoubleconvertToDblArr () const
 
MCAuto< DataArrayFloatconvertToFloatArr () const
 
MCAuto< DataArrayInt64convertToInt64Arr () const
 
MCAuto< DataArrayInt > convertToIntArr () const
 
template<class U >
MCAuto< typename Traits< U >::ArrayType > convertToOtherTypeOfArr () const
 
void divideEqual (const typename Traits< T >::ArrayType *other)
 
Traits< T >::ArrayType * duplicateEachTupleNTimes (mcIdType nbTimes) const
 
MCAuto< DataArrayIdType > findIdsGreaterOrEqualTo (T val) const
 
MCAuto< DataArrayIdType > findIdsGreaterThan (T val) const
 
MCAuto< DataArrayIdType > findIdsLowerOrEqualTo (T val) const
 
MCAuto< DataArrayIdType > findIdsLowerThan (T val) const
 
DataArrayIdType * findIdsStrictlyNegative () const
 
Traits< T >::ArrayType * fromNoInterlace () const
 
void iota (T init=(T) 0)
 
void meldWith (const typename Traits< T >::ArrayType *other)
 
void multiplyEqual (const typename Traits< T >::ArrayType *other)
 
Traits< T >::ArrayType * negate () const
 
Traits< T >::ArrayType * performCopyOrIncrRef (bool dCpy) const
 
std::string repr () const
 
std::string reprNotTooLong () const
 
void reprNotTooLongStream (std::ostream &stream) const
 
void reprNotTooLongWithoutNameStream (std::ostream &stream) const
 
void reprStream (std::ostream &stream) const
 
void reprWithoutNameStream (std::ostream &stream) const
 
std::string reprZip () const
 
void reprZipStream (std::ostream &stream) const
 
void reprZipWithoutNameStream (std::ostream &stream) const
 
void substractEqual (const typename Traits< T >::ArrayType *other)
 
Traits< T >::ArrayType * sumPerTuple () const
 
Traits< T >::ArrayType * toNoInterlace () const
 
- Public Member Functions inherited from MEDCoupling::DataArrayTemplate< T >
MemArray< T > & accessToMemArray ()
 
const MemArray< T > & accessToMemArray () const
 
void alloc (std::size_t nbOfTuple, std::size_t nbOfCompo=1)
 
void allocIfNecessary (std::size_t nbOfTuple, std::size_t nbOfCompo)
 
back () const
 
const T * begin () const
 
Traits< T >::ArrayType * changeNbOfComponents (std::size_t newNbOfComp, T dftValue) const
 
void checkAllocated () const
 
void circularPermutation (mcIdType nbOfShift=1)
 
void circularPermutationPerTuple (mcIdType nbOfShift=1)
 
void deepCopyFrom (const DataArrayTemplate< T > &other)
 
void desallocate ()
 
bool empty () const
 
const T * end () const
 
std::vector< MCAuto< typename Traits< T >::ArrayTypeCh > > explodeComponents () const
 
void fillWithValue (T val)
 
void fillWithZero ()
 
front () const
 
const T * getConstPointer () const
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
getIJ (std::size_t tupleId, std::size_t compoId) const
 
getIJSafe (std::size_t tupleId, std::size_t compoId) const
 
getMaxAbsValue (std::size_t &tupleId) const
 
getMaxAbsValueInArray () const
 
getMaxValue (mcIdType &tupleId) const
 
getMaxValueInArray () const
 
getMinValue (mcIdType &tupleId) const
 
getMinValueInArray () const
 
std::size_t getNbOfElemAllocated () const
 
mcIdType getNbOfElems () const
 
mcIdType getNumberOfTuples () const
 
T * getPointer ()
 
T * getPointerSilent ()
 
void getTuple (mcIdType tupleId, T *res) const
 
void * getVoidStarPointer ()
 
template<class InputIterator >
void insertAtTheEnd (InputIterator first, InputIterator last)
 
bool isAllocated () const override
 
void pack () const
 
popBackSilent ()
 
void printForDebug (std::ostream &oss) const
 
void pushBackSilent (T val)
 
void pushBackValsSilent (const T *valsBg, const T *valsEnd)
 
void reAlloc (std::size_t newNbOfTuple)
 
void rearrange (std::size_t newNbOfCompo)
 
Traits< T >::ArrayType * renumber (const mcIdType *old2New) const
 
Traits< T >::ArrayType * renumberAndReduce (const mcIdType *old2New, mcIdType newNbOfTuple) const
 
void renumberInPlace (const mcIdType *old2New)
 
void renumberInPlaceR (const mcIdType *new2Old)
 
Traits< T >::ArrayType * renumberR (const mcIdType *new2Old) const
 
void reserve (std::size_t nbOfElems)
 
void reverse ()
 
void reversePerTuple ()
 
T * rwBegin ()
 
T * rwEnd ()
 
MCAuto< typename Traits< T >::ArrayTypeCh > selectPartDef (const PartDefinition *pd) const
 
void setContigPartOfSelectedValues (mcIdType tupleIdStart, const DataArray *aBase, const DataArrayIdType *tuplesSelec)
 
void setContigPartOfSelectedValuesSlice (mcIdType tupleIdStart, const DataArray *aBase, mcIdType bg, mcIdType end2, mcIdType step)
 
void setIJ (std::size_t tupleId, std::size_t compoId, T newVal)
 
void setIJSilent (std::size_t tupleId, std::size_t compoId, T newVal)
 
void setPartOfValues1 (const typename Traits< T >::ArrayType *a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp, bool strictCompoCompare=true)
 
void setPartOfValues2 (const typename Traits< T >::ArrayType *a, const mcIdType *bgTuples, const mcIdType *endTuples, const mcIdType *bgComp, const mcIdType *endComp, bool strictCompoCompare=true)
 
void setPartOfValues3 (const typename Traits< T >::ArrayType *a, const mcIdType *bgTuples, const mcIdType *endTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp, bool strictCompoCompare=true)
 
void setPartOfValues4 (const typename Traits< T >::ArrayType *a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, const mcIdType *bgComp, const mcIdType *endComp, bool strictCompoCompare=true)
 
void setPartOfValuesAdv (const typename Traits< T >::ArrayType *a, const DataArrayIdType *tuplesSelec)
 
void setPartOfValuesSimple1 (T a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp)
 
void setPartOfValuesSimple2 (T a, const mcIdType *bgTuples, const mcIdType *endTuples, const mcIdType *bgComp, const mcIdType *endComp)
 
void setPartOfValuesSimple3 (T a, const mcIdType *bgTuples, const mcIdType *endTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp)
 
void setPartOfValuesSimple4 (T a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, const mcIdType *bgComp, const mcIdType *endComp)
 
void sort (bool asc=true)
 
Traits< T >::ArrayType * subArray (mcIdType tupleIdBg, mcIdType tupleIdEnd=-1) const
 
void transpose ()
 
void updateTime () const
 
void useArray (const T *array, bool ownership, DeallocType type, std::size_t nbOfTuple, std::size_t nbOfCompo)
 
void useExternalArrayWithRWAccess (const T *array, std::size_t nbOfTuple, std::size_t nbOfCompo)
 
void writeOnPlace (std::size_t id, T element0, const T *others, mcIdType sizeOfOthers)
 
- Public Member Functions inherited from MEDCoupling::DataArray
bool areInfoEquals (const DataArray &other) const
 
bool areInfoEqualsIfNotWhy (const DataArray &other, std::string &reason) const
 
void checkNbOfComps (std::size_t nbOfCompo, const std::string &msg) const
 
void checkNbOfElems (mcIdType nbOfElems, const std::string &msg) const
 
void checkNbOfTuples (mcIdType nbOfTuples, const std::string &msg) const
 
void checkNbOfTuplesAndComp (const DataArray &other, const std::string &msg) const
 
void checkNbOfTuplesAndComp (mcIdType nbOfTuples, std::size_t nbOfCompo, const std::string &msg) const
 
void copyPartOfStringInfoFrom (const DataArray &other, const std::vector< std::size_t > &compoIds)
 
void copyPartOfStringInfoFrom2 (const std::vector< std::size_t > &compoIds, const DataArray &other)
 
void copyStringInfoFrom (const DataArray &other)
 
std::string cppRepr (const std::string &varName) const
 
std::vector< const BigMemoryObject * > getDirectChildrenWithNull () const
 
std::string getInfoOnComponent (std::size_t i) const
 
std::vector< std::string > & getInfoOnComponents ()
 
const std::vector< std::string > & getInfoOnComponents () const
 
std::string getName () const
 
std::size_t getNumberOfComponents () const
 
std::string getUnitOnComponent (std::size_t i) const
 
std::vector< std::string > getUnitsOnComponent () const
 
std::string getVarOnComponent (std::size_t i) const
 
std::vector< std::string > getVarsOnComponent () const
 
void setInfoAndChangeNbOfCompo (const std::vector< std::string > &info)
 
void setInfoOnComponent (std::size_t i, const std::string &info)
 
void setInfoOnComponents (const std::vector< std::string > &info)
 
void setName (const std::string &name)
 
void setPartOfValuesBase3 (const DataArray *aBase, const mcIdType *bgTuples, const mcIdType *endTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp, bool strictCompoCompare=true)
 
- Public Member Functions inherited from MEDCoupling::RefCountObjectOnly
bool decrRef () const
 
int getRCValue () const
 
void incrRef () const
 
RefCountObjectOnlyoperator= (const RefCountObjectOnly &other)
 
- Public Member Functions inherited from MEDCoupling::BigMemoryObject
std::string debugHeapMemorySize () const
 
std::vector< const BigMemoryObject * > getAllTheProgeny () const
 
std::vector< const BigMemoryObject * > getDirectChildren () const
 
std::size_t getHeapMemorySize () const
 
std::string getHeapMemorySizeStr () const
 
bool isObjectInTheProgeny (const BigMemoryObject *obj) const
 
virtual ~BigMemoryObject ()
 
- Public Member Functions inherited from MEDCoupling::TimeLabel
void declareAsNew () const
 
std::size_t getTimeOfThis () const
 
TimeLabeloperator= (const TimeLabel &other)
 
 TimeLabel (const TimeLabel &other)=default
 

Static Public Member Functions

static DataArrayDoubleAggregate (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
static DataArrayDoubleAggregate (const std::vector< const DataArrayDouble * > &arr)
 
static void ComputeIntegralOfSeg2IntoTri3 (const double seg2[4], const double tri3[6], double coeffs[3], double &length)
 
static DataArrayDoubleCrossProduct (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
static DataArrayDoubleDot (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
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<int SPACEDIM>
static void FindTupleIdsNearTuplesAlg (const BBTreePts< SPACEDIM, mcIdType > &myTree, const double *pos, mcIdType nbOfTuples, double eps, DataArrayIdType *c, DataArrayIdType *cI)
 
static void GiveBaseForPlane (const double normalVector[3], double baseOfPlane[9])
 
static DataArrayDoubleMax (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
static DataArrayDoubleMin (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
static DataArrayDoubleNew ()
 
static DataArrayDoublePow (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
static void Rotate2DAlg (const double *center, double angle, mcIdType nbNodes, const double *coordsIn, double *coordsOut)
 
static void Rotate3DAlg (const double *center, const double *vect, double angle, mcIdType nbNodes, const double *coordsIn, double *coordsOut)
 
static void Symmetry3DPlane (const double point[3], const double normalVector[3], mcIdType nbNodes, const double *coordsIn, double *coordsOut)
 
- Static Public Member Functions inherited from MEDCoupling::DataArrayTemplateClassic< T >
static Traits< T >::ArrayType * Add (const typename Traits< T >::ArrayType *a1, const typename Traits< T >::ArrayType *a2)
 
static Traits< T >::ArrayType * Divide (const typename Traits< T >::ArrayType *a1, const typename Traits< T >::ArrayType *a2)
 
static Traits< T >::ArrayType * Meld (const std::vector< const typename Traits< T >::ArrayType * > &arr)
 
static Traits< T >::ArrayType * Meld (const typename Traits< T >::ArrayType *a1, const typename Traits< T >::ArrayType *a2)
 
static Traits< T >::ArrayType * Multiply (const typename Traits< T >::ArrayType *a1, const typename Traits< T >::ArrayType *a2)
 
static Traits< T >::ArrayType * Substract (const typename Traits< T >::ArrayType *a1, const typename Traits< T >::ArrayType *a2)
 
- Static Public Member Functions inherited from MEDCoupling::DataArrayTemplate< T >
static MCAuto< typename Traits< T >::ArrayTypeCh > NewFromArray (const T *arrBegin, const T *arrEnd)
 
static MCAuto< typename Traits< T >::ArrayTypeCh > NewFromStdVector (const typename std::vector< T > &v)
 
static void SetArrayIn (typename Traits< T >::ArrayType *newArray, typename Traits< T >::ArrayType *&arrayToSet)
 
- Static Public Member Functions inherited from MEDCoupling::DataArray
static DataArrayAggregate (const std::vector< const DataArray * > &arrs)
 
static std::string BuildInfoFromVarAndUnit (const std::string &var, const std::string &unit)
 
static std::string GetAxisTypeRepr (MEDCouplingAxisType at)
 
static mcIdType GetNumberOfItemGivenBES (mcIdType begin, mcIdType end, mcIdType step, const std::string &msg)
 
static mcIdType GetNumberOfItemGivenBESRelative (mcIdType begin, mcIdType end, mcIdType step, const std::string &msg)
 
static mcIdType GetPosOfItemGivenBESRelativeNoThrow (mcIdType value, mcIdType begin, mcIdType end, mcIdType step)
 
static void GetSlice (mcIdType start, mcIdType stop, mcIdType step, mcIdType sliceId, mcIdType nbOfSlices, mcIdType &startSlice, mcIdType &stopSlice)
 
static std::string GetUnitFromInfo (const std::string &info)
 
static std::string GetVarNameFromInfo (const std::string &info)
 
static std::vector< std::string > SplitStringInChuncks (const std::string st, std::size_t sz)
 
- Static Public Member Functions inherited from MEDCoupling::BigMemoryObject
static std::size_t GetHeapMemorySizeOfObjs (const std::vector< const BigMemoryObject * > &objs)
 

Additional Inherited Members

- Public Types inherited from MEDCoupling::DataArrayTemplate< T >
typedef T Type
 
- Protected Member Functions inherited from MEDCoupling::DataArrayTemplateClassic< T >
template<class OP >
MCAuto< DataArrayIdType > findIdsAdv (const OP &op) const
 
- Protected Member Functions inherited from MEDCoupling::DataArrayTemplate< T >
Traits< T >::ArrayTypeCh * copySortedImpl (bool asc) const
 
Traits< T >::ArrayType * myKeepSelectedComponents (const std::vector< std::size_t > &compoIds) const
 
Traits< T >::ArrayType * mySelectByTupleId (const DataArrayIdType &di) const
 
Traits< T >::ArrayType * mySelectByTupleId (const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const
 
Traits< T >::ArrayType * mySelectByTupleIdSafe (const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const
 
Traits< T >::ArrayType * mySelectByTupleIdSafeSlice (mcIdType bg, mcIdType end2, mcIdType step) const
 
Traits< T >::ArrayType * mySelectByTupleRanges (const std::vector< std::pair< mcIdType, mcIdType > > &ranges) const
 
- Protected Member Functions inherited from MEDCoupling::DataArray
 DataArray ()
 
 ~DataArray ()
 
- Protected Member Functions inherited from MEDCoupling::RefCountObject
 RefCountObject ()
 
 RefCountObject (const RefCountObject &other)
 
virtual ~RefCountObject ()
 
- Protected Member Functions inherited from MEDCoupling::RefCountObjectOnly
 RefCountObjectOnly ()
 
 RefCountObjectOnly (const RefCountObjectOnly &other)
 
virtual ~RefCountObjectOnly ()
 
- Protected Member Functions inherited from MEDCoupling::TimeLabel
void forceTimeOfThis (const TimeLabel &other) const
 
 TimeLabel ()
 
void updateTimeWith (const TimeLabel &other) const
 
virtual ~TimeLabel ()
 
- Static Protected Member Functions inherited from MEDCoupling::DataArrayTemplateClassic< T >
static Traits< T >::ArrayType * PerformCopyOrIncrRef (bool dCpy, const typename Traits< T >::ArrayType &self)
 
- Static Protected Member Functions inherited from MEDCoupling::DataArray
static void CheckClosingParInRange (mcIdType ref, mcIdType value, const std::string &msg)
 
static void CheckValueInRange (mcIdType ref, mcIdType value, const std::string &msg)
 
static void CheckValueInRangeEx (mcIdType value, mcIdType start, mcIdType end, const std::string &msg)
 
static mcIdType EffectiveCircPerm (mcIdType nbOfShift, mcIdType nbOfTuples)
 
- Protected Attributes inherited from MEDCoupling::DataArrayTemplate< T >
MemArray< T > _mem
 
- Protected Attributes inherited from MEDCoupling::DataArray
std::vector< std::string > _info_on_compo
 
std::string _name
 

Member Function Documentation

◆ New()

DataArrayDouble * DataArrayDouble::New ( )
static

Returns a new instance of DataArrayDouble. The caller is to delete this array using decrRef() as it is no more needed.

Referenced by accumulatePerChunck(), Aggregate(), applyFunc(), applyFuncNamedCompo(), MEDCoupling::MEDCouplingUMesh::Build1DMeshFromCoords(), MEDCoupling::MEDCouplingAMRAttribute::buildCellFieldOnWithoutGhost(), MEDCoupling::MEDCouplingUMesh::buildDirectionVectorField(), buildEuclidianDistanceDenseMatrix(), buildEuclidianDistanceDenseMatrixWith(), buildNewEmptyInstance(), MEDCoupling::MEDCouplingCurveLinearMesh::buildOrthogonalField(), MEDCoupling::MEDCouplingStructuredMesh::buildOrthogonalField(), MEDCoupling::MEDCouplingUMesh::buildOrthogonalField(), MEDCoupling::MEDCouplingUMesh::buildPartOrthogonalField(), MEDCoupling::MEDCouplingGaussLocalization::buildRefCell(), MEDCoupling::MEDCoupling1SGTUMesh::buildSetInstanceFromThis(), MEDCoupling::MEDCoupling1DGTUMesh::buildSetInstanceFromThis(), MEDCoupling::MEDCouplingUMesh::buildSetInstanceFromThis(), MEDCoupling::MEDCouplingUMesh::clipSingle3DCellByPlane(), computeBBoxPerTuple(), MEDCoupling::MEDCouplingCMesh::computeCellCenterOfMass(), MEDCoupling::MEDCouplingCurveLinearMesh::computeCellCenterOfMass(), MEDCoupling::MEDCouplingIMesh::computeCellCenterOfMass(), MEDCoupling::MEDCouplingUMesh::computeCellCenterOfMass(), MEDCoupling::MEDCoupling1SGTUMesh::computeDiameterField(), MEDCoupling::MEDCouplingUMesh::computeDiameterField(), MEDCoupling::MEDCouplingFieldDiscretizationKriging::computeEvaluationMatrixOnGivenPts(), MEDCoupling::MEDCouplingFieldDiscretizationKriging::computeInverseMatrix(), MEDCoupling::MEDCoupling1SGTUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCoupling1DGTUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCouplingUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCouplingMesh::computeMeshCenterOfMass(), MEDCoupling::MEDCouplingUMesh::computePlaneEquationOf3DFaces(), MEDCoupling::MEDCoupling1SGTUMesh::computeTriangleHeight(), MEDCoupling::MEDCouplingFieldDiscretizationKriging::computeVectorOfCoefficients(), MEDCoupling::MEDCouplingIMesh::convertToCartesian(), MEDCoupling::MEDCouplingCartesianAMRMeshGen::createCellFieldOnPatch(), CrossProduct(), cumSum(), determinant(), deviator(), MEDCoupling::MEDCouplingUMesh::distanceToPoint(), MEDCoupling::MEDCouplingUMesh::distanceToPoints(), Dot(), doublyContractedProduct(), eigenValues(), eigenVectors(), MEDCoupling::MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom(), fromCartToCyl(), fromCartToCylGiven(), fromCartToPolar(), fromCartToSpher(), fromCylToCart(), fromPolarToCart(), fromSpherToCart(), MEDCoupling::MEDCouplingUMesh::getAspectRatioField(), MEDCoupling::MEDCoupling1SGTUMesh::getBoundingBoxForBBTree(), MEDCoupling::MEDCoupling1DGTUMesh::getBoundingBoxForBBTree(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTreeFast(), MEDCoupling::MEDCouplingCMesh::getCoordinatesAndOwner(), MEDCoupling::MEDCouplingIMesh::getCoordinatesAndOwner(), MEDCoupling::MEDCouplingMappedExtrudedMesh::getCoordinatesAndOwner(), MEDCoupling::MEDCouplingGaussLocalization::GetDefaultReferenceCoordinatesOf(), MEDCoupling::MEDCouplingGaussLocalization::getDerivativeOfShapeFunctionValues(), MEDCoupling::MEDCouplingUMesh::getEdgeRatioField(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getLocalizationOfDiscValues(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::getLocalizationOfDiscValues(), MEDCoupling::MEDCouplingCMesh::getMeasureField(), MEDCoupling::MEDCouplingIMesh::getMeasureField(), MEDCoupling::MEDCouplingUMesh::getMeasureField(), MEDCoupling::MEDCouplingMappedExtrudedMesh::getMeasureField(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getMeasureField(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::getMeasureField(), MEDCoupling::MEDCouplingUMesh::getMeasureFieldOnNode(), MEDCoupling::MEDCouplingPointSet::getNodeIdsNearPoints(), MEDCoupling::MEDCouplingUMesh::getPartBarycenterAndOwner(), MEDCoupling::MEDCouplingUMesh::getPartMeasureField(), MEDCoupling::MEDCouplingGaussLocalization::getShapeFunctionValues(), MEDCoupling::MEDCouplingUMesh::getSkewField(), MEDCoupling::MEDCouplingFieldDiscretizationP0::getValueOnMulti(), MEDCoupling::MEDCouplingFieldDiscretizationP1::getValueOnMulti(), MEDCoupling::MEDCouplingFieldDiscretizationKriging::getValueOnMulti(), MEDCoupling::MEDCouplingUMesh::getWarpField(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshes(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshWith1DLine(), inverse(), MEDCoupling::MEDCouplingGaussLocalization::localizePtsInRefCooForEachCell(), magnitude(), Max(), maxPerTupleWithCompoId(), Min(), MEDCoupling::MEDCouplingFieldDouble::nodeToCellDiscretization(), MEDCoupling::ParaFIELD::ParaFIELD(), MEDCoupling::MEDCouplingFieldDiscretizationKriging::performDrift(), MEDCoupling::MEDCouplingFieldDiscretizationKriging::PerformDriftOfVec(), MEDCoupling::MEDCouplingFieldDiscretizationKriging::PerformDriftRect(), Pow(), MEDCoupling::MEDCouplingPointSet::renumberNodesCenter(), MEDCoupling::MEDCouplingMappedExtrudedMesh::resizeForUnserialization(), MEDCoupling::MEDCouplingTwoTimeSteps::resizeForUnserialization(), MEDCoupling::MEDCouplingRemapper::reverseTransfer(), MEDCoupling::MEDCoupling1SGTUMesh::serialize(), MEDCoupling::MEDCoupling1DGTUMesh::serialize(), MEDCoupling::MEDCouplingCMesh::serialize(), MEDCoupling::MEDCouplingCurveLinearMesh::serialize(), MEDCoupling::MEDCouplingIMesh::serialize(), MEDCoupling::MEDCouplingMappedExtrudedMesh::serialize(), MEDCoupling::MEDCouplingTimeDiscretization::setOrCreateUniformValueOnAllComponents(), MEDCoupling::MEDCouplingTimeDiscretization::setUniformValue(), MEDCoupling::MEDCouplingUMesh::SimplifyPolyhedronCell(), symmetry3DPlane(), MEDCoupling::MEDCouplingUMesh::tetrahedrize(), trace(), MEDCoupling::MEDCoupling1SGTUMesh::unserialization(), MEDCoupling::MEDCoupling1DGTUMesh::unserialization(), MEDCoupling::MEDCouplingCMesh::unserialization(), MEDCoupling::MEDCouplingCurveLinearMesh::unserialization(), MEDCoupling::MEDCouplingMappedExtrudedMesh::unserialization(), and MEDCoupling::MEDCouplingAMRAttribute::writeVTHB().

◆ doubleValue()

double DataArrayDouble::doubleValue ( ) const

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.

Returns
double - the sole value stored in this array.
Exceptions
Ifat least one of conditions stated above is not fulfilled.

References MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArrayTemplate< T >::getNbOfElems(), and MEDCoupling::DataArrayTemplate< T >::isAllocated().

◆ deepCopy()

DataArrayDouble * DataArrayDouble::deepCopy ( ) const
virtual

◆ copySorted()

DataArrayDouble* MEDCoupling::DataArrayDouble::copySorted ( bool  asc = true) const
overridevirtual

◆ getClassName()

std::string MEDCoupling::DataArrayDouble::getClassName ( ) const
overridevirtual

Reimplemented from MEDCoupling::BigMemoryObject.

◆ buildNewEmptyInstance()

DataArrayDouble* MEDCoupling::DataArrayDouble::buildNewEmptyInstance ( ) const
virtual

Implements MEDCoupling::DataArray.

References New().

◆ checkMonotonic()

void DataArrayDouble::checkMonotonic ( bool  increasing,
double  eps 
) const

Checks that this array is consistently increasing or decreasing in value, with at least absolute difference value of |eps| at each step. If not an exception is thrown.

Parameters
[in]increasing- if true, the array values should be increasing.
[in]eps- minimal absolute difference between the neighbor values at which the values are considered different.
Exceptions
Ifsequence of values is not strictly monotonic in agreement with increasing arg.
Ifthis->getNumberOfComponents() != 1.
Ifthis is not allocated.

References isMonotonic().

Referenced by MEDCoupling::MEDCouplingCMesh::checkConsistency().

◆ isMonotonic()

bool DataArrayDouble::isMonotonic ( bool  increasing,
double  eps 
) const

Checks that this array is consistently increasing or decreasing in value, with at least absolute difference value of |eps| at each step.

Parameters
[in]increasing- if true, array values should be increasing.
[in]eps- minimal absolute difference between the neighbor values at which the values are considered different.
Returns
bool - true if values change in accordance with increasing arg.
Exceptions
Ifthis->getNumberOfComponents() != 1.
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

Referenced by checkMonotonic().

◆ writeVTK()

◆ reprCppStream()

◆ reprQuickOverview()

void DataArrayDouble::reprQuickOverview ( std::ostream &  stream) const
virtual

◆ reprQuickOverviewData()

◆ isEqual()

bool DataArrayDouble::isEqual ( const DataArrayDouble other,
double  prec 
) const

Checks if this and another DataArrayDouble are fully equal. For more info see Compare DataArrays.

Parameters
[in]other- an instance of DataArrayDouble to compare with this one.
[in]prec- precision value to compare numeric data of the arrays.
Returns
bool - true if the two arrays are equal, false else.

References isEqualIfNotWhy().

Referenced by MEDCoupling::MEDFileUMesh::isEqual().

◆ isEqualIfNotWhy()

bool DataArrayDouble::isEqualIfNotWhy ( const DataArrayDouble other,
double  prec,
std::string &  reason 
) const

Equivalent to DataArrayDouble::isEqual except that if false the reason of mismatch is given.

Parameters
[in]otherthe instance to be compared with this
[in]precthe precision to compare numeric data of the arrays.
[out]reasonIn case of inequality returns the reason.
See also
DataArrayDouble::isEqual

References MEDCoupling::DataArrayTemplate< T >::_mem, and MEDCoupling::DataArray::areInfoEqualsIfNotWhy().

Referenced by MEDCoupling::MEDCouplingPointSet::areCoordsEqualIfNotWhy(), isEqual(), and MEDCoupling::MEDCouplingTwoTimeSteps::isEqualIfNotWhy().

◆ isEqualWithoutConsideringStr()

bool DataArrayDouble::isEqualWithoutConsideringStr ( const DataArrayDouble other,
double  prec 
) const

Checks if values of this and another DataArrayDouble are equal. For more info see Compare DataArrays.

Parameters
[in]other- an instance of DataArrayDouble to compare with this one.
[in]prec- precision value to compare numeric data of the arrays.
Returns
bool - true if the values of two arrays are equal, false else.

References MEDCoupling::DataArrayTemplate< T >::_mem.

Referenced by MEDCoupling::MEDCouplingPointSet::areCoordsEqualWithoutConsideringStr(), MEDCoupling::MEDCouplingTwoTimeSteps::isEqualWithoutConsideringStr(), MEDCoupling::MEDCouplingPointSet::tryToShareSameCoords(), and WriteFieldT().

◆ selectByTupleId() [1/2]

DataArrayDouble* MEDCoupling::DataArrayDouble::selectByTupleId ( const mcIdType *  new2OldBg,
const mcIdType *  new2OldEnd 
) const
virtual

◆ selectByTupleId() [2/2]

DataArrayDouble* MEDCoupling::DataArrayDouble::selectByTupleId ( const DataArrayIdType &  di) const

◆ selectByTupleIdSafe()

◆ keepSelectedComponents()

DataArrayDouble* MEDCoupling::DataArrayDouble::keepSelectedComponents ( const std::vector< std::size_t > &  compoIds) const
virtual

◆ selectByTupleIdSafeSlice()

DataArrayDouble* MEDCoupling::DataArrayDouble::selectByTupleIdSafeSlice ( mcIdType  bg,
mcIdType  end2,
mcIdType  step 
) const
virtual

◆ selectByTupleRanges()

DataArrayDouble* MEDCoupling::DataArrayDouble::selectByTupleRanges ( const std::vector< std::pair< mcIdType, mcIdType > > &  ranges) const
virtual

◆ areIncludedInMe()

bool DataArrayDouble::areIncludedInMe ( const DataArrayDouble other,
double  prec,
DataArrayIdType *&  tupleIds 
) const

This method checks that all tuples in other are in this. If true, the output param tupleIds contains the tuples ids of this that correspond to tupes in this. For each i in [ 0 , other->getNumberOfTuples() ) tuple #i in other is equal ( regarding input precision prec ) to tuple tupleIds[i] in this.

Parameters
[in]other- the array having the same number of components than this.
[out]tupleIds- the tuple ids containing the same number of tuples than other has.
See also
DataArrayDouble::findCommonTuples

References Aggregate(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

Referenced by MEDCoupling::MEDFileUMesh::quadraticToLinear().

◆ findCommonTuples()

void DataArrayDouble::findCommonTuples ( double  prec,
mcIdType  limitTupleId,
DataArrayIdType *&  comm,
DataArrayIdType *&  commIndex 
) const

Searches for tuples coincident within prec tolerance. Each tuple is considered as coordinates of a point in getNumberOfComponents()-dimensional space. The distance separating two points is computed with the infinite norm.

Indices of coincident tuples are stored in output arrays. A pair of arrays (comm, commIndex) is called "Surjective Format 2".

This method is typically used by MEDCouplingPointSet::findCommonNodes() and MEDCouplingUMesh::mergeNodes().

Parameters
[in]prec- minimal absolute distance between two tuples (infinite norm) at which they are considered not coincident.
[in]limitTupleId- limit tuple id. If all tuples within a group of coincident tuples have id strictly lower than limitTupleId then they are not returned.
[out]comm- the array holding ids (== indices) of coincident tuples. comm->getNumberOfComponents() == 1. comm->getNumberOfTuples() == commIndex->back().
[out]commIndex- the array dividing all indices stored in comm into groups of (indices of) coincident tuples. Its every value is a tuple index where a next group of tuples begins. For example the second group of tuples in comm is described by following range of indices: [ commIndex[1], commIndex[2] ). commIndex->getNumberOfTuples()-1 gives the number of groups of coincident tuples.
Exceptions
Ifthis is not allocated.
Ifthe number of components is not in [1,2,3,4].

Here is a C++ example.

Here is a Python example.

See also
DataArrayInt::ConvertIndexArrayToO2N(), DataArrayDouble::areIncludedInMe

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

Referenced by MEDCoupling::MEDCouplingPointSet::findCommonNodes(), getDifferentValues(), and MEDCoupling::MEDCouplingUMesh::MergeNodesOnUMeshesSharingSameCoords().

◆ minimalDistanceTo()

double DataArrayDouble::minimalDistanceTo ( const DataArrayDouble other,
mcIdType &  thisTupleId,
mcIdType &  otherTupleId 
) const

This methods returns the minimal distance between the two set of points this and other. So this and other have to have the same number of components. If not an INTERP_KERNEL::Exception will be thrown. This method works only if number of components of this (equal to those of other) is in 1, 2 or 3.

Parameters
[out]thisTupleIdthe tuple id in this corresponding to the returned minimal distance
[out]otherTupleIdthe tuple id in other corresponding to the returned minimal distance
Returns
the minimal distance between the two set of points this and other.
See also
DataArrayDouble::findClosestTupleId

References MEDCoupling::DataArrayTemplate< T >::begin(), findClosestTupleId(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

◆ getDifferentValues()

DataArrayDouble * DataArrayDouble::getDifferentValues ( double  prec,
mcIdType  limitTupleId = -1 
) const

Returns a copy of this array by excluding coincident tuples. Each tuple is considered as coordinates of a point in getNumberOfComponents()-dimensional space. The distance between tuples is computed using norm2. If several tuples are not far each from other than prec, only one of them remains in the result array. The order of tuples in the result array is same as in this one except that coincident tuples are excluded.

Parameters
[in]prec- minimal absolute distance between two tuples at which they are considered not coincident.
[in]limitTupleId- limit tuple id. If all tuples within a group of coincident tuples have id strictly lower than limitTupleId then they are not excluded.
Returns
DataArrayDouble * - the new instance of DataArrayDouble that the caller is to delete using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
Ifthe number of components is not in [1,2,3,4].

Here is a Python example.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), findCommonTuples(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< T >::renumberAndReduce().

◆ findClosestTupleId()

DataArrayIdType * DataArrayDouble::findClosestTupleId ( const DataArrayDouble other) const

This methods returns for each tuple in other which tuple in this is the closest. So this and other have to have the same number of components. If not an INTERP_KERNEL::Exception will be thrown. This method works only if number of components of this (equal to those of other) is in 1, 2 or 3.

Returns
a newly allocated (new object to be dealt by the caller) DataArrayInt having other->getNumberOfTuples() tuples and one components.
See also
DataArrayDouble::minimalDistanceTo

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), getMinMaxPerComponent(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

Referenced by minimalDistanceTo().

◆ computeNbOfInteractionsWith()

DataArrayIdType * DataArrayDouble::computeNbOfInteractionsWith ( const DataArrayDouble otherBBoxFrmt,
double  eps 
) const

This method expects that this and otherBBoxFrmt arrays are bounding box arrays ( as the output of MEDCouplingPointSet::getBoundingBoxForBBTree method ). This method will return a DataArrayInt array having the same number of tuples than this. This returned array tells for each cell in this how many bounding boxes in otherBBoxFrmt. So, this method expects that this and otherBBoxFrmt have the same number of components.

Parameters
[in]otherBBoxFrmt- It is an array .
[in]eps- the absolute precision of the detection. when eps < 0 the bboxes are enlarged so more interactions are detected. Inversely when > 0 the bboxes are stretched.
See also
MEDCouplingPointSet::getBoundingBoxForBBTree
Exceptions
Ifthis and otherBBoxFrmt have not the same number of components.
Ifthis and otherBBoxFrmt number of components is not even (BBox format).

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< T >::isAllocated().

◆ setSelectedComponents()

void DataArrayDouble::setSelectedComponents ( const DataArrayDouble a,
const std::vector< std::size_t > &  compoIds 
)

Copy all components in a specified order from another DataArrayDouble. Both numerical and textual data is copied. The number of tuples in this and the other array can be different.

Parameters
[in]a- the array to copy data from.
[in]compoIds- sequence of zero based indices of components, data of which is to be copied.
Exceptions
Ifa is NULL.
IfcompoIds.size() != a->getNumberOfComponents().
IfcompoIds[i] < 0 or compoIds[i] > this->getNumberOfComponents().

Here is a Python example.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::copyPartOfStringInfoFrom2(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< T >::getPointer().

◆ iterator()

DataArrayDoubleIterator * DataArrayDouble::iterator ( )

◆ checkNoNullValues()

void DataArrayDouble::checkNoNullValues ( ) const

Checks if 0.0 value is present in this array. If it is the case, an exception is thrown.

Exceptions
Ifzero is found in this array.

References MEDCoupling::DataArrayTemplate< T >::getConstPointer(), and MEDCoupling::DataArrayTemplate< T >::getNbOfElems().

◆ getMinMaxPerComponent()

void DataArrayDouble::getMinMaxPerComponent ( double *  bounds) const

Computes minimal and maximal value in each component. An output array is filled with 2 * this->getNumberOfComponents() values, so the caller is to allocate enough memory before calling this method.

Parameters
[out]bounds- array of size at least 2 *this->getNumberOfComponents(). It is filled as follows:
bounds[0] = min_of_component_0
bounds[1] = max_of_component_0
bounds[2] = min_of_component_1
bounds[3] = max_of_component_1
...

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

Referenced by findClosestTupleId(), MEDCoupling::MEDCouplingCurveLinearMesh::getBoundingBox(), MEDCoupling::MEDCouplingPointSet::getBoundingBox(), and recenterForMaxPrecision().

◆ computeBBoxPerTuple()

DataArrayDouble * DataArrayDouble::computeBBoxPerTuple ( double  epsilon = 0.0) const

This method retrieves a newly allocated DataArrayDouble instance having same number of tuples than this and twice number of components than this to store both the min and max per component of each tuples.

Parameters
[in]epsilonthe width of the bbox (identical in each direction) - 0.0 by default
Returns
a newly created DataArrayDouble instance having this->getNumberOfTuples() tuples and 2 * this->getNumberOfComponent() components
Exceptions
Ifthis is not allocated yet.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

◆ computeTupleIdsNearTuples()

void DataArrayDouble::computeTupleIdsNearTuples ( const DataArrayDouble other,
double  eps,
DataArrayIdType *&  c,
DataArrayIdType *&  cI 
) const

For each tuples t in other, this method retrieves tuples in this that are equal to t. Two tuples are considered equal if the euclidian distance between the two tuples is lower than eps.

Parameters
[in]othera DataArrayDouble having same number of components than this.
[in]epsabsolute precision representing distance (using infinite norm) between 2 tuples behind which 2 tuples are considered equal.
[out]cwill contain the set of tuple ids in this that are equal to to the tuple ids in other contiguously. cI allows to extract information in c.
[out]cIis an indirection array that allows to extract the data contained in c.
Exceptions
Incase of:
  • this is not allocated
  • other is not allocated or null
  • this and other do not have the same number of components
  • if number of components of this is not in [1,2,3]
See also
MEDCouplingPointSet::getNodeIdsNearPoints, DataArrayDouble::getDifferentValues

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

Referenced by MEDCoupling::MEDCouplingPointSet::getNodeIdsNearPoints().

◆ recenterForMaxPrecision()

void DataArrayDouble::recenterForMaxPrecision ( double  eps)

This method recenter tuples in this in order to be centered at the origin to benefit about the advantages of maximal precision to be around the box around origin of 'radius' 1.

Parameters
[in]epsabsolute epsilon. under that value of delta between max and min no scale is performed.

References MEDCoupling::DataArrayTemplateClassic< T >::applyLin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), getMinMaxPerComponent(), and MEDCoupling::DataArray::getNumberOfComponents().

Referenced by MEDCoupling::MEDCouplingPointSet::recenterForMaxPrecision(), and MEDCoupling::MEDCouplingUMesh::simplifyPolyhedra().

◆ getMaxValue2()

double DataArrayDouble::getMaxValue2 ( DataArrayIdType *&  tupleIds) const

Returns the maximal value and all its locations within this one-dimensional array.

Parameters
[out]tupleIds- a new instance of DataArrayInt containing indices of tuples holding the maximal value. The caller is to delete it using decrRef() as it is no more needed.
Returns
double - the maximal value among all values of this array.
Exceptions
Ifthis->getNumberOfComponents() != 1
Ifthis->getNumberOfTuples() < 1

References findIdsInRange(), and MEDCoupling::DataArrayTemplate< T >::getMaxValue().

◆ getMinValue2()

double DataArrayDouble::getMinValue2 ( DataArrayIdType *&  tupleIds) const

Returns the minimal value and all its locations within this one-dimensional array.

Parameters
[out]tupleIds- a new instance of DataArrayInt containing indices of tuples holding the minimal value. The caller is to delete it using decrRef() as it is no more needed.
Returns
double - the minimal value among all values of this array.
Exceptions
Ifthis->getNumberOfComponents() != 1
Ifthis->getNumberOfTuples() < 1

References findIdsInRange(), and MEDCoupling::DataArrayTemplate< T >::getMinValue().

◆ count()

mcIdType DataArrayDouble::count ( double  value,
double  eps 
) const

This method returns the number of values in this that are equals ( within an absolute precision of eps ) to input parameter value. This method only works for single component array.

Returns
a value in [ 0, this->getNumberOfTuples() )
Exceptions
Ifthis is not allocated

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

◆ getAverageValue()

double DataArrayDouble::getAverageValue ( ) const

Returns the average value of this one-dimensional array.

Returns
double - the average value over all values of this array.
Exceptions
Ifthis->getNumberOfComponents() != 1
Ifthis->getNumberOfTuples() < 1

References MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

◆ norm2()

double DataArrayDouble::norm2 ( ) const

Returns the Euclidean norm of the vector defined by this array.

Returns
double - the value of the Euclidean norm, i.e. the square root of the inner product of vector.
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), and MEDCoupling::DataArrayTemplate< T >::getNbOfElems().

◆ normMax()

double DataArrayDouble::normMax ( ) const

Returns the maximum norm of the vector defined by this array. This method works even if the number of components is different from one. If the number of elements in this is 0, -1. is returned.

Returns
double - the value of the maximum norm, i.e. the maximal absolute value among values of this array (whatever its number of components).
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), and MEDCoupling::DataArrayTemplate< T >::getNbOfElems().

◆ normMaxPerComponent()

void DataArrayDouble::normMaxPerComponent ( double *  res) const

Returns the maximum norm of for each component of this array. If the number of elements in this is 0, -1. is returned.

Parameters
[out]res- pointer to an array of result values, of size at least this->getNumberOfComponents(), that is to be allocated by the caller.
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

◆ normMin()

double DataArrayDouble::normMin ( ) const

Returns the minimum norm (absolute value) of the vector defined by this array. This method works even if the number of components is different from one. If the number of elements in this is 0, std::numeric_limits<double>::max() is returned.

Returns
double - the value of the minimum norm, i.e. the minimal absolute value among values of this array (whatever its number of components).
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), and MEDCoupling::DataArrayTemplate< T >::getNbOfElems().

◆ accumulate() [1/2]

void DataArrayDouble::accumulate ( double *  res) const

Accumulates values of each component of this array.

Parameters
[out]res- an array of length this->getNumberOfComponents(), allocated by the caller, that is filled by this method with sum value for each component.
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

◆ accumulate() [2/2]

double DataArrayDouble::accumulate ( std::size_t  compId) const

Accumulate values of the given component of this array.

Parameters
[in]compId- the index of the component of interest.
Returns
double - a sum value of compId-th component.
Exceptions
Ifthis is not allocated.
Ifthe condition ( 0 <= compId < this->getNumberOfComponents() ) is not respected.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

◆ accumulatePerChunck()

DataArrayDouble * DataArrayDouble::accumulatePerChunck ( const mcIdType *  bgOfIndex,
const mcIdType *  endOfIndex 
) const

This method accumulate using addition tuples in this using input index array [ bgOfIndex, endOfIndex ). The returned array will have same number of components than this and number of tuples equal to std::distance(bgOfIndex,endOfIndex) minus one.

The input index array is expected to be ascendingly sorted in which the all referenced ids should be in [0, this->getNumberOfTuples). This method is quite useful for users that need to put a field on cells to field on nodes on the same mesh without a need of conservation.

Parameters
[in]bgOfIndex- begin (included) of the input index array.
[in]endOfIndex- end (excluded) of the input index array.
Returns
DataArrayDouble * - the new instance having the same number of components than this.
Exceptions
IfbgOfIndex or end is NULL.
Ifinput index array is not ascendingly sorted.
Ifthere is an id in [ bgOfIndex, endOfIndex ) not in [0, this->getNumberOfTuples).
Ifstd::distance(bgOfIndex,endOfIndex)==0.

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

◆ cumSum()

MCAuto< DataArrayDouble > DataArrayDouble::cumSum ( ) const

This method is close to numpy cumSum except that number of element is equal to this->getNumberOfTuples()+1. First element of DataArray returned is equal to 0. This method expects that this as only one component. The returned array will have this->getNumberOfTuples()+1 tuple with also one component. The ith element of returned array is equal to the sum of elements in this with rank strictly lower than i.

Returns
DataArrayDouble - A newly built array containing cum sum of this.

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::checkNbOfComps(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

◆ distanceToTuple()

double DataArrayDouble::distanceToTuple ( const double *  tupleBg,
const double *  tupleEnd,
mcIdType &  tupleId 
) const

This method returns the min distance from an external tuple defined by [ tupleBg , tupleEnd ) to this and the first tuple in this that matches the returned distance. If there is no tuples in this an exception will be thrown.

this is expected to be allocated and expected to have a number of components equal to the distance from tupleBg to tupleEnd. If not an exception will be thrown.

Parameters
[in]tupleBgstart pointer (included) of input external tuple
[in]tupleEndend pointer (not included) of input external tuple
[out]tupleIdthe tuple id in this that matches the min of distance between this and input external tuple
Returns
the min distance.
See also
MEDCouplingUMesh::distanceToPoint

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

◆ fromPolarToCart()

DataArrayDouble * DataArrayDouble::fromPolarToCart ( ) const

Converts each 2D point defined by the tuple of this array from the Polar to the Cartesian coordinate system. The two components of the tuple of this array are considered to contain (1) radius and (2) angle of the point in the Polar CS.

Returns
DataArrayDouble * - the new instance of DataArrayDouble, whose each tuple contains X and Y coordinates of the point in the Cartesian CS. The caller is to delete this array using decrRef() as it is no more needed. The array does not contain any textual info on components.
Exceptions
Ifthis->getNumberOfComponents() != 2.
See also
fromCartToPolar

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

Referenced by cartesianize().

◆ fromCylToCart()

DataArrayDouble * DataArrayDouble::fromCylToCart ( ) const

Converts each 3D point defined by the tuple of this array from the Cylindrical to the Cartesian coordinate system. The three components of the tuple of this array are considered to contain (1) radius, (2) azimuth and (3) altitude of the point in the Cylindrical CS.

Returns
DataArrayDouble * - the new instance of DataArrayDouble, whose each tuple contains X, Y and Z coordinates of the point in the Cartesian CS. The info on the third component is copied from this array. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 3.
See also
fromCartToCyl

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getInfoOnComponent(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::DataArray::setInfoOnComponent().

Referenced by cartesianize().

◆ fromSpherToCart()

DataArrayDouble * DataArrayDouble::fromSpherToCart ( ) const

Converts each 3D point defined by the tuple of this array from the Spherical to the Cartesian coordinate system. The three components of the tuple of this array are considered to contain (1) radius, (2) polar angle and (3) azimuthal angle of the point in the Cylindrical CS.

Returns
DataArrayDouble * - the new instance of DataArrayDouble, whose each tuple contains X, Y and Z coordinates of the point in the Cartesian CS. The info on the third component is copied from this array. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 3.
See also
fromCartToSpher

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

Referenced by cartesianize().

◆ cartesianize()

DataArrayDouble * DataArrayDouble::cartesianize ( MEDCouplingAxisType  atOfThis) const

This method returns a new array containing the same number of tuples than this. To do this, this method needs at parameter to specify the convention of this. All the tuples of the returned array will be in cartesian sense. So if at equals to AX_CART the returned array is basically a deep copy of this. If at equals to AX_CYL the returned array will be the result of operation cylindric to cartesian of this...

Parameters
[in]atOfThis- The axis type of this.
Returns
DataArrayDouble * - the new instance of DataArrayDouble (that must be dealed by caller) containing the result of the cartesianizification of this.

References MEDCoupling::AX_CART, MEDCoupling::AX_CYL, MEDCoupling::AX_SPHER, MEDCoupling::DataArrayTemplate< T >::checkAllocated(), deepCopy(), fromCylToCart(), fromPolarToCart(), fromSpherToCart(), and MEDCoupling::DataArray::getNumberOfComponents().

Referenced by MEDCoupling::MEDFileCurveLinearMesh::cartesianize().

◆ fromCartToPolar()

DataArrayDouble * DataArrayDouble::fromCartToPolar ( ) const

This method returns a newly created array to be deallocated that contains the result of conversion from cartesian to polar. This method expects that this has exactly 2 components.

See also
fromPolarToCart

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

◆ fromCartToCyl()

DataArrayDouble * DataArrayDouble::fromCartToCyl ( ) const

This method returns a newly created array to be deallocated that contains the result of conversion from cartesian to cylindrical. This method expects that this has exactly 3 components.

See also
fromCylToCart

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

◆ fromCartToSpher()

DataArrayDouble * DataArrayDouble::fromCartToSpher ( ) const

This method returns a newly created array to be deallocated that contains the result of conversion from cartesian to spherical coordinates.

See also
fromSpherToCart

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

◆ fromCartToCylGiven()

DataArrayDouble * DataArrayDouble::fromCartToCylGiven ( const DataArrayDouble coords,
const double  center[3],
const double  vect[3] 
) const

This method returns a newly created array to be deallocated that contains the result of conversion from cartesian to cylindrical relative to the given center and a vector. This method expects that this has exactly 3 components.

See also
MEDCouplingFieldDouble::computeVectorFieldCyl

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

◆ doublyContractedProduct()

DataArrayDouble * DataArrayDouble::doublyContractedProduct ( ) const

Computes the doubly contracted product of every tensor defined by the tuple of this array containing 6 components.

Returns
DataArrayDouble * - the new instance of DataArrayDouble, whose each tuple is calculated from the tuple (t) of this array as follows: $ t[0]^2+t[1]^2+t[2]^2+2*t[3]^2+2*t[4]^2+2*t[5]^2$. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 6.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

◆ determinant()

DataArrayDouble * DataArrayDouble::determinant ( ) const

Computes the determinant of every square matrix defined by the tuple of this array, which contains either 4, 6 or 9 components. The case of 6 components corresponds to that of the upper triangular matrix.

Returns
DataArrayDouble * - the new instance of DataArrayDouble, whose each tuple is the determinant of matrix of the corresponding tuple of this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() is not in [4,6,9].

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::RefCountObjectOnly::decrRef(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

◆ eigenValues()

DataArrayDouble * DataArrayDouble::eigenValues ( ) const

Computes 3 eigenvalues of every upper triangular matrix defined by the tuple of this array, which contains 6 components. The 6 components of tuples are expected to be stored as follow :
tuple[0] = matrix_XX
tuple[1] = matrix_YY
tuple[2] = matrix_ZZ
tuple[3] = matrix_XY
tuple[4] = matrix_YZ
tuple[5] = matrix_XZ

Returns
DataArrayDouble * - the new instance of DataArrayDouble containing 3 components, whose each tuple contains the eigenvalues of the matrix of corresponding tuple of this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 6.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

◆ eigenVectors()

DataArrayDouble * DataArrayDouble::eigenVectors ( ) const

Computes 3 eigenvectors of every upper triangular matrix defined by the tuple of this array, which contains 6 components. The 6 components of tuples are expected to be stored as follow :
tuple[0] = matrix_XX
tuple[1] = matrix_YY
tuple[2] = matrix_ZZ
tuple[3] = matrix_XY
tuple[4] = matrix_YZ
tuple[5] = matrix_XZ

Returns
DataArrayDouble * - the new instance of DataArrayDouble containing 9 components, whose each tuple contains 3 eigenvectors of the matrix of corresponding tuple of this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 6.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

◆ inverse()

DataArrayDouble * DataArrayDouble::inverse ( ) const

Computes the inverse matrix of every matrix defined by the tuple of this array, which contains either 4, 6 or 9 components. The case of 6 components corresponds to that of the upper triangular matrix.

Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of components as this one, whose each tuple is the inverse matrix of the matrix of corresponding tuple of this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() is not in [4,6,9].

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

◆ trace()

DataArrayDouble * DataArrayDouble::trace ( ) const

Computes the trace of every matrix defined by the tuple of this array, which contains either 4, 6 or 9 components. The case of 6 components corresponds to that of the upper triangular matrix.

Returns
DataArrayDouble * - the new instance of DataArrayDouble containing 1 component, whose each tuple is the trace of the matrix of corresponding tuple of this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() is not in [4,6,9].

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

◆ deviator()

DataArrayDouble * DataArrayDouble::deviator ( ) const

Computes the stress deviator tensor of every stress tensor defined by the tuple of this array, which contains 6 components.

Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of components and tuples as this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 6.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

◆ magnitude()

DataArrayDouble * DataArrayDouble::magnitude ( ) const

Computes the magnitude of every vector defined by the tuple of this array.

Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of tuples as this array and one component. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

◆ minPerTuple()

DataArrayDouble * DataArrayDouble::minPerTuple ( ) const

Computes the minimal value within every tuple of this array.

Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of tuples as this array and one component. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
See also
DataArrayDouble::maxPerTuple

◆ maxPerTuple()

DataArrayDouble * DataArrayDouble::maxPerTuple ( ) const

Computes the maximal value within every tuple of this array.

Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of tuples as this array and one component. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
See also
DataArrayDouble::maxPerTupleWithCompoId, DataArrayDouble::minPerTuple

◆ maxPerTupleWithCompoId()

DataArrayDouble * DataArrayDouble::maxPerTupleWithCompoId ( DataArrayIdType *&  compoIdOfMaxPerTuple) const

Computes the maximal value within every tuple of this array and it returns the first component id for each tuple that corresponds to the maximal value within the tuple.

Parameters
[out]compoIdOfMaxPerTuple- the new new instance of DataArrayInt containing the same number of tuples and only one component.
Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of tuples as this array and one component. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
See also
DataArrayDouble::maxPerTuple

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

◆ buildEuclidianDistanceDenseMatrix()

DataArrayDouble * DataArrayDouble::buildEuclidianDistanceDenseMatrix ( ) const

This method returns a newly allocated DataArrayDouble instance having one component and this->getNumberOfTuples() * this->getNumberOfTuples() tuples.
This returned array contains the euclidian distance for each tuple in this.
So the returned array can be seen as a dense symmetrical matrix whose diagonal elements are equal to 0.
The returned array has only one component (and not this->getNumberOfTuples() components to avoid the useless memory consumption due to components info in returned DataArrayDouble)

Warning
use this method with care because it can leads to big amount of consumed memory !
Returns
A newly allocated (huge) MEDCoupling::DataArrayDouble instance that the caller should deal with.
Exceptions
Ifthis is not allocated.
See also
DataArrayDouble::buildEuclidianDistanceDenseMatrixWith

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

◆ buildEuclidianDistanceDenseMatrixWith()

DataArrayDouble * DataArrayDouble::buildEuclidianDistanceDenseMatrixWith ( const DataArrayDouble other) const

This method returns a newly allocated DataArrayDouble instance having one component and this->getNumberOfTuples() * other->getNumberOfTuples() tuples.
This returned array contains the euclidian distance for each tuple in other with each tuple in this.
So the returned array can be seen as a dense rectangular matrix with other->getNumberOfTuples() rows and this->getNumberOfTuples() columns.
Output rectangular matrix is sorted along rows.
The returned array has only one component (and not this->getNumberOfTuples() components to avoid the useless memory consumption due to components info in returned DataArrayDouble)

Warning
use this method with care because it can leads to big amount of consumed memory !
Parameters
[in]otherDataArrayDouble instance having same number of components than this.
Returns
A newly allocated (huge) MEDCoupling::DataArrayDouble instance that the caller should deal with.
Exceptions
Ifthis is not allocated, or if other is null or if other is not allocated, or if number of components of other and this differs.
See also
DataArrayDouble::buildEuclidianDistanceDenseMatrix

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

◆ asArcOfCircle()

void DataArrayDouble::asArcOfCircle ( double  center[2],
double &  radius,
double &  ang 
) const

This method expects that this stores 3 tuples containing 2 components each. Each of this tuples represent a point into 2D space. This method tries to find an arc of circle starting from first point (tuple) to 2nd and middle point (tuple) along 3nd and last point (tuple). If such arc of circle exists, the corresponding center, radius of circle is returned. And additionnaly the length of arc expressed with an ang output variable in ]0,2*pi[.

Exceptions
Ifthis is not allocated.
Ifthis has not 3 tuples of 2 components
Iftuples/points in this are aligned

References INTERP_KERNEL::SegSegIntersector::areColinears(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

◆ sortPerTuple()

void DataArrayDouble::sortPerTuple ( bool  asc)

Sorts value within every tuple of this array.

Parameters
[in]asc- if true, the values are sorted in ascending order, else, in descending order.
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< T >::getPointer().

◆ applyInv()

void DataArrayDouble::applyInv ( double  numerator)

Modify all elements of this array, so that an element x becomes $ numerator / x $.

Warning
If an exception is thrown because of presence of 0.0 element in this array, all elements processed before detection of the zero element remain modified.
Parameters
[in]numerator- the numerator used to modify array elements.
Exceptions
Ifthis is not allocated.
Ifthere is an element equal to 0.0 in this array.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< T >::getNbOfElems(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getPointer().

◆ applyPow()

void DataArrayDouble::applyPow ( double  val)

Modify all elements of this array, so that an element x becomes val ^ x . Contrary to DataArrayInt::applyPow all values in this have to be >= 0 if val is not integer.

Parameters
[in]val- the value used to apply pow on all array elements.
Exceptions
Ifthis is not allocated.
Warning
If an exception is thrown because of presence of 0 element in this array and val is not integer, all elements processed before detection of the zero element remain modified.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< T >::getNbOfElems(), and MEDCoupling::DataArrayTemplate< T >::getPointer().

◆ applyRPow()

void DataArrayDouble::applyRPow ( double  val)

Modify all elements of this array, so that an element x becomes $ val ^ x $.

Parameters
[in]val- the value used to apply pow on all array elements.
Exceptions
Ifthis is not allocated.
Ifval < 0.
Warning
If an exception is thrown because of presence of 0 element in this array, all elements processed before detection of the zero element remain modified.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< T >::getNbOfElems(), and MEDCoupling::DataArrayTemplate< T >::getPointer().

◆ applyFunc() [1/3]

DataArrayDouble * DataArrayDouble::applyFunc ( std::size_t  nbOfComp,
FunctionToEvaluate  func 
) const

Returns a new DataArrayDouble created from this one by applying FunctionToEvaluate to every tuple of this array. Textual data is not copied. For more info see Application of a function on DataArrayDouble instances.

Parameters
[in]nbOfComp- number of components in the result array.
[in]func- the FunctionToEvaluate declared as bool (*func)(const double *pos, double *res), where pos points to the first component of a tuple of this array and res points to the first component of a tuple of the result array. Note that length (number of components) of pos can differ from that of res.
Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of tuples as this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
Iffunc returns false.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::RefCountObjectOnly::decrRef(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

Referenced by MEDCoupling::MEDCouplingTimeDiscretization::fillFromAnalytic().

◆ applyFunc() [2/3]

DataArrayDouble * DataArrayDouble::applyFunc ( std::size_t  nbOfComp,
const std::string &  func,
bool  isSafe = true 
) const

Returns a new DataArrayDouble created from this one by applying a function to every tuple of this array. Textual data is not copied. For more info see applyFunc method with only two parameters.

Parameters
[in]nbOfComp- number of components in the result array.
[in]func- the expression defining how to transform a tuple of this array. Supported expressions are described here.
[in]isSafe- By default true. If true invalid operation (division by 0. acos of value > 1. ...) leads to a throw of an exception. If false the computation is carried on without any notification. When false the evaluation is a little faster.
Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of tuples as this array and nbOfComp components. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
Ifcomputing func fails.

References applyFuncNamedCompo().

◆ applyFunc() [3/3]

DataArrayDouble * DataArrayDouble::applyFunc ( const std::string &  func,
bool  isSafe = true 
) const

Returns a new DataArrayDouble created from this one by applying a function to every tuple of this array. Textual data is not copied. This method works by tuples (whatever its size). If this is a one component array, call applyFuncOnThis instead that performs the same work faster.

For more info see applyFunc method with only one parameter.

Parameters
[in]func- the expression defining how to transform a tuple of this array. Supported expressions are described here.
[in]isSafe- By default true. If true invalid operation (division by 0. acos of value > 1. ...) leads to a throw of an exception. If false the computation is carried on without any notification. When false the evaluation is a little faster.
Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of tuples and components as this array. The caller is to delete this result array using decrRef() as it is no more needed.
See also
applyFuncOnThis
Exceptions
Ifthis is not allocated.
Ifcomputing func fails.

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

◆ applyFuncOnThis()

void DataArrayDouble::applyFuncOnThis ( const std::string &  func,
bool  isSafe = true 
)

This method is a non const method that modify the array in this. This method only works on one component array. It means that function func must contain at most one variable. This method is a specialization of applyFunc method with one parameter on one component array.

Parameters
[in]func- the expression defining how to transform a tuple of this array. Supported expressions are described here.
[in]isSafe- By default true. If true invalid operation (division by 0. acos of value > 1. ...) leads to a throw of an exception. If false the computation is carried on without any notification. When false the evaluation is a little faster.
See also
applyFunc

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::fillWithValue(), MEDCoupling::DataArray::getInfoOnComponents(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), MEDCoupling::DataArrayTemplate< T >::rearrange(), and MEDCoupling::DataArray::setInfoOnComponents().

◆ applyFuncCompo()

DataArrayDouble * DataArrayDouble::applyFuncCompo ( std::size_t  nbOfComp,
const std::string &  func,
bool  isSafe = true 
) const

Returns a new DataArrayDouble created from this one by applying a function to every tuple of this array. Textual data is not copied. For more info see applyFuncCompo method.

Parameters
[in]nbOfComp- number of components in the result array.
[in]func- the expression defining how to transform a tuple of this array. Supported expressions are described here.
[in]isSafe- By default true. If true invalid operation (division by 0. acos of value > 1. ...) leads to a throw of an exception. If false the computation is carried on without any notification. When false the evaluation is a little faster.
Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of tuples as this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
Iffunc contains vars that are not in this->getInfoOnComponent().
Ifcomputing func fails.

References applyFuncNamedCompo(), and MEDCoupling::DataArray::getVarsOnComponent().

Referenced by MEDCoupling::MEDCouplingTimeDiscretization::fillFromAnalyticCompo().

◆ applyFuncNamedCompo()

DataArrayDouble * DataArrayDouble::applyFuncNamedCompo ( std::size_t  nbOfComp,
const std::vector< std::string > &  varsOrder,
const std::string &  func,
bool  isSafe = true 
) const

Returns a new DataArrayDouble created from this one by applying a function to every tuple of this array. Textual data is not copied. For more info see applyFuncNamedCompo method.

Parameters
[in]nbOfComp- number of components in the result array.
[in]varsOrder- sequence of vars defining their order.
[in]func- the expression defining how to transform a tuple of this array. Supported expressions are described here.
[in]isSafe- By default true. If true invalid operation (division by 0. acos of value > 1. ...) leads to a throw of an exception. If false the computation is carried on without any notification. When false the evaluation is a little faster.
Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of tuples as this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
Iffunc contains vars not in varsOrder.
Ifcomputing func fails.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

Referenced by applyFunc(), applyFuncCompo(), and MEDCoupling::MEDCouplingTimeDiscretization::fillFromAnalyticNamedCompo().

◆ applyFuncFast32()

◆ applyFuncFast64()

◆ symmetry3DPlane()

MCAuto< DataArrayDouble > DataArrayDouble::symmetry3DPlane ( const double  point[3],
const double  normalVector[3] 
) const

◆ findIdsInRange()

DataArrayIdType * DataArrayDouble::findIdsInRange ( double  vmin,
double  vmax 
) const

Returns a new DataArrayInt containing indices of tuples of this one-dimensional array whose values are within a given range. Textual data is not copied.

Parameters
[in]vmin- a lowest acceptable value (included).
[in]vmax- a greatest acceptable value (included).
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 1.
See also
DataArrayDouble::findIdsNotInRange

Here is a C++ example.
Here is a Python example.

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

Referenced by getMaxValue2(), and getMinValue2().

◆ findIdsNotInRange()

DataArrayIdType * DataArrayDouble::findIdsNotInRange ( double  vmin,
double  vmax 
) const

Returns a new DataArrayInt containing indices of tuples of this one-dimensional array whose values are not within a given range. Textual data is not copied.

Parameters
[in]vmin- a lowest not acceptable value (excluded).
[in]vmax- a greatest not acceptable value (excluded).
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 1.
See also
DataArrayDouble::findIdsInRange

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

◆ Aggregate() [1/2]

DataArrayDouble * DataArrayDouble::Aggregate ( const DataArrayDouble a1,
const DataArrayDouble a2 
)
static

Returns a new DataArrayDouble by concatenating two given arrays, so that (1) the number of tuples in the result array is a sum of the number of tuples of given arrays and (2) the number of component in the result array is same as that of each of given arrays. Info on components is copied from the first of the given arrays. Number of components in the given arrays must be the same.

Parameters
[in]a1- an array to include in the result array.
[in]a2- another array to include in the result array.
Returns
DataArrayDouble * - the new instance of DataArrayDouble. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifboth a1 and a2 are NULL.
Ifa1->getNumberOfComponents() != a2->getNumberOfComponents().

Referenced by MEDCoupling::MEDCouplingNoTimeLabel::aggregate(), MEDCoupling::MEDCouplingWithTimeStep::aggregate(), MEDCoupling::MEDCouplingConstOnTimeInterval::aggregate(), MEDCoupling::MEDCouplingLinearTime::aggregate(), MEDCoupling::DataArray::Aggregate(), MEDCoupling::MEDFileUMesh::Aggregate(), MEDCoupling::MEDFileFields::aggregateFieldsOnSameMeshes(), areIncludedInMe(), MEDCoupling::MEDCouplingPointSet::duplicateNodesInCoords(), MEDFileFieldLin2QuadVisitor::endTimeStepEntry(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshes(), MEDCoupling::MEDCouplingPointSet::MergeNodesArray(), MEDCoupling::MEDCouplingUMesh::PutUMeshesOnSameAggregatedCoords(), and MEDCoupling::MEDCouplingUMesh::tetrahedrize().

◆ Aggregate() [2/2]

DataArrayDouble * DataArrayDouble::Aggregate ( const std::vector< const DataArrayDouble * > &  arr)
static

Returns a new DataArrayDouble by concatenating all given arrays, so that (1) the number of tuples in the result array is a sum of the number of tuples of given arrays and (2) the number of component in the result array is same as that of each of given arrays. Info on components is copied from the first of the given arrays. Number of components in the given arrays must be the same. If the number of non null of elements in arr is equal to one the returned object is a copy of it not the object itself.

Parameters
[in]arr- a sequence of arrays to include in the result array.
Returns
DataArrayDouble * - the new instance of DataArrayDouble. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifall arrays within arr are NULL.
IfgetNumberOfComponents() of arrays within arr.

References MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

◆ Dot()

DataArrayDouble * DataArrayDouble::Dot ( const DataArrayDouble a1,
const DataArrayDouble a2 
)
static

Returns a new DataArrayDouble containing a dot product of two given arrays, so that the i-th tuple of the result array is a sum of products of j-th components of i-th tuples of given arrays ( $ a_i = \sum_{j=1}^n a1_j * a2_j $). Info on components and name is copied from the first of the given arrays. Number of tuples and components in the given arrays must be the same.

Parameters
[in]a1- a given array.
[in]a2- another given array.
Returns
DataArrayDouble * - the new instance of DataArrayDouble. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifeither a1 or a2 is NULL.
Ifany given array is not allocated.
Ifa1->getNumberOfTuples() != a2->getNumberOfTuples()
Ifa1->getNumberOfComponents() != a2->getNumberOfComponents()

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getInfoOnComponent(), MEDCoupling::DataArray::getName(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), MEDCoupling::DataArray::setInfoOnComponent(), and MEDCoupling::DataArray::setName().

Referenced by MEDCoupling::MEDCouplingUMesh::clipSingle3DCellByPlane(), MEDCoupling::MEDCouplingNoTimeLabel::dot(), MEDCoupling::MEDCouplingWithTimeStep::dot(), MEDCoupling::MEDCouplingConstOnTimeInterval::dot(), and MEDCoupling::MEDCouplingLinearTime::dot().

◆ CrossProduct()

DataArrayDouble * DataArrayDouble::CrossProduct ( const DataArrayDouble a1,
const DataArrayDouble a2 
)
static

Returns a new DataArrayDouble containing a cross product of two given arrays, so that the i-th tuple of the result array contains 3 components of a vector which is a cross product of two vectors defined by the i-th tuples of given arrays. Info on components is copied from the first of the given arrays. Number of tuples in the given arrays must be the same. Number of components in the given arrays must be 3.

Parameters
[in]a1- a given array.
[in]a2- another given array.
Returns
DataArrayDouble * - the new instance of DataArrayDouble. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifeither a1 or a2 is NULL.
Ifa1->getNumberOfTuples() != a2->getNumberOfTuples()
Ifa1->getNumberOfComponents() != 3
Ifa2->getNumberOfComponents() != 3

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArray::copyStringInfoFrom(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

Referenced by MEDCoupling::MEDCouplingNoTimeLabel::crossProduct(), MEDCoupling::MEDCouplingWithTimeStep::crossProduct(), MEDCoupling::MEDCouplingConstOnTimeInterval::crossProduct(), and MEDCoupling::MEDCouplingLinearTime::crossProduct().

◆ Max()

DataArrayDouble * DataArrayDouble::Max ( const DataArrayDouble a1,
const DataArrayDouble a2 
)
static

Returns a new DataArrayDouble containing maximal values of two given arrays. Info on components is copied from the first of the given arrays. Number of tuples and components in the given arrays must be the same.

Parameters
[in]a1- an array to compare values with another one.
[in]a2- another array to compare values with the first one.
Returns
DataArrayDouble * - the new instance of DataArrayDouble. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifeither a1 or a2 is NULL.
Ifa1->getNumberOfTuples() != a2->getNumberOfTuples()
Ifa1->getNumberOfComponents() != a2->getNumberOfComponents()

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

Referenced by MEDCoupling::MEDCouplingNoTimeLabel::max(), MEDCoupling::MEDCouplingWithTimeStep::max(), MEDCoupling::MEDCouplingConstOnTimeInterval::max(), and MEDCoupling::MEDCouplingLinearTime::max().

◆ Min()

DataArrayDouble * DataArrayDouble::Min ( const DataArrayDouble a1,
const DataArrayDouble a2 
)
static

Returns a new DataArrayDouble containing minimal values of two given arrays. Info on components is copied from the first of the given arrays. Number of tuples and components in the given arrays must be the same.

Parameters
[in]a1- an array to compare values with another one.
[in]a2- another array to compare values with the first one.
Returns
DataArrayDouble * - the new instance of DataArrayDouble. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifeither a1 or a2 is NULL.
Ifa1->getNumberOfTuples() != a2->getNumberOfTuples()
Ifa1->getNumberOfComponents() != a2->getNumberOfComponents()

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

Referenced by MEDCoupling::MEDCouplingNoTimeLabel::min(), MEDCoupling::MEDCouplingWithTimeStep::min(), MEDCoupling::MEDCouplingConstOnTimeInterval::min(), and MEDCoupling::MEDCouplingLinearTime::min().

◆ Pow()

DataArrayDouble * DataArrayDouble::Pow ( const DataArrayDouble a1,
const DataArrayDouble a2 
)
static

Returns a new DataArrayDouble that is the result of pow of two given arrays. There are 3 valid cases.

Parameters
[in]a1- an array to pow up.
[in]a2- another array to sum up.
Returns
DataArrayDouble * - the new instance of DataArrayDouble. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifeither a1 or a2 is NULL.
Ifa1->getNumberOfTuples() != a2->getNumberOfTuples()
Ifa1->getNumberOfComponents() != 1 or a2->getNumberOfComponents() != 1.
Ifthere is a negative value in a1.

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

Referenced by MEDCoupling::MEDCouplingNoTimeLabel::pow(), MEDCoupling::MEDCouplingWithTimeStep::pow(), MEDCoupling::MEDCouplingConstOnTimeInterval::pow(), and MEDCoupling::MEDCouplingLinearTime::pow().

◆ powEqual()

void DataArrayDouble::powEqual ( const DataArrayDouble other)

Apply pow on values of another DataArrayDouble to values of this one.

Parameters
[in]other- an array to pow to this one.
Exceptions
Ifother is NULL.
Ifthis->getNumberOfTuples() != other->getNumberOfTuples()
Ifthis->getNumberOfComponents() != 1 or other->getNumberOfComponents() != 1
Ifthere is a negative value in this.

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< T >::getPointer().

Referenced by MEDCoupling::MEDCouplingLinearTime::powEqual().

◆ toVectorOfBool()

std::vector< bool > DataArrayDouble::toVectorOfBool ( double  eps) const

This method is NOT wrapped into python because it can be useful only for performance reasons in C++ context. All values in this must be 0. or 1. within eps error. 0 means false, 1 means true. If an another value than 0 or 1 appear (within eps precision) an INTERP_KERNEL::Exception will be thrown.

Exceptions
ifthis is not allocated.
ifthis has not exactly one component.

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

Referenced by MEDCoupling::MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion().

◆ Rotate2DAlg()

void DataArrayDouble::Rotate2DAlg ( const double *  center,
double  angle,
mcIdType  nbNodes,
const double *  coordsIn,
double *  coordsOut 
)
static

Low static method that operates 3D rotation of nbNodes 3D nodes whose coordinates are arranged in coords around the center point center and with angle angle.

Referenced by MEDCoupling::MEDCouplingCurveLinearMesh::rotate(), and MEDCoupling::MEDCouplingPointSet::rotate2D().

◆ Rotate3DAlg()

void DataArrayDouble::Rotate3DAlg ( const double *  center,
const double *  vect,
double  angle,
mcIdType  nbNodes,
const double *  coordsIn,
double *  coordsOut 
)
static

Low static method that operates 3D rotation of 'nbNodes' 3D nodes whose coordinates are arranged in coordsIn around an axe ( center, vect) and with angle angle.

Referenced by MEDCoupling::MEDCouplingUMesh::getCellIdsCrossingPlane(), MEDCoupling::MEDCouplingCurveLinearMesh::rotate(), and MEDCoupling::MEDCouplingPointSet::rotate3D().

◆ Symmetry3DPlane()

void DataArrayDouble::Symmetry3DPlane ( const double  point[3],
const double  normalVector[3],
mcIdType  nbNodes,
const double *  coordsIn,
double *  coordsOut 
)
static

Referenced by symmetry3DPlane().

◆ GiveBaseForPlane()

void DataArrayDouble::GiveBaseForPlane ( const double  normalVector[3],
double  baseOfPlane[9] 
)
static

◆ ComputeIntegralOfSeg2IntoTri3()

void DataArrayDouble::ComputeIntegralOfSeg2IntoTri3 ( const double  seg2[4],
const double  tri3[6],
double  coeffs[3],
double &  length 
)
static
Parameters
[in]seg2: coordinates of input seg2 expected to have spacedim==2
[in]tri3: coordinates of input tri3 also expected to have spacedim==2
[out]coeffs: the result of integration normalized to 1. along seg2 inside tri3 sorted by the node id of tri3
[out]length: the length of seg2. That is too say the length of integration

◆ getTinySerializationIntInformation()

void DataArrayDouble::getTinySerializationIntInformation ( std::vector< mcIdType > &  tinyInfo) const

◆ getTinySerializationStrInformation()

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

◆ resizeForUnserialization()

bool DataArrayDouble::resizeForUnserialization ( const std::vector< mcIdType > &  tinyInfoI)

◆ finishUnserialization()

void DataArrayDouble::finishUnserialization ( const std::vector< mcIdType > &  tinyInfoI,
const std::vector< std::string > &  tinyInfoS 
)

◆ findCommonTuplesAlg()

template<int SPACEDIM>
void DataArrayDouble::findCommonTuplesAlg ( const double *  bbox,
mcIdType  nbNodes,
mcIdType  limitNodeId,
double  prec,
DataArrayIdType *  c,
DataArrayIdType *  cI 
) const

◆ FindClosestTupleIdAlg()

template<int SPACEDIM>
void DataArrayDouble::FindClosestTupleIdAlg ( const BBTreePts< SPACEDIM, mcIdType > &  myTree,
double  dist,
const double *  pos,
mcIdType  nbOfTuples,
const double *  thisPt,
mcIdType  thisNbOfTuples,
mcIdType *  res 
)
static

◆ FindTupleIdsNearTuplesAlg()

template<int SPACEDIM>
void DataArrayDouble::FindTupleIdsNearTuplesAlg ( const BBTreePts< SPACEDIM, mcIdType > &  myTree,
const double *  pos,
mcIdType  nbOfTuples,
double  eps,
DataArrayIdType *  c,
DataArrayIdType *  cI 
)
static