Quadrature API

The quadrature class provides methods to compute the quadrature points and weights required to compute integrals and derivatives of functions within a spectral element.

class quadrature

Base quadrature class.

Subclassed by specfem::quadrature::gll::gll

Public Functions

inline quadrature()

Construct a quadrature object with default values.

inline virtual specfem::kokkos::DeviceView1d<type_real> get_xi() const

Construct a new quadrature object.

Parameters:
  • alpha – alpha value of the quadrature

  • beta – beta value of the quadrature

inline virtual specfem::kokkos::DeviceView1d<type_real> get_w() const

Get quadrature weights on device

inline virtual specfem::kokkos::DeviceView2d<type_real> get_hprime() const

Get derivatives of quadrature polynomials at quadrature points on device

inline virtual specfem::kokkos::HostMirror1d<type_real> get_hxi() const

Get quadrature points on host

inline virtual specfem::kokkos::HostMirror1d<type_real> get_hw() const

Get quadrature weights on host

inline virtual specfem::kokkos::HostMirror2d<type_real> get_hhprime() const

Get derivatives of quadrature polynomials at quadrature points on host

inline virtual int get_N() const

get number of quadrture points

virtual void print(std::ostream &out) const

Log quadrature information to console.

virtual std::string to_string() const

return string representation of the quadrature

Returns:

std::string String representation of the quadrature

Private Members

type_real alpha

alpha value of the quadrature

type_real beta

beta value of the quadrature

int N

Number of qudrature points.

specfem::kokkos::DeviceView1d<type_real> xi

qudrature points stored on device

specfem::kokkos::HostMirror1d<type_real> h_xi

quadrature points stored on host

specfem::kokkos::DeviceView1d<type_real> w

qudrature weights stored on device

specfem::kokkos::HostView1d<type_real> h_w

quadrature weights stored on host

specfem::kokkos::DeviceView2d<type_real> hprime

Polynomial derivatives stored on device

specfem::kokkos::HostView2d<type_real> h_hprime

Polynomial derivatives store on host

Types of quadratures implemented