Describe the bug
MappedGrid computes and stores a composed geometric map
geo_map = phys_map ∘ model_map
in its constructor, but it does not override get_cell_map.
Because of this, calling get_cell_map on a MappedGrid falls back to the default implementation for Grid, which reconstructs the map using linear interpolation of the deformed node coordinates.
function get_cell_map(trian::Grid)
cell_to_coords = get_cell_coordinates(trian)
cell_to_shapefuns = get_cell_shapefuns(trian)
lazy_map(linear_combination, cell_to_coords, cell_to_shapefuns)
end
This reconstruction ignores the stored geo_map.
Impact
For nonlinear or curved phys_map, the reconstructed map becomes a piecewise linear approximation of the geometry instead of the intended composed map. This can lead to incorrect Jacobians and integration results during FE assembly.
Affected file
src/Geometry/MappedDiscreteModels.jl
Possible fix
Return the stored map from MappedGrid:
get_cell_map(grid::MappedGrid) = grid.geo_map
Describe the bug
MappedGridcomputes and stores a composed geometric mapin its constructor, but it does not override
get_cell_map.Because of this, calling
get_cell_mapon aMappedGridfalls back to the default implementation forGrid, which reconstructs the map using linear interpolation of the deformed node coordinates.This reconstruction ignores the stored
geo_map.Impact
For nonlinear or curved
phys_map, the reconstructed map becomes a piecewise linear approximation of the geometry instead of the intended composed map. This can lead to incorrect Jacobians and integration results during FE assembly.Affected file
Possible fix
Return the stored map from
MappedGrid: