X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDLoader%2FMEDFileJoint.hxx;h=98d4a7e5370737aae26efba8e54b0aee3500ee95;hb=b307fa3ee9c6d9e08082e2ccc832b28a17fd6d2c;hp=ed2f70bee40f38a44270c3f0cd9247eca2706764;hpb=fb6ad3f990cf8c26e23ff4f6ed571d85dc738aac;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/MEDFileJoint.hxx b/src/MEDLoader/MEDFileJoint.hxx index ed2f70bee..98d4a7e53 100644 --- a/src/MEDLoader/MEDFileJoint.hxx +++ b/src/MEDLoader/MEDFileJoint.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D +// Copyright (C) 2007-2021 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 @@ -21,9 +21,11 @@ #define __MEDFILEJOINT_HXX__ #include "MEDLoaderDefines.hxx" -#include "MEDFileUtilities.hxx" +#include "MEDFileUtilities.txx" #include "MEDCouplingMemArray.hxx" -#include "MEDCouplingAutoRefCountObjectPtr.hxx" +#include "MCAuto.hxx" + +#include "NormalizedGeometricTypes" namespace MEDCoupling { @@ -37,13 +39,14 @@ class MEDFileJointCorrespondence : public RefCountObject, public MEDFileWritable { public: MEDLOADER_EXPORT static MEDFileJointCorrespondence *New(); - MEDLOADER_EXPORT static MEDFileJointCorrespondence *New(DataArrayInt* correspondence); // nodes - MEDLOADER_EXPORT static MEDFileJointCorrespondence *New(DataArrayInt* correspondence, // cells + MEDLOADER_EXPORT static MEDFileJointCorrespondence *New(DataArrayIdType* correspondence); // nodes + MEDLOADER_EXPORT static MEDFileJointCorrespondence *New(DataArrayIdType* correspondence, // cells INTERP_KERNEL::NormalizedCellType loc_geo_type, INTERP_KERNEL::NormalizedCellType rem_geo_type); + MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileJointCorrespondence"); } MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; MEDLOADER_EXPORT std::vector getDirectChildrenWithNull() const; - MEDLOADER_EXPORT MEDFileJointCorrespondence *deepCpy() const; + MEDLOADER_EXPORT MEDFileJointCorrespondence *deepCopy() const; MEDLOADER_EXPORT MEDFileJointCorrespondence *shallowCpy() const; MEDLOADER_EXPORT bool isEqual(const MEDFileJointCorrespondence *other) const; MEDLOADER_EXPORT void setIsNodal(bool isNodal) { _is_nodal = isNodal; } @@ -52,15 +55,15 @@ public: MEDLOADER_EXPORT INTERP_KERNEL::NormalizedCellType getLocalGeometryType() const { return _loc_geo_type; } MEDLOADER_EXPORT void setRemoteGeometryType(INTERP_KERNEL::NormalizedCellType type) { _rem_geo_type=type; } MEDLOADER_EXPORT INTERP_KERNEL::NormalizedCellType getRemoteGeometryType() const { return _rem_geo_type; } - MEDLOADER_EXPORT void setCorrespondence(DataArrayInt *corr); - MEDLOADER_EXPORT const DataArrayInt *getCorrespondence() const { return _correspondence; } + MEDLOADER_EXPORT void setCorrespondence(DataArrayIdType *corr); + MEDLOADER_EXPORT const DataArrayIdType *getCorrespondence() const { return _correspondence; } MEDLOADER_EXPORT void write(const std::string& fileName, int mode, const std::string& localMeshName, const std::string& jointName, int order, int iteration) const; MEDLOADER_EXPORT std::string simpleRepr() const; MEDLOADER_EXPORT void writeLL(med_idt fid, const std::string& localMeshName, const std::string& jointName, int order, int iteration) const; private: MEDFileJointCorrespondence(); - MEDFileJointCorrespondence(DataArrayInt* correspondence, + MEDFileJointCorrespondence(DataArrayIdType* correspondence, bool is_nodal = true, INTERP_KERNEL::NormalizedCellType loc_geo_type = INTERP_KERNEL::NORM_ERROR, INTERP_KERNEL::NormalizedCellType rem_geo_type = INTERP_KERNEL::NORM_ERROR); @@ -68,7 +71,7 @@ private: bool _is_nodal; INTERP_KERNEL::NormalizedCellType _loc_geo_type; INTERP_KERNEL::NormalizedCellType _rem_geo_type; - MEDCouplingAutoRefCountObjectPtr _correspondence; + MCAuto _correspondence; }; /*! @@ -80,9 +83,10 @@ public: MEDLOADER_EXPORT static MEDFileJointOneStep *New(int dt=-1, int it=-1); MEDLOADER_EXPORT static MEDFileJointOneStep *New(const std::string& fileName, const std::string& mName, const std::string& jointName, int number=1); MEDLOADER_EXPORT static MEDFileJointOneStep *New(med_idt fid, const std::string& mName, const std::string& jointName, int number=1); + MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileJointOneStep"); } MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; MEDLOADER_EXPORT std::vector getDirectChildrenWithNull() const; - MEDLOADER_EXPORT MEDFileJointOneStep *deepCpy() const; + MEDLOADER_EXPORT MEDFileJointOneStep *deepCopy() const; MEDLOADER_EXPORT MEDFileJointOneStep *shallowCpy() const; MEDLOADER_EXPORT bool isEqual(const MEDFileJointOneStep *other) const; MEDLOADER_EXPORT void setOrder(int order) { _order=order; } @@ -105,23 +109,24 @@ protected: int _order; int _iteration; private: - std::vector > _correspondences; + std::vector > _correspondences; }; /*! * \brief Joint holds a sequence of joints of different iterations relating to * a pair of mesh domains: a local one and a distant one */ -class MEDFileJoint : public RefCountObject, public MEDFileWritable +class MEDFileJoint : public RefCountObject, public MEDFileWritableStandAlone { public: MEDLOADER_EXPORT static MEDFileJoint *New(); MEDLOADER_EXPORT static MEDFileJoint *New(const std::string& fileName, const std::string& mName, int num); MEDLOADER_EXPORT static MEDFileJoint *New(med_idt fid, const std::string& mName, int num); MEDLOADER_EXPORT static MEDFileJoint *New(const std::string& jointName, const std::string& locMeshName, const std::string& remoteMeshName, int remoteMeshNum ); + MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileJoint"); } MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; MEDLOADER_EXPORT std::vector getDirectChildrenWithNull() const; - MEDLOADER_EXPORT MEDFileJoint *deepCpy() const; + MEDLOADER_EXPORT MEDFileJoint *deepCopy() const; MEDLOADER_EXPORT MEDFileJoint *shallowCpy() const; MEDLOADER_EXPORT bool isEqual(const MEDFileJoint *other) const; MEDLOADER_EXPORT void setLocalMeshName(const std::string& name) { _loc_mesh_name=name; } @@ -139,8 +144,7 @@ public: MEDLOADER_EXPORT int getNumberOfSteps() const; MEDLOADER_EXPORT MEDFileJointOneStep *getStepAtPos(int i) const; - MEDLOADER_EXPORT void write(const std::string& fileName, int mode) const; - MEDLOADER_EXPORT void write(med_idt fid) const; + MEDLOADER_EXPORT void writeLL(med_idt fid) const; MEDLOADER_EXPORT std::string simpleRepr() const; private: @@ -152,25 +156,25 @@ public: std::string _desc_name; int _domain_number; std::string _rem_mesh_name; - std::vector< MEDCouplingAutoRefCountObjectPtr > _joint; + std::vector< MCAuto > _joint; }; /*! * \brief Joints of a mesh domain relating to all other mesh domains */ - class MEDFileJoints : public RefCountObject, public MEDFileWritable + class MEDFileJoints : public RefCountObject, public MEDFileWritableStandAlone { public: MEDLOADER_EXPORT static MEDFileJoints *New(); MEDLOADER_EXPORT static MEDFileJoints *New(const std::string& fileName, const std::string& meshName); MEDLOADER_EXPORT static MEDFileJoints *New(med_idt fid, const std::string& meshName); - MEDLOADER_EXPORT MEDFileJoints *deepCpy() const; + MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileJoints"); } + MEDLOADER_EXPORT MEDFileJoints *deepCopy() const; MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; MEDLOADER_EXPORT std::vector getDirectChildrenWithNull() const; MEDLOADER_EXPORT std::string simpleRepr() const; MEDLOADER_EXPORT void simpleReprWithoutHeader(std::ostream& oss) const; - MEDLOADER_EXPORT void write(const std::string& fileName, int mode) const; - MEDLOADER_EXPORT void write(med_idt fid) const; + MEDLOADER_EXPORT void writeLL(med_idt fid) const; MEDLOADER_EXPORT std::string getMeshName() const; MEDLOADER_EXPORT int getNumberOfJoints() const; MEDLOADER_EXPORT MEDFileJoint *getJointAtPos(int i) const; @@ -187,7 +191,7 @@ public: MEDFileJoints(); MEDFileJoints(med_idt fid, const std::string& meshName); private: - std::vector< MEDCouplingAutoRefCountObjectPtr > _joints; + std::vector< MCAuto > _joints; }; }