X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingFieldTemplate.hxx;h=118e1dab1200d75706dbcb902cd8e240d9dbf975;hb=8f2a28585bcf231a8f976f36b7fb1d2eed8801c2;hp=e6cc3ae70a6d9d2932801019241820f4e7deeed5;hpb=a23c622fadddf57290253debb129d9008226cdb9;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingFieldTemplate.hxx b/src/MEDCoupling/MEDCouplingFieldTemplate.hxx index e6cc3ae70..118e1dab1 100644 --- a/src/MEDCoupling/MEDCouplingFieldTemplate.hxx +++ b/src/MEDCoupling/MEDCouplingFieldTemplate.hxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D +// Copyright (C) 2007-2020 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,37 +16,61 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// Author : Anthony Geay (CEA/DEN) +// Author : Anthony Geay (EDF R&D) #ifndef __PARAMEDMEM_MEDCOUPLINGFIELDTEMPLATE_HXX__ #define __PARAMEDMEM_MEDCOUPLINGFIELDTEMPLATE_HXX__ #include "MEDCouplingField.hxx" -namespace ParaMEDMEM +namespace MEDCoupling { + class MEDCouplingFieldInt; + class MEDCouplingFieldFloat; class MEDCouplingFieldDouble; - + /*! + * \brief A field template can be seen as a field without the array of values. + * + * A field template aggregates a MEDCouplingMesh and a spatial discretization object (instance of + * MEDCouplingFieldDiscretization). + * + * MEDCouplingFieldTemplate is the most appropriate type for the preparation of matrix using + * MEDCouplingRemapper::prepareEx, since it contains the minimal information requireds to prepare + * the interpolation matrix. + */ class MEDCouplingFieldTemplate : public MEDCouplingField { public: MEDCOUPLING_EXPORT static MEDCouplingFieldTemplate *New(const MEDCouplingFieldDouble& f); + MEDCOUPLING_EXPORT static MEDCouplingFieldTemplate *New(const MEDCouplingFieldFloat& f); + MEDCOUPLING_EXPORT static MEDCouplingFieldTemplate *New(const MEDCouplingFieldInt& f); MEDCOUPLING_EXPORT static MEDCouplingFieldTemplate *New(TypeOfField type); + MEDCOUPLING_EXPORT static MEDCouplingFieldTemplate *NewWithoutCheck(const MEDCouplingFieldDouble& f); + MEDCOUPLING_EXPORT static MEDCouplingFieldTemplate *NewWithoutCheck(const MEDCouplingFieldFloat& f); + MEDCOUPLING_EXPORT static MEDCouplingFieldTemplate *NewWithoutCheck(const MEDCouplingFieldInt& f); + MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingFieldTemplate"); } + MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingFieldTemplate *other, double meshPrec, std::string& reason) const; + MEDCOUPLING_EXPORT bool isEqual(const MEDCouplingFieldTemplate *other, double meshPrec) const; + MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingFieldTemplate *other, double meshPrec) const; MEDCOUPLING_EXPORT std::string simpleRepr() const; MEDCOUPLING_EXPORT std::string advancedRepr() const; - MEDCOUPLING_EXPORT void checkCoherency() const; + MEDCOUPLING_EXPORT void checkConsistencyLight() const; + MEDCOUPLING_EXPORT MCAuto clone(bool recDeepCpy) const; // - MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector& tinyInfo) 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); - MEDCOUPLING_EXPORT void finishUnserialization(const std::vector& tinyInfoI, const std::vector& tinyInfoD, const std::vector& tinyInfoS); - MEDCOUPLING_EXPORT void serialize(DataArrayInt *&dataInt) const; + MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector& tinyInfoI, DataArrayIdType *&dataInt); + MEDCOUPLING_EXPORT void finishUnserialization(const std::vector& tinyInfoI, const std::vector& tinyInfoD, const std::vector& tinyInfoS); + MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&dataInt) const; // MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const; private: - MEDCouplingFieldTemplate(const MEDCouplingFieldDouble& f); + MEDCouplingFieldTemplate(const MEDCouplingFieldDouble& f, bool isChecked=true); + MEDCouplingFieldTemplate(const MEDCouplingFieldFloat& f, bool isChecked=true); + MEDCouplingFieldTemplate(const MEDCouplingFieldInt& f, bool isChecked=true); MEDCouplingFieldTemplate(TypeOfField type); + MEDCouplingFieldTemplate(const MEDCouplingFieldTemplate& other, bool deepCopy); }; }