X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTools%2FblocFissure%2Fdoc%2Ftestcases.rst;h=57dc0948166477c0dc05cf4e1bf42b11392a1638;hb=60bb6273b99dc88e3d6f360d7ae5792a77c68d06;hp=47be3dc5e61833c9cd7f27591b63eda20429fd5d;hpb=004925bca40d46c25cf9cc837193335163c2d44f;p=modules%2Fsmesh.git diff --git a/src/Tools/blocFissure/doc/testcases.rst b/src/Tools/blocFissure/doc/testcases.rst old mode 100755 new mode 100644 index 47be3dc5e..57dc09481 --- a/src/Tools/blocFissure/doc/testcases.rst +++ b/src/Tools/blocFissure/doc/testcases.rst @@ -4,94 +4,102 @@ Test cases ####################### -A base of 25 test cases ensures the proper functioning of « Bloc Fissure ». 12 cases are dedicated to :ref:`cracked bended pipes ` and the others 13 are for other :ref:`generic geometries `. They are shown here in order to illustrate cases on which « Bloc Fissure » works. +A base of 28 test cases guarantees the correct functioning of « Bloc Fissure ». 12 cases are dedicated to :ref:`cracked bended pipes ` and the others 16 are for other :ref:`generic geometries `. They are shown here in order to illustrate cases on which « Bloc Fissure » works. .. _genericTC: Generic cases =============================== -All 13 cases are shown Table 2. Two views show the whole cracked structure and a zoom onto the crack with its tore. - -+-------------------------------------------+----------------------------------------------+ -| CubeAngle | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/01_CubeAngle.png | .. image:: images/01_CubeAngle_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| CubeAngle2 | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/02_CubeAngle2.png | .. image:: images/02_CubeAngle2_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| cylindre | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/03_cylindre.png | .. image:: images/03_cylindre_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| cylindre2 | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/04_cylindre2.png | .. image:: images/04_cylindre2_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| disque | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/05_disque.png | .. image:: images/05_disque_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| ellipse1 | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/06_ellipse1.png | .. image:: images/06_ellipse1_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| ellipse2 (tilted crack) | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/07_ellipse2.png | .. image:: images/07_ellipse2_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| eprouvetteCourbe | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/08_eprouvetteCourbe.png | .. image:: images/08_eprouvetteCourbe_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| eprouvetteDroite | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/09_eprouvetteDroite.png | .. image:: images/09_eprouvetteDroite_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| eprouvetteDroite2 | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/10_eprouvetteDroite2.png | .. image:: images/10_eprouvetteDroite2_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| faceGauche | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/11_faceGauche.png | .. image:: images/11_faceGauche_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| faceGauche2 | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/12_faceGauche2.png | .. image:: images/12_faceGauche2_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| vis (Crack is in the radius filet between the screw head and the screw shank) | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/13_vis_1.png | .. image:: images/13_vis_1_2.png | -| :width: 400 | :width: 400 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ +All 16 cases are shown Table 2. Two views show the whole cracked structure and a zoom onto the crack with its tore. + ++--------------------------------------------+-----------------------------------------------+ +| CubeAngle | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/01_CubeAngle.png | .. image:: images/01_CubeAngle_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| CubeAngle_2 | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/02_CubeAngle_2.png | .. image:: images/02_CubeAngle_2_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| cubeCoin | ++--------------------------------------------+-----------------------------------------------+ +| cubeMilieu | ++--------------------------------------------+-----------------------------------------------+ +| cubeTransverse | ++--------------------------------------------+-----------------------------------------------+ +| cylindre | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/03_cylindre.png | .. image:: images/03_cylindre_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| cylindre_2 | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/04_cylindre_2.png | .. image:: images/04_cylindre_2_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| disquePerce | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/05_disque.png | .. image:: images/05_disque_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| ellipse_1 | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/06_ellipse_1.png | .. image:: images/06_ellipse_1_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| ellipse_2 (tilted crack) | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/07_ellipse_2.png | .. image:: images/07_ellipse_2_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| eprouvetteCourbe | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/08_eprouvetteCourbe.png | .. image:: images/08_eprouvetteCourbe_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| eprouvetteDroite | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/09_eprouvetteDroite.png | .. image:: images/09_eprouvetteDroite_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| eprouvetteDroite_2 | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/10_eprouvetteDroite_2.png | .. image:: images/10_eprouvetteDroite_2_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| faceGauche | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/11_faceGauche.png | .. image:: images/11_faceGauche_2.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| faceGauche_2 | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/12_faceGauche_2.png | .. image:: images/12_faceGauche_2_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| vis (Crack is in the radius filet between the screw head and the screw shank) | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/13_vis_1.png | .. image:: images/13_vis_1_2.png | +| :width: 400 | :width: 400 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| tube | ++--------------------------------------------+-----------------------------------------------+ .. _pipeTC: @@ -115,56 +123,59 @@ All 12 bended pipe test cases are not shown here because they are relatively sim | with an external crack | | +--------------------------------+----------------------------------------------+ -« Bloc Fissure » is very efficient for the case of bended pipes. The generation of the geometry and the crack insertion takes only around 15s. - -Running test cases -===================================== +coude_0 can be computed using this file for the data: -In SALOME interface: + * :download:`data for a bended puipe <../ihm/dialogFissureCoude.dic>` -0) **Generate med and breps files.** Once the files are generated, they are saved in SALOME source files. There is no need to generate them again:: +« Bloc Fissure » is very efficient for the case of bended pipes. The generation of the geometry and the crack insertion takes only around 15s. - from blocFissure.materielCasTests import genereMateriel +Data for the test cases +===================================== -Then the user can either launch all test cases, several at once or just one : +All the files for these test cases are stored in the directory of the installation of SALOME: -1) **To execute all test cases**:: +``Salome-VXXXX_package-YY/modules/SMESH_VXXXX/lib/python3.6/site-packages/salome/blocFissure`` - from blocFissure.CasTests import execution_Cas +The set of the med, xao and brep files can be created by the following importation: -2) **To execute only selected test cases**: + from blocFissure.materielCasTests import genereMateriel -modify execution_Cas.py file and change:: +Once the files are generated, they are saved into the directory of the installation of SALOME: - runall = False. #old : True +``Salome-VXXXX_package-YY/modules/SMESH_VXXXX/lib/python3.6/site-packages/salome/blocFissure/materielCasTests`` -And change from 0 to 1 of the number of the test you want to launch:: +There is no need to generate them again. - torun = [ 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,] +To check the installation of salome, the test cases can be computed by the salome test process:: -then launch the test cases:: + salome -test blocFissure - from blocFissure.CasTests import execution_Cas +Running test cases +===================================== -3) **To execute only one test case**:: +The test cases can be runned by the following instructions:: - from blocFissure.CasTests.[TEST_CASE_NAME] import [TEST_CASE_NAME] + from blocFissure.CasTests.blocFissureTest import blocFissureTest + BLOCFISSURE_TEST = blocFissureTest(list_of_cases) + MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement() + sys.stdout.write(MESSAGE_ERREUR) + del BLOCFISSURE_TEST - [TEST_CASE_NAME](0).executeProbleme() +If ``list_of_cases`` is an empty list, all the cases are computed. -[TEST_CASE_NAME] is the name of the test case in the following list. Note that the test cases fissureCoude_4 and fissure_Coude_4 are very similar. +If not, ``list_of_cases`` is made of the list of the numbers and/or the name of the requested case. The index of each test is the position of the test in the following table, from 0 for cubeAngle, 1 for cubeAngle_2, 2 for cubeCoin... from top to bottom, then from left to right. +--------------------+--------------------+--------------------+-----------------+-----------------+ -| faceGauche | cylindre_2 | disquePerce | fissureCoude_3 | fissureCoude_6 | +| cubeAngle | cylindre_2 | eprouvetteDroite_2 | fissureCoude_3 | fissureCoude_9 | +--------------------+--------------------+--------------------+-----------------+-----------------+ -| faceGauche_2 | eprouvetteCourbe | vis_1 | fissureCoude_4 | fissureCoude_7 | +| cubeAngle_2 | disquePerce | faceGauche | fissureCoude_4 | fissure_Coude | +--------------------+--------------------+--------------------+-----------------+-----------------+ -| ellipse_1 | eprouvetteDroite | fissureCoude | fissure_Coude_4 | fissureCoude_8 | +| cubeCoin | ellipse_1 | faceGauche_2 | fissureCoude_5 | fissure_Coude_4 | +--------------------+--------------------+--------------------+-----------------+-----------------+ -| ellipse_2 | cubeAngle | fissureCoude_1 | fissureCoude_5 | fissureCoude_9 | +| cubeMilieu | ellipse_2 | fissureCoude_1 | fissureCoude_6 | vis_1 | +--------------------+--------------------+--------------------+-----------------+-----------------+ -| cylindre | cubeAngle2 | fissureCoude_2 | fissureCoude_5 | fissureCoude_10 | +| cubeTransverse | eprouvetteCourbe | fissureCoude_10 | fissureCoude_7 | | ++--------------------+--------------------+--------------------+-----------------+-----------------+ +| cylindre | eprouvetteDroite | fissureCoude_2 | fissureCoude_8 | | +--------------------+--------------------+--------------------+-----------------+-----------------+ - -