@@ -153,34 +153,33 @@ def __init__(self, *args, **kwargs):
153
153
if weibull_kwargs ["mask" ] is None :
154
154
weibull_kwargs ["mask" ] = IntField ("mask" , damage_kwargs ["nodeList" ], 1 )
155
155
156
- # Build the flaw distribution.
157
- damage_kwargs [ "flaws" ] = weibullFlawDistributionBenzAsphaug ( ** weibull_kwargs )
156
+ # Preserve the input for constructing the flaws
157
+ self . weibull_kwargs = weibull_kwargs
158
158
159
159
# Invoke the parent constructor.
160
160
TensorDamageModel .__init__ (self , ** damage_kwargs )
161
161
return
162
162
163
+ ########################################################################
164
+ def initializeProblemStartupDependencies (self ,
165
+ dataBase ,
166
+ state ,
167
+ derivs ):
168
+ # Set the flaws
169
+ self .weibull_kwargs ["state" ] = state
170
+ self .flaws = weibullFlawDistributionBenzAsphaug (** self .weibull_kwargs )
171
+
172
+ TensorDamageModel .initializeProblemStartupDependencies (self ,
173
+ dataBase ,
174
+ state ,
175
+ derivs )
176
+
177
+ return
178
+
179
+ ########################################################################
163
180
def label (self ):
164
181
return "GradyKippTensorDamageBenzAsphaug"
165
182
166
- # def dumpState(self,
167
- # file,
168
- # pathName):
169
- # TensorDamageModel.dumpState(self, file, pathName)
170
- # #file.writeObject(self.kWeibull, pathName + "/kWeibull")
171
- # #file.writeObject(self.mWeibull, pathName + "/mWeibull")
172
- # #file.writeObject(self.seed, pathName + "/seed")
173
- # return
174
-
175
- # def restoreState(self,
176
- # file,
177
- # pathName):
178
- # TensorDamageModel.restoreState(self, file, pathName)
179
- # #self.kWeibull = file.readObject(pathName + "/kWeibull")
180
- # #self.mWeibull = file.readObject(pathName + "/mWeibull")
181
- # #self.seed = file.readObject(pathName + "/seed")
182
- # return
183
-
184
183
return GradyKippTensorDamageBenzAsphaug
185
184
186
185
#-------------------------------------------------------------------------------
@@ -324,35 +323,34 @@ def __init__(self, *args, **kwargs):
324
323
if weibull_kwargs ["mask" ] is None :
325
324
weibull_kwargs ["mask" ] = IntField ("mask" , damage_kwargs ["nodeList" ], 1 )
326
325
327
- # Build the flaw distribution.
328
- damage_kwargs [ "flaws" ] = weibullFlawDistributionOwen ( ** weibull_kwargs )
326
+ # Preserve the input for constructing the flaws, and build dummy flaws for now
327
+ self . weibull_kwargs = weibull_kwargs
329
328
330
329
# Invoke the parent constructor.
331
330
TensorDamageModel .__init__ (self , ** damage_kwargs )
332
331
333
332
return
334
333
334
+ ########################################################################
335
+ def initializeProblemStartupDependencies (self ,
336
+ dataBase ,
337
+ state ,
338
+ derivs ):
339
+ # Set the flaws
340
+ self .weibull_kwargs ["state" ] = state
341
+ self .flaws = weibullFlawDistributionOwen (** self .weibull_kwargs )
342
+
343
+ TensorDamageModel .initializeProblemStartupDependencies (self ,
344
+ dataBase ,
345
+ state ,
346
+ derivs )
347
+
348
+ return
349
+
350
+ ########################################################################
335
351
def label (self ):
336
352
return "GradyKippTensorDamageOwen"
337
353
338
- # def dumpState(self,
339
- # file,
340
- # pathName):
341
- # TensorDamageModel.dumpState(self, file, pathName)
342
- # # file.writeObject(self.kWeibull, pathName + "/kWeibull")
343
- # # file.writeObject(self.mWeibull, pathName + "/mWeibull")
344
- # # file.writeObject(self.seed, pathName + "/seed")
345
- # return
346
-
347
- # def restoreState(self,
348
- # file,
349
- # pathName):
350
- # TensorDamageModel.restoreState(self, file, pathName)
351
- # # self.kWeibull = file.readObject(pathName + "/kWeibull")
352
- # # self.mWeibull = file.readObject(pathName + "/mWeibull")
353
- # # self.seed = file.readObject(pathName + "/seed")
354
- # return
355
-
356
354
return GradyKippTensorDamageOwen
357
355
358
356
#-------------------------------------------------------------------------------
0 commit comments