simpeg.meta.MultiprocessingRepeatedSimulation#

class simpeg.meta.MultiprocessingRepeatedSimulation(simulation, mappings, n_processes=None)[source]#

Bases: MultiprocessingMetaSimulation, RepeatedSimulation

A multiprocessing version of the RepeatedSimulation.

This class makes use of a single simulation that is copied to each internal process, but only once per process.

This simulation shares internals with the MultiprocessingMetaSimulation. class, as such please see that documentation for details regarding how to properly use multiprocessing on your operating system.

Parameters:
simulationsimpeg.simulation.BaseSimulation

The simulation to use repeatedly with different mappings.

mappings(n_sim) list of simpeg.maps.IdentityMap

The list of different mappings to use.

n_processesoptional

The number of processes to spawn internally. This will default to multiprocessing.cpu_count(). The number of processes spawned will be the minimum of this number and the number of simulations.

Attributes

clean_on_model_update

A list of solver objects to clean when the model is updated

counter

SimPEG Counter object to store iterations and run-times.

deleteTheseOnModelUpdate

A list of properties stored on this object to delete when the model is updated

mappings

The mappings paired to each simulation.

mesh

Mesh for the simulation.

needs_model

True if a model is necessary

sensitivity_path

Path to directory where sensitivity file is stored.

simulation

The internal simulation.

simulations

The list of simulations.

solver

Numerical solver used in the forward simulation.

solver_opts

Solver-specific parameters.

survey

The survey for the simulation.

verbose

Verbose progress printout.

model

Methods

Jtvec(m, v[, f])

Compute the Jacobian transpose times a vector for the model provided.

Jtvec_approx(m, v[, f])

Approximation of the Jacobian transpose times a vector for the model provided.

Jvec(m, v[, f])

Compute the Jacobian times a vector for the model provided.

Jvec_approx(m, v[, f])

Approximation of the Jacobian times a vector for the model provided.

dpred([m, f])

Predicted data for the model provided.

fields(m)

Create fields for every simulation.

getJtJdiag(m[, W, f])

Return the squared sum of columns of the Jacobian.

make_synthetic_data(m[, relative_error, ...])

Make synthetic data for the model and Gaussian noise provided.

residual(m, dobs[, f])

The data residual.

join