
April 21, 2017
11:48 a.m.
On 04/21/2017 01:10 PM, fatune@gmail.com wrote:
After looking deep into the example I created my version of minimum workng example of the script script. Here it is:
filename_in = "linear_viscoelastic.py" conf = ProblemConf.from_file(filename_in) pb = Problem.from_conf(conf) time_solver = pb.get_time_solver() time_solver.init_time() for out in time_solver(): step, time, state = out print ("##################") print("step : %s time : %s " % (step, time)) u = state() x = pb.get_mesh_coors().T[0] y = pb.get_mesh_coors().T[1] z = pb.get_mesh_coors().T[2] Vx = state.reshape(state.shape[0]/3,3).T[0] Vy = state.reshape(state.shape[0]/3,3).T[1] Vz = state.reshape(state.shape[0]/3,3).T[2]
Vx Vy Vz are different at each new step (at least at first few steps). But coordinates of the mesh stays the same. How can I deform the mesh according to Vx Vy Vz? Or it is the wrong way of getting coordinates?
This can be done using the pb.set_mesh_coors(), but what do you want to do next? Maybe send us the equations you want to solve, so that we have a better idea of what to recommend you.
r.