fix biquadratic quadratic pentahedron(18 nodes prism)

This commit is contained in:
Paul RASCLE 2017-09-14 22:28:11 +02:00
parent 2077baef82
commit 09ff68516f
15 changed files with 159 additions and 86 deletions

View File

@ -493,6 +493,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
case ePYRA13: aNbNodes = 13; break; case ePYRA13: aNbNodes = 13; break;
case ePENTA6: aNbNodes = 6; break; case ePENTA6: aNbNodes = 6; break;
case ePENTA15: aNbNodes = 15; break; case ePENTA15: aNbNodes = 15; break;
case ePENTA18: aNbNodes = 18; break;
case eHEXA8: aNbNodes = 8; break; case eHEXA8: aNbNodes = 8; break;
case eHEXA20: aNbNodes = 20; break; case eHEXA20: aNbNodes = 20; break;
case eHEXA27: aNbNodes = 27; break; case eHEXA27: aNbNodes = 27; break;
@ -811,6 +812,41 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
isRenum = anIsElemNum; isRenum = anIsElemNum;
} }
break; break;
case ePENTA18:
aNbNodes = 18;
if(anIsElemNum)
anElement = myMesh->AddVolumeWithID(aNodeIds[0], aNodeIds[1],
aNodeIds[2], aNodeIds[3],
aNodeIds[4], aNodeIds[5],
aNodeIds[6], aNodeIds[7],
aNodeIds[8], aNodeIds[9],
aNodeIds[10], aNodeIds[11],
aNodeIds[12], aNodeIds[13],
aNodeIds[14], aNodeIds[15],
aNodeIds[16], aNodeIds[17],
aCellInfo->GetElemNum(iElem));
if (!anElement) {
anElement = myMesh->AddVolume(FindNode(myMesh,aNodeIds[0]),
FindNode(myMesh,aNodeIds[1]),
FindNode(myMesh,aNodeIds[2]),
FindNode(myMesh,aNodeIds[3]),
FindNode(myMesh,aNodeIds[4]),
FindNode(myMesh,aNodeIds[5]),
FindNode(myMesh,aNodeIds[6]),
FindNode(myMesh,aNodeIds[7]),
FindNode(myMesh,aNodeIds[8]),
FindNode(myMesh,aNodeIds[9]),
FindNode(myMesh,aNodeIds[10]),
FindNode(myMesh,aNodeIds[11]),
FindNode(myMesh,aNodeIds[12]),
FindNode(myMesh,aNodeIds[13]),
FindNode(myMesh,aNodeIds[14]),
FindNode(myMesh,aNodeIds[15]),
FindNode(myMesh,aNodeIds[16]),
FindNode(myMesh,aNodeIds[17]));
isRenum = anIsElemNum;
}
break;
case eHEXA8: case eHEXA8:
aNbNodes = 8; aNbNodes = 8;
if(anIsElemNum) if(anIsElemNum)

View File

