Build Status

SimplexGridFactory

Contains convenience interfaces to triangle (via Triangulate.jl) and TetGen via TetGen.jl.

API Documentation

Mesh generator interface

SimplexGridFactory.triangulateioMethod
triangulateio(; flags, points, bfaces, bfaceregions, regionpoints, regionnumbers, regionvolumes) -> Triangulate.TriangulateIO

Create a TriangulateIO structure from a number of input arrays. The 2D input arrays are transposed if necessary and converted to the proper data types for Triangulate.

This conversion is not performed if the data types are those indicated in the defaults and the leading dimension of 2D arrays corresponds to the space dimension.

SimplexGridBuilder

SimplexGridFactory.SimplexGridBuilderType
mutable struct SimplexGridBuilder

Simplex grid builder: wrapper around array based mesh generator interface. It allows build up the input data incrementally.

SimplexGridFactory.SimplexGridBuilderMethod
SimplexGridBuilder(; dim_space, tol, flags)

Create a SimplexGridBuilder.

For the flags parameter see the short resp. long documentation of the Triangle control flags.

Possible standard Triangle control flags:

Dict(:pointset => "Q",:domain => "pAaqDQ",:convex_hull => "cQ")

ExtendableGrids.simplexgridMethod
simplexgrid(this::SimplexGridBuilder) -> ExtendableGrid{Float64,Int32}

Build simplex grid from the current state of the builder.

ExtendableGrids.simplexgridMethod
function simplexgrid(;flags::String="pAaqDQ",
                     points=Array{Cdouble,2}(undef,0,0),
                     bfaces=Array{Cint,2}(undef,0,0),
                     bfaceregions=Array{Cint,1}(undef,0),
                     regionpoints=Array{Cdouble,2}(undef,0,0),
                     regionnumbers=Array{Cint,1}(undef,0),
                     regionvolumes=Array{Cdouble,1}(undef,0),
                     unsuitable=nothing
                  )

Create Grid from a number of input arrays. The 2D input arrays are transposed if necessary and converted to the proper data types for TetGen.

This conversion is not performed if the data types are those indicated in the defaults and the leading dimension of 2D arrays corresponds to the space dimension.

See the documentations for triunsuitable and the short resp. long documentation of the Triangle control flags.

SimplexGridFactory.cellregion!Method
cellregion!(this::SimplexGridBuilder, x::Any, y::Any, z::Any; region, volume) -> Int64

Add a region point marking a region, indicate simplex volume in this region.

SimplexGridFactory.cellregion!Method
cellregion!(this::SimplexGridBuilder, x::Any, y::Any; region, volume) -> Array{Int32,1}

Add a region point marking a region, indicate simplex volume in this region.

SimplexGridFactory.cellregion!Method
cellregion!(this::SimplexGridBuilder, x::Any; region, volume) -> Union{Int64, Array{Int32,1}}

Add a region point marking a region, indicate simplex volume in this region.

SimplexGridFactory.cellregion!Method
cellregion!(this::SimplexGridBuilder, p::Union{Tuple, Array{T,1} where T}; region, volume) -> Union{Int64, Array{Int32,1}}

Add a region point marking a region, indicate simplex volume in this region.

SimplexGridFactory.facet!Method
facet!(this::SimplexGridBuilder, i1::Any, i2::Any, i3::Any, i4::Any; region) -> Int64

Add a facet via the corresponding point indices.

SimplexGridFactory.facet!Method
facet!(this::SimplexGridBuilder, i1::Any, i2::Any, i3::Any; region) -> Int64

Add a facet via the corresponding point indices.

SimplexGridFactory.facet!Method
facet!(this::SimplexGridBuilder, i1::Any, i2::Any; region) -> Int64

Add a facet via the corresponding point indices.

SimplexGridFactory.facet!Method
facet!(this::SimplexGridBuilder, i::Any; region) -> Int64

Add a facet via the corresponding point indices.

SimplexGridFactory.facet!Method
facet!(this::SimplexGridBuilder, p::Union{Tuple, Array{T,1} where T}; region) -> Int64

Add a facet via the corresponding point indices.

SimplexGridFactory.flags!Method
flags!(this::SimplexGridBuilder, flags::Symbol) -> String

Set standard Triangle Control flags

SimplexGridFactory.hole!Method
hole!(this::SimplexGridBuilder, x::Any, y::Any, z::Any) -> Int64

Add a point marking a hole region

SimplexGridFactory.hole!Method
hole!(this::SimplexGridBuilder, x::Any, y::Any) -> Array{Int32,1}

Add a point marking a hole region

SimplexGridFactory.hole!Method
hole!(this::SimplexGridBuilder, p::Union{Tuple, Array{T,1} where T}) -> Any

Add a point marking a hole region

SimplexGridFactory.point!Method
point!(this::SimplexGridBuilder, x::Any, y::Any, z::Any) -> Int64

Add point or merge with already existing point. Return its index.

SimplexGridFactory.point!Method
point!(this::SimplexGridBuilder, x::Any, y::Any) -> Int64

Add point or merge with already existing point. Return its index.

SimplexGridFactory.point!Method
point!(this::SimplexGridBuilder, x::Any) -> Int64

Add point or merge with already existing point. Return its index.

SimplexGridFactory.point!Method
point!(this::SimplexGridBuilder, p::Union{Tuple, Array{T,1} where T}) -> Int64

Add point or merge with already existing point. Return its index.

SimplexGridFactory.tetgenioMethod
tetgenio(this::SimplexGridBuilder) -> Triangulate.TriangulateIO

Create tetgen input from the current state of the builder.

SimplexGridFactory.triangulateioMethod
triangulateio(this::SimplexGridBuilder) -> Triangulate.TriangulateIO

Create triangle input from the current state of the builder.

ExtendableGrids.plot!Method
plot!(ctx::PlotterContext, gf::SimplexGridBuilder; kwargs...) -> Any

Two panel plot of gridfactory and its output.

ExtendableGrids.plotMethod
plot(gf::SimplexGridBuilder; Plotter, kwargs...)

Two panel plot of gridfactory with input and resulting grid