Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
022500: [CEA 1077] 'GetLibName' not found
[modules/smesh.git]
/
src
/
DriverMED
/
DriverMED_W_SMESHDS_Mesh.cxx
diff --git
a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx
b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx
index 9d1bf4adf7461c8b7c0c4482b1013f5bb82bb133..1006479ccddea4a0360f0e43e6a26bd261349d9d 100644
(file)
--- a/
src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx
+++ b/
src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
2
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
4
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-6,7
+6,7
@@
// 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
// 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.
+// 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
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-24,19
+24,19
@@
// File : DriverMED_W_SMESHDS_Mesh.cxx
// Module : SMESH
//
// File : DriverMED_W_SMESHDS_Mesh.cxx
// Module : SMESH
//
-#include <sstream>
#include "DriverMED_W_SMESHDS_Mesh.h"
#include "DriverMED_W_SMESHDS_Mesh.h"
-#include "DriverMED_Family.h"
-#include "SMESHDS_Mesh.hxx"
+#include "DriverMED_Family.h"
+#include "MED_Factory.hxx"
+#include "MED_Utilities.hxx"
#include "SMDS_MeshElement.hxx"
#include "SMDS_MeshNode.hxx"
#include "SMDS_PolyhedralVolumeOfNodes.hxx"
#include "SMDS_MeshElement.hxx"
#include "SMDS_MeshNode.hxx"
#include "SMDS_PolyhedralVolumeOfNodes.hxx"
+#include "SMESHDS_Mesh.hxx"
-#include
"utilities.h"
+#include
<utilities.h>
-#include "MED_Utilities.hxx"
#define _EDF_NODE_IDS_
//#define _ELEMENTS_BY_DIM_
#define _EDF_NODE_IDS_
//#define _ELEMENTS_BY_DIM_
@@
-46,23
+46,27
@@
using namespace MED;
DriverMED_W_SMESHDS_Mesh::DriverMED_W_SMESHDS_Mesh():
DriverMED_W_SMESHDS_Mesh::DriverMED_W_SMESHDS_Mesh():
+ myMedVersion(MED::eV2_2),
myAllSubMeshes (false),
myDoGroupOfNodes (false),
myDoGroupOfEdges (false),
myDoGroupOfFaces (false),
myAllSubMeshes (false),
myDoGroupOfNodes (false),
myDoGroupOfEdges (false),
myDoGroupOfFaces (false),
- myDoGroupOfVolumes (false)
+ myDoGroupOfVolumes (false),
+ myDoGroupOf0DElems(false),
+ myDoGroupOfBalls(false),
+ myAutoDimension(true)
{}
void DriverMED_W_SMESHDS_Mesh::SetFile(const std::string& theFileName,
{}
void DriverMED_W_SMESHDS_Mesh::SetFile(const std::string& theFileName,
- MED::EVersion theId)
+ MED::EVersion
theId)
{
{
- myMed = CrWrapper(theFileName,theId);
Driver_SMESHDS_Mesh::SetFile(theFileName);
Driver_SMESHDS_Mesh::SetFile(theFileName);
+ myMedVersion = theId;
}
void DriverMED_W_SMESHDS_Mesh::SetFile(const std::string& theFileName)
{
}
void DriverMED_W_SMESHDS_Mesh::SetFile(const std::string& theFileName)
{
-
return SetFile(theFileName,MED::eV2_2
);
+
Driver_SMESHDS_Mesh::SetFile(theFileName
);
}
string DriverMED_W_SMESHDS_Mesh::GetVersionString(const MED::EVersion theVersion, int theNbDigits)
}
string DriverMED_W_SMESHDS_Mesh::GetVersionString(const MED::EVersion theVersion, int theNbDigits)
@@
-118,7
+122,8
@@
void DriverMED_W_SMESHDS_Mesh::AddGroupOfVolumes()
myDoGroupOfVolumes = true;
}
myDoGroupOfVolumes = true;
}
-namespace{
+namespace
+{
typedef double (SMDS_MeshNode::* TGetCoord)() const;
typedef const char* TName;
typedef const char* TUnit;
typedef double (SMDS_MeshNode::* TGetCoord)() const;
typedef const char* TName;
typedef const char* TUnit;
@@
-309,12
+314,13
@@
Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
}
// Mesh dimension definition
}
// Mesh dimension definition
- TInt aSpaceDimension;
+ TInt aSpaceDimension
= 3
;
TCoordHelperPtr aCoordHelperPtr;
{
bool anIsXDimension = false;
bool anIsYDimension = false;
bool anIsZDimension = false;
TCoordHelperPtr aCoordHelperPtr;
{
bool anIsXDimension = false;
bool anIsYDimension = false;
bool anIsZDimension = false;
+ if ( myAutoDimension )
{
SMDS_NodeIteratorPtr aNodesIter = myMesh->nodesIterator();
double aBounds[6];
{
SMDS_NodeIteratorPtr aNodesIter = myMesh->nodesIterator();
double aBounds[6];
@@
-388,6
+394,7
@@
Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
if ( myMesh->NbVolumes() > 0 )
aMeshDimension = 3;
if ( myMesh->NbVolumes() > 0 )
aMeshDimension = 3;
+ MED::PWrapper myMed = CrWrapper(myFile,myMedVersion);
PMeshInfo aMeshInfo = myMed->CrMeshInfo(aMeshDimension,aSpaceDimension,aMeshName);
MESSAGE("Add - aMeshName : "<<aMeshName<<"; "<<aMeshInfo->GetName());
myMed->SetMeshInfo(aMeshInfo);
PMeshInfo aMeshInfo = myMed->CrMeshInfo(aMeshDimension,aSpaceDimension,aMeshName);
MESSAGE("Add - aMeshName : "<<aMeshName<<"; "<<aMeshInfo->GetName());
myMed->SetMeshInfo(aMeshInfo);
@@
-530,28
+537,33
@@
Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
anEntity = eARETE;
#endif
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
anEntity = eARETE;
#endif
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
- eSEG2,
- nbElemInfo.NbEdges( ORDER_LINEAR ),
- SMDSAbs_Edge));
+
eSEG2,
+
nbElemInfo.NbEdges( ORDER_LINEAR ),
+
SMDSAbs_Edge));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
- eSEG3,
- nbElemInfo.NbEdges( ORDER_QUADRATIC ),
- SMDSAbs_Edge));
+
eSEG3,
+
nbElemInfo.NbEdges( ORDER_QUADRATIC ),
+
SMDSAbs_Edge));
#ifdef _ELEMENTS_BY_DIM_
anEntity = eFACE;
#endif
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
#ifdef _ELEMENTS_BY_DIM_
anEntity = eFACE;
#endif
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
- eTRIA3,
- nbElemInfo.NbTriangles( ORDER_LINEAR ),
- SMDSAbs_Face));
+ eTRIA3,
+ nbElemInfo.NbTriangles( ORDER_LINEAR ),
+ SMDSAbs_Face));
+ aTElemTypeDatas.push_back( TElemTypeData(anEntity,
+ eTRIA6,
+ nbElemInfo.NbTriangles( ORDER_QUADRATIC ) -
+ nbElemInfo.NbBiQuadTriangles(),
+ SMDSAbs_Face));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
-
eTRIA6
,
-
nbElemInfo.NbTriangles( ORDER_QUADRATIC
),
- SMDSAbs_Face));
+
eTRIA7
,
+
nbElemInfo.NbBiQuadTriangles(
),
+
SMDSAbs_Face));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
- eQUAD4,
- nbElemInfo.NbQuadrangles( ORDER_LINEAR ),
- SMDSAbs_Face));
+
eQUAD4,
+
nbElemInfo.NbQuadrangles( ORDER_LINEAR ),
+
SMDSAbs_Face));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eQUAD8,
nbElemInfo.NbQuadrangles( ORDER_QUADRATIC ) -
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eQUAD8,
nbElemInfo.NbQuadrangles( ORDER_QUADRATIC ) -
@@
-576,25
+588,25
@@
Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
anEntity = eMAILLE;
#endif
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
anEntity = eMAILLE;
#endif
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
- eTETRA4,
- nbElemInfo.NbTetras( ORDER_LINEAR ),
- SMDSAbs_Volume));
+
eTETRA4,
+
nbElemInfo.NbTetras( ORDER_LINEAR ),
+
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
- eTETRA10,
- nbElemInfo.NbTetras( ORDER_QUADRATIC ),
- SMDSAbs_Volume));
+
eTETRA10,
+
nbElemInfo.NbTetras( ORDER_QUADRATIC ),
+
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
- ePYRA5,
- nbElemInfo.NbPyramids( ORDER_LINEAR ),
- SMDSAbs_Volume));
+
ePYRA5,
+
nbElemInfo.NbPyramids( ORDER_LINEAR ),
+
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
- ePYRA13,
- nbElemInfo.NbPyramids( ORDER_QUADRATIC ),
- SMDSAbs_Volume));
+
ePYRA13,
+
nbElemInfo.NbPyramids( ORDER_QUADRATIC ),
+
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
- ePENTA6,
- nbElemInfo.NbPrisms( ORDER_LINEAR ),
- SMDSAbs_Volume));
+
ePENTA6,
+
nbElemInfo.NbPrisms( ORDER_LINEAR ),
+
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePENTA15,
nbElemInfo.NbPrisms( ORDER_QUADRATIC ),
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePENTA15,
nbElemInfo.NbPrisms( ORDER_QUADRATIC ),