specfem::time_scheme::newmark¶
-
template<typename AssemblyFields, specfem::simulation::type SimulationType>
class newmark¶ Newmark time integration scheme implementation.
Implements the Newmark-beta method for time integration of the wave equation. This second-order accurate scheme uses predictor-corrector steps:
Specialized for forward and combined (adjoint) simulations.
- Template Parameters:
AssemblyFields – Field assembly type containing wavefield data
SimulationType – Either forward or combined simulation type
Predictor and Corrector Phase Implementations¶
The two functions below implement the predictor and corrector phases of the
Newmark time integration scheme. They are called internally by the
specfem::time_scheme::newmark class, and not intended to be used
directly by users, but are documented here for mathematical clarity.
-
template<specfem::dimension::type DimensionTag, specfem::element::medium_tag MediumTag, specfem::wavefield::simulation_field WavefieldType>
int specfem::time_scheme::newmark_impl::predictor_phase_impl(const specfem::assembly::simulation_field<DimensionTag, WavefieldType> &field, const type_real deltat, const type_real deltatover2, const type_real deltasquareover2)¶ Implements Newmark Predictor Phase
Predictor Phase updates displacement and velocity, then zeros acceleration:
\[\begin{split} \begin{aligned} u^{n+1} &= u^n + \Delta t \, v^n + \frac{\Delta t^2}{2} a^n \\ v^{n+\frac{1}{2}} &= v^n + \frac{\Delta t}{2} a^n \\ a^{n+1} &= 0 \end{aligned} \end{split}\]- Template Parameters:
DimensionTag – 2D or 3D simulation
MediumTag – Medium type (elastic, acoustic, etc.)
WavefieldType – Forward, adjoint, or backward wavefield
- Parameters:
field – Simulation field containing displacement, velocity, acceleration
deltat – Timestep (dt, or -dt for backward integration)
deltatover2 – Half timestep (dt/2, or -dt/2 for backward)
deltasquareover2 – Half of squared timestep (dt²/2)
- Returns:
Number of degrees of freedom updated
-
template<specfem::dimension::type DimensionTag, specfem::element::medium_tag MediumTag, specfem::wavefield::simulation_field WavefieldType>
int specfem::time_scheme::newmark_impl::corrector_phase_impl(const specfem::assembly::simulation_field<DimensionTag, WavefieldType> &field, const type_real deltatover2)¶ Implements Newmark Corrector Phase
Corrector Phase updates velocity using the new acceleration computed after the predictor:
\[ v^{n+1} = v^{n+\frac{1}{2}} + \frac{\Delta t}{2} a^{n+1} \]- Template Parameters:
DimensionTag – 2D or 3D simulation
MediumTag – Medium type (elastic, acoustic, etc.)
WavefieldType – Forward, adjoint, or backward wavefield
- Parameters:
field – Simulation field containing velocity and acceleration
deltatover2 – Half of the timestep (dt/2, or -dt/2 for backward)
- Returns:
Number of degrees of freedom updated