refine.mesh.2D: Refine a 2D triangular mesh

Description Usage Arguments Value See Also Examples

View source: R/mesh.R

Description

This function refines a Constrained Delaunay triangulation into a Conforming Delaunay triangulation. This is a wrapper of the Triangle library (http://www.cs.cmu.edu/~quake/triangle.html). It can be used to refine a mesh previously created with create.mesh.2D. The algorithm can add Steiner points (points through which the segments are splitted) in order to meet the imposed refinement conditions.

Usage

1
refine.mesh.2D(mesh, minimum_angle, maximum_area, delaunay, verbosity)

Arguments

mesh

A mesh.2D object representing the triangular mesh, created by create.mesh.2D.

minimum_angle

A scalar specifying a minimun value for the triangles angles.

maximum_area

A scalar specifying a maximum value for the triangles areas.

delaunay

A boolean parameter indicating whether or not the output mesh should satisfy the Delaunay condition.

verbosity

This can be '0', '1' or '2'. It indicates the level of verbosity in the triangulation process.

Value

A mesh.2D object representing the refined triangular mesh, with the following output:

See Also

create.mesh.2D, create.FEM.basis

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(fdaPDE)

## Upload the quasicircle2D data
data(quasicircle2D)
boundary_nodes = quasicircle2D$boundary_nodes
boundary_segments = quasicircle2D$boundary_segments
locations = quasicircle2D$locations
data = quasicircle2D$data

## Create mesh from boundary:
mesh = create.mesh.2D(nodes = boundary_nodes, segments = boundary_segments)
plot(mesh)
## Refine the mesh with the maximum area criterion:
finemesh = refine.mesh.2D(mesh = mesh, maximum_area = 0.1)
plot(finemesh)
## Refine the mesh with the minimum angle criterion:
finemesh2 = refine.mesh.2D(mesh = mesh, minimum_angle = 30)
plot(finemesh2)

fdaPDE documentation built on July 2, 2020, 2:22 a.m.