| 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:
nodesA #nodes-by-3 matrix containing the x, y, z coordinates of the mesh nodes.
nodesmarkersA 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.
nodesattributesA matrix with #nodes rows containing nodes' attributes. These are passed unchanged from the input.
tetrahedronsA #tetrahedrons-by-4 (when
order= 1) or #tetrahedrons-by-10 (whenorder= 2) matrix. It specifies the tetrahedrons giving the indices innodesof the tetrahedrons' vertices and (whennodes= 2) also if the tetrahedrons' edges midpoints.segmentsmarkerA vector of length #segments with entries either '1' or '0'. An entry '1' indicates that the corresponding element in
segmentsis a boundary segment; an entry '0' indicates that the corresponding segment is not a boundary segment.facesA #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.facesmarkersA vector of lenght #faces with entries either '1' or '0'. An entry '1' indicates that the corresponding element in
facesis a boundary face; an entry '0' indicates that the corresponding edge is not a boundary face.neighborsA #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.
holesA #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.
orderEither '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)