IPPL API Reference
Independent Parallel Particle Layer C++ API
Loading...
Searching...
No Matches
ippl Namespace Reference

Classes

class  BareField
 
class  BaseManager
 A base class for managing simulations using IPPL. More...
 
class  BConds
 
class  BufferHandler
 Interface for memory buffer handling. More...
 
class  CCTransform
 
class  CG
 
class  CG< OperatorRet, LowerRet, UpperRet, UpperLowerRet, InverseDiagRet, FEMVector< T >, FEMVector< T > >
 
class  ChebyshevGaussQuadrature
 This is class represents the Chebyshev-Gauss quadrature rule. It is a special case of the Gauss-Jacobi quadrature rule with alpha = beta = -0.5. More...
 
class  ConstantFace
 
class  Cos1Transform
 
class  CosTransform
 
struct  CutTimes
 
class  DefaultBufferHandler
 Concrete implementation of BufferHandler for managing memory buffers. More...
 
struct  DefaultCellCrossingRule
 
class  EdgeElement
 
class  Element
 Base class for all elements. More...
 
struct  EvalFunctor
 Representation of the lhs of the problem we are trying to solve. More...
 
struct  ExtractExpressionRank
 
class  ExtrapolateFace
 
class  FDTDSolverBase
 Base class for FDTD solvers in the ippl library. More...
 
class  FEMMaxwellDiffusionSolver
 A solver for the electric diffusion equation given by \( \nabla \times \nabla \times E + E = f \text{ in } \Omega\) and \( n \times E = 0 \text{ on } \partial \Omega\) using the Nédélec basis functions. More...
 
class  FEMPoissonSolver
 A solver for the poisson equation using finite element methods and Conjugate Gradient (CG) More...
 
class  FEMVector
 1D vector used in the context of FEM. More...
 
class  FFT
 
class  FFT< CCTransform, ComplexField >
 
class  FFT< Cos1Transform, Field >
 
class  FFT< CosTransform, Field >
 
class  FFT< RCTransform, RealField >
 
class  FFT< SineTransform, Field >
 
class  FFTBase
 
class  FFTOpenPoissonSolver
 
class  FFTPeriodicPoissonSolver
 
class  FFTTruncatedGreenPeriodicPoissonSolver
 
class  Field
 
class  FieldLayout
 
class  FieldSolverBase
 
class  FiniteElementSpace
 The FiniteElementSpace class handles the mesh index mapping to vertices and elements and is the base class for other FiniteElementSpace classes (e.g. LagrangeSpace) More...
 
class  GaussJacobiQuadrature
 This is class represents the Gauss-Jacobi quadrature rule on a reference element. More...
 
class  GaussLegendreQuadrature
 This is class represents the Gauss-Legendre quadrature rule. It is a special case of the Gauss-Jacobi quadrature rule with alpha = beta = 0.0. More...
 
struct  GridPathSegmenter
 
struct  gs_preconditioner
 
class  HexahedralElement
 
struct  increment_type
 
class  Index
 
struct  jacobi_preconditioner
 
class  LagrangeSpace
 A class representing a Lagrange space for finite element methods on a structured, rectilinear grid. More...
 
struct  LogEntry
 
class  LoggingBufferHandler
 Decorator class for buffer management that adds logging capabilities to buffer operations. More...
 
class  Maxwell
 
class  Mesh
 
class  MidpointQuadrature
 This is a class representing the midpoint quadrature rule. More...
 
class  NDIndex
 
class  NDRegion
 
class  NedelecSpace
 A class representing a Nedelec space for finite element methods on a structured, rectilinear grid. More...
 
class  NoBcFace
 
class  NonStandardFDTDSolver
 A solver for Maxwell's equations using a non-standard Finite-Difference Time-Domain (FDTD) method. More...
 
class  NullSolver
 
class  OrthogonalRecursiveBisection
 
class  ParameterList
 
class  ParticleAttrib
 
class  ParticleBase
 
class  ParticleBaseBase
 
class  ParticleInteractionBase
 
class  ParticleSpatialLayout
 
class  ParticleSpatialOverlapLayout
 
class  PCG
 
class  PeriodicFace
 
class  PicManager
 A template class for managing Particle-in-Cell (PIC) simulations. More...
 
class  Poisson
 
class  PoissonCG
 
struct  polynomial_chebyshev_preconditioner
 
struct  polynomial_newton_preconditioner
 
class  PreconditionedFEMPoissonSolver
 A solver for the poisson equation using finite element methods and Conjugate Gradient (CG) More...
 
struct  preconditioner
 
class  PRegion
 
class  Quadrature
 This is the base class for all quadrature rules. More...
 
struct  QuadratureData
 Per-quadrature-node basis data passed to evaluateAx evaluator functors. More...
 
