IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
ippl::TruncatedGreenParticleInteraction< ParticleContainer, VectorAttribute, ScalarAttribute > Class Template Reference

#include <TruncatedGreenParticleInteraction.h>

Inheritance diagram for ippl::TruncatedGreenParticleInteraction< ParticleContainer, VectorAttribute, ScalarAttribute >:
Collaboration diagram for ippl::TruncatedGreenParticleInteraction< ParticleContainer, VectorAttribute, ScalarAttribute >:

Public Types

using Base = ParticleInteractionBase<ParticleContainer>
using Vector_t = typename VectorAttribute::value_type
using Scalar_t = typename ScalarAttribute::value_type
using execution_space = typename VectorAttribute::execution_space

Public Member Functions

 TruncatedGreenParticleInteraction (const ParticleContainer &pc, VectorAttribute &F, const VectorAttribute &R, const ScalarAttribute &QM, const ParameterList &params)
 ~TruncatedGreenParticleInteraction () override=default
void solve () override
template<typename T>
void updateParameter (const std::string &key, const T &value)
void updateParameters (const ParameterList &params)
void mergeParameters (const ParameterList &params)

Protected Member Functions

virtual void setDefaultParameters ()

Protected Attributes

const ParticleContainerpc_m
ParameterList params_m

Static Private Member Functions

static KOKKOS_INLINE_FUNCTION constexpr Vector_t fieldFromPair (const Vector_t &dist, Scalar_t r2, Scalar_t alpha, Scalar_t forceConstant, Scalar_t qm)

Private Attributes

VectorAttribute & Field_m
 ! The electric or gravitational field
const VectorAttribute & R_m
 ! Positions of the particles
const ScalarAttribute & QM_m
 ! Charge or Mass of the particles

Detailed Description

template<typename ParticleContainer, typename VectorAttribute, typename ScalarAttribute>
class ippl::TruncatedGreenParticleInteraction< ParticleContainer, VectorAttribute, ScalarAttribute >

TruncatedGreenParticleInteraction class definition.

Template Parameters
ParticleContainerparticle container type
VectorAttributetype to store vector valued attributes
ScalarAttributetype to store scalar valued attributes evaluates truncated short range interaction F = - q * forceConstant grad [(1 - erf(alpha * r)) / r].

Definition at line 26 of file TruncatedGreenParticleInteraction.h.

Member Typedef Documentation

◆ Base

template<typename ParticleContainer, typename VectorAttribute, typename ScalarAttribute>
using ippl::TruncatedGreenParticleInteraction< ParticleContainer, VectorAttribute, ScalarAttribute >::Base = ParticleInteractionBase<ParticleContainer>

Definition at line 28 of file TruncatedGreenParticleInteraction.h.

◆ execution_space

template<typename ParticleContainer, typename VectorAttribute, typename ScalarAttribute>
using ippl::TruncatedGreenParticleInteraction< ParticleContainer, VectorAttribute, ScalarAttribute >::execution_space = typename VectorAttribute::execution_space

Definition at line 31 of file TruncatedGreenParticleInteraction.h.

◆ Scalar_t

template<typename ParticleContainer, typename VectorAttribute, typename ScalarAttribute>
using ippl::TruncatedGreenParticleInteraction< ParticleContainer, VectorAttribute, ScalarAttribute >::Scalar_t = typename ScalarAttribute::value_type

Definition at line 30 of file TruncatedGreenParticleInteraction.h.

◆ Vector_t

template<typename ParticleContainer, typename VectorAttribute, typename ScalarAttribute>
using ippl::TruncatedGreenParticleInteraction< ParticleContainer, VectorAttribute, ScalarAttribute >::Vector_t = typename VectorAttribute::value_type

Definition at line 29 of file TruncatedGreenParticleInteraction.h.

Constructor & Destructor Documentation

◆ TruncatedGreenParticleInteraction()

template<typename ParticleContainer, typename VectorAttribute, typename ScalarAttribute>
ippl::TruncatedGreenParticleInteraction< ParticleContainer, VectorAttribute, ScalarAttribute >::TruncatedGreenParticleInteraction ( const ParticleContainer & pc,
VectorAttribute & F,
const VectorAttribute & R,
const ScalarAttribute & QM,
const ParameterList & params )
inline
Parameters
pcParticle container
FField attribute, where the evaluated field will be added to
RPosition attribute
QMCharge or Mass like attribute determining the force magnitued
paramsParameters, containing at least 'alpha', 'force_constant' and 'rcut'. alpha controls the truncation strength. force_constant to be multiplied with the force. rcut determines the maximal distance between two particles to contribute to the forces.

Definition at line 44 of file TruncatedGreenParticleInteraction.h.

References Field_m, QM_m, and R_m.

◆ ~TruncatedGreenParticleInteraction()

template<typename ParticleContainer, typename VectorAttribute, typename ScalarAttribute>
ippl::TruncatedGreenParticleInteraction< ParticleContainer, VectorAttribute, ScalarAttribute >::~TruncatedGreenParticleInteraction ( )
overridedefault

