File pdd.hxx

class LaplacePDD : public Laplacian

Public Functions

inline LaplacePDD(Options *opt = nullptr, const CELL_LOC loc = CELL_CENTRE, Mesh *mesh_in = nullptr, Solver *solver = nullptr, Datafile *dump = nullptr)
inline ~LaplacePDD()
inline virtual void setCoefA(const Field2D &val) override

Set coefficients for inversion. Re-builds matrices if necessary.

inline virtual void setCoefC(const Field2D &val) override
inline virtual void setCoefD(const Field2D &val) override
inline virtual void setCoefEx(const Field2D &val) override
inline virtual void setCoefEz(const Field2D &val) override
virtual FieldPerp solve(const FieldPerp &b) override
virtual Field3D solve(const Field3D &b) override

Private Functions

void start(const FieldPerp &b, PDD_data &data)

Laplacian inversion using Parallel Diagonal Dominant (PDD) method

July 2008: Adapted from serial version to run in parallel (split in X) for tridiagonal system i.e. no 4th order inversion yet.

Note

This code stores intermediate results and takes significantly more memory than the serial version. This can be balanced against communication time i.e. faster communications can allow less memory use.

Parameters
  • b[in] RHS values (Ax = b)

  • data[in] Internal data used for multiple calls in parallel mode

void next(PDD_data &data)

Middle part of the PDD algorithm.

void finish(PDD_data &data, FieldPerp &x)

Last part of the PDD algorithm.

Private Members

Field2D Acoef
Field2D Ccoef
Field2D Dcoef
const int PDD_COMM_XV
const int PDD_COMM_Y
struct PDD_data

Data structure for PDD algorithm.

Public Members

Matrix<dcomplex> bk

b vector in Fourier space

Matrix<dcomplex> avec
Matrix<dcomplex> bvec
Matrix<dcomplex> cvec

Diagonal bands of matrix.

int jy

Y index.

Matrix<dcomplex> xk
Matrix<dcomplex> v
Matrix<dcomplex> w
Array<BoutReal> snd
Array<BoutReal> rcv
comm_handle recv_handle
Array<dcomplex> y2i