Hello everyone,
I am trying to solve a 3d solid mechanics problem using deal.ii, PetSc, and p4est (p::d::triangulation) where in the mesh moves in time (like step-18). After a while, the distortion in the mesh is too much and I am looking for a re-meshing strategy that can help untangle the mesh and transfer the solution and Gauss point history variables from old mesh to new mesh.
After looking at several posts in this group related to the above use case, I have come to the following strategy. Please let me know if this is okay. I would also like to contribute my solution for anyone else to use, therefore I am also open to any implementation-specific suggestions.
1. Write the old mesh in the vtk file.
2. Read the mesh in mesquite and smoothen it.
3. Calculate the "displacement" of the mesh coordinates and write them in a file.
4. Now, restart your code with the old mesh file, and setup everything like before.
5. Create a new triangulation that is same as old mesh and then move its vertices using the displacements calculated above in Mesquite.
6. You may use FeFieldFunction to transfer the solution from the old mesh to the new mesh by one of the following 2 methods:
a) L2 projection from old mesh to new mesh (Projection)
b) Simple evaluation of solution values on the new nodal coordinates (Interpolation)
Note 1: One good thing in this approach is that FeFieldFunction would not throw exception if you ensure that the new mesh has the same partition as the old mesh. In this case, new mesh is just displaced from the old mesh.
Note 2: Also, instead of writing mesh and displacement solutions to file,
things can be transferred in memory but the strategy remains the same.
Here are my questions related to implementation.
Q1. Please let me know if this strategy is fine.
Q2. Can we use VectorTools::Interpolate/ project function instead of using the FeFieldFunction on our own? I ask this because the documentation says the the tria's should have a common coarse grid to use VectorTools:Interpolate/Project. Does that mean VectorTools:Interpolate/Project can only be used when there is refinement and/or coarsening happening. It cannot be used when the two meshes are just displaced wrt to each other?