From: gdd Date: Wed, 4 May 2011 18:29:15 +0000 (+0000) Subject: A first fix for quadratic 2d input mesh w/o geometry X-Git-Tag: V6_3_0~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=984f83cae13916c47cde70d23893779764c15130;p=plugins%2Fghs3dplugin.git A first fix for quadratic 2d input mesh w/o geometry There is still a problem of nodes of faces and tetras. --- diff --git a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx index da4580e..d849532 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx @@ -979,6 +979,13 @@ static bool readGMFFile(const char* theFile, int nbInitialNodes = theNodeByGhs3dId.size(); std::cout << "theNodeByGhs3dId.size(): " << nbInitialNodes << std::endl; + const bool isQuadMesh = + theHelper->GetMesh()->NbEdges( ORDER_QUADRATIC ) || + theHelper->GetMesh()->NbFaces( ORDER_QUADRATIC ) || + theHelper->GetMesh()->NbVolumes( ORDER_QUADRATIC ); + std::cout << "isQuadMesh: " << isQuadMesh << std::endl; + + theHelper->SetIsQuadratic(isQuadMesh); // --------------------------------- // Read generated elements and nodes // --------------------------------- @@ -1072,7 +1079,6 @@ static bool readGMFFile(const char* theFile, } if (iElem >= nbInitialNodes) { GMFNode[ aGMFID ] = aGMFNode; - std::cout << "GMFNode["<AddEdge( node[0], node[1] ); + theHelper->AddEdge( node[0], node[1], /*id =*/0, /*force3d =*/false ); break; } case GmfTriangles: { if (fullyCreatedElement) - theMeshDS->AddFace( node[0], node[1], node[2]); + theHelper->AddFace( node[0], node[1], node[2], /*id =*/0, /*force3d =*/false ); break; } // case GmfQuadrilaterals: -// theMeshDS->AddFace( node[0], node[1], node[2], node[3] ); break; +// theHelper->AddFace( node[0], node[1], node[2], node[3] ); break; case GmfTetrahedra: - theHelper->AddVolume( node[0], node[1], node[2], node[3] ); + theHelper->AddVolume( node[0], node[1], node[2], node[3], /*id =*/0, /*force3d =*/false ); break; // case GmfHexahedra: // theHelper->AddVolume( node[0], node[3], node[2], node[1],