-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add the posibility to plot 2D surfaces in 3D #82
base: main
Are you sure you want to change the base?
Conversation
@amrueda is this ready to merge? It would be nice to have this so we can use it with TrixiAtmo.jl. |
Since Trixi2Vtk.jl calls |
Since trixi-framework/Trixi.jl#2068 was merged, I guess that we are ready to merge this PR? |
@@ -234,8 +234,9 @@ end | |||
function calc_node_coordinates(mesh::P4estMesh, nodes, n_visnodes) | |||
# Extract number of spatial dimensions | |||
ndims_ = ndims(mesh) | |||
ndims_spa = size(mesh.tree_node_coordinates,1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment explaining why we need this convoluted way and cannot just use ndims_
.
Also, please be consistent with our formatting conventions (space after comma).
Finally, please do not use abbreviations in variable/type/function names that are not absolutely clear to everyone in the community (unless you are really referring to the town in Belgium).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that trixi-framework/Trixi.jl#2068 is merged, instead of doing this, we can just extract NDIMS
and NDIMS_AMBIENT
(this is the same as the variable ndims_spa
here) from the type parameters of the mesh.
@@ -580,7 +581,7 @@ function calc_vtk_points_cells(node_coordinates::AbstractArray{<:Any,4}) | |||
linear_indices = LinearIndices(size_[2:end]) | |||
|
|||
# Use lagrange nodes as VTK points | |||
vtk_points = reshape(node_coordinates, (2, n_points)) | |||
vtk_points = reshape(node_coordinates, (size(node_coordinates, 1), n_points)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As before, please leave a short comment explaining this seemingly overcomplex way of setting the number of dimensions.
This PR adds support for Trixi simulations on spherical shells. See trixi-framework/TrixiAtmo.jl#25.
earth.mp4