Description Usage Arguments Details Value Examples
View source: R/exportDfn2geo.R
dfn to gmsh .geo file generation
1 | exportDfn2geo(dfn, bdry, cl, file)
|
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. |
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.
A file named <file>.
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')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.