From: eap Date: Tue, 1 Mar 2016 10:27:22 +0000 (+0300) Subject: 23248: [CEA 1767] V7_dev: crash or SIGSEGV when computing the mesh with Hybrid X-Git-Tag: V7_8_0a2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5b782ed44d2099cc5617e48f80c1bf1cbf540eed;p=plugins%2Fhybridplugin.git 23248: [CEA 1767] V7_dev: crash or SIGSEGV when computing the mesh with Hybrid Enable working w/o hypothesis --- diff --git a/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx b/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx index ae88435..4508d45 100644 --- a/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx +++ b/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx @@ -1763,32 +1763,32 @@ std::string HYBRIDPlugin_Hypothesis::CommandToRun(const HYBRIDPlugin_Hypothesis* { TCollection_AsciiString cmd = GetExeName().c_str(); // check if any option is overridden by hyp->myTextOption - bool p_h = ( hyp->myTextOption.find("-h") != std::string::npos ); - bool p_v = ( hyp->myTextOption.find("-v ") != std::string::npos ); - //bool p_i = ( hyp->myTextOption.find("-i") != std::string::npos ); - //bool p_o = ( hyp->myTextOption.find("-o") != std::string::npos ); - bool p_mnot = ( hyp->myTextOption.find("--max_number_of_threads ") != std::string::npos ); - bool p_blsi = ( hyp->myTextOption.find("--boundary_layer_surface_tags ") != std::string::npos ); - bool p_blii = ( hyp->myTextOption.find("--boundary_layer_imprint_tags ") != std::string::npos ); - bool p_blsd = ( hyp->myTextOption.find("--normal_direction ") != std::string::npos ); - bool p_hotfl = ( hyp->myTextOption.find("--boundary_layer_global_initial_height ") != std::string::npos ); - bool p_nobl = ( hyp->myTextOption.find("--number_of_boundary_layers ") != std::string::npos ); - bool p_blgp = ( hyp->myTextOption.find("--boundary_layer_geometric_progression ") != std::string::npos ); - bool p_eg = ( hyp->myTextOption.find("--element_generation ") != std::string::npos ); - bool p_cm = ( hyp->myTextOption.find("--collision_mode ") != std::string::npos ); - bool p_am = ( hyp->myTextOption.find("--add_multinormals ") != std::string::npos ); - bool p_mat = ( hyp->myTextOption.find("--multinormal_angle_threshold ") != std::string::npos ); - bool p_sn = ( hyp->myTextOption.find("--smooth_normals ") != std::string::npos ); - -//missing options : -//- global_physical_size -//- boundary_layer_size_mode -//- boundary_layer_initial_height_on_surface_tags -//- boundary_layer_max_element_angle + bool p_h = ( hyp && hyp->myTextOption.find("-h") != std::string::npos ); + bool p_v = ( hyp && hyp->myTextOption.find("-v ") != std::string::npos ); + bool p_i = ( hyp && hyp->myTextOption.find("-i") != std::string::npos ); + bool p_o = ( hyp && hyp->myTextOption.find("-o") != std::string::npos ); + bool p_mnot = ( hyp && hyp->myTextOption.find("--max_number_of_threads ") != std::string::npos ); + bool p_blsi = ( hyp && hyp->myTextOption.find("--boundary_layer_surface_tags ") != std::string::npos ); + bool p_blii = ( hyp && hyp->myTextOption.find("--boundary_layer_imprint_tags ") != std::string::npos ); + bool p_blsd = ( hyp && hyp->myTextOption.find("--normal_direction ") != std::string::npos ); + bool p_hotfl = ( hyp && hyp->myTextOption.find("--boundary_layer_global_initial_height ") != std::string::npos ); + bool p_nobl = ( hyp && hyp->myTextOption.find("--number_of_boundary_layers ") != std::string::npos ); + bool p_blgp = ( hyp && hyp->myTextOption.find("--boundary_layer_geometric_progression ") != std::string::npos ); + bool p_eg = ( hyp && hyp->myTextOption.find("--element_generation ") != std::string::npos ); + bool p_cm = ( hyp && hyp->myTextOption.find("--collision_mode ") != std::string::npos ); + bool p_am = ( hyp && hyp->myTextOption.find("--add_multinormals ") != std::string::npos ); + bool p_mat = ( hyp && hyp->myTextOption.find("--multinormal_angle_threshold ") != std::string::npos ); + bool p_sn = ( hyp && hyp->myTextOption.find("--smooth_normals ") != std::string::npos ); + + //missing options : + //- global_physical_size + //- boundary_layer_size_mode + //- boundary_layer_initial_height_on_surface_tags + //- boundary_layer_max_element_angle bool nolayers = false; - bool layersOnAllWrap = hyp->myLayersOnAllWrap; - + bool layersOnAllWrap = hyp ? hyp->myLayersOnAllWrap : DefaultLayersOnAllWrap(); + //help mode if ( p_h ) { cmd += " --help "; @@ -1798,7 +1798,7 @@ std::string HYBRIDPlugin_Hypothesis::CommandToRun(const HYBRIDPlugin_Hypothesis* std::cout << "!!!!! CommandToRun help only !!!! " << cmd.ToCString() << std::endl; return cmd.ToCString(); } - + if ( !p_v && hyp ) { cmd += " --verbose "; cmd += hyp->myVerboseLevel;