Learn R Programming

VARMER (version 1.0.0)

mesh_3: Generates triangular finite element mesh.

Description

The function mesh_3 takes as input data the length of the domain in x (Lx), the length of the domain in y (Ly), the number of divisions in x (Nx) and the number of divisions in y (Ny).

These values are obtained with the function prev_data, specifically from coordinates inside the variable uhat (which must be equal to those of v).

Usage

mesh_3(Lx, Ly, Nx, Ny)

Arguments

Lx, Ly, Nx, Ny

a group of vectors obtained with the function prev_data.

The coordinates of the nodes (coordinates) and the table of elements (elements).

Following the next structure in columns

coordinates: x, y, index

elements: index1, index2, index3

A plot with triangles from the coordinates

Examples

Run this code
# NOT RUN {
data(uhat,"VARMER")
invisible(force(uhat))
pre_results=pre_data(uhat)
coordsx=pre_results[[1]][[1]]
coordsx=pre_results[[1]][[2]]
Lx=pre_results[[2]]
Ly=pre_results[[3]]
Nx=pre_results[[4]]
Ny=pre_results[[5]]
mesh_results=mesh_3(Lx,Ly,Nx,Ny)
# }

Run the code above in your browser using DataLab