sarkas.processes.PreProcess#

class sarkas.processes.PreProcess(input_file=None)[source]#

Wrapper class handling the estimation of time and best parameters of a simulation.

Parameters

input_file (str) – Path to the YAML input file.

Variables
  • loops (int) – Number of timesteps to run for time and size estimates. Default = 10

  • estimate (bool) – Run an estimate for the best PPPM parameters in the simulation. Default=False.

  • pm_meshes (numpy.ndarray) – Array of mesh sizes used in the PPPM parameters estimation.

  • pp_cells (numpy.ndarray) – Array of simulations box cells used in the PPPM parameters estimation.

  • kappa (float) – Screening parameter. Calculated from sarkas.potentials.core.Potential.matrix().

Methods

PreProcess.__init__([input_file])

PreProcess.analytical_approx_pppm()

Calculate the total force error as given in [Dharuman et al., 2017].

PreProcess.common_parser([filename])

Parse simulation parameters from YAML file.

PreProcess.evolve_loop(phase, ...)

PreProcess.green_function_timer()

Time Potential setup.

PreProcess.initialization()

Initialize all classes.

PreProcess.make_color_map(rcuts, alphas, ...)

Plot a color map of the total force error approximation.

PreProcess.make_fit_plot(pp_xdata, pm_xdata, ...)

Make a dual plot of the fitted functions.

PreProcess.make_force_v_timing_plot([data_df])

Make contour maps of the force error and total acc time as functions of LCL cells and PM meshes for each charge assignment order sequence.

PreProcess.make_lagrangian_plot()

TODO: complete this.

PreProcess.make_line_plot(rcuts, alphas, ...)

Plot selected values of the total force error approximation.

PreProcess.make_pppm_color_map(rcuts, ...)

Plot a color map of the total force error approximation.

PreProcess.make_pppm_line_plot(rcuts, ...)

Plot selected values of the total force error approximation.

PreProcess.make_timing_plots([data_df])

Makes a figure with three subplots of the CPU times vs PPPM parameters.

PreProcess.postproc_estimates()

PreProcess.pppm_approximation()

Calculate the force error for a PPPM simulation using analytical approximations.

PreProcess.remove_preproc_dumps()

PreProcess.run([loops, timing, ...])

Estimate the time of the simulation and best parameters if wanted.

PreProcess.setup([read_yaml, other_inputs])

Setup simulations' parameters and io subclasses.

PreProcess.time_acceleration([loops])

Run loops number of acceleration calculations for timing estimate.

PreProcess.time_evolution_loop([loops])

Run several loops of the equilibration and production phase to estimate the total time of the simulation.

PreProcess.time_n_space_estimates([loops])

Estimate simulation times and space

PreProcess.timing_study_calculation()

Estimate the best number of mesh points and cutoff radius.