@ -703,7 +703,11 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
SMDSAbs_Volume)); SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity, aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePENTA15, ePENTA15,
nbElemInfo.NbPrisms( ORDER_QUADRATIC ), nbElemInfo.NbQuadPrisms(),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePENTA18,
nbElemInfo.NbBiQuadPrisms(),
SMDSAbs_Volume)); SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity, aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eHEXA8, eHEXA8,
@ -943,7 +947,6 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
{ {
// Treat standard types // Treat standard types
// --------------------- // ---------------------
// allocate data arrays // allocate data arrays
PCellInfo aCellInfo = myMed->CrCellInfo( aMeshInfo, PCellInfo aCellInfo = myMed->CrCellInfo( aMeshInfo,
aElemTypeData->_entity, aElemTypeData->_entity,
@ -955,7 +958,6 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
// build map of family numbers for this type // build map of family numbers for this type
if ( !isElemFamMapBuilt[ aElemTypeData->_smdsType ]) if ( !isElemFamMapBuilt[ aElemTypeData->_smdsType ])
{ {
//cout << " fillElemFamilyMap()" << endl;
fillElemFamilyMap( anElemFamMap, aFamilies, aElemTypeData->_smdsType ); fillElemFamilyMap( anElemFamMap, aFamilies, aElemTypeData->_smdsType );
isElemFamMapBuilt[ aElemTypeData->_smdsType ] = true; isElemFamMapBuilt[ aElemTypeData->_smdsType ] = true;
} }
@ -993,10 +995,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
// store data in a file // store data in a file
myMed->SetCellInfo(aCellInfo); myMed->SetCellInfo(aCellInfo);
} }
} // loop on geom types } // loop on geom types
} }
catch(const std::exception& exc) { catch(const std::exception& exc) {
INFOS("The following exception was caught:\n\t"<<exc.what()); INFOS("The following exception was caught:\n\t"<<exc.what());

View File

@ -27,7 +27,7 @@
#ifdef WIN32 #ifdef WIN32
#pragma warning(disable:4250) #pragma warning(disable:4250)
#endif #endif
#include <utilities.h>
namespace MED namespace MED
{ {
//--------------------------------------------------------------- //---------------------------------------------------------------

View File

@ -93,6 +93,7 @@ bool InitEntity2GeomSet()
aGeomMAILLESet.insert(eTETRA10); aGeomMAILLESet.insert(eTETRA10);
aGeomMAILLESet.insert(ePYRA13); aGeomMAILLESet.insert(ePYRA13);
aGeomMAILLESet.insert(ePENTA15); aGeomMAILLESet.insert(ePENTA15);
aGeomMAILLESet.insert(ePENTA18);
aGeomMAILLESet.insert(eHEXA20); aGeomMAILLESet.insert(eHEXA20);
aGeomMAILLESet.insert(eHEXA27); aGeomMAILLESet.insert(eHEXA27);
aGeomMAILLESet.insert(ePOLYEDRE); aGeomMAILLESet.insert(ePOLYEDRE);

View File

@ -279,6 +279,7 @@ SMESH_ActorDef::SMESH_ActorDef()
aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON); aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
aFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON); aFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON);
aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE); aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
aFilter->RegisterCellsWithType(VTK_BIQUADRATIC_QUADRATIC_WEDGE);
aFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID); aFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID);
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET); aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
aFilter->RegisterCellsWithType(VTK_POLYHEDRON); aFilter->RegisterCellsWithType(VTK_POLYHEDRON);
@ -310,6 +311,7 @@ SMESH_ActorDef::SMESH_ActorDef()
aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON); aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
aFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON); aFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON);
aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE); aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
aFilter->RegisterCellsWithType(VTK_BIQUADRATIC_QUADRATIC_WEDGE);
aFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID); aFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID);
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET); aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
aFilter->RegisterCellsWithType(VTK_POLYHEDRON); aFilter->RegisterCellsWithType(VTK_POLYHEDRON);
@ -1683,6 +1685,7 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode)
aFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON); aFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON);
aFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID); aFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID);
aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE); aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
aFilter->RegisterCellsWithType(VTK_BIQUADRATIC_QUADRATIC_WEDGE);
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET); aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
aFilter->RegisterCellsWithType(VTK_POLYHEDRON); aFilter->RegisterCellsWithType(VTK_POLYHEDRON);
@ -1696,6 +1699,7 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode)
aHltFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON); aHltFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
aHltFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON); aHltFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON);
aHltFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE); aHltFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
aHltFilter->RegisterCellsWithType(VTK_BIQUADRATIC_QUADRATIC_WEDGE);
aHltFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID); aHltFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID);
aHltFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET); aHltFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
aHltFilter->RegisterCellsWithType(VTK_POLYHEDRON); aHltFilter->RegisterCellsWithType(VTK_POLYHEDRON);

View File

