0052673: Viscous Layers hypothesis is not taken into account by NETGEN 3D algo
This commit is contained in:
parent
99cf7a6a3c
commit
ce66305970
@ -1373,7 +1373,7 @@ void NETGENPlugin_Mesher::AddIntVerticesInSolids(const netgen::OCCGeometry&
|
|||||||
ofstream py(DUMP_TRIANGLES_SCRIPT);
|
ofstream py(DUMP_TRIANGLES_SCRIPT);
|
||||||
py << "import SMESH"<< endl
|
py << "import SMESH"<< endl
|
||||||
<< "from salome.smesh import smeshBuilder"<<endl
|
<< "from salome.smesh import smeshBuilder"<<endl
|
||||||
<< "smesh = smeshBuilder.New(salome.myStudy)"
|
<< "smesh = smeshBuilder.New(salome.myStudy)"<<endl
|
||||||
<< "m = smesh.Mesh(name='triangles')" << endl;
|
<< "m = smesh.Mesh(name='triangles')" << endl;
|
||||||
#endif
|
#endif
|
||||||
if ( nodeVec.size() < ngMesh.GetNP() )
|
if ( nodeVec.size() < ngMesh.GetNP() )
|
||||||
@ -1572,9 +1572,9 @@ void NETGENPlugin_Mesher::AddIntVerticesInSolids(const netgen::OCCGeometry&
|
|||||||
ngMesh.AddSurfaceElement (tri);
|
ngMesh.AddSurfaceElement (tri);
|
||||||
|
|
||||||
#ifdef DUMP_TRIANGLES_SCRIPT
|
#ifdef DUMP_TRIANGLES_SCRIPT
|
||||||
py << "n1 = m.AddNode( "<< mpV.X()<<", "<< mpV.Y()<<", "<< mpV.Z()<<") "<< endl
|
py << "n1 = m.AddNode( "<< mpV(0)<<", "<< mpV(1)<<", "<< mpV(2)<<") "<< endl
|
||||||
<< "n2 = m.AddNode( "<< mp[0].X()<<", "<< mp[0].Y()<<", "<< mp[0].Z()<<") "<< endl
|
<< "n2 = m.AddNode( "<< mp[0](0)<<", "<< mp[0](1)<<", "<< mp[0](2)<<") "<< endl
|
||||||
<< "n3 = m.AddNode( "<< mp[1].X()<<", "<< mp[1].Y()<<", "<< mp[1].Z()<<" )" << endl
|
<< "n3 = m.AddNode( "<< mp[1](0)<<", "<< mp[1](1)<<", "<< mp[1](2)<<" )" << endl
|
||||||
<< "m.AddFace([n1,n2,n3])" << endl;
|
<< "m.AddFace([n1,n2,n3])" << endl;
|
||||||
#endif
|
#endif
|
||||||
} // loop on internal vertices of a solid
|
} // loop on internal vertices of a solid
|
||||||
@ -3252,8 +3252,10 @@ NETGENPlugin_Mesher::ReadErrors(const vector<const SMDS_MeshNode* >& nodeVec)
|
|||||||
(COMPERR_BAD_INPUT_MESH, "Some edges multiple times in surface mesh");
|
(COMPERR_BAD_INPUT_MESH, "Some edges multiple times in surface mesh");
|
||||||
SMESH_File file("test.out");
|
SMESH_File file("test.out");
|
||||||
vector<int> two(2);
|
vector<int> two(2);
|
||||||
|
vector<int> three1(3), three2(3);
|
||||||
const char* badEdgeStr = " multiple times in surface mesh";
|
const char* badEdgeStr = " multiple times in surface mesh";
|
||||||
const int badEdgeStrLen = strlen( badEdgeStr );
|
const int badEdgeStrLen = strlen( badEdgeStr );
|
||||||
|
|
||||||
while( !file.eof() )
|
while( !file.eof() )
|
||||||
{
|
{
|
||||||
if ( strncmp( file, "Edge ", 5 ) == 0 &&
|
if ( strncmp( file, "Edge ", 5 ) == 0 &&
|
||||||
@ -3270,7 +3272,6 @@ NETGENPlugin_Mesher::ReadErrors(const vector<const SMDS_MeshNode* >& nodeVec)
|
|||||||
// openelement 18 with open element 126
|
// openelement 18 with open element 126
|
||||||
// 41 36 38
|
// 41 36 38
|
||||||
// 69 70 72
|
// 69 70 72
|
||||||
vector<int> three1(3), three2(3);
|
|
||||||
file.getLine();
|
file.getLine();
|
||||||
const char* pos = file;
|
const char* pos = file;
|
||||||
bool ok = ( strncmp( file, "openelement ", 12 ) == 0 );
|
bool ok = ( strncmp( file, "openelement ", 12 ) == 0 );
|
||||||
@ -3301,6 +3302,12 @@ NETGENPlugin_Mesher::ReadErrors(const vector<const SMDS_MeshNode* >& nodeVec)
|
|||||||
++file;
|
++file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _DEBUG_
|
||||||
|
size_t nbBadElems = err->myBadElements.size();
|
||||||
|
nbBadElems = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,14 +162,15 @@ bool NETGENPlugin_NETGEN_3D::CheckHypothesis (SMESH_Mesh& aMesh,
|
|||||||
{
|
{
|
||||||
if ( !_hypMaxElementVolume )
|
if ( !_hypMaxElementVolume )
|
||||||
_hypMaxElementVolume = dynamic_cast< const StdMeshers_MaxElementVolume*> ( *h );
|
_hypMaxElementVolume = dynamic_cast< const StdMeshers_MaxElementVolume*> ( *h );
|
||||||
// if ( !_viscousLayersHyp ) several _viscousLayersHyp's allowed
|
if ( !_viscousLayersHyp ) // several _viscousLayersHyp's allowed
|
||||||
_viscousLayersHyp = dynamic_cast< const StdMeshers_ViscousLayers*> ( *h );
|
_viscousLayersHyp = dynamic_cast< const StdMeshers_ViscousLayers*> ( *h );
|
||||||
if ( ! _hypParameters )
|
if ( ! _hypParameters )
|
||||||
_hypParameters = dynamic_cast< const NETGENPlugin_Hypothesis*> ( *h );
|
_hypParameters = dynamic_cast< const NETGENPlugin_Hypothesis*> ( *h );
|
||||||
|
|
||||||
if ( *h != _hypMaxElementVolume &&
|
if ( *h != _hypMaxElementVolume &&
|
||||||
*h != _viscousLayersHyp &&
|
*h != _viscousLayersHyp &&
|
||||||
*h != _hypParameters)
|
*h != _hypParameters &&
|
||||||
|
!dynamic_cast< const StdMeshers_ViscousLayers*>(*h)) // several VL hyps allowed
|
||||||
aStatus = HYP_INCOMPATIBLE;
|
aStatus = HYP_INCOMPATIBLE;
|
||||||
}
|
}
|
||||||
if ( _hypMaxElementVolume && _hypParameters )
|
if ( _hypMaxElementVolume && _hypParameters )
|
||||||
@ -467,9 +468,8 @@ bool NETGENPlugin_NETGEN_3D::compute(SMESH_Mesh& aMesh,
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
#endif
|
|
||||||
#ifdef NETGEN_V5
|
#ifdef NETGEN_V5
|
||||||
ngMesh->CalcLocalH(netgen::mparam.grading);
|
ngMesh->CalcLocalH(netgen::mparam.grading);
|
||||||
err = netgen::OCCGenerateMesh(occgeo, ngMesh, netgen::mparam, startWith, endWith);
|
err = netgen::OCCGenerateMesh(occgeo, ngMesh, netgen::mparam, startWith, endWith);
|
||||||
|
Loading…
Reference in New Issue
Block a user