OSHUN  beta
Arbitrary Order Spherical-Harmonic 1D-3P Vlasov-Fokker-Planck-Maxwell code
Algorithms::PEFRL< T > Class Template Reference

#include <lib-algorithms.h>

Public Member Functions

 PEFRL (T &Yin)
 
T & operator() (T &Y, double h, AbstFunctor< T > *F_space, AbstFunctor< T > *F_momentum)
 
T & operator() (T &Y, double h, AbstFunctor< T > *F_space, AbstFunctor< T > *F_momentum, size_t dir)
 

Private Attributes

Y0
 
Yh
 
double xsi
 
double lambda
 
double chi
 

Detailed Description

template<class T>
class Algorithms::PEFRL< T >

Definition at line 816 of file lib-algorithms.h.

Constructor & Destructor Documentation

◆ PEFRL()

template<class T >
Algorithms::PEFRL< T >::PEFRL ( T &  Yin)
inline

Definition at line 819 of file lib-algorithms.h.

819  : Y0(Yin), Yh(Yin),
820  xsi(0.1786178958448091),
821  lambda(-0.2123418310626054),
822  chi(-0.06626458266981849)
823  {}

Member Function Documentation

◆ operator()() [1/2]

template<class T >
T & Algorithms::PEFRL< T >::operator() ( T &  Y,
double  h,
AbstFunctor< T > *  F_space,
AbstFunctor< T > *  F_momentum 
)

Definition at line 836 of file lib-algorithms.h.

836  {
837 // Take a step using PEFRL
838 
839 // Initialization
840  Y0 = Y;
841 
842 // First step space
843  (*F_space)(Y0,Yh); Yh *= xsi*h; // x = h * F_space(Y0)
844  Y0 += Yh;
845 
846  (*F_momentum)(Y0,Yh); Yh *= (1.0-2.0*lambda)*0.5*h; // p = h * F_momentum(Y0)
847  Y0 += Yh; // Y0 = Y0 + h*Yh
848 
849  (*F_space)(Y0,Yh); Yh *= chi*h; // x = h * F_space(Y0)
850  Y0 += Yh;
851 
852  (*F_momentum)(Y0,Yh); Yh *= lambda*h; // p = h * F_momentum(Y0)
853  Y0 += Yh; // Y0 = Y0 + h*Yh
854 
855  (*F_space)(Y0,Yh); Yh *= (1.0-2.0*(chi+xsi))*h; // x = h * F_space(Y0)
856  Y0 += Yh;
857 
858  (*F_momentum)(Y0,Yh); Yh *= lambda*h; // p = h * F_momentum(Y0)
859  Y0 += Yh; // Y0 = Y0 + h*Yh
860 
861  (*F_space)(Y0,Yh); Yh *= chi*h; // x = h * F_space(Y0)
862  Y0 += Yh;
863 
864  (*F_momentum)(Y0,Yh); Yh *= (1.0-2.0*lambda)*0.5*h; // p = h * F_momentum(Y0)
865  Y0 += Yh;
866 
867  (*F_space)(Y0,Yh); Yh *= xsi*h; // x = h * F_space(Y0)
868  Y0 += Yh;
869 
870  Y = Y0;
871 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
872 
873  return Y;
874  }

◆ operator()() [2/2]

template<class T >
T & Algorithms::PEFRL< T >::operator() ( T &  Y,
double  h,
AbstFunctor< T > *  F_space,
AbstFunctor< T > *  F_momentum,
size_t  dir 
)

Definition at line 876 of file lib-algorithms.h.

876  {
877 // Take a step using PEFRL
878 
879 // Initialization
880  Y0 = Y;
881 
882 // First step space
883  (*F_space)(Y0,Yh); Yh *= xsi*h; // x = h * F_space(Y0)
884  Y0 += Yh;
885 
886  (*F_momentum)(Y0,Yh); Yh *= (1.0-2.0*lambda)*0.5*h; // p = h * F_momentum(Y0)
887  Y0 += Yh; // Y0 = Y0 + h*Yh
888 
889  (*F_space)(Y0,Yh); Yh *= chi*h; // x = h * F_space(Y0)
890  Y0 += Yh;
891 
892  (*F_momentum)(Y0,Yh); Yh *= lambda*h; // p = h * F_momentum(Y0)
893  Y0 += Yh; // Y0 = Y0 + h*Yh
894 
895  (*F_space)(Y0,Yh); Yh *= (1.0-2.0*(chi+xsi))*h; // x = h * F_space(Y0)
896  Y0 += Yh;
897 
898  (*F_momentum)(Y0,Yh); Yh *= lambda*h; // p = h * F_momentum(Y0)
899  Y0 += Yh; // Y0 = Y0 + h*Yh
900 
901  (*F_space)(Y0,Yh); Yh *= chi*h; // x = h * F_space(Y0)
902  Y0 += Yh;
903 
904  (*F_momentum)(Y0,Yh); Yh *= (1.0-2.0*lambda)*0.5*h; // p = h * F_momentum(Y0)
905  Y0 += Yh;
906 
907  (*F_space)(Y0,Yh); Yh *= xsi*h; // x = h * F_space(Y0)
908  Y0 += Yh;
909 
910  Y = Y0;
911 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
912  return Y;
913  }

Field Documentation

◆ chi

template<class T >
double Algorithms::PEFRL< T >::chi
private

Definition at line 832 of file lib-algorithms.h.

◆ lambda

template<class T >
double Algorithms::PEFRL< T >::lambda
private

Definition at line 832 of file lib-algorithms.h.

◆ xsi

template<class T >
double Algorithms::PEFRL< T >::xsi
private

Definition at line 832 of file lib-algorithms.h.

◆ Y0

template<class T >
T Algorithms::PEFRL< T >::Y0
private

Definition at line 831 of file lib-algorithms.h.

◆ Yh

template<class T >
T Algorithms::PEFRL< T >::Yh
private

Definition at line 831 of file lib-algorithms.h.


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