From 138bc55414fcc14038a4a93a6e00d613df1df43d Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 23 Aug 2013 07:49:10 +0000 Subject: [PATCH] Unwarningization under Win. --- src/MEDCoupling_Swig/CMakeLists.txt | 2 +- src/MEDCoupling_Swig/MEDCouplingCommon.i | 5 +- .../MEDCouplingTimeDiscretization.i | 171 ++++++++++++++++++ 3 files changed, 175 insertions(+), 3 deletions(-) create mode 100644 src/MEDCoupling_Swig/MEDCouplingTimeDiscretization.i diff --git a/src/MEDCoupling_Swig/CMakeLists.txt b/src/MEDCoupling_Swig/CMakeLists.txt index ae3c2479b..fe89399da 100644 --- a/src/MEDCoupling_Swig/CMakeLists.txt +++ b/src/MEDCoupling_Swig/CMakeLists.txt @@ -78,7 +78,7 @@ INSTALL(TARGETS ${SWIG_MODULE_MEDCoupling_REAL_NAME} ${SWIG_MODULE_MEDCouplingRe SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCoupling.py ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingRemapper.py) INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${SALOME_INSTALL_SCRIPT_PYTHON}) -INSTALL(FILES MEDCoupling.i MEDCouplingCommon.i MEDCouplingMemArray.i MEDCouplingFieldDiscretization.i MEDCouplingFinalize.i MEDCouplingRemapper.i MEDCouplingTypemaps.i DESTINATION ${SALOME_INSTALL_HEADERS}) +INSTALL(FILES MEDCoupling.i MEDCouplingCommon.i MEDCouplingMemArray.i MEDCouplingFieldDiscretization.i MEDCouplingTimeDiscretization.i MEDCouplingFinalize.i MEDCouplingRemapper.i MEDCouplingTypemaps.i DESTINATION ${SALOME_INSTALL_HEADERS}) INSTALL(FILES MEDCouplingBasicsTest.py MEDCouplingRemapperTest.py MEDCouplingDataForTest.py MEDCouplingNumPyTest.py DESTINATION ${SALOME_INSTALL_SCRIPT_PYTHON}) INSTALL(FILES MEDCouplingExamplesTest.py DESTINATION ${SALOME_INSTALL_SCRIPT_PYTHON}) diff --git a/src/MEDCoupling_Swig/MEDCouplingCommon.i b/src/MEDCoupling_Swig/MEDCouplingCommon.i index 7fbe47208..a511180cd 100644 --- a/src/MEDCoupling_Swig/MEDCouplingCommon.i +++ b/src/MEDCoupling_Swig/MEDCouplingCommon.i @@ -1127,8 +1127,9 @@ namespace ParaMEDMEM static std::string GetAllPossibilitiesStr(); }; } -// -%include "MEDCouplingTimeDiscretization.hxx" + +// the MEDCouplingTimeDiscretization classes are not swigged : in case the file can help +// include "MEDCouplingTimeDiscretization.i" namespace ParaMEDMEM { diff --git a/src/MEDCoupling_Swig/MEDCouplingTimeDiscretization.i b/src/MEDCoupling_Swig/MEDCouplingTimeDiscretization.i new file mode 100644 index 000000000..64d7b7472 --- /dev/null +++ b/src/MEDCoupling_Swig/MEDCouplingTimeDiscretization.i @@ -0,0 +1,171 @@ +// 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 +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// Author : Anthony Geay (CEA/DEN) + +namespace ParaMEDMEM +{ + class MEDCouplingTimeDiscretization : public TimeLabel, public BigMemoryObject + { + public: + static MEDCouplingTimeDiscretization *New(TypeOfTimeDiscretization type) throw(INTERP_KERNEL::Exception); + void setTimeUnit(const char *unit); + const char *getTimeUnit() const; + virtual void copyTinyAttrFrom(const MEDCouplingTimeDiscretization& other) throw(INTERP_KERNEL::Exception); + virtual void copyTinyStringsFrom(const MEDCouplingTimeDiscretization& other) throw(INTERP_KERNEL::Exception); + virtual void checkCoherency() const throw(INTERP_KERNEL::Exception); + virtual bool areCompatible(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + virtual bool areStrictlyCompatible(const MEDCouplingTimeDiscretization *other, std::string& reason) const throw(INTERP_KERNEL::Exception); + virtual bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + virtual bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + virtual bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + virtual bool isEqualIfNotWhy(const MEDCouplingTimeDiscretization *other, double prec, std::string& reason) const throw(INTERP_KERNEL::Exception); + virtual bool isEqual(const MEDCouplingTimeDiscretization *other, double prec) const throw(INTERP_KERNEL::Exception); + virtual bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretization *other, double prec) const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *buildNewTimeReprFromThis(TypeOfTimeDiscretization type, bool deepCpy) const throw(INTERP_KERNEL::Exception); + virtual std::string getStringRepr() const throw(INTERP_KERNEL::Exception); + virtual TypeOfTimeDiscretization getEnum() const throw(INTERP_KERNEL::Exception); + virtual void synchronizeTimeWith(const MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *aggregate(const std::vector& other) const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *dot(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *crossProduct(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *max(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *min(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + virtual void addEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + virtual void substractEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + virtual void multiplyEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + virtual void divideEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *pow(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + virtual void powEqual(const MEDCouplingTimeDiscretization *other) throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *performCpy(bool deepCpy) const throw(INTERP_KERNEL::Exception); + void setTimeTolerance(double val); + double getTimeTolerance() const; + virtual void checkNoTimePresence() const throw(INTERP_KERNEL::Exception); + virtual void checkTimePresence(double time) const throw(INTERP_KERNEL::Exception); + virtual void setArray(DataArrayDouble *array, TimeLabel *owner) throw(INTERP_KERNEL::Exception); + virtual void setEndArray(DataArrayDouble *array, TimeLabel *owner) throw(INTERP_KERNEL::Exception); + virtual void setArrays(const std::vector& arrays, TimeLabel *owner) throw(INTERP_KERNEL::Exception); + DataArrayDouble *getArray() throw(INTERP_KERNEL::Exception); + const DataArrayDouble *getArray() const throw(INTERP_KERNEL::Exception); + virtual const DataArrayDouble *getEndArray() const throw(INTERP_KERNEL::Exception); + virtual DataArrayDouble *getEndArray() throw(INTERP_KERNEL::Exception); + virtual std::vector< const DataArrayDouble *> getArraysForTime(double time) const throw(INTERP_KERNEL::Exception); + virtual void getValueForTime(double time, const std::vector& vals, double *res) const throw(INTERP_KERNEL::Exception); + virtual void getArrays(std::vector& arrays) const throw(INTERP_KERNEL::Exception); + virtual bool isBefore(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + virtual bool isStrictlyBefore(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); + double getTime(int& iteration, int& order) const throw(INTERP_KERNEL::Exception); + virtual double getStartTime(int& iteration, int& order) const throw(INTERP_KERNEL::Exception); + virtual double getEndTime(int& iteration, int& order) const throw(INTERP_KERNEL::Exception); + void setTime(double time, int iteration, int order) throw(INTERP_KERNEL::Exception); + void setIteration(int it) throw(INTERP_KERNEL::Exception); + void setOrder(int order) throw(INTERP_KERNEL::Exception); + void setTimeValue(double val) throw(INTERP_KERNEL::Exception); + virtual void setStartIteration(int it) throw(INTERP_KERNEL::Exception); + virtual void setEndIteration(int it) throw(INTERP_KERNEL::Exception); + virtual void setStartOrder(int order) throw(INTERP_KERNEL::Exception); + virtual void setEndOrder(int order) throw(INTERP_KERNEL::Exception); + virtual void setStartTimeValue(double time) throw(INTERP_KERNEL::Exception); + virtual void setEndTimeValue(double time) throw(INTERP_KERNEL::Exception); + virtual void setStartTime(double time, int iteration, int order) throw(INTERP_KERNEL::Exception); + virtual void setEndTime(double time, int iteration, int order) throw(INTERP_KERNEL::Exception); + virtual void getValueOnTime(int eltId, double time, double *value) const throw(INTERP_KERNEL::Exception); + virtual void getValueOnDiscTime(int eltId, int iteration, int order, double *value) const throw(INTERP_KERNEL::Exception); + // + virtual MEDCouplingTimeDiscretization *doublyContractedProduct() const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *determinant() const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *eigenValues() const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *eigenVectors() const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *inverse() const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *trace() const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *deviator() const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *magnitude() const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *negate() const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *maxPerTuple() const throw(INTERP_KERNEL::Exception); + virtual MEDCouplingTimeDiscretization *keepSelectedComponents(const std::vector& compoIds) const throw(INTERP_KERNEL::Exception); + virtual void setSelectedComponents(const MEDCouplingTimeDiscretization *other, const std::vector& compoIds) throw(INTERP_KERNEL::Exception); + virtual void changeNbOfComponents(int newNbOfComp, double dftValue) throw(INTERP_KERNEL::Exception); + virtual void sortPerTuple(bool asc) throw(INTERP_KERNEL::Exception); + virtual void setUniformValue(int nbOfTuple, int nbOfCompo, double value) throw(INTERP_KERNEL::Exception); + virtual void setOrCreateUniformValueOnAllComponents(int nbOfTuple, double value) throw(INTERP_KERNEL::Exception); + virtual void applyLin(double a, double b, int compoId) throw(INTERP_KERNEL::Exception); + virtual void applyFunc(int nbOfComp, FunctionToEvaluate func) throw(INTERP_KERNEL::Exception); + virtual void applyFunc(int nbOfComp, const char *func) throw(INTERP_KERNEL::Exception); + virtual void applyFunc2(int nbOfComp, const char *func) throw(INTERP_KERNEL::Exception); + virtual void applyFunc3(int nbOfComp, const std::vector& varsOrder, const char *func) throw(INTERP_KERNEL::Exception); + virtual void applyFunc(const char *func) throw(INTERP_KERNEL::Exception); + virtual void applyFuncFast32(const char *func) throw(INTERP_KERNEL::Exception); + virtual void applyFuncFast64(const char *func) throw(INTERP_KERNEL::Exception); + virtual void fillFromAnalytic(const DataArrayDouble *loc, int nbOfComp, FunctionToEvaluate func) throw(INTERP_KERNEL::Exception); + virtual void fillFromAnalytic(const DataArrayDouble *loc, int nbOfComp, const char *func) throw(INTERP_KERNEL::Exception); + virtual void fillFromAnalytic2(const DataArrayDouble *loc, int nbOfComp, const char *func) throw(INTERP_KERNEL::Exception); + virtual void fillFromAnalytic3(const DataArrayDouble *loc, int nbOfComp, const std::vector& varsOrder, const char *func) throw(INTERP_KERNEL::Exception); + // + virtual ~MEDCouplingTimeDiscretization(); + }; + + class MEDCouplingNoTimeLabel : public MEDCouplingTimeDiscretization + { + public: + MEDCouplingNoTimeLabel(); + MEDCouplingNoTimeLabel(const MEDCouplingTimeDiscretization& other, bool deepCpy); + public: + static const TypeOfTimeDiscretization DISCRETIZATION=NO_TIME; + static const char REPR[]; + }; + + class MEDCouplingWithTimeStep : public MEDCouplingTimeDiscretization + { + public: + MEDCouplingWithTimeStep(); + public: + static const TypeOfTimeDiscretization DISCRETIZATION=ONE_TIME; + static const char REPR[]; + }; + + class MEDCouplingConstOnTimeInterval : public MEDCouplingTimeDiscretization + { + protected: + MEDCouplingConstOnTimeInterval(); + MEDCouplingConstOnTimeInterval(const MEDCouplingConstOnTimeInterval& other, bool deepCpy); + public: + static const TypeOfTimeDiscretization DISCRETIZATION=CONST_ON_TIME_INTERVAL; + static const char REPR[]; + }; + + class MEDCouplingTwoTimeSteps : public MEDCouplingTimeDiscretization + { + }; + + class MEDCouplingLinearTime : public MEDCouplingTwoTimeSteps + { + public: + MEDCouplingLinearTime(); + public: + static const TypeOfTimeDiscretization DISCRETIZATION=LINEAR_TIME; + static const char REPR[]; + }; +} + +#endif -- 2.39.2