using namespace MED;
+//================================================================================
+/*!
+ * \brief Constructor
+ */
+//================================================================================
+
DriverMED_W_SMESHDS_Mesh::DriverMED_W_SMESHDS_Mesh():
myAllSubMeshes (false),
myDoGroupOfNodes (false),
myAddODOnVertices(false),
myDoAllInGroups(false),
myVersion(-1),
- myZTolerance(-1.)
+ myZTolerance(-1.),
+ mySaveNumbers(true)
{}
+//================================================================================
+/*!
+ * \brief Set a file name and a version
+ * \param [in] theFileName - output file name
+ * \param [in] theVersion - desired MED file version == major * 10 + minor
+ */
+//================================================================================
+
void DriverMED_W_SMESHDS_Mesh::SetFile(const std::string& theFileName, int theVersion)
{
myVersion = theVersion;
Driver_SMESHDS_Mesh::SetFile(theFileName);
}
+//================================================================================
/*!
* MED version is either the latest available, or with an inferior minor,
* to ensure backward compatibility on writing med files.
*/
+//================================================================================
+
string DriverMED_W_SMESHDS_Mesh::GetVersionString(int theMinor, int theNbDigits)
{
TInt majeur, mineur, release;
myDoGroupOfBalls = true;
}
-//================================================================================
-/*!
- * \brief Set up a flag to add all elements not belonging to any group to
- * some auxiliary group. This is needed for SMESH -> SAUVE -> SMESH conversion,
- * which since PAL0023285 reads only SAUVE elements belonging to any group,
- * and hence can lose some elements. That auxiliary group is ignored while
- * reading a MED file.
- */
-//================================================================================
-
-void DriverMED_W_SMESHDS_Mesh::AddAllToGroup()
-{
- myDoAllInGroups = true;
-}
-
namespace
{
+ //---------------------------------------------
+ /*!
+ * \brief Retrieving node coordinates utilities
+ */
+ //---------------------------------------------
+
typedef double (SMDS_MeshNode::* TGetCoord)() const;
typedef const char* TName;
typedef const char* TUnit;
}
}
+//================================================================================
+/*!
+ * \brief Write my mesh to a file
+ */
+//================================================================================
+
Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
{
MED::PWrapper myMed = CrWrapperW(myFile, myVersion);
return this->PerformInternal<MED::PWrapper>(myMed);
}
+//================================================================================
+/*!
+ * \brief Write my mesh to a MEDCoupling DS
+ */
+//================================================================================
+
Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh_Mem::Perform()
{
void *ptr(nullptr);
#endif
const EModeSwitch theMode = eFULL_INTERLACE;
const ERepere theSystem = eCART;
- const EBooleen theIsElemNum = eVRAI;
+ const EBooleen theIsElemNum = mySaveNumbers ? eVRAI : eFAUX;
const EBooleen theIsElemNames = eFAUX;
const EConnectivite theConnMode = eNOD;