- Thank you received: 0
SetDeformation does not work properly with L2 space gfu
- creativeworker
- Topic Author
- Offline
- Senior Member
Less
More
5 years 6 months ago #1640
by creativeworker
Hi,
I have the following code-snippet, that seems to not deform the mesh as expected:
I also tried with H1 fes, but that had the disadvantage, that the interpolation of the cf was very useless.
Perhaps there is a fundamentally better way to achieve this moving target?
I have the following code-snippet, that seems to not deform the mesh as expected:
Code:
cf = CoefficientFunction([(0,0,1) if mat== "MovingTarget" else (0,0,0) for mat in mesh.GetMaterials()])
fes = L2(mesh, order = 1, dim=3)
u = GridFunction(fes)
u.Set(cf)
mesh.SetDeformation(u)
I also tried with H1 fes, but that had the disadvantage, that the interpolation of the cf was very useless.
Perhaps there is a fundamentally better way to achieve this moving target?
- christopher
- Offline
- Administrator
Less
More
- Thank you received: 101
5 years 5 months ago #1646
by christopher
Replied by christopher on topic SetDeformation does not work properly with L2 space gfu
I don't think you want a discontinuous deformation... What do you mean with 'useless'? I guess you want a smooth extension of (0,0,1) into the outer domain, best would probably be computing an harmonic extension by solving a poisson equation on the exterior with dirichlet boundaries (0,0,1) on the interior and then setting all vertex dofs to (0,0,1) in the interior. That would give you a function deforms the mesh smoothly and is (0,0,1) in the domain... But a bit expensive to compute.
Best
Christopher
Best
Christopher
Time to create page: 0.101 seconds