@ -61,6 +61,7 @@ int SMDS_Downward::getCellDimension(unsigned char cellType)
_cellDimension[VTK_TRIQUADRATIC_HEXAHEDRON] = 3; _cellDimension[VTK_TRIQUADRATIC_HEXAHEDRON] = 3;
_cellDimension[VTK_WEDGE] = 3; _cellDimension[VTK_WEDGE] = 3;
_cellDimension[VTK_QUADRATIC_WEDGE] = 3; _cellDimension[VTK_QUADRATIC_WEDGE] = 3;
_cellDimension[VTK_BIQUADRATIC_QUADRATIC_WEDGE] = 3;
_cellDimension[VTK_PYRAMID] = 3; _cellDimension[VTK_PYRAMID] = 3;
_cellDimension[VTK_QUADRATIC_PYRAMID] = 3; _cellDimension[VTK_QUADRATIC_PYRAMID] = 3;
_cellDimension[VTK_HEXAGONAL_PRISM] = 3; _cellDimension[VTK_HEXAGONAL_PRISM] = 3;

View File

@ -1556,9 +1556,15 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeFromVtkIdsWithID(const std::vector<vtkIdTyp
case VTK_QUADRATIC_WEDGE: case VTK_QUADRATIC_WEDGE:
myInfo.myNbQuadPrisms++; myInfo.myNbQuadPrisms++;
break; break;
case VTK_BIQUADRATIC_QUADRATIC_WEDGE:
myInfo.myNbBiQuadPrisms++;
break;
case VTK_QUADRATIC_HEXAHEDRON: case VTK_QUADRATIC_HEXAHEDRON:
myInfo.myNbQuadHexas++; myInfo.myNbQuadHexas++;
break; break;
case VTK_TRIQUADRATIC_HEXAHEDRON:
myInfo.myNbTriQuadHexas++;
break;
//#ifdef VTK_HAVE_POLYHEDRON //#ifdef VTK_HAVE_POLYHEDRON
case VTK_POLYHEDRON: case VTK_POLYHEDRON:
myInfo.myNbPolyhedrons++; myInfo.myNbPolyhedrons++;
@ -4357,6 +4363,7 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolume(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n2356, const SMDS_MeshNode * n2356,
const SMDS_MeshNode * n1346) const SMDS_MeshNode * n1346)
{ {
//MESSAGE("AddVolume penta18");
int ID = myElementIDFactory->GetFreeID(); int ID = myElementIDFactory->GetFreeID();
SMDS_MeshVolume * v = SMDS_MeshVolume * v =
SMDS_Mesh::AddVolumeWithID(n1, n2, n3, n4, n5, n6, n12, n23, n31, SMDS_Mesh::AddVolumeWithID(n1, n2, n3, n4, n5, n6, n12, n23, n31,
@ -4376,6 +4383,7 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(int n1, int n2, int n3,
int n14,int n25,int n36, int n14,int n25,int n36,
int n1245, int n2356, int n1346, int ID) int n1245, int n2356, int n1346, int ID)
{ {
//MESSAGE("AddVolumeWithID penta18 " << ID);
return SMDS_Mesh::AddVolumeWithID return SMDS_Mesh::AddVolumeWithID
((SMDS_MeshNode*) myNodeIDFactory->MeshElement(n1) , ((SMDS_MeshNode*) myNodeIDFactory->MeshElement(n1) ,
(SMDS_MeshNode*) myNodeIDFactory->MeshElement(n2) , (SMDS_MeshNode*) myNodeIDFactory->MeshElement(n2) ,
@ -4422,6 +4430,7 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n1346, const SMDS_MeshNode * n1346,
int ID) int ID)
{ {
//MESSAGE("AddVolumeWithID penta18 "<< ID);
if (!n1 || !n2 || !n3 || !n4 || !n5 || !n6 || !n12 || !n23 || if (!n1 || !n2 || !n3 || !n4 || !n5 || !n6 || !n12 || !n23 ||
!n31 || !n45 || !n56 || !n64 || !n14 || !n25 || !n36 || !n1245 || !n2356 || !n1346) !n31 || !n45 || !n56 || !n64 || !n14 || !n25 || !n36 || !n1245 || !n2356 || !n1346)
return 0; return 0;
@ -4430,7 +4439,7 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
return 0; return 0;
} }
// --- retrieve nodes ID // --- retrieve nodes ID
myNodeIds.resize(15); myNodeIds.resize(18);
myNodeIds[0] = n1->getVtkId(); myNodeIds[0] = n1->getVtkId();
myNodeIds[1] = n2->getVtkId(); myNodeIds[1] = n2->getVtkId();
myNodeIds[2] = n3->getVtkId(); myNodeIds[2] = n3->getVtkId();

View File

@ -29,6 +29,7 @@
#include "SMESH_SMDS.hxx" #include "SMESH_SMDS.hxx"
#include "SMDS_MeshElement.hxx" #include "SMDS_MeshElement.hxx"
#include<utilities.h>
class SMDS_EXPORT SMDS_MeshInfo class SMDS_EXPORT SMDS_MeshInfo
{ {
@ -144,26 +145,30 @@ inline SMDS_MeshInfo::SMDS_MeshInfo():
// 15 * // 15 *
// 16 * // 16 *
// 17 * // 17 *
// 18 * // 18 *
// 19 * // 19
// 20 * // 20 *
// 21 * // 21
// 22 * // 22
// 23 * // 23
// 24 * // 24
// 25 // 25 *
// 26 // 26 *
// 27 * // 27 *
// 28 *
// 29 *
// 30 *
// 31 *
// //
// So to have a unique index for each type basing on nb of nodes, we use a shift: // So to have a unique index for each type basing on nb of nodes, we use a shift:
myShift.resize(SMDSAbs_NbElementTypes, 0); myShift.resize(SMDSAbs_NbElementTypes, 0);
myShift[ SMDSAbs_Face ] = +15;// 3->18, 4->19, etc. myShift[ SMDSAbs_Face ] = +22;// 3->25, 4->26, etc.
myShift[ SMDSAbs_Edge ] = +14;// 2->16, 3->17 myShift[ SMDSAbs_Edge ] = +14;// 2->16, 3->17
myShift[ SMDSAbs_0DElement ] = +2; // 1->3 myShift[ SMDSAbs_0DElement ] = +2; // 1->3
myShift[ SMDSAbs_Ball ] = +1; // 1->2 myShift[ SMDSAbs_Ball ] = +1; // 1->2
myNb.resize( index( SMDSAbs_Volume,27 ) + 1, NULL); myNb.resize( index( SMDSAbs_Face,9 ) + 1, NULL);
myNb[ index( SMDSAbs_Node,1 )] = & myNbNodes; myNb[ index( SMDSAbs_Node,1 )] = & myNbNodes;
myNb[ index( SMDSAbs_0DElement,1 )] = & myNb0DElements; myNb[ index( SMDSAbs_0DElement,1 )] = & myNb0DElements;
@ -187,6 +192,7 @@ inline SMDS_MeshInfo::SMDS_MeshInfo():
myNb[ index( SMDSAbs_Volume, 12)] = & myNbHexPrism; myNb[ index( SMDSAbs_Volume, 12)] = & myNbHexPrism;
myNb[ index( SMDSAbs_Volume, 13)] = & myNbQuadPyramids; myNb[ index( SMDSAbs_Volume, 13)] = & myNbQuadPyramids;
myNb[ index( SMDSAbs_Volume, 15)] = & myNbQuadPrisms; myNb[ index( SMDSAbs_Volume, 15)] = & myNbQuadPrisms;
myNb[ index( SMDSAbs_Volume, 18)] = & myNbBiQuadPrisms;
myNb[ index( SMDSAbs_Volume, 20)] = & myNbQuadHexas; myNb[ index( SMDSAbs_Volume, 20)] = & myNbQuadHexas;
myNb[ index( SMDSAbs_Volume, 27)] = & myNbTriQuadHexas; myNb[ index( SMDSAbs_Volume, 27)] = & myNbTriQuadHexas;
} }
@ -282,7 +288,7 @@ SMDS_MeshInfo::NbPyramids(SMDSAbs_ElementOrder order) const
inline int // NbPrisms inline int // NbPrisms
SMDS_MeshInfo::NbPrisms (SMDSAbs_ElementOrder order) const SMDS_MeshInfo::NbPrisms (SMDSAbs_ElementOrder order) const
{ return order == ORDER_ANY ? myNbPrisms+myNbQuadPrisms : order == ORDER_LINEAR ? myNbPrisms : myNbQuadPrisms; } { return order == ORDER_ANY ? myNbPrisms+myNbQuadPrisms+myNbBiQuadPrisms: order == ORDER_LINEAR ? myNbPrisms : myNbQuadPrisms+myNbBiQuadPrisms; }
inline int // NbHexPrisms inline int // NbHexPrisms
SMDS_MeshInfo::NbHexPrisms (SMDSAbs_ElementOrder order) const SMDS_MeshInfo::NbHexPrisms (SMDSAbs_ElementOrder order) const
@ -386,7 +392,8 @@ SMDS_MeshInfo::NbElementsOfGeom(SMDSAbs_GeometryType geom) const
myNbQuadHexas + myNbQuadHexas +
myNbTriQuadHexas); myNbTriQuadHexas);
case SMDSGeom_PENTA: return (myNbPrisms + case SMDSGeom_PENTA: return (myNbPrisms +
myNbQuadPrisms); myNbQuadPrisms +
myNbBiQuadPrisms);
case SMDSGeom_HEXAGONAL_PRISM: return myNbHexPrism; case SMDSGeom_HEXAGONAL_PRISM: return myNbHexPrism;
case SMDSGeom_POLYHEDRA: return myNbPolyhedrons; case SMDSGeom_POLYHEDRA: return myNbPolyhedrons;
// Discrete: // Discrete:

View File

@ -170,6 +170,7 @@ int SMDS_VtkVolume::NbFaces() const
case VTK_WEDGE: case VTK_WEDGE:
case VTK_QUADRATIC_PYRAMID: case VTK_QUADRATIC_PYRAMID:
case VTK_QUADRATIC_WEDGE: case VTK_QUADRATIC_WEDGE:
case VTK_BIQUADRATIC_QUADRATIC_WEDGE:
nbFaces = 5; nbFaces = 5;
break; break;
case VTK_HEXAHEDRON: case VTK_HEXAHEDRON:
@ -240,6 +241,7 @@ int SMDS_VtkVolume::NbEdges() const
break; break;
case VTK_WEDGE: case VTK_WEDGE:
case VTK_QUADRATIC_WEDGE: case VTK_QUADRATIC_WEDGE:
case VTK_BIQUADRATIC_QUADRATIC_WEDGE:
nbEdges = 9; nbEdges = 9;
break; break;
case VTK_HEXAHEDRON: case VTK_HEXAHEDRON:
@ -468,6 +470,7 @@ bool SMDS_VtkVolume::IsQuadratic() const
case VTK_QUADRATIC_TETRA: case VTK_QUADRATIC_TETRA:
case VTK_QUADRATIC_PYRAMID: case VTK_QUADRATIC_PYRAMID:
case VTK_QUADRATIC_WEDGE: case VTK_QUADRATIC_WEDGE:
case VTK_BIQUADRATIC_QUADRATIC_WEDGE:
case VTK_QUADRATIC_HEXAHEDRON: case VTK_QUADRATIC_HEXAHEDRON:
case VTK_TRIQUADRATIC_HEXAHEDRON: case VTK_TRIQUADRATIC_HEXAHEDRON:
return true; return true;
@ -498,6 +501,7 @@ bool SMDS_VtkVolume::IsMediumNode(const SMDS_MeshNode* node) const
rankFirstMedium = 5; // medium nodes are of rank 5 to 12 rankFirstMedium = 5; // medium nodes are of rank 5 to 12
break; break;
case VTK_QUADRATIC_WEDGE: case VTK_QUADRATIC_WEDGE:
case VTK_BIQUADRATIC_QUADRATIC_WEDGE:
rankFirstMedium = 6; // medium nodes are of rank 6 to 14 rankFirstMedium = 6; // medium nodes are of rank 6 to 14
break; break;
case VTK_QUADRATIC_HEXAHEDRON: case VTK_QUADRATIC_HEXAHEDRON:
@ -533,11 +537,12 @@ int SMDS_VtkVolume::NbCornerNodes() const
vtkIdType aVtkType = grid->GetCellType(myVtkID); vtkIdType aVtkType = grid->GetCellType(myVtkID);
switch (aVtkType) switch (aVtkType)
{ {
case VTK_QUADRATIC_TETRA: return 4; case VTK_QUADRATIC_TETRA: return 4;
case VTK_QUADRATIC_PYRAMID: return 5; case VTK_QUADRATIC_PYRAMID: return 5;
case VTK_QUADRATIC_WEDGE: return 6; case VTK_QUADRATIC_WEDGE:
case VTK_BIQUADRATIC_QUADRATIC_WEDGE: return 6;
case VTK_QUADRATIC_HEXAHEDRON: case VTK_QUADRATIC_HEXAHEDRON:
case VTK_TRIQUADRATIC_HEXAHEDRON: return 8; case VTK_TRIQUADRATIC_HEXAHEDRON: return 8;
default:; default:;
} }
return NbNodes(); return NbNodes();
@ -612,6 +617,7 @@ SMDSAbs_GeometryType SMDS_VtkVolume::GetGeomType() const
break; break;
case VTK_WEDGE: case VTK_WEDGE:
case VTK_QUADRATIC_WEDGE: case VTK_QUADRATIC_WEDGE:
case VTK_BIQUADRATIC_QUADRATIC_WEDGE:
aType = SMDSGeom_PENTA; aType = SMDSGeom_PENTA;
break; break;
case VTK_HEXAHEDRON: case VTK_HEXAHEDRON:

View File

@ -9230,7 +9230,7 @@ int SMESH_MeshEditor::convertElemToQuadratic(SMESHDS_SubMesh * theSm,
SMESH_MesherHelper& theHelper, SMESH_MesherHelper& theHelper,
const bool theForce3d) const bool theForce3d)
{ {
MESSAGE("convertElemToQuadratic"); //MESSAGE("convertElemToQuadratic");
int nbElem = 0; int nbElem = 0;
if( !theSm ) return nbElem; if( !theSm ) return nbElem;
@ -9338,7 +9338,6 @@ int SMESH_MeshEditor::convertElemToQuadratic(SMESHDS_SubMesh * theSm,
case SMDSEntity_Penta: case SMDSEntity_Penta:
case SMDSEntity_Quad_Penta: case SMDSEntity_Quad_Penta:
case SMDSEntity_BiQuad_Penta: case SMDSEntity_BiQuad_Penta:
MESSAGE("--- " << aGeomType);
NewElem = theHelper.AddVolume(nodes[0], nodes[1], nodes[2], nodes[3], nodes[4], nodes[5], id, theForce3d); NewElem = theHelper.AddVolume(nodes[0], nodes[1], nodes[2], nodes[3], nodes[4], nodes[5], id, theForce3d);
break; break;
case SMDSEntity_Hexa: case SMDSEntity_Hexa:
@ -9369,7 +9368,7 @@ int SMESH_MeshEditor::convertElemToQuadratic(SMESHDS_SubMesh * theSm,
void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d, const bool theToBiQuad) void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d, const bool theToBiQuad)
{ {
MESSAGE("ConvertToQuadratic "<< theForce3d << " " << theToBiQuad); //MESSAGE("ConvertToQuadratic "<< theForce3d << " " << theToBiQuad);
SMESHDS_Mesh* meshDS = GetMeshDS(); SMESHDS_Mesh* meshDS = GetMeshDS();
SMESH_MesherHelper aHelper(*myMesh); SMESH_MesherHelper aHelper(*myMesh);
@ -9538,7 +9537,6 @@ void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d, const bool theT
case SMDSEntity_Penta: case SMDSEntity_Penta:
case SMDSEntity_Quad_Penta: case SMDSEntity_Quad_Penta:
case SMDSEntity_BiQuad_Penta: case SMDSEntity_BiQuad_Penta:
MESSAGE("--- " << type);
NewVolume = aHelper.AddVolume(nodes[0], nodes[1], nodes[2], NewVolume = aHelper.AddVolume(nodes[0], nodes[1], nodes[2],
nodes[3], nodes[4], nodes[5], id, theForce3d); nodes[3], nodes[4], nodes[5], id, theForce3d);
for ( size_t i = 15; i < nodes.size(); ++i ) // rm central nodes for ( size_t i = 15; i < nodes.size(); ++i ) // rm central nodes

View File

@ -4883,7 +4883,7 @@ namespace { // Structures used by FixQuadraticElements()
void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& compError, void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& compError,
bool volumeOnly) bool volumeOnly)
{ {
MESSAGE("FixQuadraticElements " << volumeOnly); //MESSAGE("FixQuadraticElements " << volumeOnly);
// setenv NO_FixQuadraticElements to know if FixQuadraticElements() is guilty of bad conversion // setenv NO_FixQuadraticElements to know if FixQuadraticElements() is guilty of bad conversion
if ( getenv("NO_FixQuadraticElements") ) if ( getenv("NO_FixQuadraticElements") )
return; return;
@ -4911,7 +4911,6 @@ void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& compError,
} }
else { // fix nodes in the solid and its faces else { // fix nodes in the solid and its faces
#ifdef _DEBUG_ #ifdef _DEBUG_
MESSAGE("FIX SOLID " << nbSolids-- << " #" << GetMeshDS()->ShapeToIndex(s.Current()));
MSG("FIX SOLID " << nbSolids-- << " #" << GetMeshDS()->ShapeToIndex(s.Current())); MSG("FIX SOLID " << nbSolids-- << " #" << GetMeshDS()->ShapeToIndex(s.Current()));
#endif #endif
SMESH_MesherHelper h(*myMesh); SMESH_MesherHelper h(*myMesh);

View File

@ -153,6 +153,7 @@ vtkIdType getCellType( const SMDSAbs_ElementType theType,
else if ( theNbNodes == 20 ) return VTK_QUADRATIC_HEXAHEDRON; else if ( theNbNodes == 20 ) return VTK_QUADRATIC_HEXAHEDRON;
else if ( theNbNodes == 27 ) return VTK_TRIQUADRATIC_HEXAHEDRON; else if ( theNbNodes == 27 ) return VTK_TRIQUADRATIC_HEXAHEDRON;
else if ( theNbNodes == 15 ) return VTK_QUADRATIC_WEDGE; else if ( theNbNodes == 15 ) return VTK_QUADRATIC_WEDGE;
else if ( theNbNodes == 18 ) return VTK_BIQUADRATIC_QUADRATIC_WEDGE;
else if ( theNbNodes == 13 ) return VTK_QUADRATIC_PYRAMID;//VTK_CONVEX_POINT_SET; else if ( theNbNodes == 13 ) return VTK_QUADRATIC_PYRAMID;//VTK_CONVEX_POINT_SET;
else return VTK_EMPTY_CELL; else return VTK_EMPTY_CELL;

View File

@ -6057,18 +6057,22 @@ Please enter correct value and try again</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_21</source> <source>ENTITY_TYPE_21</source>
<translation>OCTA12</translation> <translation>PENTA18</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_22</source> <source>ENTITY_TYPE_22</source>
<translation>POLYEDRE</translation> <translation>OCTA12</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_23</source> <source>ENTITY_TYPE_23</source>
<translation>QPOLYEDRE</translation> <translation>POLYEDRE</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_24</source> <source>ENTITY_TYPE_24</source>
<translation>QPOLYEDRE</translation>
</message>
<message>
<source>ENTITY_TYPE_25</source>
<translation>BALL</translation> <translation>BALL</translation>
</message> </message>
<message> <message>

View File

@ -6036,18 +6036,22 @@ Entrez une valeur correcte et essayez de nouveau</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_21</source> <source>ENTITY_TYPE_21</source>
<translation>OCTA12</translation> <translation>PENTA18</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_22</source> <source>ENTITY_TYPE_22</source>
<translation>POLYEDRE</translation> <translation>OCTA12</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_23</source> <source>ENTITY_TYPE_23</source>
<translation>QPOLYEDRE</translation> <translation>POLYEDRE</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_24</source> <source>ENTITY_TYPE_24</source>
<translation>QPOLYEDRE</translation>
</message>
<message>
<source>ENTITY_TYPE_25</source>
<translation>BALL</translation> <translation>BALL</translation>
</message> </message>
<message> <message>

View File

@ -5848,104 +5848,108 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_0</source> <source>ENTITY_TYPE_0</source>
<translation>POINT1</translation> <translation>NONE</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_1</source> <source>ENTITY_TYPE_1</source>
<translation>POINT1</translation> <translation>POINT1</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_2</source> <source>ENTITY_TYPE_2</source>
<translation>SEG2</translation> <translation>SEG2</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_3</source> <source>ENTITY_TYPE_3</source>
<translation>SEG3</translation> <translation>SEG3</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_4</source> <source>ENTITY_TYPE_4</source>
<translation>TRIA3</translation> <translation>TRIA3</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_5</source> <source>ENTITY_TYPE_5</source>
<translation>TRIA6</translation> <translation>TRIA6</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_6</source> <source>ENTITY_TYPE_6</source>
<translation>QUAD4</translation> <translation>TRIA7</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_7</source> <source>ENTITY_TYPE_7</source>
<translation>QUAD8</translation> <translation>QUAD4</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_8</source> <source>ENTITY_TYPE_8</source>
<translation>QUAD9</translation> <translation>QUAD8</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_9</source> <source>ENTITY_TYPE_9</source>
<translation>TETRA4</translation> <translation>QUAD9</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_10</source> <source>ENTITY_TYPE_10</source>
<translation>TETRA10</translation> <translation>POLYGON</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_11</source> <source>ENTITY_TYPE_11</source>
<translation>PYRA5</translation> <translation>QPOLYGON</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_12</source> <source>ENTITY_TYPE_12</source>
<translation>PYRA13</translation> <translation>TETRA4</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_13</source> <source>ENTITY_TYPE_13</source>
<translation>PENTA6</translation> <translation>TETRA10</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_14</source> <source>ENTITY_TYPE_14</source>
<translation>PENTA15</translation> <translation>PYRA5</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_15</source> <source>ENTITY_TYPE_15</source>
<translation>HEXA8</translation> <translation>PYRA13</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_16</source> <source>ENTITY_TYPE_16</source>
<translation>HEXA20</translation> <translation>HEXA8</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_17</source> <source>ENTITY_TYPE_17</source>
<translation>HEXA27</translation> <translation>HEXA20</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_18</source> <source>ENTITY_TYPE_18</source>
<translation>OCTA12</translation> <translation>HEXA27</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_19</source> <source>ENTITY_TYPE_19</source>
<translation></translation> <translation>PENTA6</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_20</source> <source>ENTITY_TYPE_20</source>
<translation>POLYEDRE</translation> <translation>PENTA15</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_21</source> <source>ENTITY_TYPE_21</source>
<translation>[]</translation> <translation>PENTA18</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_22</source> <source>ENTITY_TYPE_22</source>
<translation></translation> <translation>OCTA12</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_23</source> <source>ENTITY_TYPE_23</source>
<translation>QPOLYEDRE</translation> <translation>POLYEDRE</translation>
</message> </message>
<message> <message>
<source>ENTITY_TYPE_24</source> <source>ENTITY_TYPE_24</source>
<translation></translation> <translation>QPOLYEDRE</translation>
</message>
<message>
<source>ENTITY_TYPE_25</source>
<translation>BALL</translation>
</message> </message>
<message> <message>
<source>GEOM_TYPE</source> <source>GEOM_TYPE</source>