|
hp-FEM
Adaptive hp-FEM suite for nano-optics
|


Go to the source code of this file.
Classes | |
| class | hpfem::solvers::DeviceStepper |
Namespaces | |
| namespace | hpfem |
| namespace | hpfem::solvers |
Newmark time stepping on the GPU (HPFEM_ENABLE_CUDA, hpfem_gpu library of API version 3): the state \( u, v, a \) stays on the device, every step is two sparse products, the solve with the factorised Newmark operator and the vector updates of \( u_{\text{pred}} = u + \Delta t\, v + \Delta t^2 (\tfrac12 - \beta) a \), \( v_{\text{pred}} = v + \Delta t (1 - \gamma) a \), \( a_{\text{new}} = K^{-1} (s\, b_J - C v_{\text{pred}} - S u_{\text{pred}}) \), \( u = u_{\text{pred}} + \beta \Delta t^2 a_{\text{new}} \), \( v = v_{\text{pred}} + \gamma \Delta t\, a_{\text{new}} \) — exactly the recursion of physics::TimeDomain::step, so results agree with the host loop to round-off. The state is downloaded only on request (observers, energy, the end of a run). See docs/theory/solvers.md.