hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
hpfem::solvers::DeviceStepper Class Reference

#include <device_stepper.hpp>

Public Member Functions

 DeviceStepper (LinearSolver &newmark, const SparseMatrix *damping, const SparseMatrix &stiffness, const Vector *load, Real dt, Real beta, Real gamma)
 
 ~DeviceStepper ()
 
 DeviceStepper (const DeviceStepper &)=delete
 
DeviceStepper & operator= (const DeviceStepper &)=delete
 
void set_state (const Vector &u, const Vector &v, const Vector &a)
 Uploads the state (reduced vectors of the free DoFs).
 
void step (Real load_scale)
 One Newmark step with the load \( s\, b_J \) (load_scale = \( -g'(t_{\text{new}}) \)).
 
void get_state (Vector &u, Vector &v, Vector &a) const
 Downloads the state (synchronises the device).
 
Index size () const noexcept
 

Static Public Member Functions

static bool available (const LinearSolver &newmark) noexcept
 

Constructor & Destructor Documentation

◆ DeviceStepper() [1/2]

hpfem::solvers::DeviceStepper::DeviceStepper ( LinearSolver &  newmark,
const SparseMatrix *  damping,
const SparseMatrix &  stiffness,
const Vector *  load,
Real  dt,
Real  beta,
Real  gamma 
)
Parameters
newmarkthe factorised Newmark operator \( K \) (see above)
damping\( C \) or null (no conductivity, no absorbing walls)
stiffness\( S \)
load\( b_J \), the current load on the free DoFs, or null (no source); the time dependence enters as the scalar of step
Exceptions
Errorif available(newmark) is false or a device allocation fails, InvalidArgument for mismatched sizes.

◆ ~DeviceStepper()

hpfem::solvers::DeviceStepper::~DeviceStepper ( )

◆ DeviceStepper() [2/2]

hpfem::solvers::DeviceStepper::DeviceStepper ( const DeviceStepper &  )
delete

Member Function Documentation

◆ available()

static bool hpfem::solvers::DeviceStepper::available ( const LinearSolver &  newmark)
staticnoexcept

True if newmark is (or, for kAuto, chose) the cuDSS backend of a library with API version 3 or later, so that the step can run on the device.

◆ get_state()

void hpfem::solvers::DeviceStepper::get_state ( Vector &  u,
Vector &  v,
Vector &  a 
) const

Downloads the state (synchronises the device).

◆ operator=()

DeviceStepper & hpfem::solvers::DeviceStepper::operator= ( const DeviceStepper &  )
delete

◆ set_state()

void hpfem::solvers::DeviceStepper::set_state ( const Vector &  u,
const Vector &  v,
const Vector &  a 
)

Uploads the state (reduced vectors of the free DoFs).

◆ size()

Index hpfem::solvers::DeviceStepper::size ( ) const
inlinenoexcept

◆ step()

void hpfem::solvers::DeviceStepper::step ( Real  load_scale)

One Newmark step with the load \( s\, b_J \) (load_scale = \( -g'(t_{\text{new}}) \)).


The documentation for this class was generated from the following file: