Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

SetDeformation does not work properly with L2 space gfu

More
4 years 10 months ago #1640 by creativeworker
Hi,

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?
More
4 years 10 months ago #1646 by christopher
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
Time to create page: 0.126 seconds