MEDCouplingField.cxx
MEDCouplingFieldFloat.cxx
MEDCouplingFieldDouble.cxx
- MEDCouplingFieldInt.cxx
+ MEDCouplingFieldInt32.cxx
MEDCouplingUMesh.cxx
MEDCouplingUMesh_internal.cxx
MEDCouplingUMesh_intersection.cxx
#include "MEDCouplingFieldDouble.hxx"
#include "MEDCouplingFieldTemplate.hxx"
#include "MEDCouplingFieldT.txx"
-#include "MEDCouplingFieldInt.hxx"
+#include "MEDCouplingFieldInt32.hxx"
#include "MEDCouplingFieldFloat.hxx"
#include "MEDCouplingUMesh.hxx"
#include "MEDCouplingTimeDiscretization.hxx"
return ret.retn();
}
-MEDCouplingFieldInt *MEDCouplingFieldDouble::convertToIntField() const
+MEDCouplingFieldInt32 *MEDCouplingFieldDouble::convertToIntField() const
{
return ConvertToUField<int>(this);
}
namespace MEDCoupling
{
class Voronizer;
- class MEDCouplingFieldInt;
+ class MEDCouplingFieldInt32;
class MEDCouplingFieldTemplate;
class MEDCouplingFieldDouble : public MEDCouplingFieldT<double>
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 MEDCouplingFieldInt32 *convertToIntField() const;
MEDCOUPLING_EXPORT MEDCouplingFieldFloat *convertToFloatField() const;
MEDCOUPLING_EXPORT double getIJK(mcIdType cellId, int nodeIdInCell, int compoId) const;
MEDCOUPLING_EXPORT double accumulate(int compId) const;
+++ /dev/null
-// 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, 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
-// 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 : Yann Pora (EDF R&D)
-
-#include "MEDCouplingFieldInt.hxx"
-#include "MEDCouplingFieldT.txx"
-#include "MEDCouplingFieldDouble.hxx"
-#include "MEDCouplingFieldTemplate.hxx"
-#include "MEDCouplingMesh.hxx"
-#include "MEDCouplingMemArray.txx"
-
-using namespace MEDCoupling;
-
-template class MEDCoupling::MEDCouplingFieldT<int>;
-
-MEDCouplingFieldInt *MEDCouplingFieldInt::New(TypeOfField type, TypeOfTimeDiscretization td)
-{
- return new MEDCouplingFieldInt(type,td);
-}
-
-MEDCouplingFieldInt *MEDCouplingFieldInt::New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td)
-{
- return new MEDCouplingFieldInt(ft,td);
-}
-
-MEDCouplingFieldInt::MEDCouplingFieldInt(TypeOfField type, TypeOfTimeDiscretization td):MEDCouplingFieldT<int>(type,MEDCouplingTimeDiscretizationInt::New(td))
-{
-}
-
-MEDCouplingFieldInt::MEDCouplingFieldInt(const MEDCouplingFieldInt& other, bool deepCpy):MEDCouplingFieldT<int>(other,deepCpy)
-{
-}
-
-MEDCouplingFieldInt::MEDCouplingFieldInt(NatureOfField n, MEDCouplingTimeDiscretizationInt *td, MEDCouplingFieldDiscretization *type):MEDCouplingFieldT<int>(type,n,td)
-{
-}
-
-/*!
- * ** WARINING : This method do not deeply copy neither mesh nor spatial discretization. Only a shallow copy (reference) is done for mesh and spatial discretization ! **
- */
-MEDCouplingFieldInt::MEDCouplingFieldInt(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td):MEDCouplingFieldT<int>(ft,MEDCouplingTimeDiscretizationInt::New(td),false)
-{
-}
-
-MEDCouplingFieldInt *MEDCouplingFieldInt::deepCopy() const
-{
- return cloneWithMesh(true);
-}
-
-MEDCouplingFieldInt *MEDCouplingFieldInt::clone(bool recDeepCpy) const
-{
- return new MEDCouplingFieldInt(*this,recDeepCpy);
-}
-
-MEDCouplingFieldDouble *MEDCouplingFieldInt::convertToDblField() const
-{
- MCAuto<MEDCouplingFieldTemplate> tmp(MEDCouplingFieldTemplate::New(*this));
- int t1,t2;
- double t0(getTime(t1,t2));
- MCAuto<MEDCouplingFieldDouble> ret(MEDCouplingFieldDouble::New(*tmp,getTimeDiscretization()));
- ret->setTime(t0,t1,t2);
- if(getArray())
- {
- MCAuto<DataArrayDouble> arr(getArray()->convertToDblArr());
- ret->setArray(arr);
- }
- return ret.retn();
-}
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D
+// Copyright (C) 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// Author : Yann Pora (EDF R&D)
+// Author : Anthony Geay (EDF R&D)
-#ifndef __MEDCOUPLINGFIELDINT_HXX__
-#define __MEDCOUPLINGFIELDINT_HXX__
+#pragma once
-#include "MEDCoupling.hxx"
-#include "MEDCouplingFieldT.hxx"
-#include "MEDCouplingMemArray.hxx"
-
-#include <string>
+#include "MEDCouplingFieldInt32.hxx"
namespace MEDCoupling
{
- class MEDCouplingFieldDouble;
- class MEDCouplingFieldTemplate;
-
- class MEDCouplingFieldInt : public MEDCouplingFieldT<int>
- {
- public:
- MEDCOUPLING_EXPORT static MEDCouplingFieldInt *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
- MEDCOUPLING_EXPORT static MEDCouplingFieldInt *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
- MEDCOUPLING_EXPORT MEDCouplingFieldInt *deepCopy() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldInt *clone(bool recDeepCpy) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *convertToDblField() const;
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingFieldInt"); }
- protected:
- MEDCouplingFieldInt(TypeOfField type, TypeOfTimeDiscretization td);
- MEDCouplingFieldInt(const MEDCouplingFieldInt& other, bool deepCopy);
- MEDCouplingFieldInt(NatureOfField n, MEDCouplingTimeDiscretizationInt *td, MEDCouplingFieldDiscretization *type);
- MEDCouplingFieldInt(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td);
- ~MEDCouplingFieldInt() { }
- };
+ using MEDCouplingFieldInt = MEDCouplingFieldInt32;
}
-
-#endif
--- /dev/null
+// 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, 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
+// 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 : Yann Pora (EDF R&D)
+
+#include "MEDCouplingFieldInt32.hxx"
+#include "MEDCouplingFieldT.txx"
+#include "MEDCouplingFieldDouble.hxx"
+#include "MEDCouplingFieldTemplate.hxx"
+#include "MEDCouplingMesh.hxx"
+#include "MEDCouplingMemArray.txx"
+
+using namespace MEDCoupling;
+
+template class MEDCoupling::MEDCouplingFieldT<int>;
+
+MEDCouplingFieldInt32 *MEDCouplingFieldInt32::New(TypeOfField type, TypeOfTimeDiscretization td)
+{
+ return new MEDCouplingFieldInt32(type,td);
+}
+
+MEDCouplingFieldInt32 *MEDCouplingFieldInt32::New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td)
+{
+ return new MEDCouplingFieldInt32(ft,td);
+}
+
+MEDCouplingFieldInt32::MEDCouplingFieldInt32(TypeOfField type, TypeOfTimeDiscretization td):MEDCouplingFieldT<int>(type,MEDCouplingTimeDiscretizationInt::New(td))
+{
+}
+
+MEDCouplingFieldInt32::MEDCouplingFieldInt32(const MEDCouplingFieldInt32& other, bool deepCpy):MEDCouplingFieldT<int>(other,deepCpy)
+{
+}
+
+MEDCouplingFieldInt32::MEDCouplingFieldInt32(NatureOfField n, MEDCouplingTimeDiscretizationInt *td, MEDCouplingFieldDiscretization *type):MEDCouplingFieldT<int>(type,n,td)
+{
+}
+
+/*!
+ * ** WARINING : This method do not deeply copy neither mesh nor spatial discretization. Only a shallow copy (reference) is done for mesh and spatial discretization ! **
+ */
+MEDCouplingFieldInt32::MEDCouplingFieldInt32(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td):MEDCouplingFieldT<int>(ft,MEDCouplingTimeDiscretizationInt::New(td),false)
+{
+}
+
+MEDCouplingFieldInt32 *MEDCouplingFieldInt32::deepCopy() const
+{
+ return cloneWithMesh(true);
+}
+
+MEDCouplingFieldInt32 *MEDCouplingFieldInt32::clone(bool recDeepCpy) const
+{
+ return new MEDCouplingFieldInt32(*this,recDeepCpy);
+}
+
+MEDCouplingFieldDouble *MEDCouplingFieldInt32::convertToDblField() const
+{
+ MCAuto<MEDCouplingFieldTemplate> tmp(MEDCouplingFieldTemplate::New(*this));
+ int t1,t2;
+ double t0(getTime(t1,t2));
+ MCAuto<MEDCouplingFieldDouble> ret(MEDCouplingFieldDouble::New(*tmp,getTimeDiscretization()));
+ ret->setTime(t0,t1,t2);
+ if(getArray())
+ {
+ MCAuto<DataArrayDouble> arr(getArray()->convertToDblArr());
+ ret->setArray(arr);
+ }
+ return ret.retn();
+}
--- /dev/null
+// 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, 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
+// 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 : Yann Pora (EDF R&D)
+
+#pragma once
+
+#include "MEDCoupling.hxx"
+#include "MEDCouplingFieldT.hxx"
+#include "MEDCouplingMemArray.hxx"
+
+#include <string>
+
+namespace MEDCoupling
+{
+ class MEDCouplingFieldDouble;
+ class MEDCouplingFieldTemplate;
+
+ class MEDCouplingFieldInt32 : public MEDCouplingFieldT<int>
+ {
+ public:
+ MEDCOUPLING_EXPORT static MEDCouplingFieldInt32 *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
+ MEDCOUPLING_EXPORT static MEDCouplingFieldInt32 *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
+ MEDCOUPLING_EXPORT MEDCouplingFieldInt32 *deepCopy() const;
+ MEDCOUPLING_EXPORT MEDCouplingFieldInt32 *clone(bool recDeepCpy) const;
+ MEDCOUPLING_EXPORT MEDCouplingFieldDouble *convertToDblField() const;
+ MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingFieldInt32"); }
+ protected:
+ MEDCouplingFieldInt32(TypeOfField type, TypeOfTimeDiscretization td);
+ MEDCouplingFieldInt32(const MEDCouplingFieldInt32& other, bool deepCopy);
+ MEDCouplingFieldInt32(NatureOfField n, MEDCouplingTimeDiscretizationInt *td, MEDCouplingFieldDiscretization *type);
+ MEDCouplingFieldInt32(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td);
+ ~MEDCouplingFieldInt32() { }
+ };
+}
#include "MEDCouplingFieldTemplate.hxx"
#include "MEDCouplingMesh.hxx"
-#include "MEDCouplingFieldInt.hxx"
+#include "MEDCouplingFieldInt32.hxx"
#include "MEDCouplingFieldFloat.hxx"
#include "MEDCouplingFieldDouble.hxx"
#include "MEDCouplingFieldDiscretization.hxx"
return new MEDCouplingFieldTemplate(f,true);
}
-MEDCouplingFieldTemplate *MEDCouplingFieldTemplate::New(const MEDCouplingFieldInt& f)
+MEDCouplingFieldTemplate *MEDCouplingFieldTemplate::New(const MEDCouplingFieldInt32& f)
{
return new MEDCouplingFieldTemplate(f,true);
}
return new MEDCouplingFieldTemplate(f,false);
}
-MEDCouplingFieldTemplate *MEDCouplingFieldTemplate::NewWithoutCheck(const MEDCouplingFieldInt& f)
+MEDCouplingFieldTemplate *MEDCouplingFieldTemplate::NewWithoutCheck(const MEDCouplingFieldInt32& f)
{
return new MEDCouplingFieldTemplate(f,false);
}
checkConsistencyLight();
}
-MEDCouplingFieldTemplate::MEDCouplingFieldTemplate(const MEDCouplingFieldInt& f, bool isChecked):MEDCouplingField(f,false)
+MEDCouplingFieldTemplate::MEDCouplingFieldTemplate(const MEDCouplingFieldInt32& f, bool isChecked):MEDCouplingField(f,false)
{
forceTimeOfThis(f);
if(isChecked)
//
// Author : Anthony Geay (EDF R&D)
-#ifndef __PARAMEDMEM_MEDCOUPLINGFIELDTEMPLATE_HXX__
-#define __PARAMEDMEM_MEDCOUPLINGFIELDTEMPLATE_HXX__
+#pragma once
#include "MEDCouplingField.hxx"
namespace MEDCoupling
{
- class MEDCouplingFieldInt;
+ class MEDCouplingFieldInt32;
class MEDCouplingFieldFloat;
class MEDCouplingFieldDouble;
/*!
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(const MEDCouplingFieldInt32& 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 static MEDCouplingFieldTemplate *NewWithoutCheck(const MEDCouplingFieldInt32& 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;
private:
MEDCouplingFieldTemplate(const MEDCouplingFieldDouble& f, bool isChecked=true);
MEDCouplingFieldTemplate(const MEDCouplingFieldFloat& f, bool isChecked=true);
- MEDCouplingFieldTemplate(const MEDCouplingFieldInt& f, bool isChecked=true);
+ MEDCouplingFieldTemplate(const MEDCouplingFieldInt32& f, bool isChecked=true);
MEDCouplingFieldTemplate(TypeOfField type);
MEDCouplingFieldTemplate(const MEDCouplingFieldTemplate& other, bool deepCopy);
};
}
-
-#endif
class DataArrayInt64;
class MEDCouplingFieldDouble;
class MEDCouplingFieldFloat;
- class MEDCouplingFieldInt;
+ class MEDCouplingFieldInt32;
class DataArrayInt32Tuple;
class DataArrayInt64Tuple;
class DataArrayFloatTuple;
static const char VTKReprStr[];
using ArrayType = DataArrayInt32;
using ArrayTypeCh = DataArrayInt32;
- using FieldType = MEDCouplingFieldInt;
+ using FieldType = MEDCouplingFieldInt32;
using ArrayTuple = DataArrayInt32Tuple;
using IteratorType = DataArrayInt32Iterator;
};