]> SALOME platform Git repositories - plugins/hybridplugin.git/commitdiff
Salome HOME
A first fix for quadratic 2d input mesh w/o geometry
authorgdd <gdd>
Wed, 4 May 2011 18:29:15 +0000 (18:29 +0000)
committergdd <gdd>
Wed, 4 May 2011 18:29:15 +0000 (18:29 +0000)
There is still a problem of nodes of faces and tetras.

src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx

index da4580ec50082357eb34eca179338bd46bb5314e..d849532436648015ae3614b3e6d0f38c84e61e01 100644 (file)
@@ -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["<<aGMFID<<"]: " << aGMFNode ;
           nodeAssigne[ aGMFID ] = 0;
         }
       }
@@ -1161,18 +1167,18 @@ static bool readGMFFile(const char*                     theFile,
         {
         case GmfEdges: {
           if (fullyCreatedElement)
-            theHelper->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],