File pdd.hxx

class LaplacePDD : public Laplacian

Public Functions

LaplacePDD(Options *opt = nullptr, const CELL_LOC loc = CELL_CENTRE, Mesh *mesh_in = nullptr)
void setCoefA(const Field2D &val)

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

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

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.

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.
  • b: RHS values (Ax = b)
  • data: 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