Member Function Documentation

◆ fieldFromPair()

template<typename ParticleContainer, typename ScalarAttribute, typename VectorAttribute>
KOKKOS_INLINE_FUNCTION constexpr TruncatedGreenParticleInteraction< ParticleContainer, ScalarAttribute, VectorAttribute >::Vector_t ippl::TruncatedGreenParticleInteraction< ParticleContainer, ScalarAttribute, VectorAttribute >::fieldFromPair ( const Vector_t & dist,
Scalar_t r2,
Scalar_t alpha,
Scalar_t forceConstant,
Scalar_t qm )
staticconstexprprivate

Helper function to compute the field = - q * forceConstant grad [(1 - erf(alpha * r)) / r]. generated by an interacting particle

Definition at line 17 of file TruncatedGreenParticleInteraction.hpp.

References fieldFromPair().

Referenced by fieldFromPair(), and solve().

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

◆ mergeParameters()

template<typename ParticleContainer>
void ippl::ParticleInteractionBase< ParticleContainer >::mergeParameters ( const ParameterList & params)
inlineinherited

Merges another parameter set into the solver's parameters, overwriting existing parameters in case of conflict

Parameters
paramsParameter list with desired values

Definition at line 57 of file ParticleInteractionBase.h.

References params_m.

◆ setDefaultParameters()

template<typename ParticleContainer>
virtual void ippl::ParticleInteractionBase< ParticleContainer >::setDefaultParameters ( )
inlineprotectedvirtualinherited

Utility function for initializing a solver's default parameters (to be overridden for each base class)

Definition at line 71 of file ParticleInteractionBase.h.

Referenced by ParticleInteractionBase(), and ParticleInteractionBase().

Here is the caller graph for this function:

◆ solve()

template<typename ParticleContainer, typename ScalarAttribute, typename VectorAttribute>
void ippl::TruncatedGreenParticleInteraction< ParticleContainer, ScalarAttribute, VectorAttribute >::solve ( )
overridevirtual

Evaluates the short range interactions F = - q * forceConstant grad [(1 - erf(alpha * r)) / r].

Implements ippl::ParticleInteractionBase< ParticleContainer >.

Definition at line 33 of file TruncatedGreenParticleInteraction.hpp.

References Field_m, fieldFromPair(), ippl::get(), IpplTimings::getTimer(), ippl::ParticleInteractionBase< ParticleContainer >::params_m, ippl::ParticleInteractionBase< ParticleContainer >::pc_m, QM_m, R_m, solve(), IpplTimings::startTimer(), and IpplTimings::stopTimer().

Referenced by solve().

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

◆ updateParameter()

template<typename ParticleContainer>
template<typename T>
void ippl::ParticleInteractionBase< ParticleContainer >::updateParameter ( const std::string & key,
const T & value )
inlineinherited

Update one of the solver's parameters

Parameters
keyThe parameter key
valueThe new value
Exceptions
IpplExceptionFails if there is no existing parameter with the given key

Definition at line 40 of file ParticleInteractionBase.h.

References params_m.

◆ updateParameters()

template<typename ParticleContainer>
void ippl::ParticleInteractionBase< ParticleContainer >::updateParameters ( const ParameterList & params)
inlineinherited

Updates all solver parameters based on values in another parameter set

Parameters
paramsParameter list with updated values
Exceptions
IpplExceptionFails if the provided parameter list includes keys not already present

Definition at line 50 of file ParticleInteractionBase.h.

References params_m.

Member Data Documentation

◆ Field_m

template<typename ParticleContainer, typename VectorAttribute, typename ScalarAttribute>
VectorAttribute& ippl::TruncatedGreenParticleInteraction< ParticleContainer, VectorAttribute, ScalarAttribute >::Field_m
private

! The electric or gravitational field

Definition at line 71 of file TruncatedGreenParticleInteraction.h.

Referenced by solve(), and TruncatedGreenParticleInteraction().

◆ params_m

◆ pc_m

◆ QM_m

template<typename ParticleContainer, typename VectorAttribute, typename ScalarAttribute>
const ScalarAttribute& ippl::TruncatedGreenParticleInteraction< ParticleContainer, VectorAttribute, ScalarAttribute >::QM_m
private

! Charge or Mass of the particles

Definition at line 75 of file TruncatedGreenParticleInteraction.h.

Referenced by solve(), and TruncatedGreenParticleInteraction().

◆ R_m

template<typename ParticleContainer, typename VectorAttribute, typename ScalarAttribute>
const VectorAttribute& ippl::TruncatedGreenParticleInteraction< ParticleContainer, VectorAttribute, ScalarAttribute >::R_m
private

! Positions of the particles

Definition at line 73 of file TruncatedGreenParticleInteraction.h.

Referenced by solve(), and TruncatedGreenParticleInteraction().


The documentation for this class was generated from the following files: