Description Usage Arguments Details Value Examples
Export polygon points (vertices) to a gmsh .geo file
1 | bdry2Dgmsh(x, cl = 0.1, file = "dfnBdry.geo", idStart = 1, add = FALSE)
|
x |
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 |
Numeric scalar. Characteristic length of gmsh. It tunes up the meshing. |
file |
The name of the exported .geo file. |
idStart |
Non-negative integer scalar. This value is the first identification number (ID) for the geometric elements to be written to file. |
add |
This helps to save the DFN.geo to a file |
The polygonal boundary does not need to enclose all the gmsh elements; but the meshing will only be made inside the polygon. See examples.
If add, a file named <file>.
1 2 3 4 5 6 7 8 9 | x <- cbind(x = c(0,6,6,0), y = c(0,0,3, 3))
plot(x, type='l', col = 'blue')
# write boundary to file in the current working directory
bdry2Dgmsh(x)
# Another saving-to-file example
bdry2Dgmsh(x, idStart = 10001)
write('// This is another file', file = "newBdry.geo")
bdry2Dgmsh(x, file = 'newBdry.geo', add = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.