Salome HOME
projects
/
tools
/
medcoupling.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add test for .mesh file format
[tools/medcoupling.git]
/
src
/
MEDLoader
/
MEDFileUtilities.cxx
diff --git
a/src/MEDLoader/MEDFileUtilities.cxx
b/src/MEDLoader/MEDFileUtilities.cxx
index 280963984bb63906d0260d06bffc6d04afbe76d4..2f8beeeae16bbf520477c2d987340d50f463b984 100644
(file)
--- a/
src/MEDLoader/MEDFileUtilities.cxx
+++ b/
src/MEDLoader/MEDFileUtilities.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-202
0 CEA/DEN, EDF R&D
+// Copyright (C) 2007-202
4 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@
-49,18
+49,21
@@
med_access_mode MEDFileUtilities::TraduceWriteMode(int medloaderwritemode)
const char *MEDFileUtilities::GetReadableMEDFieldType(med_field_type ft)
{
static const char medFloat64[]="MED_FLOAT64";
const char *MEDFileUtilities::GetReadableMEDFieldType(med_field_type ft)
{
static const char medFloat64[]="MED_FLOAT64";
+ static const char medFloat32[]="MED_FLOAT32";
static const char medInt32[]="MED_INT32";
static const char medInt64[]="MED_INT64";
switch(ft)
{
case MED_FLOAT64:
return medFloat64;
static const char medInt32[]="MED_INT32";
static const char medInt64[]="MED_INT64";
switch(ft)
{
case MED_FLOAT64:
return medFloat64;
+ case MED_FLOAT32:
+ return medFloat32;
case MED_INT32:
return medInt32;
case MED_INT64:
return medInt64;
default:
case MED_INT32:
return medInt32;
case MED_INT64:
return medInt64;
default:
- throw INTERP_KERNEL::Exception("Non supported field type ! Should be FLOAT64, INT32 or INT64 !");
+ throw INTERP_KERNEL::Exception("Non supported field type ! Should be FLOAT64,
FLOAT32,
INT32 or INT64 !");
}
}
}
}
@@
-200,6
+203,11
@@
void MEDCoupling::MEDFileWritableStandAlone::write30(const std::string& fileName
this->writeXX(fileName,mode,3,0,6);
}
this->writeXX(fileName,mode,3,0,6);
}
+void MEDCoupling::MEDFileWritableStandAlone::write40(const std::string& fileName, int mode) const
+{
+ this->writeXX(fileName,mode,4,0,1);
+}
+
void MEDCoupling::MEDFileWritableStandAlone::writeXX(const std::string& fileName, int mode, med_int maj, med_int min, med_int rel) const
{
#if ( MED_NUM_MAJEUR>4 || ( MED_NUM_MAJEUR==4 && MED_NUM_MINEUR>=1 ) )
void MEDCoupling::MEDFileWritableStandAlone::writeXX(const std::string& fileName, int mode, med_int maj, med_int min, med_int rel) const
{
#if ( MED_NUM_MAJEUR>4 || ( MED_NUM_MAJEUR==4 && MED_NUM_MINEUR>=1 ) )