Closed Peigen-L closed 3 years ago
Hi @Peigen-L You can use a postSolveHook function, that is fine. However the one you have implemented does not do anything. It is called by the code after each iteration so you need to define what is done in there...
As for the error, it is a classic Python error. You are trying to add a float to a list. In Python we usually use list comprehension to do this: new_list = [val + something for val in old_list]
An alternative is to use numpy arrays... you can convert your list to a numpy array...
I hope this helps!
R
Hi @rbeucher
Thank you so much for your help, I will try with your suggestions.
kind regards
Peigen
Hi, I am trying to trace the velocity and displacement for a specific particle by updating the position of the passive tracer for every timestep using post solve hook function as:
Machine recalled error as 'TypeErrorTraceback (most recent call last)
Is there any possibility to trace the movement for a specific point and out put its velocity every time-step?