Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::TrapezoidalTorus< Scalar, N, M, AspectRatio > Class Template Reference

The N x M trapezoidal rule on the torus with minor radius 1 and major radius AspectRatio. More...

#include <TrapezoidalTorus.hpp>

Public Types

using value_type = Scalar

Static Public Member Functions

static constexpr Kokkos::Array< Scalar, 3 *num_points > points ()
 The points as (x, y, z) triples, ring by ring in theta from the outer equator, by increasing phi in a ring.
static constexpr Kokkos::Array< Scalar, num_points > weights ()
 The num_points weights, in the order of points().
template<class Function>
static constexpr auto integrate (const Function &f)
 sum_i w_i f(x_i, y_i, z_i), approximating the integral of f over the torus.

Static Public Attributes

static constexpr unsigned num_poloidal = N
static constexpr unsigned num_toroidal = M
static constexpr unsigned num_points = N * M
static constexpr double aspect_ratio = AspectRatio

Detailed Description

template<class Scalar, unsigned N, unsigned M, double AspectRatio>
class mundy::TrapezoidalTorus< Scalar, N, M, AspectRatio >

The points and weights are correctly rounded to Scalar and computed by the compiler, so every member is a constant expression. Like GaussLegendreSphere's rule, it integrates over a unit-scale surface; scale for other minor radii.

Member Typedef Documentation

◆ value_type

template<class Scalar, unsigned N, unsigned M, double AspectRatio>
using mundy::TrapezoidalTorus< Scalar, N, M, AspectRatio >::value_type = Scalar

Member Function Documentation

◆ points()

template<class Scalar, unsigned N, unsigned M, double AspectRatio>
constexpr Kokkos::Array< Scalar, 3 *num_points > mundy::TrapezoidalTorus< Scalar, N, M, AspectRatio >::points ( )
inlinestaticconstexpr

◆ weights()

template<class Scalar, unsigned N, unsigned M, double AspectRatio>
constexpr Kokkos::Array< Scalar, num_points > mundy::TrapezoidalTorus< Scalar, N, M, AspectRatio >::weights ( )
inlinestaticconstexpr

◆ integrate()

template<class Scalar, unsigned N, unsigned M, double AspectRatio>
template<class Function>
constexpr auto mundy::TrapezoidalTorus< Scalar, N, M, AspectRatio >::integrate ( const Function & f)
inlinestaticconstexpr

Member Data Documentation

◆ num_poloidal

template<class Scalar, unsigned N, unsigned M, double AspectRatio>
unsigned mundy::TrapezoidalTorus< Scalar, N, M, AspectRatio >::num_poloidal = N
staticconstexpr

◆ num_toroidal

template<class Scalar, unsigned N, unsigned M, double AspectRatio>
unsigned mundy::TrapezoidalTorus< Scalar, N, M, AspectRatio >::num_toroidal = M
staticconstexpr

◆ num_points

template<class Scalar, unsigned N, unsigned M, double AspectRatio>
unsigned mundy::TrapezoidalTorus< Scalar, N, M, AspectRatio >::num_points = N * M
staticconstexpr

◆ aspect_ratio

template<class Scalar, unsigned N, unsigned M, double AspectRatio>
double mundy::TrapezoidalTorus< Scalar, N, M, AspectRatio >::aspect_ratio = AspectRatio
staticconstexpr