exportDfn2geo: dfn to gmsh .geo file generation

Description Usage Arguments Details Value Examples

View source: R/exportDfn2geo.R

Description

dfn to gmsh .geo file generation

Usage

1
exportDfn2geo(dfn, bdry, cl, file)

Arguments

dfn

data frame of line segments ends coordinates.

bdry

2-columns table (data.frame, matrix, array). The first column are the x coordinates and the 2nd column the y coordinates of the open polygon.

cl

cl Numeric scalar. Characteristic length of gmsh. It tunes up the meshing.

file

The name of the exported .geo file.

Details

To mesh the .geo files in the examples, go to the <file> directory, and run in the terminal gmsh -2 <file>. To view run in the terminal gmsh -2 <file>.geo <file>.msh.

Value

A file named <file>.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Example 1
bdry <- cbind(x = c(1,6,6,0), y = c(1,0,3, 3))
data(dfn)
exportDfn2geo(dfn, bdry, cl = 0.1, file = 'dfn.geo')

# Example 2
data(synthDFN)
print(min(synthDFN$lengthCm))
bdry <- cbind(x = c(-1,401, 401, -1),
      y = c(-1,-1,  401, 401))
exportDfn2geo(dfn = synthDFN, bdry,
	cl = min(synthDFN$lengthCm), file = 'newDfn.geo')

mathphysmx/gmshR documentation built on May 7, 2019, 1:25 p.m.