specfem::runtime_configuration::time_scheme

class time_scheme

time_marching class is used to instantiate a time-marching solver

Public Functions

inline time_scheme(std::string timescheme, type_real dt, type_real nstep, type_real t0, specfem::simulation::type simulation)

Construct a new time marching object.

Parameters:
  • timescheme – Type of timescheme

  • dt – delta time of the timescheme

  • nstep – Number of time steps

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

Construct a new time marching object.

Parameters:

Node – YAML node describing the time-marching method

inline void update_t0(type_real t0)

Update simulation start time.

If user has not defined start time then we need to update the simulation start time based on source frequencies and time shift

Note

This might be specific to only time-marching solvers

Parameters:

t0 – Simulation start time

template<typename AssemblyFields>
std::shared_ptr<specfem::time_scheme::time_scheme> instantiate(AssemblyFields &fields, const int nstep_between_samples)

Instantiate the Timescheme.

Returns:

specfem::TimeScheme::TimeScheme* Pointer to the TimeScheme object used in the solver algorithm

inline type_real get_dt() const

Get the value of time increment.

Returns:

type_real value of time increment

Private Members

int nstep

number of time steps

type_real dt

delta time for the timescheme

type_real t0 = 0.0

start time

std::string timescheme

Time scheme e.g. Newmark, Runge-Kutta, LDDRK.

specfem::simulation::type type

Type of simulation (forward/adjoint/combined)