-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visualization of geometries deformed by displacement fields #43
Comments
@fverdugo thanks for following up with this. FYI I tried to build something to show a deformed model. # Model
domain = (0,1,0,1,0,1)
partition = (3,3,3)
model = CartesianDiscreteModel(domain,partition)
# Setup integration
degree = 2
Ω = Triangulation(model)
dΩ = Measure(Ω,degree) Then If I do the following however then vd = visualization_data(Ω,"",cellfields=["u"=>uh])
grid = vd[1].grid
vals = vd[1].nodaldata["u"]
grid2 = deepcopy(grid)
nodes2 = get_node_coordinates(grid2)
nodes2 .= nodes2 .+ vals Is there a way to obtain displacements and coordinates in the form |
Got it. If I get element descriptions like this, then the indices conform to the vd=visualization_data(Ω,"");
grid = vd[1].grid
E = get_cell_node_ids(grid) #Elements
V = get_node_coordinates(grid) #Nodes |
Try this: vd=visualization_data(Ω,"",order=2); |
@fverdugo at first I thought it was the order but actually |
Yes, and the general one is the "unshared" since it also allows one to visualise discontinuous functions as needed in advanced discretization methods like DG. |
Thanks @fverdugo. What would I use to get visualization data for the shared node case? Or do we currently default to unshared? |
Simple code sniped of how to deform your visualization grid with a generic displacement field.
We want to implement a nice high level API for this. Something linke:
cc @Kevin-Mattheus-Moerman
The text was updated successfully, but these errors were encountered: