create.mesh.3D {fdaPDE} | R Documentation |
Create a mesh.3D
object from the connectivity matrix and nodes locations
Description
Create a mesh.3D
object from the connectivity matrix and nodes locations
Usage
create.mesh.3D(
nodes,
tetrahedrons,
order = 1,
nodesattributes = NULL,
segments = NULL,
holes = NULL
)
Arguments
nodes |
A #nodes-by-3 matrix containing the x, y, z coordinates of the mesh nodes. |
tetrahedrons |
A #tetrahedrons-by-4 (when |
order |
Either '1' or '2'. It specifies wether each mesh tetrahedron should be represented by 4 nodes (the tetrahedron's vertices) or by 10 nodes (the tetrahedron's vertices and edge midpoints).
These are
respectively used for linear (order = 1) and quadratic (order = 2) Finite Elements. Default is |
nodesattributes |
A matrix with #nodes rows containing nodes' attributes.
These are passed unchanged to the output. This has been added for consistency with the function |
segments |
A #segments-by-2 matrix. Each row contains the row's indices in |
holes |
A #holes-by-3 matrix containing the x, y, z coordinates of a point internal to each hole of the mesh. These points are used to carve holes
in the triangulation, when the domain has holes. This has been added for consistency with the function |
Value
An object of the class mesh.3D with the following output:
nodes
A #nodes-by-3 matrix containing the x, y, z coordinates of the mesh nodes.
nodesmarkers
A vector of length #nodes, with entries either '1' or '0'. An entry '1' indicates that the corresponding node is a boundary node; an entry '0' indicates that the corresponding node is not a boundary node.
nodesattributes
A matrix with #nodes rows containing nodes' attributes. These are passed unchanged from the input.
tetrahedrons
A #tetrahedrons-by-4 (when
order
= 1) or #tetrahedrons-by-10 (whenorder
= 2) matrix. It specifies the tetrahedrons giving the indices innodes
of the tetrahedrons' vertices and (whennodes
= 2) also if the tetrahedrons' edges midpoints.segmentsmarker
A vector of length #segments with entries either '1' or '0'. An entry '1' indicates that the corresponding element in
segments
is a boundary segment; an entry '0' indicates that the corresponding segment is not a boundary segment.faces
A #faces-by-3 matrix containing all the faces of the tetrahedrons in the output triangulation. Each row contains the row's indices in
nodes
, indicating the nodes where the face starts from and ends to.facesmarkers
A vector of lenght #faces with entries either '1' or '0'. An entry '1' indicates that the corresponding element in
faces
is a boundary face; an entry '0' indicates that the corresponding edge is not a boundary face.neighbors
A #triangles-by-4 matrix. Each row contains the indices of the four neighbouring tetrahedrons An entry '-1' indicates that one face of the tetrahedrons is a boundary face.
holes
A #holes-by-3 matrix containing the x, y, z coordinates of a point internal to each hole of the mesh. These points are used to carve holes in the triangulation, when the domain has holes. These are passed unchanged from the input.
order
Either '1' or '2'. It specifies wether each mesh tetrahedron should be represented by 3 nodes (the tetrahedron's vertices) or by 6 nodes (the tetrahedron's vertices and midpoints). These are respectively used for linear (order = 1) and quadratic (order = 2) Finite Elements.
Examples
library(fdaPDE)
##Load the matrix nodes and tetrahedrons
data(sphere3Ddata)
nodes=sphere3Ddata$nodes
tetrahedrons=sphere3Ddata$tetrahedrons
##Create the triangulated mesh from the connectivity matrix and nodes locations
mesh=create.mesh.3D(nodes,tetrahedrons)