class  QuadrilateralElement
 
struct  RangePolicy
 
struct  RangePolicy< 1, PolicyArgs... >
 
class  RCTransform
 
struct  richardson_preconditioner
 
struct  richardson_preconditioner_alt
 
struct  Segment
 
class  SineTransform
 
class  SolverAlgorithm
 
struct  ssor_preconditioner
 
class  StandardFDTDSolver
 A solver for Maxwell's equations using the Finite-Difference Time-Domain (FDTD) method. More...
 
class  SubFieldLayout
 SubFieldLayout provides a layout for a sub-region of a larger field. More...
 
class  TruncatedGreenParticleInteraction
 
class  Tuple
 Generic tuple class with various operations. More...
 
struct  TupleImpl
 Implementation details for the Tuple class. More...
 
struct  TupleImpl< i, N, T >
 Partial specialization of TupleImpl for handling the terminal element. More...
 
struct  TupleImpl< i, N, T, R, Ts... >
 
struct  TupleTypeImpl
 
struct  TupleTypeImpl< 0, T, Ts... >
 
class  UniformCartesian
 
class  Vector
 
class  ZeroFace
 

Typedefs

template<typename T , unsigned NumVertices>
using Element1D = Element< T, 1, NumVertices >
 Base class for all 1D elements.
 
template<typename T , unsigned NumVertices>
using Element2D = Element< T, 2, NumVertices >
 Base class for all 2D elements.
 
template<typename T , unsigned NumVertices>
using Element3D = Element< T, 3, NumVertices >
 Base class for all 3D elements.
 
template<std::size_t Idx, typename... Ts>
using TupleType = typename TupleTypeImpl< Idx, Ts... >::type
 

Enumerations

enum  InitialGuessType { Chebyshev , LehrFEM }
 
enum  FFTComm { a2av = 0 , a2a = 1 , p2p = 2 , p2p_pl = 3 }
 
enum  TransformDirection { FORWARD , BACKWARD }
 
enum  FieldBC {
  PERIODIC_FACE = 0b0000 , CONSTANT_FACE = 0b0001 , ZERO_FACE = 0b0011 , EXTRAPOLATE_FACE = 0b0100 ,
  NO_FACE = 0b1000
}
 
enum  e_cube_tag { UPPER = 0 , LOWER = 1 , IS_PARALLEL = 2 }
 
enum  fdtd_bc { periodic , absorbing }
 
enum  BC { PERIODIC , REFLECTIVE , SINK , NO }
 

Functions

void serializeString (std::vector< char > &buffer, const std::string &str)
 
std::string deserializeString (const std::vector< char > &buffer, size_t &offset)
 
template<typename T >
void serializeBasicType (std::vector< char > &buffer, const T &value)
 
template<typename T >
deserializeBasicType (const std::vector< char > &buffer, size_t &offset)
 
template<typename View , typename Coords , size_t... Idx>
KOKKOS_INLINE_FUNCTION constexpr decltype(auto) apply_impl (const View &view, const Coords &coords, const std::index_sequence< Idx... > &)
 
template<typename View , typename Coords >
KOKKOS_INLINE_FUNCTION constexpr decltype(auto) apply (const View &view, const Coords &coords)
 
template<typename E1 , size_t N1, typename E2 , size_t N2>
KOKKOS_INLINE_FUNCTION detail::meta_cross< E1, E2 > cross (const detail::Expression< E1, N1 > &u, const detail::Expression< E2, N2 > &v)
 
template<typename E1 , size_t N1, typename E2 , size_t N2>
KOKKOS_INLINE_FUNCTION detail::meta_dot< E1, E2 > dot (const detail::Expression< E1, N1 > &u, const detail::Expression< E2, N2 > &v)
 
template<typename T , unsigned Dim>
KOKKOS_INLINE_FUNCTION void locate_element_nd_and_xi (const Vector< T, Dim > &hr, const Vector< T, Dim > &origin, const Vector< T, Dim > &x, Vector< size_t, Dim > &e_nd, Vector< T, Dim > &xi)
 Mapping from global position to element ND index and reference coordinates (xi ∈ [0,1)^Dim) on a UniformCartesian mesh.
 
template<class View , class IVec , std::size_t... Is>
KOKKOS_INLINE_FUNCTION auto view_ptr_impl (View &v, const IVec &I, std::index_sequence< Is... >) -> decltype(&v(I[Is]...))
 
template<int D, class View , class IVec >
KOKKOS_INLINE_FUNCTION auto view_ptr (View &v, const IVec &I) -> decltype(view_ptr_impl(v, I, std::make_index_sequence< D >{}))
 
