You would have to convert your mesh function into a function in the (“DG”, 0) space, see for instance: How to define different materials / importet 3D geometry (gmsh) - #2 by dokken
dokken
2
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Gradient of basic functions evaluated in each point of the mesh | 3 | 266 | June 7, 2024 | |
| Calculating gradient from mesh | 3 | 432 | April 5, 2024 | |
| How to get the first order derivative of the solution and store it in a numpy array | 23 | 1158 | April 22, 2025 | |
| Derivatives, gradients etc. in Dolfinx | 1 | 1301 | September 19, 2022 | |
| How can I interpolate a UFL nabla_grad/grad to a function | 3 | 867 | October 15, 2022 |