|
IPPL (Independent Parallel Particle Layer)
IPPL
|
Functor for solving equations using the Newton-Raphson method. More...
#include <Utility.h>
Public Member Functions | |
| KOKKOS_FUNCTION | NewtonRaphson ()=default |
| KOKKOS_FUNCTION | ~NewtonRaphson ()=default |
| KOKKOS_INLINE_FUNCTION | NewtonRaphson (const Distribution &dist_) |
| KOKKOS_INLINE_FUNCTION void | solve (unsigned int d, T &x, T &u) |
| Solve an equation using the Newton-Raphson method. | |
Public Attributes | |
| Distribution | dist |
| double | atol = 1e-12 |
| unsigned int | max_iter = 20 |
Functor for solving equations using the Newton-Raphson method.
In particular, find the root x of the equation dist.obj(x, u)= 0 for a given u using Newton-Raphson method.
| T | Data type for the equation variables. |
| Distribution | Class of target distribution to sample from. |
| dist | Distribution object providing objective function cdf(x)-u and its derivative. |
| atol | Absolute tolerance for convergence (default: 1.0e-12). |
| max_iter | Maximum number of iterations (default: 20). |
|
default |
|
default |
|
inline |
|
inline |
Solve an equation using the Newton-Raphson method.
This function iteratively solves an equation of the form "cdf(x) - u = 0" for a given sample u using the Newton-Raphson method.
| d | Dimension index. |
| x | Variable to solve for (initial guess and final solution). |
| u | Given sample from a uniform distribution [0, 1]. |
Definition at line 52 of file Utility.h.
References atol, dist, and max_iter.
Referenced by ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool >::operator()().
| double ippl::random::detail::NewtonRaphson< T, Distribution >::atol = 1e-12 |
| Distribution ippl::random::detail::NewtonRaphson< T, Distribution >::dist |
Definition at line 29 of file Utility.h.
Referenced by NewtonRaphson(), and solve().
| unsigned int ippl::random::detail::NewtonRaphson< T, Distribution >::max_iter = 20 |