Skip to content

Commit 7aba09c

Browse files
committed
more
1 parent 942b88b commit 7aba09c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/FESpaces/DiscreteModelWithFEMaps.jl

+18
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,20 @@ function GridWithFEMap(model,orders::AbstractArray; kwargs...)
7676
GridWithFEMap(grid, Vₕ, Vₕ_scal, xh, nodes_coords, reffes)
7777
end
7878

79+
function _compute_node_coordinates(grid,xh)
80+
c_dofs = get_fe_dof_basis(grid.fe_sp)
81+
c_nodes = lazy_map(get_nodes,get_data(c_dofs))
82+
83+
c_xh = lazy_map(evaluate,get_data(xh),c_nodes)
84+
c_scal_ids = get_cell_dof_ids(grid.scal_fe_sp)
85+
86+
nodes_coords = grid.node_coords
87+
Geometry._cell_vector_to_dof_vector!(nodes_coords,c_scal_ids,c_xh)
88+
89+
return nothing
90+
91+
end
92+
7993
function add_mesh_displacement!(grid::GridWithFEMap,dh::FEFunction)
8094

8195
Xh = grid.fe_map
@@ -86,6 +100,8 @@ function add_mesh_displacement!(grid::GridWithFEMap,dh::FEFunction)
86100
Xh_fv .= Xh_fv .+ get_free_dof_values(dh)
87101
Xh_dv .= Xh_dv .+ get_dirichlet_dof_values(get_fe_space(dh))
88102

103+
_compute_node_coordinates(grid,Xh)
104+
89105
end
90106

91107
function update_coordinates!(grid::GridWithFEMap,dh::FEFunction)
@@ -98,6 +114,8 @@ function update_coordinates!(grid::GridWithFEMap,dh::FEFunction)
98114
Xh_fv .= get_free_dof_values(dh)
99115
Xh_dv .= get_dirichlet_dof_values(get_fe_space(dh))
100116

117+
_compute_node_coordinates(grid,Xh)
118+
101119
end
102120

103121
# Interface

0 commit comments

Comments
 (0)