Skip to content

Plot

Note that the Plot module does not actually plot itself, but instead writes to VTK files.

All docstrings from Mantis.Plot

Mantis.Plot.export_form_fields_to_vtk Method
julia
export_form_fields_to_vtk(form_sols::Vector{Forms.AbstractForm}, var_names::Vector{String}, filename::String; n_subcells::Int = 1, degree::Int = 4, output_directory_tree::Vector{String} = ["examples", "data", "output"])

Export the form solutions to VTK files.

Arguments

  • form_sols::Vector{Forms.AbstractForm}: The form solutions to be exported.

  • var_names::Vector{String}: The names of the form solutions.

  • filename::String: The name of the output file.

  • n_subcells::Int: The number of subcells to be used in the visualization.

  • degree::Int: The degree of the basis functions used in the visualization.

  • output_directory_tree::Vector{String}: A vector of strings representing the directory tree.

source
Mantis.Plot.export_form_fields_to_vtk Method
julia
export_form_fields_to_vtk(form_sols::Vector{Forms.AbstractForm}, var_names::Vector{String}, filename::String; n_subcells::Int = 1, degree::Int = 4, output_directory_tree::Vector{String} = ["examples", "data", "output"])

Export the form solutions to VTK files.

Arguments

  • form_sols::Vector{Forms.AbstractForm}: The form solutions to be exported.

  • filename::String: The name of the output file.

  • n_subcells::Int: The number of subcells to be used in the visualization.

  • degree::Int: The degree of the basis functions used in the visualization.

  • output_directory_tree::Vector{String}: A vector of strings representing the directory tree.

source
Mantis.Plot.export_geometry_to_vtk Method
julia
visualize_geometry(geo::Geometry.AbstractGeometry, filename::String; n_subcells::Int = 1, degree::Int = 4, output_directory_tree::Vector{String} = ["examples", "data", "output"])

Export the geometry to a VTK file.

Arguments

  • geo::Geometry.AbstractGeometry: The geometry to be exported.

  • filename::String: The name of the output file.

  • n_subcells::Int: The number of subcells to be used in the visualization.

  • degree::Int: The degree of the basis functions used in the visualization.

  • output_directory_tree::Vector{String}: A vector of strings representing the directory tree.

source
Mantis.Plot.plot Method
julia
plot(geometry::G; kwargs...) where {G <: AbstractGeometry}

Plot a geometry geometry by generating a vtk file containing the definition of the (high polynomial) degree elements.

Arguments

  • geometry::AbstractGeometry: the geometry to plot.

Keyword arguments

  • vtk_filename::String: The name of the vtk file where to save the plot (.vtk extension is automatically added). <default>: "default".

  • n_subcells::Int64: The number of subdivisions (per dimension) to generate in each element, i.e., each element is exported as n_subcells^d cells, where d is the geometric dimension. This allows for a more detailed plotting when using basis functions with polynomial degree higher than one. <default>: 1.

  • degree::Int64: The polynomial degree of the exported vtk cells. Each element is sampled at (degree + 1)^d, where d is the geometric dimension, points and these are exported as a high degree VTK_LAGRANGE_QUADRILATERAL. Highly refined visualization is then available in Paraview, for example, by adding an ExtractSurface filter and then increasing the Nonlinear Subdivision Level. Each subdivision level in Paraview doubles the number of visualization cells in each dimension.

Returns

Nothing

source