LinearPeriodicCoordinates1D< NT > Class Template Reference#

DiFfRG: DiFfRG::LinearPeriodicCoordinates1D< NT > Class Template Reference
DiFfRG
Discretization Framework for functional Renormalization Group flows
DiFfRG::LinearPeriodicCoordinates1D< NT > Class Template Reference

Linear coordinates on a periodic axis of period (stop - start). More...

#include <coordinates.hh>

Public Types

using ctype = NT
 

Public Member Functions

 LinearPeriodicCoordinates1D (size_t grid_extent, double start, double stop)
 
template<typename NT2 >
 LinearPeriodicCoordinates1D (const LinearPeriodicCoordinates1D< NT2 > &other)
 
device::array< size_t, 1 > KOKKOS_FORCEINLINE_FUNCTION from_linear_index (size_t i) const
 
template<typename IT >
NT KOKKOS_FORCEINLINE_FUNCTION forward (const IT &x) const
 Transform from the grid to the physical space.
 
template<typename IT >
device::array< NT, 1 > KOKKOS_FORCEINLINE_FUNCTION forward (const device::array< IT, 1 > &x) const
 
NT KOKKOS_FORCEINLINE_FUNCTION backward (const NT &y) const
 Transform from the physical space to the grid, folded into [0, grid_extent)
 
size_t KOKKOS_FORCEINLINE_FUNCTION size () const
 
device::array< size_t, 1 > KOKKOS_FORCEINLINE_FUNCTION sizes () const
 
std::string to_string () const
 

Public Attributes

const NT start
 
const NT stop
 

Static Public Attributes

static constexpr size_t dim = 1
 
static constexpr bool periodic = true
 

Private Attributes

const size_t grid_extent
 
const NT extent
 
NT a
 

Friends

template<typename NT2 >
bool operator== (const LinearPeriodicCoordinates1D< NT > &lhs, const LinearPeriodicCoordinates1D< NT2 > &rhs)
 

Detailed Description

template<typename NT = double>
requires std::is_floating_point_v<NT>
class DiFfRG::LinearPeriodicCoordinates1D< NT >

Linear coordinates on a periodic axis of period (stop - start).

In contrast to LinearCoordinates1D, the endpoint is excluded: the grid points are start, start + a, ..., stop - a with a = (stop - start) / grid_extent, because stop and start describe the same physical point. For an angle this means one full plane of grid points less than the naive [start, stop] grid, and no duplicated, unconstrained degrees of freedom.

backward() folds the returned fractional index into [0, grid_extent); interpolators aware of is_periodic_coordinate_v additionally wrap the upper stencil index around to 0.

Member Typedef Documentation

◆ ctype

template<typename NT = double>
using DiFfRG::LinearPeriodicCoordinates1D< NT >::ctype = NT

Constructor & Destructor Documentation

◆ LinearPeriodicCoordinates1D() [1/2]

template<typename NT = double>
DiFfRG::LinearPeriodicCoordinates1D< NT >::LinearPeriodicCoordinates1D ( size_t grid_extent,
double start,
double stop )
inline

◆ LinearPeriodicCoordinates1D() [2/2]

template<typename NT = double>
template<typename NT2 >
DiFfRG::LinearPeriodicCoordinates1D< NT >::LinearPeriodicCoordinates1D ( const LinearPeriodicCoordinates1D< NT2 > & other)
inline

Member Function Documentation

◆ backward()

template<typename NT = double>
NT KOKKOS_FORCEINLINE_FUNCTION DiFfRG::LinearPeriodicCoordinates1D< NT >::backward ( const NT & y) const
inline

Transform from the physical space to the grid, folded into [0, grid_extent)

Parameters
yphysical coordinate
Returns
double grid coordinate

◆ forward() [1/2]

template<typename NT = double>
template<typename IT >
device::array< NT, 1 > KOKKOS_FORCEINLINE_FUNCTION DiFfRG::LinearPeriodicCoordinates1D< NT >::forward ( const device::array< IT, 1 > & x) const
inline

◆ forward() [2/2]

template<typename NT = double>
template<typename IT >
NT KOKKOS_FORCEINLINE_FUNCTION DiFfRG::LinearPeriodicCoordinates1D< NT >::forward ( const IT & x) const
inline

Transform from the grid to the physical space.

Parameters
xgrid coordinate
Returns
NumberType physical coordinate

◆ from_linear_index()

template<typename NT = double>
device::array< size_t, 1 > KOKKOS_FORCEINLINE_FUNCTION DiFfRG::LinearPeriodicCoordinates1D< NT >::from_linear_index ( size_t i) const
inline

◆ size()

template<typename NT = double>
size_t KOKKOS_FORCEINLINE_FUNCTION DiFfRG::LinearPeriodicCoordinates1D< NT >::size ( ) const
inline

◆ sizes()

template<typename NT = double>
device::array< size_t, 1 > KOKKOS_FORCEINLINE_FUNCTION DiFfRG::LinearPeriodicCoordinates1D< NT >::sizes ( ) const
inline

◆ to_string()

template<typename NT = double>
std::string DiFfRG::LinearPeriodicCoordinates1D< NT >::to_string ( ) const
inline

Friends And Related Symbol Documentation

◆ operator==

template<typename NT = double>
template<typename NT2 >
bool operator== ( const LinearPeriodicCoordinates1D< NT > & lhs,
const LinearPeriodicCoordinates1D< NT2 > & rhs )
friend

Member Data Documentation

◆ a

template<typename NT = double>
NT DiFfRG::LinearPeriodicCoordinates1D< NT >::a
private

◆ dim

template<typename NT = double>
size_t DiFfRG::LinearPeriodicCoordinates1D< NT >::dim = 1
staticconstexpr

◆ extent

template<typename NT = double>
const NT DiFfRG::LinearPeriodicCoordinates1D< NT >::extent
private

◆ grid_extent

template<typename NT = double>
const size_t DiFfRG::LinearPeriodicCoordinates1D< NT >::grid_extent
private

◆ periodic

template<typename NT = double>
bool DiFfRG::LinearPeriodicCoordinates1D< NT >::periodic = true
staticconstexpr

◆ start

template<typename NT = double>
const NT DiFfRG::LinearPeriodicCoordinates1D< NT >::start

◆ stop

template<typename NT = double>
const NT DiFfRG::LinearPeriodicCoordinates1D< NT >::stop

The documentation for this class was generated from the following file:
  • /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/coordinates/coordinates.hh