API Reference

MeshTools

MeshTools.contourFunction
contour(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).

source
MeshTools.create_meshFunction
create_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

source
MeshTools.integrateFunction
integrate(func, poly::T; n=6) where T<:Ngon

Integrate func(r,z) over polygon with n order quadrature points

source
integrate(func, m::Mesh; n=6)

Integrate func(r,z) over mesh with n order quadrature points

source
MeshTools.quad_pointsFunction
quad_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

source
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

source
quad_points(m::Mesh, ::Val{N}) where N

Calculate quadrature points for all elements in the mesh with n order quadrature points

source