template<typename AttribIn , typename Field , typename PosAttrib , typename Space , typename policy_type = Kokkos::RangePolicy<typename Field::execution_space>>
void assemble_rhs_from_particles (const AttribIn &attrib, Field &f, const PosAttrib &pp, const Space &space, policy_type iteration_policy)
 Assemble a P1 FEM load vector (RHS) from particle attributes.
 
template<class View , class IVec , std::size_t... Is>
KOKKOS_INLINE_FUNCTION decltype(auto) view_ref_impl (View &v, const IVec &I, std::index_sequence< Is... >)
 
template<int D, class View , class IVec >
KOKKOS_INLINE_FUNCTION decltype(auto) view_ref (View &v, const IVec &I)
 
template<typename AttribOut , typename Field , typename PosAttrib , typename Space , typename policy_type = Kokkos::RangePolicy<typename Field::execution_space>>
void interpolate_to_diracs (AttribOut &attrib_out, const Field &coeffs, const PosAttrib &pp, const Space &space, policy_type iteration_policy)
 Interpolate a P1 FEM field to particle positions.
 
template<typename AttribOut , typename Field , typename PosAttrib , typename Space , typename policy_type = Kokkos::RangePolicy<typename Field::execution_space>>
void interpolate_grad_to_diracs (AttribOut &attrib_out, const Field &coeffs, const PosAttrib &pp, const Space &space, policy_type iteration_policy)
 Interpolate a P1 FEM field gradient to particle positions.
 
template<typename T >
innerProduct (const FEMVector< T > &a, const FEMVector< T > &b)
 Calculate the inner product between two ippl::FEMVector(s).
 
template<typename T >
norm (const FEMVector< T > &v, int p=2)
 
constexpr unsigned calculateNumElementVertices (unsigned Dim)
 
template<int I, int End, class F >
KOKKOS_INLINE_FUNCTION constexpr void static_for (F &&f)
 
template<typename T >
KOKKOS_INLINE_FUNCTION void sort2 (T &a, T &b)
 
template<typename T >
KOKKOS_INLINE_FUNCTION void sort3 (T &a, T &b, T &c)
 
template<unsigned Dim, typename T >
KOKKOS_INLINE_FUNCTION Vector< T, Dim > lerp_point (const Vector< T, Dim > &A, const Vector< T, Dim > &B, T t)
 
template<unsigned Dim, typename T >
KOKKOS_INLINE_FUNCTION CutTimes< Dim, T > compute_axis_cuts_default (const Vector< T, Dim > &A, const Vector< T, Dim > &B, const Vector< T, Dim > &origin, const Vector< T, Dim > &h)
 
template<unsigned Dim, typename T >
KOKKOS_INLINE_FUNCTION void make_endpoints_fixed (const CutTimes< Dim, T > &cuts, Kokkos::Array< T, Dim+2 > &Tcuts)
 
