Developer Documentation

Note that these functions could be removed or change in behavior between minor version changes! Use and dispatch on these with care!

FerriteViz.verticesFunction

Get the vertices represented as a list of coordinates of a cell.

Details

TODO refactor into Ferrite core.

source
FerriteViz.transfer_quadrature_face_to_cellFunction
transfer_quadrature_face_to_cell(point::AbstractVector, cell::Ferrite.AbstractCell{3,N,4}, face::Int)

Mapping from 2D triangle to 3D face of a tetrahedon.

source
transfer_quadrature_face_to_cell(point::AbstractVector, cell::Ferrite.AbstractCell{3,N,6}, face::Int)

Mapping from 2D quadrilateral to 3D face of a hexahedron.

source
FerriteViz.decompose!Method
decompose!(coord_offset, coord_matrix, ref_coord_matrix, triangle_offset, triangle_matrix, grid, cell::Union{Ferrite.AbstractCell{2,N,3}, Ferrite.AbstractCell{3,3,1}})

Decompose a triangle into a coordinates and a triangle index list to disconnect it properly. Guarantees to preserve orderings and orientations.

source
FerriteViz.decompose!Method
decompose!(coord_offset, coord_matrix::Vector{Point{space_dim,T}}, ref_coord_matrix, triangle_offset, triangle_matrix, grid, cell::Union{Ferrite.AbstractCell{2,N,4}, Ferrite.AbstractCell{3,4,1}})

Decompose a quadrilateral into a coordinates and a triangle index list to disconnect it properly. Guarantees to preserve orderings and orientations.

Details

This function takes a CCW ordered quadrilateral, i.e.

4-------3
|       |
|       |
|       |
|       |
|       |
1-------2

and creates the decomposition

4-------3
| \ C / |
|  \ /  |
|D  5  B|
|  / \  |
| / A \ |
1-------2

where A=(1,2,5),B=(2,3,5),C=(3,4,5),D=(4,1,5) are the generated triangles in this order.

source
FerriteViz.decompose!Method
decompose!(coord_offset, coord_matrix, ref_coord_matrix, triangle_offset, triangle_matrix, grid, cell::Ferrite.AbstractCell{3,N,M})

Decompose volumetric objects via their faces.

source
FerriteViz.transfer_solutionFunction
transfer_solution(plotter::MakiePlotter{dim,DH,T}, u::Vector; field_idx::Int=1, process::Function=FerriteViz.postprocess) where {dim,DH<:Ferrite.AbstractDofHandler,T}

Transfer the solution of a plotter to the tessellated mesh in dim.

Details

TODO: Refactor. This is peak inefficiency.

source
FerriteViz.postprocessFunction
postprocess(node_values::Vector{T}) -> T

Takes the nodal dof vector and maps it either to the scalar or to the euclidean norm (in the vectorial case)

source
FerriteViz._tensorsjl_gradient_accessorFunction
_tensorsjl_gradient_accessor(v::Tensors.Vec, field_dim_idx::Int, spatial_dim_idx::Int)

This is a helper to access the correct value in Tensors.jl entities, because the gradient index is the outermost one.

source
FerriteViz.linear_face_cellFunction
linear_face_cell(cell::Ferrite.Cell, local_face_idx::Int)

Get the geometrically linear face of a given cell.

Warning

This may extracts the face spanned by the vertices, not the actual face!

source