Was crashing one of the testbase NRT_GRIDS_SMESH_BUGS_08_I1.
Issue was that input info must be sorted to ensure the same number of
volumes in one process.
Also ensure that netgen::mparam parameters are all initialised.
_fineness = NETGENPlugin_Hypothesis::GetDefaultFineness();
mparams.uselocalh = NETGENPlugin_Hypothesis::GetDefaultSurfaceCurvature();
netgen::merge_solids = NETGENPlugin_Hypothesis::GetDefaultFuseEdges();
+ // Unused argument but set 0 to initialise it
+ mparams.elementorder = 0;
#ifdef NETGEN_V6
#endif
}
+
//=============================================================================
/*!
* Pass parameters to NETGEN
if ( !ngMesh )
ngMesh = new netgen::Mesh;
+ // To dump mparam
+ // netgen::mparam.Print(std::cerr);
+
#ifdef NETGEN_V6
ngMesh->SetGeometry( shared_ptr<netgen::NetgenGeometry>( &occgeo, &NOOP_Deleter ));
SMESH_ProxyMesh::Ptr proxyMesh,
NETGENPlugin_Internals &internals,
SMESH_MesherHelper &helper,
- std::map<const SMDS_MeshElement*, tuple<bool, bool>>& listElements
+ std::map<const SMDS_MeshElement*, tuple<bool, bool>, TIDCompare>& listElements
)
{
SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
SMESH::Controls::TSequenceOfXYZ nodesCoords;
// maps nodes to ng ID
+ // map must be sorted by ID to ensure that we will have the same number of
+ // 3D element if we recompute
typedef map< const SMDS_MeshNode*, int, TIDCompare > TNodeToIDMap;
typedef TNodeToIDMap::value_type TN2ID;
TNodeToIDMap nodeToNetgenID;
proxyMesh.reset( Adaptor );
}
- std::map<const SMDS_MeshElement*, tuple<bool, bool>> listElements;
+ // map must be sorted by ID to ensure that we will have the same number of
+ // 3D element if we recompute
+ std::map<const SMDS_MeshElement*, tuple<bool, bool>, TIDCompare> listElements;
bool ret = getSurfaceElements(aMesh, aShape, proxyMesh, internals, helper, listElements);
if(ret)
return ret;
SMESH_ProxyMesh::Ptr proxyMesh,
NETGENPlugin_Internals &internals,
SMESH_MesherHelper &helper,
- std::map<const SMDS_MeshElement*, std::tuple<bool, bool>>& listElements);
+ std::map<const SMDS_MeshElement*, std::tuple<bool, bool>, TIDCompare>& listElements);
bool compute(SMESH_Mesh& mesh,
SMESH_MesherHelper& helper,
SMESH_ProxyMesh::Ptr proxyMesh,
NETGENPlugin_Internals &internals,
SMESH_MesherHelper &helper,
- std::map<const SMDS_MeshElement*, tuple<bool, bool>>& listElements
+ std::map<const SMDS_MeshElement*, tuple<bool, bool>, TIDCompare>& listElements
)
{
// To remove compilation warnings
SMESH_ProxyMesh::Ptr proxyMesh,
NETGENPlugin_Internals &internals,
SMESH_MesherHelper &helper,
- std::map<const SMDS_MeshElement*, tuple<bool, bool>>& listElements
+ std::map<const SMDS_MeshElement*, tuple<bool, bool>, TIDCompare>& listElements
) override;
std::string _element_orientation_file="";