LogarithmicCoordinates1D< NT > Class Template Reference#
|
DiFfRG
Discretization Framework for functional Renormalization Group flows
|
Points on [start, stop], including both ends, with spacing growing exponentially in the index. More...
#include <coordinates.hh>
Public Types | |
| using | ctype = NT |
| Scalar type. | |
Public Member Functions | |
| LogarithmicCoordinates1D (size_t grid_extent, double start, double stop, double bias) | |
| template<typename NT2 > | |
| LogarithmicCoordinates1D (const LogarithmicCoordinates1D< NT2 > &other) | |
| Convert from another precision. | |
| LogarithmicCoordinates1D | prefix (size_t n) const |
The first n points of this grid, as a grid of the same type. | |
| size_t KOKKOS_FORCEINLINE_FUNCTION | parent_size () const |
| Number of points of the grid this one is a prefix() of; size() unless it is a prefix. | |
| device::array< size_t, 1 > KOKKOS_FORCEINLINE_FUNCTION | from_linear_index (size_t i) const |
| The multi-index {i} of point i. | |
| template<typename IT > | |
| NT KOKKOS_FORCEINLINE_FUNCTION | forward (const IT &x) const |
The coordinate \(x(i)\) at grid index x (real values allowed). | |
| template<typename IT > | |
| device::array< NT, 1 > KOKKOS_FORCEINLINE_FUNCTION | forward (const device::array< IT, 1 > &x) const |
| As forward(x[0]). | |
| NT KOKKOS_FORCEINLINE_FUNCTION | backward (const NT &y) const |
The inverse map: the (fractional) grid index of the coordinate y. | |
| NT KOKKOS_FORCEINLINE_FUNCTION | backward_derivative (const NT &y) const |
\(di/dx\) at the coordinate y. | |
| size_t KOKKOS_FORCEINLINE_FUNCTION | size () const |
| Number of points N. | |
| device::array< size_t, 1 > KOKKOS_FORCEINLINE_FUNCTION | sizes () const |
| {N}. | |
| std::string | to_string () const |
| "LogarithmicCoordinates1D(start, stop, bias, N)"; identifies the grid. | |
Public Attributes | |
| const NT | start |
| The parameters. | |
| const NT | stop |
| const NT | bias |
Static Public Attributes | |
| static constexpr size_t | dim = 1 |
| One axis. | |
Friends | |
| template<typename NT2 > | |
| bool | operator== (const LogarithmicCoordinates1D< NT > &lhs, const LogarithmicCoordinates1D< NT2 > &rhs) |
| Same precision, parameters and number of points (and the same parent, for a prefix). | |
Detailed Description
requires std::is_floating_point_v<NT>
class DiFfRG::LogarithmicCoordinates1D< NT >
Points on [start, stop], including both ends, with spacing growing exponentially in the index.
With N = grid_extent ≥ 2, bias b ≠ 0 and grid index i (real values allowed):
\[ x(i) = \mathrm{start} + (\mathrm{stop} - \mathrm{start})\,\frac{e^{b\,i/(N-1)} - 1}{e^{b} - 1}\,. \]
For b > 0 the points cluster near start (consecutive spacings grow by the factor \(e^{b/(N-1)}\)), for b < 0 near stop; b → 0 approaches LinearCoordinates1D.
- Template Parameters
-
NT Scalar type of the coordinates.
Member Typedef Documentation
◆ ctype
Constructor & Destructor Documentation
◆ LogarithmicCoordinates1D() [1/2]
|
inline |
grid_extent points (≥ 2) from start to stop with bias (≠ 0); throws otherwise. Constants are computed in double.
◆ LogarithmicCoordinates1D() [2/2]
|
inline |
Convert from another precision.
Member Function Documentation
◆ backward()
|
inline |
The inverse map: the (fractional) grid index of the coordinate y.
◆ backward_derivative()
|
inline |
\(di/dx\) at the coordinate y.
◆ forward() [1/2]
|
inline |
As forward(x[0]).
◆ forward() [2/2]
|
inline |
The coordinate \(x(i)\) at grid index x (real values allowed).
◆ from_linear_index()
|
inline |
The multi-index {i} of point i.
◆ parent_size()
|
inline |
◆ prefix()
|
inline |
The first n points of this grid, as a grid of the same type.
forward(i) is bit-identical to that of the full grid for i < n, and backward() is unchanged; use it to skip the upper end of a grid without changing the coordinate type. The prefix keeps the parameters and point count of the full grid (parent_size()); to_string() appends ".prefix(n)".
- Parameters
-
n Number of points kept, 1 ≤ n ≤ size().
◆ size()
|
inline |
Number of points N.
◆ sizes()
|
inline |
{N}.
◆ to_string()
|
inline |
"LogarithmicCoordinates1D(start, stop, bias, N)"; identifies the grid.
Friends And Related Symbol Documentation
◆ operator==
|
friend |
Same precision, parameters and number of points (and the same parent, for a prefix).
Member Data Documentation
◆ bias
| const NT bias |
◆ dim
|
staticconstexpr |
One axis.
◆ start
| const NT start |
The parameters.
◆ stop
| const NT stop |
The documentation for this class was generated from the following file:
- /home/runner/work/DiFfRG/DiFfRG/DiFfRG/include/DiFfRG/discretization/coordinates/coordinates.hh
Generated by