How to assemble stiffness matrix scaled by local mesh width

7 months ago by
Hi Everyone,

I am trying to assemble a stiffness matrix where each entry will be scaled by its local mesh width where the mesh is anisotropic. I'd prefer to be able to define a function so can all be done in the assembly call. If that is not possible is there a function which returns the mesh width of a given cell? I know that mesh.hmin() and mesh.hmax() will return the minimum and maximum for the whole mesh, but I need each individual cell.

Community: FEniCS Project

1 Answer

7 months ago by
I believe the function h = CellSize(mesh) is what you are looking for. You can then use h in your expressions.
Please login to add an answer/comment or follow this question.

Similar posts:
Search »