-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include "MEDCouplingMappedExtrudedMesh.hxx"
#include "MEDCoupling1GTUMesh.hxx"
#include "MEDCouplingFieldDiscretization.hxx"
+#include "MEDCouplingFieldDiscretizationOnNodesFE.hxx"
#include "MEDCouplingMultiFields.hxx"
#include "MEDCouplingPartDefinition.hxx"
#include "MEDCouplingCartesianAMRMesh.hxx"
auto PyDeleter = [](PyObject *ob) { Py_DECREF(ob) ; };
-class AutoPyPtr : std::unique_ptr<PyObject,decltype(PyDeleter)>
-{
- public:
- AutoPyPtr(PyObject *ob):std::unique_ptr<PyObject,decltype(PyDeleter)>(ob,PyDeleter) { }
- PyObject *retn() { return this->release(); }
- operator PyObject *() const { return this->get(); }
-};
+namespace { // Only in this TU, so in an anonymous namespace
+ class AutoPyPtr : std::unique_ptr<PyObject,decltype(PyDeleter)>
+ {
+ public:
+ AutoPyPtr(PyObject *ob):std::unique_ptr<PyObject,decltype(PyDeleter)>(ob,PyDeleter) { }
+ PyObject *retn() { return this->release(); }
+ operator PyObject *() const { return this->get(); }
+ };
+}
AutoPyPtr convertMapStringInt(const std::map<std::string,mcIdType>& cpp)
{
ret=SWIG_NewPointerObj(reinterpret_cast<void*>(fd),SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDiscretizationGaussNE,owner);
if(dynamic_cast<MEDCoupling::MEDCouplingFieldDiscretizationKriging *>(fd))
ret=SWIG_NewPointerObj(reinterpret_cast<void*>(fd),SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDiscretizationKriging,owner);
+ if(dynamic_cast<MEDCoupling::MEDCouplingFieldDiscretizationOnNodesFE *>(fd))
+ ret=SWIG_NewPointerObj(reinterpret_cast<void*>(fd),SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDiscretizationOnNodesFE,owner);
if(!ret)
throw INTERP_KERNEL::Exception("Not recognized type of field discretization on downcast !");
return ret;