-// Copyright (C) 2007-2015 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
//
// 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 array of values.
+ * \brief A field template can be seen as a field without the array of values.
*
- * A field template instance aggregates a MEDCouplingMesh instance and a spatial discretization object (instance of MEDCouplingFieldDiscretization).
+ * A field template aggregates a MEDCouplingMesh and a spatial discretization object (instance of
+ * MEDCouplingFieldDiscretization).
*
- * Instances of type MEDCouplingFieldTemplate are the most appropriate for preparation of matrix using MEDCouplingRemapper::prepareEx.
+ * 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 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<MEDCouplingFieldTemplate> clone(bool recDeepCpy) const;
//
MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) 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);
};
}