template<typename Mesh , typename ChargeAttrib , typename PosAttrib , typename FEMVector , typename NedelecSpace , typename policy_type = Kokkos::RangePolicy<>>
void assemble_current_nedelec (const Mesh &mesh, const ChargeAttrib &q_attrib, const PosAttrib &X0, const PosAttrib &X1, FEMVector &fem_vector, const NedelecSpace &space, policy_type iteration_policy, typename Mesh::value_type dt)
 Assemble the current density RHS vector for a Nedelec FEM space.
 
 DefineReduction (Sum, sum, valL+=myVal, std::plus) DefineReduction(Max
 
std::greater DefineReduction (Min, min, using Kokkos::min;valL=min(valL, myVal), std::less) DefineReduction(Prod
 
template<typename BareField >
BareField::value_type innerProduct (const BareField &f1, const BareField &f2)
 
template<typename BareField >
BareField::value_type norm (const BareField &field, int p=2)
 
template<typename Field , unsigned Dim>
std::ostream & operator<< (std::ostream &os, const BConds< Field, Dim > &bc)
 
template<typename Field >
detail::meta_grad< Fieldgrad (Field &u)
 
template<typename Field >
detail::meta_div< Fielddiv (Field &u)
 
template<typename Field >
detail::meta_laplace< Fieldlaplace (Field &u)
 
template<typename Field >
detail::meta_curl< Fieldcurl (Field &u)
 
template<typename Field >
detail::meta_hess< Fieldhess (Field &u)
 
template<unsigned Dim>
std::ostream & operator<< (std::ostream &, const FieldLayout< Dim > &)
 
std::ostream & operator<< (std::ostream &out, const Index &I)
 
KOKKOS_INLINE_FUNCTION Index operator+ (const Index &i, int off)
 
KOKKOS_INLINE_FUNCTION Index operator+ (int off, const Index &i)
 
KOKKOS_INLINE_FUNCTION Index operator- (const Index &i, int off)
 
KOKKOS_INLINE_FUNCTION Index operator- (int off, const Index &i)
 
KOKKOS_INLINE_FUNCTION Index operator- (const Index &i)
 
KOKKOS_INLINE_FUNCTION Index operator* (const Index &i, int m)
 
KOKKOS_INLINE_FUNCTION Index operator* (int m, const Index &i)
 
KOKKOS_INLINE_FUNCTION Index operator/ (const Index &i, int d)
 
KOKKOS_INLINE_FUNCTION void lcm (int s1, int s2, int &s, int &m1, int &m2)
 
template<unsigned Dim>
std::ostream & operator<< (std::ostream &out, const NDIndex< Dim > &idx)
 
template<unsigned Dim>
bool operator== (const NDIndex< Dim > &nd1, const NDIndex< Dim > &nd2)
 
template<unsigned Dim>
bool operator!= (const NDIndex< Dim > &nd1, const NDIndex< Dim > &nd2)
 
template<typename Mesh , typename ChargeAttrib , typename PosAttrib , typename JField , typename policy_type = Kokkos::RangePolicy<>>
void assemble_current_yee (const Mesh &mesh, const ChargeAttrib &q_attrib, const PosAttrib &X0, const PosAttrib &X1, JField &J_field, policy_type iteration_policy, typename Mesh::value_type dt)
 Deposit current density onto a Yee-staggered grid.
 
void initialize (int &argc, char *argv[], MPI_Comm comm)
 
void finalize ()
 
void fence ()
 
void abort (const char *msg, int errorcode)
 
template<typename Field , typename Functor >
double powermethod (Functor &&f, Field &x_0, unsigned int max_iter=5000, double tol=1e-3)
 
template<typename Field , typename Functor >
double adapted_powermethod (Functor &&f, Field &x_0, double lambda_max, unsigned int max_iter=5000, double tol=1e-3)
 
template<typename Attrib1 , typename Field , typename Attrib2 , typename policy_type = Kokkos::RangePolicy<typename Field::execution_space>>
void scatter (const Attrib1 &attrib, Field &f, const Attrib2 &pp)
 Non-class interface for scattering particle attribute data onto a field.
 
template<typename Attrib1 , typename Field , typename Attrib2 , typename policy_type = Kokkos::RangePolicy<typename Field::execution_space>>
void scatter (const Attrib1 &attrib, Field &f, const Attrib2 &pp, policy_type iteration_policy, typename Attrib1::hash_type hash_array={})
 Non-class interface for scattering with a custom iteration policy and optional index array.
 
template<typename Attrib1 , typename Field , typename Attrib2 >
void gather (Attrib1 &attrib, Field &f, const Attrib2 &pp, const bool addToAttribute=false)
 Non-class interface for gathering field data into a particle attribute.
 
 DefineParticleReduction (Sum, sum, valL+=myVal, std::plus) DefineParticleReduction(Max
 
 if (myVal > valL) valL
 
std::greater DefineParticleReduction (Min, min, if(myVal< valL) valL=myVal, std::less) DefineParticleReduction(Prod
 
template<typename Field >
detail::meta_poisson< Fieldpoisson (Field &u)
 
template<typename Field >
detail::meta_lower_laplace< Fieldlower_laplace (Field &u)
 
template<typename Field >
detail::meta_lower_laplace< Fieldlower_laplace_no_comm (Field &u)
 
template<typename Field >
detail::meta_upper_laplace< Fieldupper_laplace (Field &u)
 
template<typename Field >
detail::meta_upper_laplace< Fieldupper_laplace_no_comm (Field &u)
 
template<typename Field >
detail::meta_upper_and_lower_laplace< Fieldupper_and_lower_laplace (Field &u)
 
template<typename Field >
detail::meta_upper_and_lower_laplace< Fieldupper_and_lower_laplace_no_comm (Field &u)
 
template<typename Field >
double negative_inverse_diagonal_laplace (Field &u)
 
template<typename Field >
double diagonal_laplace (Field &u)
 
template<typename Field >
void mult (Field &u, const double c)
 
template<typename T , unsigned Dim>
std::ostream & operator<< (std::ostream &out, const NDRegion< T, Dim > &idx)
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const PRegion< T > &r)
 
template<std::size_t Idx, typename... Ts>
KOKKOS_INLINE_FUNCTION auto & get (Tuple< Ts... > &t)
 Accessor function to get an element mutable reference at a specific index from a Tuple.
 
template<std::size_t Idx, typename... Ts>
KOKKOS_INLINE_FUNCTION const auto & get (const Tuple< Ts... > &t)
 Accessor function to get a element const reference at a specific index from a Tuple.
 
template<typename... Ts>
KOKKOS_INLINE_FUNCTION Tuple< Ts... > makeTuple (Ts &&... args)
 Function to create a Tuple with specified elements.
 
template<typename T , unsigned Dim>
KOKKOS_INLINE_FUNCTION Vector< T, Dim > min (const Vector< T, Dim > &a, const Vector< T, Dim > &b)
 
template<typename T , unsigned Dim>
KOKKOS_INLINE_FUNCTION Vector< T, Dim > max (const Vector< T, Dim > &a, const Vector< T, Dim > &b)
 
template<typename T , unsigned Dim>
std::ostream & operator<< (std::ostream &out, const Vector< T, Dim > &v)
 
template<class... PolicyArgs, typename View >
RangePolicy< View::rank, typenameView::execution_space, PolicyArgs... >::policy_type getRangePolicy (const View &view, int shift=0)
 
template<size_t Dim, class... PolicyArgs>
RangePolicy< Dim, PolicyArgs... >::policy_type createRangePolicy (const Kokkos::Array< typename RangePolicy< Dim, PolicyArgs... >::index_type, Dim > &begin, const Kokkos::Array< typename RangePolicy< Dim, PolicyArgs... >::index_type, Dim > &end)
 
template<class ExecPolicy , class FunctorType >
void parallel_for (const std::string &name, const ExecPolicy &policy, const FunctorType &functor)
 
template<class ExecPolicy , class FunctorType , class... ReducerArgument>
void parallel_reduce (const std::string &name, const ExecPolicy &policy, const FunctorType &functor, ReducerArgument &&... reducer)
 

Variables

 max
 
 valL = max(valL, myVal)
 
std::greater prod
 
std::unique_ptr< mpi::CommunicatorComm = 0
 
std::unique_ptr< mpi::EnvironmentEnv = 0
 
std::unique_ptr< InformInfo = 0
 
std::unique_ptr< InformWarn = 0
 
std::unique_ptr< InformError = 0
 

Detailed Description

Implementations for FFT constructor/destructor and transforms

Typedef Documentation

◆ Element1D

template<typename T , unsigned NumVertices>
using ippl::Element1D = typedef Element<T, 1, NumVertices>

Base class for all 1D elements.

Template Parameters
TThe type of the coordinates of the vertices of the element.
NumVerticesThe number of vertices of the element.

◆ Element2D

template<typename T , unsigned NumVertices>
using ippl::Element2D = typedef Element<T, 2, NumVertices>

Base class for all 2D elements.

Template Parameters
TThe type of the coordinates of the vertices of the element.
NumVerticesThe number of vertices of the element.

◆ Element3D

template<typename T , unsigned NumVertices>
using ippl::Element3D = typedef Element<T, 3, NumVertices>

Base class for all 3D elements.

Template Parameters
TThe type of the coordinates of the vertices of the element.
NumVerticesThe number of vertices of the element.

Function Documentation

◆ adapted_powermethod()

template<typename Field , typename Functor >
double ippl::adapted_powermethod ( Functor &&  f,
Field x_0,
double  lambda_max,
unsigned int  max_iter = 5000,
double  tol = 1e-3 
)

Computes the smallest Eigenvalue of the Functor f (f must be symmetric positive definite)

Parameters
fFunctor
x_0initial guess
lambda_maxlargest Eigenvalue
max_itermaximum number of iterations
toltolerance

◆ apply()

template<typename View , typename Coords >
KOKKOS_INLINE_FUNCTION constexpr decltype(auto) ippl::apply ( const View &  view,
const Coords &  coords 
)
constexpr

Accesses the element of a view at the indices contained in an array-like structure instead of having the indices being separate arguments

Template Parameters
Viewthe view type
Coordsan array-like container of indices
Parameters
viewthe view to access
coordsthe indices
Returns
The element in the view at the given location

◆ apply_impl()

template<typename View , typename Coords , size_t... Idx>
KOKKOS_INLINE_FUNCTION constexpr decltype(auto) ippl::apply_impl ( const View &  view,
const Coords &  coords,
const std::index_sequence< Idx... > &   
)
constexpr

Utility function for apply (see its docstring)

Template Parameters
Idx...indices of the elements to take (in practice, always the sequence of natural numbers up to the dimension of the view)

◆ assemble_current_nedelec()

template<typename Mesh , typename ChargeAttrib , typename PosAttrib , typename FEMVector , typename NedelecSpace , typename policy_type = Kokkos::RangePolicy<>>
void ippl::assemble_current_nedelec ( const Mesh mesh,
const ChargeAttrib &  q_attrib,
const PosAttrib &  X0,
const PosAttrib &  X1,
FEMVector fem_vector,
const NedelecSpace space,
policy_type  iteration_policy,
typename Mesh::value_type  dt 
)
inline

Assemble the current density RHS vector for a Nedelec FEM space.

For each particle p moving from X0(p) to X1(p) during one time step dt, the particle trajectory is split into sub-segments that each lie within a single mesh cell (via GridPathSegmenter). Each sub-segment's contribution to the current density is computed and then scattered onto the edge DOFs of the cell that contains the sub-segment's midpoint, using the Nedelec basis functions evaluated at the midpoint (equivalent to linear interpolation).

◆ assemble_current_yee()

template<typename Mesh , typename ChargeAttrib , typename PosAttrib , typename JField , typename policy_type = Kokkos::RangePolicy<>>
void ippl::assemble_current_yee ( const Mesh mesh,
const ChargeAttrib &  q_attrib,
const PosAttrib &  X0,
const PosAttrib &  X1,
JField &  J_field,
policy_type  iteration_policy,
typename Mesh::value_type  dt 
)
inline

Deposit current density onto a Yee-staggered grid.

For each particle p moving from X0(p) to X1(p) during one time step dt, the trajectory is split into sub-segments each lying within a single mesh cell (via GridPathSegmenter). For each spatial component, every segment's contribution to J is scattered onto the 2^(Dim-1) Yee-grid nodes using linear interpolation weights evaluated at the midpoint.

◆ assemble_rhs_from_particles()

template<typename AttribIn , typename Field , typename PosAttrib , typename Space , typename policy_type = Kokkos::RangePolicy<typename Field::execution_space>>
void ippl::assemble_rhs_from_particles ( const AttribIn &  attrib,
Field f,
const PosAttrib &  pp,
const Space &  space,
policy_type  iteration_policy 
)
inline

Assemble a P1 FEM load vector (RHS) from particle attributes.

For each particle position x, locate the owning element (ND index e_nd) and reference coordinate xi. Deposit the particle attribute value into the element's nodal DOFs using P1 Lagrange shape functions evaluated at xi.

Template Parameters
AttribInParticle attribute type with getView()(p) -> scalar
Fieldippl::Field with rank=Dim nodal coefficients (RHS)
PosAttribParticle position attribute with getView()(p) -> Vector<T,Dim>
SpaceLagrange space providing element/DOF/topology queries
policy_typeKokkos execution policy (defaults to Field::execution_space)

◆ createRangePolicy()

template<size_t Dim, class... PolicyArgs>
RangePolicy< Dim, PolicyArgs... >::policy_type ippl::createRangePolicy ( const Kokkos::Array< typename RangePolicy< Dim, PolicyArgs... >::index_type, Dim > &  begin,
const Kokkos::Array< typename RangePolicy< Dim, PolicyArgs... >::index_type, Dim > &  end 
)

Create a range policy for an index range given in the form of arrays (required because Kokkos doesn't allow the initialization of 1D range policies using arrays)

Template Parameters
Dimthe dimension of the range
PolicyArgs...additional template parameters for the range policy
Parameters
beginthe starting indices
endthe ending indices
Returns
A (MD)RangePolicy spanning the given range

◆ curl()

template<typename Field >
detail::meta_curl< Field > ippl::curl ( Field u)

User interface of curl in three dimensions.

Parameters
ufield

◆ div()

template<typename Field >
detail::meta_div< Field > ippl::div ( Field u)

User interface of divergence in three dimensions.

Parameters
ufield

◆ gather()

template<typename Attrib1 , typename Field , typename Attrib2 >
void ippl::gather ( Attrib1 &  attrib,
Field f,
const Attrib2 &  pp,
const bool  addToAttribute = false 
)
inline

Non-class interface for gathering field data into a particle attribute.

This interface calls the member ParticleAttrib::gather() function with the provided parameters and preserving legacy behavior by assigning addToAttribute a default value.

Note
See ParticleAttrib::gather() for more information on the behavior of addToAttribute.
Template Parameters
Attrib1The type of the particle attribute.
FieldThe type of the field.
Attrib2The type of the particle position attribute.
Parameters
attribThe particle attribute to gather data into.
fThe field from which data is gathered.
ppThe ParticleAttrib representing particle positions.
addToAttributeIf true, the gathered field value is added to the current attribute value; otherwise, the attribute value is overwritten.

◆ get() [1/2]

template<std::size_t Idx, typename... Ts>
KOKKOS_INLINE_FUNCTION const auto & ippl::get ( const Tuple< Ts... > &  t)

Accessor function to get a element const reference at a specific index from a Tuple.

Template Parameters
IdxIndex of the element to retrieve.
TsTypes of elements in the Tuple.
Parameters
tTuple from which to retrieve the element.
Returns
Reference to the specified element.

◆ get() [2/2]

template<std::size_t Idx, typename... Ts>
KOKKOS_INLINE_FUNCTION auto & ippl::get ( Tuple< Ts... > &  t)

Accessor function to get an element mutable reference at a specific index from a Tuple.

Template Parameters
IdxIndex of the element to retrieve.
TsTypes of elements in the Tuple.
Parameters
tTuple from which to retrieve the element.
Returns
Reference to the specified element.

◆ getRangePolicy()

template<class... PolicyArgs, typename View >
RangePolicy< View::rank, typenameView::execution_space, PolicyArgs... >::policy_type ippl::getRangePolicy ( const View &  view,
int  shift = 0 
)

Create a range policy that spans an entire Kokkos view, excluding a specifiable number of ghost cells at the extremes.

Template Parameters
Tagrange policy tag
Viewthe view type
Parameters
viewto span
shiftnumber of ghost cells
Returns
A (MD)RangePolicy that spans the desired elements of the given view

◆ grad()

template<typename Field >
detail::meta_grad< Field > ippl::grad ( Field u)

User interface of gradient

Parameters
ufield

◆ hess()

template<typename Field >
detail::meta_hess< Field > ippl::hess ( Field u)

User interface of Hessian in three dimensions.

Parameters
ufield

◆ innerProduct() [1/2]

template<typename BareField >
BareField::value_type ippl::innerProduct ( const BareField f1,
const BareField f2 
)

Computes the inner product of two fields

Parameters
f1first field
f2second field
Returns
Result of f1^T f2

◆ innerProduct() [2/2]

template<typename T >
T ippl::innerProduct ( const FEMVector< T > &  a,
const FEMVector< T > &  b 
)

Calculate the inner product between two ippl::FEMVector(s).

Calculates the inner product \( a^T b\) between the ippl::FEMVector(s) a and b. Note that during the inner product computations the halo cells are included, if this should not be the case the hallo cells should be set to 0 using the ippl::FEMVector::setHalo() function.

Parameters
aFirst field.
bSecond field.
Returns
The value \(a^Tb\).

◆ interpolate_grad_to_diracs()

template<typename AttribOut , typename Field , typename PosAttrib , typename Space , typename policy_type = Kokkos::RangePolicy<typename Field::execution_space>>
void ippl::interpolate_grad_to_diracs ( AttribOut &  attrib_out,
const Field coeffs,
const PosAttrib &  pp,
const Space &  space,
policy_type  iteration_policy 
)
inline

Interpolate a P1 FEM field gradient to particle positions.

For each particle position x, locate the owning element (ND index e_nd) and reference coordinate xi. Evaluate gradient of P1 Lagrange shape functions at xi to combine nodal coefficients and write u(x) to the particle attribute.

Template Parameters
AttribOutParticle attribute type with getView()(p) -> scalar
Fieldippl::Field with rank=Dim nodal coefficients
PosAttribParticle position attribute with getView()(p) -> Vector<T,Dim>
SpaceLagrange space providing element/DOF/topology queries
policy_typeKokkos execution policy (defaults to Field::execution_space)

◆ interpolate_to_diracs()

template<typename AttribOut , typename Field , typename PosAttrib , typename Space , typename policy_type = Kokkos::RangePolicy<typename Field::execution_space>>
void ippl::interpolate_to_diracs ( AttribOut &  attrib_out,
const Field coeffs,
const PosAttrib &  pp,
const Space &  space,
policy_type  iteration_policy 
)
inline

Interpolate a P1 FEM field to particle positions.

For each particle position x, locate the owning element (ND index e_nd) and reference coordinate xi. Evaluate P1 Lagrange shape functions at xi to combine nodal coefficients and write u(x) to the particle attribute.

Template Parameters
AttribOutParticle attribute type with getView()(p) -> scalar
Fieldippl::Field with rank=Dim nodal coefficients
PosAttribParticle position attribute with getView()(p) -> Vector<T,Dim>
SpaceLagrange space providing element/DOF/topology queries
policy_typeKokkos execution policy (defaults to Field::execution_space)

◆ laplace()

template<typename Field >
detail::meta_laplace< Field > ippl::laplace ( Field u)

User interface of Laplacian

Parameters
ufield

◆ locate_element_nd_and_xi()

template<typename T , unsigned Dim>
KOKKOS_INLINE_FUNCTION void ippl::locate_element_nd_and_xi ( const Vector< T, Dim > &  hr,
const Vector< T, Dim > &  origin,
const Vector< T, Dim > &  x,
Vector< size_t, Dim > &  e_nd,
Vector< T, Dim > &  xi 
)

Mapping from global position to element ND index and reference coordinates (xi ∈ [0,1)^Dim) on a UniformCartesian mesh.

Assumes the input x is strictly inside the computational domain so that for each dimension d: 0 ≤ (x[d]-origin[d])/h[d] < nr[d]-1.

◆ lower_laplace()

template<typename Field >
detail::meta_lower_laplace< Field > ippl::lower_laplace ( Field u)

User interface of lower triangular Laplacian

Parameters
ufield

◆ lower_laplace_no_comm()

template<typename Field >
detail::meta_lower_laplace< Field > ippl::lower_laplace_no_comm ( Field u)

User interface of lower triangular Laplacian without exchange of halo cells

Parameters
ufield

◆ makeTuple()

template<typename... Ts>
KOKKOS_INLINE_FUNCTION Tuple< Ts... > ippl::makeTuple ( Ts &&...  args)

Function to create a Tuple with specified elements.

Template Parameters
TsTypes of elements in the Tuple.
Parameters
argsElements to initialize the Tuple.
Returns
Newly created Tuple.

◆ negative_inverse_diagonal_laplace()

template<typename Field >
double ippl::negative_inverse_diagonal_laplace ( Field u)

Returns the factor by which to multiply the u field to get the inverse of the diagonal of the Laplacian.

Parameters
ufield

◆ norm()

template<typename BareField >
BareField::value_type ippl::norm ( const BareField field,
int  p = 2 
)

Computes the Lp-norm of a field

Parameters
fieldfield
pdesired norm (default 2)
Returns
The desired norm of the field

◆ poisson()

template<typename Field >
detail::meta_poisson< Field > ippl::poisson ( Field u)

User interface of poisson

Parameters
ufield

◆ powermethod()

template<typename Field , typename Functor >
double ippl::powermethod ( Functor &&  f,
Field x_0,
unsigned int  max_iter = 5000,
double  tol = 1e-3 
)

Computes the largest Eigenvalue of the Functor f

Parameters
fFunctor
x_0initial guess
max_itermaximum number of iterations
toltolerance

◆ scatter() [1/2]

template<typename Attrib1 , typename Field , typename Attrib2 , typename policy_type = Kokkos::RangePolicy<typename Field::execution_space>>
void ippl::scatter ( const Attrib1 &  attrib,
Field f,
const Attrib2 &  pp 
)
inline

Non-class interface for scattering particle attribute data onto a field.

This overload preserves legacy functionality by providing a default iteration policy. It calls the member scatter() with a default Kokkos::RangePolicy.

Note
The default behaviour is to scatter all particles without any custom index mapping.
Template Parameters
Attrib1The type of the particle attribute.
FieldThe type of the field.
Attrib2The type of the particle position attribute.
policy_type(Default: Kokkos::RangePolicy<typename Field::execution_space>)
Parameters
attribThe particle attribute to scatter.
fThe field onto which the data is scattered.
ppThe ParticleAttrib representing particle positions.

◆ scatter() [2/2]

template<typename Attrib1 , typename Field , typename Attrib2 , typename policy_type = Kokkos::RangePolicy<typename Field::execution_space>>
void ippl::scatter ( const Attrib1 &  attrib,
Field f,
const Attrib2 &  pp,
policy_type  iteration_policy,
typename Attrib1::hash_type  hash_array = {} 
)
inline

Non-class interface for scattering with a custom iteration policy and optional index array.

This overload allows the caller to specify a custom Kokkos::range_policy and an optional ippl::hash_type array. It forwards the parameters to the member scatter() function.

Note
See ParticleAttrib::scatter() for more information on the custom iteration functionality.
Template Parameters
Attrib1The type of the particle attribute.
FieldThe type of the field.
Attrib2The type of the particle position attribute.
policy_type(Default: Kokkos::RangePolicy<typename Field::execution_space>)
Parameters
attribThe particle attribute to scatter.
fThe field onto which the data is scattered.
ppThe ParticleAttrib representing particle positions.
iteration_policyA custom Kokkos::range_policy defining the iteration range.
hash_arrayAn optional ippl::hash_type array for index mapping.

◆ upper_and_lower_laplace()

template<typename Field >
detail::meta_upper_and_lower_laplace< Field > ippl::upper_and_lower_laplace ( Field u)

User interface of upper+lower triangular Laplacian

Parameters
ufield

◆ upper_and_lower_laplace_no_comm()

template<typename Field >
detail::meta_upper_and_lower_laplace< Field > ippl::upper_and_lower_laplace_no_comm ( Field u)

User interface of upper+lower triangular Laplacian without exchange of halo cells

Parameters
ufield

◆ upper_laplace()

template<typename Field >
detail::meta_upper_laplace< Field > ippl::upper_laplace ( Field u)

User interface of upper triangular Laplacian

Parameters
ufield

◆ upper_laplace_no_comm()

template<typename Field >
detail::meta_upper_laplace< Field > ippl::upper_laplace_no_comm ( Field u)

User interface of upper triangular Laplacian without exchange of halo cells

Parameters
ufield