make_Sample {sandbox} | R Documentation |
Create a Virtual Sample.
Description
The function generates many virtual sediment grains based on the specified sample geometry and depth, using the information from a rule book.
Usage
make_Sample(
book,
depth,
geometry = "cuboid",
radius,
height,
width,
length,
slice = TRUE,
force = FALSE,
n_cores = max(1, parallel::detectCores() - 2)
)
Arguments
book |
list object, initially produced by get_RuleBook |
depth |
numeric scalar, depth of the sample centre (m). |
geometry |
character scalar, keyword defining the geometry of
the sample. One out of |
radius |
numeric scalar, radius of the cylinder (m). |
height |
numeric scalar, height of the cuboid (m). |
width |
numeric scalar, width of the cuboid (m). |
length |
numeric scalar, length of the cuboid or cylinder (m). |
slice |
logical scalar, option to sample in repeated slices of 10^6 grains until the required sample size is reached. Useful to avoid memory issues for large numbers of grains per sample volume. |
force |
logical scalar, option to override the default maximum number of 10^7 grains per sample, set to avoid memory problems of the computer. |
n_cores |
integer (optional) set the number of cores used for the parallel processing |
Value
A list object.
Author(s)
Michael Dietze, GFZ Potsdam (Germany)
Examples
set.seed(12234)
sample_01 <- make_Sample(
book = get_RuleBook(),
depth = 1,
geometry = "cuboid",
n_cores = 1,
height = 0.001,
width = 0.001,
length = 0.001)