Question about extracting iteration number

Hi all, I am trying to change the elastic tensor when the calculation reaches a certain iteration number (e.g. iteration = 50). However I have no idea about how to extract the current iteration number. It seems that the implementation of the specified process such as PhaseField, and the iteration procedure are separate in the source code. Therefore could someone give me advice on extracting the current iteration number? Thanks.

Hi Augustus,

you could use the preIterationConcreteProcess() method of your process to manually keep track of the iteration number in your process, store that information in <YOUR_PROCESS>ProcessData and pass it to the local assembler that way, where you can mess around with it.

However, I don’t recommend that. It seems like a hack to me to overcome some convergence problems. Probably the iteration number where you want to start changing the elastic tensor changes from use case to use case. In the end you might just trade one problem for another one.

Best regards,

Hi Christoph,

Really thank you @chleh for presenting the procedure, and also thanks for the warning. I will try to solve the convergence problems by other means before changing the elastic tensor.

Best regards,