MLMC package

The mlmc package provides tools to realize the Multilevel Monte Carlo method.

Subpackages

plot Subpackage provides plot functions to display pdf, violinplot, …
quantity Subpackage provides methods to represent and handle a quantity of interest.
random Subpackage provides random field generation and GSTools library interface
sim Contains a parent simulation class and a specific synthetic simulation
tool Contains classes that provide an interface to other resources such as HDF5, Gmsh, PBS, …

Classes

Sampler

Sampler(sample_storage, sampling_pool, …) Manages samples scheduling, results collection, and result storage.

SamplingPool

SamplingPool([work_dir, debug]) Determining the runtime environment of samples, eg single process, multiple processes, running PBS, …
OneProcessPool([work_dir, debug])
ProcessPool(n_processes[, work_dir, debug]) Suitable for local parallel sampling for simulations WITHOUT external program call

SamplingPoolPBS

SamplingPoolPBS(work_dir[, debug]) Sampling pool PBS (Portable batch system) runtime environment

SampleStorage

SampleStorage Provides methods to store and retrieve sample’s data
Memory() Sample’s data are stored in the main memory

SampleStorageHDF

SampleStorageHDF(file_path) Sample’s data are stored in a HDF5 file

Estimate

Estimate(quantity, sample_storage[, moments_fn]) Provides wrapper methods for moments estimation, pdf approximation, …

Moments

Moments(size, domain[, log, safe_eval]) Class for calculating moments of a random variable
Monomial(size[, domain, ref_domain, log, …]) Monomials generalized moments
Fourier(size[, domain, ref_domain, log, …]) Fourier functions generalized moments
Legendre(size, domain[, ref_domain, log, …]) Legendre polynomials generalized moments

LevelSimulation

LevelSimulation(config_dict, Any], …) This class is used to pass simulation data at a given level between a Sampler and a SamplingPool User shouldn’t change this class