specfem::runtime_configuration::wavefield

class wavefield

Wavefield configuration class is used to instantiate wavefield writers.

Constructors

inline wavefield(const std::string &output_format, const std::string &output_folder, const specfem::simulation::type type, const int time_interval, const std::string &time_interval_by_memory, const bool include_last_step, bool for_adjoint_simulations)

Construct a new wavefield configuration object.

Parameters:
  • output_format – Output wavefield file format

  • output_folder – Path to folder location where wavefield will be stored

  • type – Type of simulation (forward or adjoint)

  • time_interval – number of timesteps between wavefield if it is 0, do not write wavefield periodically, if it is -1, the second parameter nsteps_between_samples_by_memory will be used instead.

  • time_interval_by_memory – automatically determine the number of timesteps between wavefield by the memory value provided, e.g. 100MB, 20GB.

  • include_last_step – Whether or not to write the final time step.

wavefield(const YAML::Node &Node, const specfem::simulation::type type)

Construct a new wavefield configuration object from YAML node.

Parameters:
  • Node – YAML node describing the wavefield writer

  • type – Type of simulation (forward or adjoint)

Public Functions

template<specfem::dimension::type DimensionTag>
std::shared_ptr<specfem::periodic_tasks::periodic_task<DimensionTag>> instantiate_wavefield_writer() const

Instantiate a wavefield writer object.

Returns:

std::shared_ptr<specfem::io::writer> Pointer to an instantiated writer object

template<specfem::dimension::type DimensionTag>
std::shared_ptr<specfem::periodic_tasks::periodic_task<DimensionTag>> instantiate_wavefield_reader() const

Instantiate a wavefield reader object.

Returns:

std::shared_ptr<specfem::io::reader> Pointer to an instantiated reader object

Private Members

std::string output_format

format of output file

std::string output_folder

Path to output folder.

specfem::simulation::type simulation_type

Type of simulation.

int time_interval

Number of timesteps between wavefield

std::string time_interval_by_memory

Automatically determine the number of timesteps between wavefield by the memory value provided, e.g. 100MB, 20GB.

bool include_last_step

Whether or not to write the final time step.

bool for_adjoint_simulations

Whether or not the wavefield is for adjoint simulations