X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingFieldDouble.hxx;h=051d4a5e2295d6c9ee4bf019e447dd3be556a1eb;hb=e66b6e2d02fe4b9e544deb731cc68d070382029c;hp=4d86fd3f8f19636eb896cb25ea19693ed7608c8d;hpb=10f37bf6f33a762626d7f1093b2f5450c1688667;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingFieldDouble.hxx b/src/MEDCoupling/MEDCouplingFieldDouble.hxx index 4d86fd3f8..051d4a5e2 100644 --- a/src/MEDCoupling/MEDCouplingFieldDouble.hxx +++ b/src/MEDCoupling/MEDCouplingFieldDouble.hxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D +// Copyright (C) 2007-2016 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 // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,178 +16,151 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// Author : Anthony Geay (CEA/DEN) -#ifndef __PARAMEDMEM_MEDCOUPLINGFIELDDOUBLE_HXX__ -#define __PARAMEDMEM_MEDCOUPLINGFIELDDOUBLE_HXX__ +#ifndef __MEDCOUPLINGFIELDDOUBLE_HXX__ +#define __MEDCOUPLINGFIELDDOUBLE_HXX__ #include "MEDCoupling.hxx" -#include "MEDCouplingField.hxx" -#include "MEDCouplingTimeDiscretization.hxx" +#include "MEDCouplingFieldT.hxx" #include "MEDCouplingMemArray.hxx" -namespace ParaMEDMEM +namespace MEDCoupling { + class Voronizer; + class MEDCouplingFieldInt; class MEDCouplingFieldTemplate; - class MEDCOUPLING_EXPORT MEDCouplingFieldDouble : public MEDCouplingField + class MEDCouplingFieldDouble : public MEDCouplingFieldT { public: - static MEDCouplingFieldDouble *New(TypeOfField type, TypeOfTimeDiscretization td=NO_TIME); - static MEDCouplingFieldDouble *New(const MEDCouplingFieldTemplate *ft, TypeOfTimeDiscretization td=NO_TIME); - void setTimeUnit(const char *unit); - const char *getTimeUnit() const; - void copyTinyStringsFrom(const MEDCouplingFieldDouble *other) throw(INTERP_KERNEL::Exception); - void copyTinyAttrFrom(const MEDCouplingFieldDouble *other) throw(INTERP_KERNEL::Exception); - std::string simpleRepr() const; - std::string advancedRepr() const; - 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, 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 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; + 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 synchronizeTimeWithSupport(); + MEDCOUPLING_EXPORT std::string advancedRepr() const; + MEDCOUPLING_EXPORT std::string writeVTK(const std::string& fileName, bool isBinary=true) const; + MEDCOUPLING_EXPORT bool areCompatibleForMerge(const MEDCouplingField *other) const; + MEDCOUPLING_EXPORT bool areCompatibleForMeld(const MEDCouplingFieldDouble *other) const; + 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 *findIdsInRange(double vmin, double vmax) const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *deepCopy() const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *clone(bool recDeepCpy) const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildNewTimeReprFromThis(TypeOfTimeDiscretization td, bool deepCpy) const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *nodeToCellDiscretization() const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *cellToNodeDiscretization() const; + MEDCOUPLING_EXPORT MEDCouplingFieldInt *convertToIntField() const; + MEDCOUPLING_EXPORT MEDCouplingFieldFloat *convertToFloatField() const; + MEDCOUPLING_EXPORT double getIJK(int cellId, int nodeIdInCell, int compoId) const; + 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 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 normMax(int compId) const; + MEDCOUPLING_EXPORT void normMax(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 void applyLin(double a, double b); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble &operator=(double value); + MEDCOUPLING_EXPORT void fillFromAnalytic(int nbOfComp, FunctionToEvaluate func); + MEDCOUPLING_EXPORT void fillFromAnalytic(int nbOfComp, const std::string& func); + MEDCOUPLING_EXPORT void fillFromAnalyticCompo(int nbOfComp, const std::string& func); + MEDCOUPLING_EXPORT void fillFromAnalyticNamedCompo(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 applyFuncCompo(int nbOfComp, const std::string& func); + MEDCOUPLING_EXPORT void applyFuncNamedCompo(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 std::size_t getNumberOfComponents() const; + MEDCOUPLING_EXPORT std::size_t getNumberOfTuples() const; + MEDCOUPLING_EXPORT std::size_t getNumberOfValues() const; + MEDCOUPLING_EXPORT void updateTime() const; + MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; + MEDCOUPLING_EXPORT std::vector getDirectChildrenWithNull() 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; - // - 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 mergeNodesCenter(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 MCAuto voronoize(double eps) const; + MEDCOUPLING_EXPORT MCAuto convertQuadraticCellsToLinear() const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *computeVectorFieldCyl(const double center[3], const double vect[3]) const; + 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); + 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); + 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); + 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); + MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *DivideFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *operator^(const MEDCouplingFieldDouble& other) const; + MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator^=(const MEDCouplingFieldDouble& other); + MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *PowFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); + MEDCOUPLING_EXPORT static std::string 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; } - private: - MEDCouplingFieldDouble(TypeOfField type, TypeOfTimeDiscretization td); - MEDCouplingFieldDouble(const MEDCouplingFieldTemplate *ft, TypeOfTimeDiscretization td); - MEDCouplingFieldDouble(const MEDCouplingFieldDouble& other, bool deepCopy); - MEDCouplingFieldDouble(NatureOfField n, MEDCouplingTimeDiscretization *td, MEDCouplingFieldDiscretization *type); - ~MEDCouplingFieldDouble(); + MEDCOUPLING_EXPORT const MEDCouplingTimeDiscretization *getTimeDiscretizationUnderGround() const { return timeDiscr(); } + MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *getTimeDiscretizationUnderGround() { return timeDiscr(); } + protected: + ~MEDCouplingFieldDouble() { } private: - MEDCouplingTimeDiscretization *_time_discr; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble(TypeOfField type, TypeOfTimeDiscretization td); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble(const MEDCouplingFieldDouble& other, bool deepCpy); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble(NatureOfField n, MEDCouplingTimeDiscretization *td, MEDCouplingFieldDiscretization *type); + MEDCOUPLING_EXPORT MCAuto voronoizeGen(const Voronizer *vor, double eps) const; + MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *timeDiscr(); + MEDCOUPLING_EXPORT const MEDCouplingTimeDiscretization *timeDiscr() const; }; }