Hello,
I'm doing an analysis that takes a lot of calculation time and would like to save results from calculation steps that were already done for later on.
The idea is to keep the results from previous calculations, in order to be able to make and evaluate changes in the code in stages that will have an influence after for example 10hours of calculation time. So starting the calculation lets say at stage 4, using the result of stage 3 as initial conditions without having to wait the 9 hours that it took to get the result of stage 3, since the result of these first 9 hours will be exactly the same as in the run before.
does anyone know how, do you have an example?
what I've tried so far is the following: (see code below)
I tried to intercept the error from STAT_NON_LINE with a python command that then skips the following calculation steps. The idea is that the results already calculated can be saved/printed and then used again. However it doesn't work, I guess Code_Aster stops the evaluation before the except command from try: except: can do something. How can i tell code aster not to stop itself but to read my commands first?
Best regards,
René
# auxiliary variable to control errors
error=0,
# -------------------------------------------------------------------------
# step 0:
# -------------------------------------------------------------------------
try:
result=STAT_NON_LINE(...)
except (aster.error, aster.FatalError):
error=1
# -------------------------------------------------------------------------
# step 1:
# -------------------------------------------------------------------------
if error==1:
pass
else:
try:
result=STAT_NON_LINE(...)
except (aster.error, aster.FatalError):
error=1
# and so on, so that eventually it will go to the printing of the results and do that.
IMPR_RESU(...)
FIN()