split test smeshplugins to keep apart mg_tetra_parallele which is not working

This commit is contained in:
Paul RASCLE 2019-08-01 11:19:48 +02:00
parent 0baa22d65a
commit fb2fc07236
3 changed files with 84 additions and 22 deletions

View File

@ -0,0 +1,82 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Test000
Checks the availability of the external plugins :
1 MG-TETRA-PARALLELE (GHS3DPRLPLUGIN)
Copyright EDF R&D 2017
"""
__revision__ = "V1.0"
#
# Computation of the meshes: T/F
ComputeMeshes = True
import salome
salome.salome_init()
theStudy = salome.myStudy
#
import iparameters
IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
# fill list AP_MODULES_LIST
IPAR.append("AP_MODULES_LIST", "Geometry")
IPAR.append("AP_MODULES_LIST", "Mesh")
ERROR = 0
MESSAGE = ""
#
while not ERROR :
###
### A. GEOM component
###
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New()
O = geompy.MakeVertex(0, 0, 0, "0")
OX = geompy.MakeVectorDXDYDZ(1, 0, 0, "OX")
OY = geompy.MakeVectorDXDYDZ(0, 1, 0, "OY")
OZ = geompy.MakeVectorDXDYDZ(0, 0, 1, "OZ")
BOX = geompy.MakeBoxDXDYDZ(200, 200, 200, "BOX")
###
### B. SMESH component
###
import SMESH
from salome.smesh import smeshBuilder
smesh = smeshBuilder.New()
# B.7. MG_Tetra_Parallel
TEXTE = "MG_Tetra_Parallel"
MESH_7 = smesh.Mesh(BOX)
smesh.SetName(MESH_7.GetMesh(), "M_"+TEXTE)
MG_CADSurf_Tp = MESH_7.Triangle(algo=smeshBuilder.MG_CADSurf)
try :
MG_Tetra_Parallel = MESH_7.Tetrahedron(algo=smeshBuilder.MG_Tetra_Parallel)
except :
MESSAGE += "\nImpossible d'utiliser "+TEXTE
ERROR += 1
else :
if ComputeMeshes :
smesh.SetName(MG_Tetra_Parallel.GetAlgorithm(), TEXTE)
OK_COMPUTE = MESH_7.Compute()
if not OK_COMPUTE :
MESSAGE += "\nErreur avec "+TEXTE
ERROR += 1
else :
print(TEXTE+": OK")
break
###
### C. End
###
if ERROR :
raise Exception("\n\nNombre d'erreurs : %d" % ERROR + MESSAGE + "\n")
else :
print("\nAucun problème\n")

21
doc/salome/examples/test_smeshplugins.py Normal file → Executable file
View File

@ -9,7 +9,6 @@ Checks the availability of the external plugins :
4 MG-TETRA (GHS3DPLUGIN) 4 MG-TETRA (GHS3DPLUGIN)
5 MG-HEXA (HEXOTICPLUGIN) 5 MG-HEXA (HEXOTICPLUGIN)
6 MG-HYBRID (HYBRIDPLUGIN) 6 MG-HYBRID (HYBRIDPLUGIN)
7 MG-TETRA-PARALLELE (GHS3DPRLPLUGIN)
Copyright EDF R&D 2017 Copyright EDF R&D 2017
""" """
__revision__ = "V1.0" __revision__ = "V1.0"
@ -174,26 +173,6 @@ while not ERROR :
else : else :
print(TEXTE+": OK") print(TEXTE+": OK")
# B.7. MG_Tetra_Parallel
TEXTE = "MG_Tetra_Parallel"
MESH_7 = smesh.Mesh(BOX)
smesh.SetName(MESH_7.GetMesh(), "M_"+TEXTE)
MG_CADSurf_Tp = MESH_7.Triangle(algo=smeshBuilder.MG_CADSurf)
try :
MG_Tetra_Parallel = MESH_7.Tetrahedron(algo=smeshBuilder.MG_Tetra_Parallel)
except :
MESSAGE += "\nImpossible d'utiliser "+TEXTE
ERROR += 1
else :
if ComputeMeshes :
smesh.SetName(MG_Tetra_Parallel.GetAlgorithm(), TEXTE)
OK_COMPUTE = MESH_7.Compute()
if not OK_COMPUTE :
MESSAGE += "\nErreur avec "+TEXTE
ERROR += 1
else :
print(TEXTE+": OK")
break break
### ###

View File

@ -43,7 +43,7 @@ SET(BAD_TESTS
quality_controls_ex22.py quality_controls_ex22.py
viewing_meshes_ex01.py viewing_meshes_ex01.py
radial_prism_3d_algo.py radial_prism_3d_algo.py
test_smeshplugins.py test_smeshplugin_mg_tetra_parallele.py
) )
SET(GOOD_TESTS SET(GOOD_TESTS
@ -181,6 +181,7 @@ SET(GOOD_TESTS
split_biquad.py split_biquad.py
quad_medial_axis_algo.py quad_medial_axis_algo.py
defining_hypotheses_len_near_vertex.py defining_hypotheses_len_near_vertex.py
test_smeshplugins.py
) )
SET(EXAMPLES_TESTS ${BAD_TESTS} ${GOOD_TESTS} testme.py) SET(EXAMPLES_TESTS ${BAD_TESTS} ${GOOD_TESTS} testme.py)