specfem::io::read_2d_sources

std::tuple<std::vector<std::shared_ptr<specfem::sources::source<specfem::dimension::type::dim2>>>, type_real> specfem::io::read_2d_sources(const std::string &sources_file, const int nsteps, const type_real user_t0, const type_real dt, const specfem::simulation::type simulation_type)

Read sources file written in .yml format.

Parse source specification file written in yaml format and create a vector of specfem::source::source * object

Parameters:
  • sources_file – Name of the yaml file

  • nsteps – Number of time steps

  • user_t0 – User defined t0

  • dt – Time step

  • simulation_type – Type of simulation

Returns:

std::vector<specfem::sources::source *> vector of instantiated source objects

specfem::io::read_3d_sources

std::tuple<std::vector<std::shared_ptr<specfem::sources::source<specfem::dimension::type::dim3>>>, type_real> specfem::io::read_3d_sources(const std::string &sources_file, const int nsteps, const type_real user_t0, const type_real dt, const specfem::simulation::type simulation_type)

Read sources file written in .yml format.

Parse source specification file written in yaml format and create a vector of specfem::source::source * object

Parameters:
  • sources_file – Name of the yaml file

  • nsteps – Number of time steps

  • user_t0 – User defined t0

  • dt – Time step

  • simulation_type – Type of simulation

Returns:

std::vector<specfem::sources::source *> vector of instantiated source objects