IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
ippl::detail::meta_hess< E > Struct Template Reference

#include <IpplOperations.h>

Inheritance diagram for ippl::detail::meta_hess< E >:
Collaboration diagram for ippl::detail::meta_hess< E >:

Public Member Functions

KOKKOS_FUNCTION meta_hess (const E &u, const typename E::Mesh_t::vector_type vectors[], const typename E::Mesh_t::vector_type &hvector)
template<typename... Idx>
KOKKOS_INLINE_FUNCTION auto operator() (const Idx... args) const
KOKKOS_INLINE_FUNCTION auto operator[] (size_t i) const

Static Public Attributes

static constexpr unsigned dim = E::dim

Private Types

using Mesh_t = typename E::Mesh_t
using vector_type = typename Mesh_t::vector_type
using matrix_type = typename Mesh_t::matrix_type

Private Member Functions

template<size_t... row, typename... Idx>
KOKKOS_INLINE_FUNCTION constexpr void computeHessian (const std::index_sequence< row... > &is, matrix_type &hessian, const Idx... args) const
template<size_t row, size_t... col, typename... Idx>
KOKKOS_INLINE_FUNCTION constexpr int hessianRow (const std::index_sequence< col... > &, matrix_type &hessian, const Idx... args) const
template<size_t row, size_t col, typename... Idx>
KOKKOS_INLINE_FUNCTION constexpr vector_type hessianEntry (const Idx... args) const

Private Attributes

const E u_m
vector_type vectors_m [dim]
const vector_type hvector_m

Detailed Description

template<typename E>
struct ippl::detail::meta_hess< E >

Meta function of Hessian

Definition at line 518 of file IpplOperations.h.

Member Typedef Documentation

◆ matrix_type

template<typename E>
using ippl::detail::meta_hess< E >::matrix_type = typename Mesh_t::matrix_type
private

Definition at line 548 of file IpplOperations.h.

◆ Mesh_t

template<typename E>
using ippl::detail::meta_hess< E >::Mesh_t = typename E::Mesh_t
private

Definition at line 546 of file IpplOperations.h.

◆ vector_type

template<typename E>
using ippl::detail::meta_hess< E >::vector_type = typename Mesh_t::vector_type
private

Definition at line 547 of file IpplOperations.h.

Constructor & Destructor Documentation

◆ meta_hess()

template<typename E>
KOKKOS_FUNCTION ippl::detail::meta_hess< E >::meta_hess ( const E & u,
const typename E::Mesh_t::vector_type vectors[],
const typename E::Mesh_t::vector_type & hvector )
inline

Definition at line 526 of file IpplOperations.h.

References hvector_m, u_m, and vectors_m.

Member Function Documentation

◆ computeHessian()

template<typename E>
template<size_t... row, typename... Idx>
KOKKOS_INLINE_FUNCTION constexpr void ippl::detail::meta_hess< E >::computeHessian ( const std::index_sequence< row... > & is,
matrix_type & hessian,
const Idx... args ) const
inlineconstexprprivate

Utility function for computing the Hessian. Computes the rows of the matrix one by one via fold expression.

Template Parameters
row...the row indices (in practice, the sequence 0...Dim - 1)
Idx...the indices at which to access the field view
Parameters
isindex sequence (reused for row computation)
hessianmatrix in which to store the Hessian
args...the indices

Definition at line 564 of file IpplOperations.h.

References hessianRow().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hessianEntry()

template<typename E>
template<size_t row, size_t col, typename... Idx>
KOKKOS_INLINE_FUNCTION constexpr vector_type ippl::detail::meta_hess< E >::hessianEntry ( const Idx... args) const
inlineconstexprprivate

Utility function for computing the Hessian. Computes a single entry of the matrix

Template Parameters
rowthe row index
colthe column index
Idx...the indices at which to access the field view
Parameters
args...the indices
Returns
The entry of the Hessian at the given row and column

Definition at line 602 of file IpplOperations.h.

References ippl::apply(), dim, hvector_m, u_m, and vectors_m.

Referenced by hessianRow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hessianRow()

template<typename E>
template<size_t row, size_t... col, typename... Idx>
KOKKOS_INLINE_FUNCTION constexpr int ippl::detail::meta_hess< E >::hessianRow ( const std::index_sequence< col... > & ,
matrix_type & hessian,
const Idx... args ) const
inlineconstexprprivate

Utility function for computing the Hessian. Computes the entries in a single row of the matrix via fold expression.

Template Parameters
rowthe row index
col...the column indices (in practice, the sequence 0...Dim - 1)
Idx...the indices at which to access the field view
Parameters
hessianmatrix in which to store the hessian
args...the indices
Returns
An unused dummy value (required to allow use of a more performant fold expression)

Definition at line 585 of file IpplOperations.h.

References hessianEntry().

Referenced by computeHessian().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator()()

template<typename E>
template<typename... Idx>
KOKKOS_INLINE_FUNCTION auto ippl::detail::meta_hess< E >::operator() ( const Idx... args) const
inline

Definition at line 539 of file IpplOperations.h.

References computeHessian().

Here is the call graph for this function:

◆ operator[]()

KOKKOS_INLINE_FUNCTION auto ippl::detail::Expression< E, N >::operator[] ( size_t i) const
inlineinherited

Access single element of the expression

Definition at line 32 of file IpplExpressions.h.

Member Data Documentation

◆ dim

template<typename E>
unsigned ippl::detail::meta_hess< E >::dim = E::dim
staticconstexpr

Definition at line 523 of file IpplOperations.h.

Referenced by hessianEntry().

◆ hvector_m

template<typename E>
const vector_type ippl::detail::meta_hess< E >::hvector_m
private

Definition at line 552 of file IpplOperations.h.

Referenced by hessianEntry(), and meta_hess().

◆ u_m

template<typename E>
const E ippl::detail::meta_hess< E >::u_m
private

Definition at line 550 of file IpplOperations.h.

Referenced by hessianEntry(), and meta_hess().

◆ vectors_m

template<typename E>
vector_type ippl::detail::meta_hess< E >::vectors_m[dim]
private

Definition at line 551 of file IpplOperations.h.

Referenced by hessianEntry(), and meta_hess().


The documentation for this struct was generated from the following file: