API Reference
MeshTools
MeshTools.barycentric_coordinates
— Functionbarycentric_coordinates(t::Triangle, p::Point)
MeshTools.contour
— Functioncontour(f::F, m::Mesh, l::T) where {F<:Function, T<:Real) -> Vector{Vector{NTuple{2}}}
Find contour lines of function f
at level l
. The function f
can be of the form f(x,y) or f(p::Point2).
MeshTools.create_mesh
— Functioncreate_mesh(outer::P; inner=Vector{P}[], outer_length=nothing, inner_lengths=nothing, spline=true, spline_inner=fill(spline,length(inner)) where P<:Vector{NTuple{2}}
Create a Triangular mesh from a vector of tuples using Gmsh. Interior boundaries define holes. Returns Meshes.SimpleMesh
MeshTools.integrate
— Functionintegrate(func, poly::T; n=6) where T<:Ngon
Integrate func(r,z) over polygon with n order quadrature points
integrate(func, m::Mesh; n=6)
Integrate func(r,z) over mesh with n order quadrature points
MeshTools.interpolate
— Functioninterpolate(t::Triangle, F::Vector, p)
interpolate(m::Mesh, vertexF::Matrix, p)
interpolate(m::Mesh, vertexF::Vector, p)
MeshTools.quad_points
— Functionquad_points(tri::Triangle, ::Val{N}; w=1.0) where N
Given a triangle returns a list of evaluation points [(r,z,weight),...] n number of quadrature points. currently: 1, 3 or 6 w weight scale factor default = 1 Coefficients taken from http://www.cs.rpi.edu/~flaherje/pdf/fea6.pdf Joseph E. Flaherty course notes, Rensselaer Polytechnic Institute
quad_points(poly::Ngon, ::Val{N}) where N
Given a polygon calculates a set of quadrature points and weights, by splitting the polygon into triangles. returns a list of evaluation points and weights [(r,z,weight),...] These are normalised to calculate the average value of a function over the polygon; multiply by the area to get the integral. n number of quadrature points in each triangle currently: 1, 3 or 6
quad_points(m::Mesh, ::Val{N}) where N
Calculate quadrature points for all elements in the mesh with n order quadrature points