X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingFieldDouble.hxx;h=d4a088bc5f09cc89517402dea1abf0f71e655018;hb=0c9d48870957c4a9f6f82fc8e2c569780a5f886b;hp=da5e01ba0cf7a034fecc14ae3a2e8b23dc95bbf7;hpb=468bbce4875c5e421f0a9e4f5f37aaf4fc2a4247;p=modules%2Fmed.git diff --git a/src/MEDCoupling/MEDCouplingFieldDouble.hxx b/src/MEDCoupling/MEDCouplingFieldDouble.hxx index da5e01ba0..d4a088bc5 100644 --- a/src/MEDCoupling/MEDCouplingFieldDouble.hxx +++ b/src/MEDCoupling/MEDCouplingFieldDouble.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D +// Copyright (C) 2007-2013 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -30,165 +30,174 @@ namespace ParaMEDMEM { class MEDCouplingFieldTemplate; - class MEDCOUPLING_EXPORT MEDCouplingFieldDouble : public MEDCouplingField + class MEDCouplingFieldDouble : public MEDCouplingField { public: - static MEDCouplingFieldDouble *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME); - static MEDCouplingFieldDouble *New(const MEDCouplingFieldTemplate *ft, TypeOfTimeDiscretization td=ONE_TIME); - void setTimeUnit(const char *unit); - const char *getTimeUnit() const; - void synchronizeTimeWithSupport() throw(INTERP_KERNEL::Exception); - void copyTinyStringsFrom(const MEDCouplingField *other) throw(INTERP_KERNEL::Exception); - void copyTinyAttrFrom(const MEDCouplingFieldDouble *other) throw(INTERP_KERNEL::Exception); - void copyAllTinyAttrFrom(const MEDCouplingFieldDouble *other) throw(INTERP_KERNEL::Exception); - std::string simpleRepr() const; - std::string advancedRepr() const; - void writeVTK(const char *fileName) const throw(INTERP_KERNEL::Exception); - bool isEqualIfNotWhy(const MEDCouplingField *other, double meshPrec, double valsPrec, std::string& reason) const throw(INTERP_KERNEL::Exception); - bool isEqualWithoutConsideringStr(const MEDCouplingField *other, double meshPrec, double valsPrec) const; - bool areCompatibleForMerge(const MEDCouplingField *other) const; - bool areStrictlyCompatible(const MEDCouplingField *other) const; - bool areCompatibleForMul(const MEDCouplingField *other) const; - bool areCompatibleForDiv(const MEDCouplingField *other) const; - bool areCompatibleForMeld(const MEDCouplingFieldDouble *other) const; - void renumberCells(const int *old2NewBg, bool check=true) throw(INTERP_KERNEL::Exception); - void renumberCellsWithoutMesh(const int *old2NewBg, bool check=true) throw(INTERP_KERNEL::Exception); - void renumberNodes(const int *old2NewBg) throw(INTERP_KERNEL::Exception); - void renumberNodesWithoutMesh(const int *old2NewBg, int newNbOfNodes, double eps=1e-15) throw(INTERP_KERNEL::Exception); - DataArrayInt *getIdsInRange(double vmin, double vmax) const throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *buildSubPart(const DataArrayInt *part) const throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *buildSubPart(const int *partBg, const int *partEnd) const throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *deepCpy() const; - MEDCouplingFieldDouble *clone(bool recDeepCpy) const; - MEDCouplingFieldDouble *cloneWithMesh(bool recDeepCpy) const; - MEDCouplingFieldDouble *buildNewTimeReprFromThis(TypeOfTimeDiscretization td, bool deepCopy) const; - TypeOfTimeDiscretization getTimeDiscretization() const; - void checkCoherency() const throw(INTERP_KERNEL::Exception); - void setNature(NatureOfField nat) throw(INTERP_KERNEL::Exception); - void setTimeTolerance(double val) { _time_discr->setTimeTolerance(val); } - double getTimeTolerance() const { return _time_discr->getTimeTolerance(); } - void setIteration(int it) throw(INTERP_KERNEL::Exception) { _time_discr->setIteration(it); } - void setEndIteration(int it) throw(INTERP_KERNEL::Exception) { _time_discr->setEndIteration(it); } - void setOrder(int order) throw(INTERP_KERNEL::Exception) { _time_discr->setOrder(order); } - void setEndOrder(int order) throw(INTERP_KERNEL::Exception) { _time_discr->setEndOrder(order); } - void setTimeValue(double val) throw(INTERP_KERNEL::Exception) { _time_discr->setTimeValue(val); } - void setEndTimeValue(double val) throw(INTERP_KERNEL::Exception) { _time_discr->setEndTimeValue(val); } - void setTime(double val, int iteration, int order) { _time_discr->setTime(val,iteration,order); } - void synchronizeTimeWithMesh() throw(INTERP_KERNEL::Exception); - void setStartTime(double val, int iteration, int order) { _time_discr->setStartTime(val,iteration,order); } - void setEndTime(double val, int iteration, int order) { _time_discr->setEndTime(val,iteration,order); } - double getTime(int& iteration, int& order) const { return _time_discr->getTime(iteration,order); } - double getStartTime(int& iteration, int& order) const { return _time_discr->getStartTime(iteration,order); } - double getEndTime(int& iteration, int& order) const { return _time_discr->getEndTime(iteration,order); } - double getIJ(int tupleId, int compoId) const { return getArray()->getIJ(tupleId,compoId); } - double getIJK(int cellId, int nodeIdInCell, int compoId) const; - void setArray(DataArrayDouble *array); - void setEndArray(DataArrayDouble *array); - void setArrays(const std::vector& arrs) throw(INTERP_KERNEL::Exception); - const DataArrayDouble *getArray() const { return _time_discr->getArray(); } - DataArrayDouble *getArray() { return _time_discr->getArray(); } - const DataArrayDouble *getEndArray() const { return _time_discr->getEndArray(); } - DataArrayDouble *getEndArray() { return _time_discr->getEndArray(); } - std::vector getArrays() const { std::vector ret; _time_discr->getArrays(ret); return ret; } - double accumulate(int compId) const; - void accumulate(double *res) const; - double getMaxValue() const throw(INTERP_KERNEL::Exception); - double getMaxValue2(DataArrayInt*& tupleIds) const throw(INTERP_KERNEL::Exception); - double getMinValue() const throw(INTERP_KERNEL::Exception); - double getMinValue2(DataArrayInt*& tupleIds) const throw(INTERP_KERNEL::Exception); - double getAverageValue() const throw(INTERP_KERNEL::Exception); - double norm2() const throw(INTERP_KERNEL::Exception); - double normMax() const throw(INTERP_KERNEL::Exception); - double getWeightedAverageValue() const throw(INTERP_KERNEL::Exception); - double normL1(int compId) const throw(INTERP_KERNEL::Exception); - void normL1(double *res) const throw(INTERP_KERNEL::Exception); - double normL2(int compId) const throw(INTERP_KERNEL::Exception); - void normL2(double *res) const throw(INTERP_KERNEL::Exception); - double integral(int compId, bool isWAbs) const throw(INTERP_KERNEL::Exception); - void integral(bool isWAbs, double *res) const throw(INTERP_KERNEL::Exception); - void getValueOnPos(int i, int j, int k, double *res) const throw(INTERP_KERNEL::Exception); - void getValueOn(const double *spaceLoc, double *res) const throw(INTERP_KERNEL::Exception); - void getValueOn(const double *spaceLoc, double time, double *res) const throw(INTERP_KERNEL::Exception); - DataArrayDouble *getValueOnMulti(const double *spaceLoc, int nbOfPoints) const throw(INTERP_KERNEL::Exception); - //! \b temporary - void applyLin(double a, double b, int compoId); - MEDCouplingFieldDouble &operator=(double value) throw(INTERP_KERNEL::Exception); - void fillFromAnalytic(int nbOfComp, FunctionToEvaluate func) throw(INTERP_KERNEL::Exception); - void fillFromAnalytic(int nbOfComp, const char *func) throw(INTERP_KERNEL::Exception); - void fillFromAnalytic2(int nbOfComp, const char *func) throw(INTERP_KERNEL::Exception); - void fillFromAnalytic3(int nbOfComp, const std::vector& varsOrder, const char *func) throw(INTERP_KERNEL::Exception); - void applyFunc(int nbOfComp, FunctionToEvaluate func); - void applyFunc(int nbOfComp, double val); - void applyFunc(int nbOfComp, const char *func) throw(INTERP_KERNEL::Exception); - void applyFunc2(int nbOfComp, const char *func) throw(INTERP_KERNEL::Exception); - void applyFunc3(int nbOfComp, const std::vector& varsOrder, const char *func) throw(INTERP_KERNEL::Exception); - void applyFunc(const char *func) throw(INTERP_KERNEL::Exception); - void applyFuncFast32(const char *func) throw(INTERP_KERNEL::Exception); - void applyFuncFast64(const char *func) throw(INTERP_KERNEL::Exception); - int getNumberOfComponents() const throw(INTERP_KERNEL::Exception); - int getNumberOfTuples() const throw(INTERP_KERNEL::Exception); - int getNumberOfValues() const throw(INTERP_KERNEL::Exception); - void updateTime() const; - std::size_t getHeapMemorySize() const; + MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME); + MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME); + MEDCOUPLING_EXPORT void setTimeUnit(const std::string& unit); + MEDCOUPLING_EXPORT std::string getTimeUnit() const; + MEDCOUPLING_EXPORT void synchronizeTimeWithSupport(); + MEDCOUPLING_EXPORT void copyTinyStringsFrom(const MEDCouplingField *other); + MEDCOUPLING_EXPORT void copyTinyAttrFrom(const MEDCouplingFieldDouble *other); + MEDCOUPLING_EXPORT void copyAllTinyAttrFrom(const MEDCouplingFieldDouble *other); + MEDCOUPLING_EXPORT std::string simpleRepr() const; + MEDCOUPLING_EXPORT std::string advancedRepr() const; + MEDCOUPLING_EXPORT void writeVTK(const std::string& fileName, bool isBinary=true) const; + MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingField *other, double meshPrec, double valsPrec, std::string& reason) const; + MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingField *other, double meshPrec, double valsPrec) const; + MEDCOUPLING_EXPORT bool areCompatibleForMerge(const MEDCouplingField *other) const; + MEDCOUPLING_EXPORT bool areStrictlyCompatible(const MEDCouplingField *other) const; + MEDCOUPLING_EXPORT bool areCompatibleForMul(const MEDCouplingField *other) const; + MEDCOUPLING_EXPORT bool areCompatibleForDiv(const MEDCouplingField *other) const; + MEDCOUPLING_EXPORT bool areCompatibleForMeld(const MEDCouplingFieldDouble *other) const; + MEDCOUPLING_EXPORT void renumberCells(const int *old2NewBg, bool check=true); + MEDCOUPLING_EXPORT void renumberCellsWithoutMesh(const int *old2NewBg, bool check=true); + MEDCOUPLING_EXPORT void renumberNodes(const int *old2NewBg, double eps=1e-15); + MEDCOUPLING_EXPORT void renumberNodesWithoutMesh(const int *old2NewBg, int newNbOfNodes, double eps=1e-15); + MEDCOUPLING_EXPORT DataArrayInt *getIdsInRange(double vmin, double vmax) const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildSubPart(const DataArrayInt *part) const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildSubPart(const int *partBg, const int *partEnd) const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildSubPartRange(int begin, int end, int step) const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *deepCpy() const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *clone(bool recDeepCpy) const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *cloneWithMesh(bool recDeepCpy) const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildNewTimeReprFromThis(TypeOfTimeDiscretization td, bool deepCopy) const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *nodeToCellDiscretization() const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *cellToNodeDiscretization() const; + MEDCOUPLING_EXPORT TypeOfTimeDiscretization getTimeDiscretization() const; + MEDCOUPLING_EXPORT void checkCoherency() const; + MEDCOUPLING_EXPORT void setNature(NatureOfField nat); + MEDCOUPLING_EXPORT void setTimeTolerance(double val) { _time_discr->setTimeTolerance(val); } + MEDCOUPLING_EXPORT double getTimeTolerance() const { return _time_discr->getTimeTolerance(); } + MEDCOUPLING_EXPORT void setIteration(int it) { _time_discr->setIteration(it); } + MEDCOUPLING_EXPORT void setEndIteration(int it) { _time_discr->setEndIteration(it); } + MEDCOUPLING_EXPORT void setOrder(int order) { _time_discr->setOrder(order); } + MEDCOUPLING_EXPORT void setEndOrder(int order) { _time_discr->setEndOrder(order); } + MEDCOUPLING_EXPORT void setTimeValue(double val) { _time_discr->setTimeValue(val); } + MEDCOUPLING_EXPORT void setEndTimeValue(double val) { _time_discr->setEndTimeValue(val); } + MEDCOUPLING_EXPORT void setTime(double val, int iteration, int order) { _time_discr->setTime(val,iteration,order); } + MEDCOUPLING_EXPORT void synchronizeTimeWithMesh(); + MEDCOUPLING_EXPORT void setStartTime(double val, int iteration, int order) { _time_discr->setStartTime(val,iteration,order); } + MEDCOUPLING_EXPORT void setEndTime(double val, int iteration, int order) { _time_discr->setEndTime(val,iteration,order); } + MEDCOUPLING_EXPORT double getTime(int& iteration, int& order) const { return _time_discr->getTime(iteration,order); } + MEDCOUPLING_EXPORT double getStartTime(int& iteration, int& order) const { return _time_discr->getStartTime(iteration,order); } + MEDCOUPLING_EXPORT double getEndTime(int& iteration, int& order) const { return _time_discr->getEndTime(iteration,order); } + MEDCOUPLING_EXPORT double getIJ(int tupleId, int compoId) const { return getArray()->getIJ(tupleId,compoId); } + MEDCOUPLING_EXPORT double getIJK(int cellId, int nodeIdInCell, int compoId) const; + MEDCOUPLING_EXPORT void setArray(DataArrayDouble *array); + MEDCOUPLING_EXPORT void setEndArray(DataArrayDouble *array); + MEDCOUPLING_EXPORT void setArrays(const std::vector& arrs); + MEDCOUPLING_EXPORT const DataArrayDouble *getArray() const { return _time_discr->getArray(); } + MEDCOUPLING_EXPORT DataArrayDouble *getArray() { return _time_discr->getArray(); } + MEDCOUPLING_EXPORT const DataArrayDouble *getEndArray() const { return _time_discr->getEndArray(); } + MEDCOUPLING_EXPORT DataArrayDouble *getEndArray() { return _time_discr->getEndArray(); } + MEDCOUPLING_EXPORT std::vector getArrays() const { std::vector ret; _time_discr->getArrays(ret); return ret; } + MEDCOUPLING_EXPORT double accumulate(int compId) const; + MEDCOUPLING_EXPORT void accumulate(double *res) const; + MEDCOUPLING_EXPORT double getMaxValue() const; + MEDCOUPLING_EXPORT double getMaxValue2(DataArrayInt*& tupleIds) const; + MEDCOUPLING_EXPORT double getMinValue() const; + MEDCOUPLING_EXPORT double getMinValue2(DataArrayInt*& tupleIds) const; + MEDCOUPLING_EXPORT double getAverageValue() const; + MEDCOUPLING_EXPORT double norm2() const; + MEDCOUPLING_EXPORT double normMax() const; + MEDCOUPLING_EXPORT void getWeightedAverageValue(double *res, bool isWAbs=true) const; + MEDCOUPLING_EXPORT double getWeightedAverageValue(int compId, bool isWAbs=true) const; + MEDCOUPLING_EXPORT double normL1(int compId) const; + MEDCOUPLING_EXPORT void normL1(double *res) const; + MEDCOUPLING_EXPORT double normL2(int compId) const; + MEDCOUPLING_EXPORT void normL2(double *res) const; + MEDCOUPLING_EXPORT double integral(int compId, bool isWAbs) const; + MEDCOUPLING_EXPORT void integral(bool isWAbs, double *res) const; + MEDCOUPLING_EXPORT void getValueOnPos(int i, int j, int k, double *res) const; + MEDCOUPLING_EXPORT void getValueOn(const double *spaceLoc, double *res) const; + MEDCOUPLING_EXPORT void getValueOn(const double *spaceLoc, double time, double *res) const; + MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const double *spaceLoc, int nbOfPoints) const; + MEDCOUPLING_EXPORT void applyLin(double a, double b, int compoId); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble &operator=(double value) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT void fillFromAnalytic(int nbOfComp, FunctionToEvaluate func); + MEDCOUPLING_EXPORT void fillFromAnalytic(int nbOfComp, const std::string& func); + MEDCOUPLING_EXPORT void fillFromAnalytic2(int nbOfComp, const std::string& func); + MEDCOUPLING_EXPORT void fillFromAnalytic3(int nbOfComp, const std::vector& varsOrder, const std::string& func); + MEDCOUPLING_EXPORT void applyFunc(int nbOfComp, FunctionToEvaluate func); + MEDCOUPLING_EXPORT void applyFunc(int nbOfComp, double val); + MEDCOUPLING_EXPORT void applyFunc(int nbOfComp, const std::string& func); + MEDCOUPLING_EXPORT void applyFunc2(int nbOfComp, const std::string& func); + MEDCOUPLING_EXPORT void applyFunc3(int nbOfComp, const std::vector& varsOrder, const std::string& func); + MEDCOUPLING_EXPORT void applyFunc(const std::string& func); + MEDCOUPLING_EXPORT void applyFuncFast32(const std::string& func); + MEDCOUPLING_EXPORT void applyFuncFast64(const std::string& func); + MEDCOUPLING_EXPORT int getNumberOfComponents() const; + MEDCOUPLING_EXPORT int getNumberOfTuples() const; + MEDCOUPLING_EXPORT int getNumberOfValues() const; + MEDCOUPLING_EXPORT void updateTime() const; + MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; + MEDCOUPLING_EXPORT std::vector getDirectChildren() const; // - void getTinySerializationIntInformation(std::vector& tinyInfo) const; - void getTinySerializationDbleInformation(std::vector& tinyInfo) const; - void getTinySerializationStrInformation(std::vector& tinyInfo) const; - void resizeForUnserialization(const std::vector& tinyInfoI, DataArrayInt *&dataInt, std::vector& arrays); - void finishUnserialization(const std::vector& tinyInfoI, const std::vector& tinyInfoD, const std::vector& tinyInfoS); - void serialize(DataArrayInt *&dataInt, std::vector& arrays) const; + MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector& tinyInfo) const; + MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector& tinyInfo) const; + MEDCOUPLING_EXPORT void getTinySerializationStrInformation(std::vector& tinyInfo) const; + MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector& tinyInfoI, DataArrayInt *&dataInt, std::vector& arrays); + MEDCOUPLING_EXPORT void finishUnserialization(const std::vector& tinyInfoI, const std::vector& tinyInfoD, const std::vector& tinyInfoS); + MEDCOUPLING_EXPORT void serialize(DataArrayInt *&dataInt, std::vector& arrays) const; // - void changeUnderlyingMesh(const MEDCouplingMesh *other, int levOfCheck, double prec) throw(INTERP_KERNEL::Exception); - void substractInPlaceDM(const MEDCouplingFieldDouble *f, int levOfCheck, double prec) throw(INTERP_KERNEL::Exception); - bool mergeNodes(double eps, double epsOnVals=1e-15) throw(INTERP_KERNEL::Exception); - bool mergeNodes2(double eps, double epsOnVals=1e-15) throw(INTERP_KERNEL::Exception); - bool zipCoords(double epsOnVals=1e-15) throw(INTERP_KERNEL::Exception); - bool zipConnectivity(int compType, double epsOnVals=1e-15) throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *extractSlice3D(const double *origin, const double *vec, double eps) const throw(INTERP_KERNEL::Exception); - bool simplexize(int policy) throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *doublyContractedProduct() const throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *determinant() const throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *eigenValues() const throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *eigenVectors() const throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *inverse() const throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *trace() const throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *deviator() const throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *magnitude() const throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *maxPerTuple() const throw(INTERP_KERNEL::Exception); - void changeNbOfComponents(int newNbOfComp, double dftValue=0.) throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *keepSelectedComponents(const std::vector& compoIds) const throw(INTERP_KERNEL::Exception); - void setSelectedComponents(const MEDCouplingFieldDouble *f, const std::vector& compoIds) throw(INTERP_KERNEL::Exception); - void sortPerTuple(bool asc) throw(INTERP_KERNEL::Exception); - static MEDCouplingFieldDouble *MergeFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception); - static MEDCouplingFieldDouble *MergeFields(const std::vector& a) throw(INTERP_KERNEL::Exception); - static MEDCouplingFieldDouble *MeldFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception); - static MEDCouplingFieldDouble *DotFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *dot(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return DotFields(this,&other); } - static MEDCouplingFieldDouble *CrossProductFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *crossProduct(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return CrossProductFields(this,&other); } - static MEDCouplingFieldDouble *MaxFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *max(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return MaxFields(this,&other); } - static MEDCouplingFieldDouble *MinFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *min(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return MinFields(this,&other); } - MEDCouplingFieldDouble *operator+(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return AddFields(this,&other); } - const MEDCouplingFieldDouble &operator+=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception); - static MEDCouplingFieldDouble *AddFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *operator-(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return SubstractFields(this,&other); } - const MEDCouplingFieldDouble &operator-=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception); - static MEDCouplingFieldDouble *SubstractFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT void changeUnderlyingMesh(const MEDCouplingMesh *other, int levOfCheck, double precOnMesh, double eps=1e-15); + MEDCOUPLING_EXPORT void substractInPlaceDM(const MEDCouplingFieldDouble *f, int levOfCheck, double precOnMesh, double eps=1e-15); + MEDCOUPLING_EXPORT bool mergeNodes(double eps, double epsOnVals=1e-15); + MEDCOUPLING_EXPORT bool mergeNodes2(double eps, double epsOnVals=1e-15); + MEDCOUPLING_EXPORT bool zipCoords(double epsOnVals=1e-15); + MEDCOUPLING_EXPORT bool zipConnectivity(int compType, double epsOnVals=1e-15); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *extractSlice3D(const double *origin, const double *vec, double eps) const; + MEDCOUPLING_EXPORT bool simplexize(int policy); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *doublyContractedProduct() const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *determinant() const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *eigenValues() const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *eigenVectors() const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *inverse() const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *trace() const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *deviator() const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *magnitude() const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *maxPerTuple() const; + MEDCOUPLING_EXPORT void changeNbOfComponents(int newNbOfComp, double dftValue=0.); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *keepSelectedComponents(const std::vector& compoIds) const; + MEDCOUPLING_EXPORT void setSelectedComponents(const MEDCouplingFieldDouble *f, const std::vector& compoIds); + MEDCOUPLING_EXPORT void sortPerTuple(bool asc); + MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *MergeFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); + MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *MergeFields(const std::vector& a); + MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *MeldFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); + MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *DotFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *dot(const MEDCouplingFieldDouble& other) const { return DotFields(this,&other); } + MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *CrossProductFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *crossProduct(const MEDCouplingFieldDouble& other) const { return CrossProductFields(this,&other); } + MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *MaxFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *max(const MEDCouplingFieldDouble& other) const { return MaxFields(this,&other); } + MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *MinFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *min(const MEDCouplingFieldDouble& other) const { return MinFields(this,&other); } + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *negate() const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *operator+(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return AddFields(this,&other); } + MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator+=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *AddFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *operator-(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return SubstractFields(this,&other); } + MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator-=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *SubstractFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); MEDCouplingFieldDouble *operator*(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return MultiplyFields(this,&other); } - const MEDCouplingFieldDouble &operator*=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception); - static MEDCouplingFieldDouble *MultiplyFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *operator/(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return DivideFields(this,&other); } - const MEDCouplingFieldDouble &operator/=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception); - static MEDCouplingFieldDouble *DivideFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception); - static void WriteVTK(const char *fileName, const std::vector& fs) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator*=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *MultiplyFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *operator/(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return DivideFields(this,&other); } + MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator/=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *DivideFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *operator^(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator^=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *PowFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); + MEDCOUPLING_EXPORT static void WriteVTK(const std::string& fileName, const std::vector& fs, bool isBinary=true); public: - const MEDCouplingTimeDiscretization *getTimeDiscretizationUnderGround() const { return _time_discr; } - MEDCouplingTimeDiscretization *getTimeDiscretizationUnderGround() { return _time_discr; } + MEDCOUPLING_EXPORT const MEDCouplingTimeDiscretization *getTimeDiscretizationUnderGround() const { return _time_discr; } + MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *getTimeDiscretizationUnderGround() { return _time_discr; } + MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const; private: MEDCouplingFieldDouble(TypeOfField type, TypeOfTimeDiscretization td); - MEDCouplingFieldDouble(const MEDCouplingFieldTemplate *ft, TypeOfTimeDiscretization td); + MEDCouplingFieldDouble(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td); MEDCouplingFieldDouble(const MEDCouplingFieldDouble& other, bool deepCopy); MEDCouplingFieldDouble(NatureOfField n, MEDCouplingTimeDiscretization *td, MEDCouplingFieldDiscretization *type); ~MEDCouplingFieldDouble();