1 # -*- coding: utf-8 -*-
5 from blocFissure import gmu
6 from blocFissure.gmu.initEtude import initEtude
7 from blocFissure.gmu.getStatsMaillageFissure import getStatsMaillageFissure
9 class fissureGenerique():
11 classe générique problème fissure:
12 génération géométrie et maillage sain
13 définition et positionnement d'une fissure
14 génération d'un bloc défaut inséré dans le maillage sain
17 nomProbleme = "generique"
19 def __init__(self, numeroCas):
21 self.numeroCas = numeroCas
22 self.nomCas = self.nomProbleme +"_%d"%(self.numeroCas)
23 self.fissureLongue = False
25 def setParamGeometrieSaine(self):
28 def genereGeometrieSaine(self, geomParams):
29 geometriesSaines = [None]
30 return geometriesSaines
32 def setParamMaillageSain(self):
35 def genereMaillageSain(self, geometriesSaines, meshParams):
36 maillagesSains = [None]
39 def setParamShapeFissure(self):
40 self.shapeFissureParams = {}
42 def genereShapeFissure(self, geometriesSaines, geomParams, shapeFissureParams):
43 shapesFissure = [None]
46 def setParamMaillageFissure(self):
47 self.maillageFissureParams = {}
49 def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, maillageFissureParams):
50 elementsDefaut = [None]
53 def genereMaillageFissure(self, geometriesSaines, maillagesSains, shapesFissure,
54 maillageFissureParams, elementsDefaut, step):
55 maillageFissure = None
56 return maillageFissure
58 def setReferencesMaillageFissure(self):
59 referencesMaillageFissure = {}
60 return referencesMaillageFissure
62 # ---------------------------------------------------------------------------
64 def executeProbleme(self, step=-1):
65 logging.info(" --- executeProbleme %s", self.nomCas)
69 self.setParamGeometrieSaine()
70 geometriesSaines = self.genereGeometrieSaine(self.geomParams)
74 self.setParamMaillageSain()
75 maillagesSains = self.genereMaillageSain(geometriesSaines, self.meshParams)
79 self.setParamShapeFissure()
80 shapesFissure = self.genereShapeFissure(geometriesSaines, self.geomParams, self.shapeFissureParams)
84 self.setParamMaillageFissure()
85 elementsDefaut = self.genereZoneDefaut(geometriesSaines, maillagesSains, shapesFissure, self.shapeFissureParams, self.maillageFissureParams)
89 maillageFissure = self.genereMaillageFissure(geometriesSaines, maillagesSains,
90 shapesFissure, self.shapeFissureParams,
91 self.maillageFissureParams, elementsDefaut, step)
93 self.setReferencesMaillageFissure()
94 mesures = getStatsMaillageFissure(maillageFissure, self.referencesMaillageFissure, self.maillageFissureParams)