Class PoissonSolverFFT3D#

Inheritance Relationships#

Base Type#

Class Documentation#

class PoissonSolverFFT3D : public PoissonSolver3D#

The PoissonSolverFFT3D class calculates electrostatic potential of a 3D charge distribution using 3D FFT approach.

Public Functions

PoissonSolverFFT3D(int xSize, int ySize, int zSize)#

Constructor with sizes only

PoissonSolverFFT3D(int xSize, int ySize, int zSize, double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)#

Constructor wit sizes and limits

virtual ~PoissonSolverFFT3D()#

Destructor

void setNumberOfExternalBunches(int nBunches)#

Set number of bunches from both sides for space charge calculations

void setSpacingOfExternalBunches(double lambda)#

Set distance between external bunches - period

int getNumberOfExternalBunches()#

Get number of bunches from both sides for space charge calculations

double getSpacingOfExternalBunches()#

Get distance between bunches

virtual void setGridX(double xMin, double xMax)#

Sets x-grid. This method is virtual, because the setting of limits may involve some subclass specific actions.

virtual void setGridY(double yMin, double yMax)#

Sets y-grid. This method is virtual, because the setting of limits may involve some subclass specific actions.

virtual void setGridZ(double zMin, double zMax)#

Sets z-grid. This method is virtual, because the setting of limits may involve some subclass specific actions.

void setGridXYZ(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)#
void updateGreenFunction()#

Updates the Green function FFT

virtual void findPotential(Grid3D *rhoGrid, Grid3D *phiGrid)#

Solves the Poisson problem for an external charge distribution and puts results into an external potential grid

Protected Functions

virtual void init(int xSize, int ySize, int zSize, double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)#
void _defineGreenF()#

Protected Attributes

int xSize2_#
int ySize2_#
int zSize2_#
double ***greensF_#
double *in_#
double *in_res_#
fftw_complex *out_green_#
fftw_complex *out_#
fftw_complex *out_res_#
fftw_plan planForward_greenF_#
fftw_plan planForward_#
fftw_plan planBackward_#
int nBunches_#
double lambda_#