OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
RK4< FieldFunction, Arguments > Class Template Reference

4-th order Runnge-Kutta stepper More...

#include <RK4.h>

Inheritance diagram for RK4< FieldFunction, Arguments >:
Inheritance graph
Collaboration diagram for RK4< FieldFunction, Arguments >:
Collaboration graph

Public Member Functions

 RK4 (const FieldFunction &fieldfunc)
 
virtual bool advance (PartBunchBase< double, 3 > *bunch, const size_t &i, const double &t, const double dt, Arguments &... args) const
 

Protected Attributes

const FieldFunction & fieldfunc_m
 

Private Member Functions

bool doAdvance_m (PartBunchBase< double, 3 > *bunch, const size_t &i, const double &t, const double dt, Arguments &... args) const
 
bool derivate_m (PartBunchBase< double, 3 > *bunch, double *y, const double &t, double *yp, const size_t &i, Arguments &... args) const
 
void copyTo (const Vector_t &R, const Vector_t &P, double *x) const
 
void copyFrom (Vector_t &R, Vector_t &P, double *x) const
 

Private Attributes

const double mass_coeff = 1.0e9 * Units::GeV2kg
 

Detailed Description

template<typename FieldFunction, typename ... Arguments>
class RK4< FieldFunction, Arguments >

4-th order Runnge-Kutta stepper

Definition at line 27 of file RK4.h.

Constructor & Destructor Documentation

◆ RK4()

template<typename FieldFunction , typename ... Arguments>
RK4< FieldFunction, Arguments >::RK4 ( const FieldFunction &  fieldfunc)
inline

Definition at line 30 of file RK4.h.

Member Function Documentation

◆ advance()

virtual bool Stepper< FieldFunction, Arguments >::advance ( PartBunchBase< double, 3 > *  bunch,
const size_t &  i,
const double &  t,
const double  dt,
Arguments &...  args 
) const
inlinevirtualinherited

Definition at line 42 of file Stepper.h.

◆ copyFrom()

template<typename FieldFunction , typename ... Arguments>
void RK4< FieldFunction, Arguments >::copyFrom ( Vector_t R,
Vector_t P,
double *  x 
) const
private

Definition at line 148 of file RK4.hpp.

References Attrib::Distribution::R.

◆ copyTo()

template<typename FieldFunction , typename ... Arguments>
void RK4< FieldFunction, Arguments >::copyTo ( const Vector_t R,
const Vector_t P,
double *  x 
) const
private

Definition at line 136 of file RK4.hpp.

References Attrib::Distribution::R.

◆ derivate_m()

template<typename FieldFunction , typename ... Arguments>
bool RK4< FieldFunction, Arguments >::derivate_m ( PartBunchBase< double, 3 > *  bunch,
double *  y,
const double &  t,
double *  yp,
const size_t &  i,
Arguments &...  args 
) const
private
Parameters
y
t
yp
Pindex
Returns

Definition at line 93 of file RK4.hpp.

References Physics::c, PartBunchBase< T, Dim >::M, Units::ns2s, PartBunchBase< T, Dim >::Q, PartBunchBase< T, Dim >::R, and sqrt().

Here is the call graph for this function:

◆ doAdvance_m()

template<typename FieldFunction , typename ... Arguments>
bool RK4< FieldFunction, Arguments >::doAdvance_m ( PartBunchBase< double, 3 > *  bunch,
const size_t &  i,
const double &  t,
const double  dt,
Arguments &...  args 
) const
privatevirtual

Member Data Documentation

◆ fieldfunc_m

const FieldFunction& Stepper< FieldFunction, Arguments >::fieldfunc_m
protectedinherited

Definition at line 70 of file Stepper.h.

◆ mass_coeff

template<typename FieldFunction , typename ... Arguments>
const double RK4< FieldFunction, Arguments >::mass_coeff = 1.0e9 * Units::GeV2kg
private

Definition at line 59 of file RK4.h.


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