File serial_tri.hxx

class LaplaceSerialTri : public Laplacian

Public Functions

LaplaceSerialTri(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)
FieldPerp solve(const FieldPerp &b, const FieldPerp &x0)

Solve Ax=b for x given b

This function will

  1. Take the fourier transform of the y-slice given in the input
  2. For each fourier mode a) Set up the tridiagonal matrix b) Call the solver which inverts the matrix Ax_mode = b_mode
  3. Collect all the modes in a 2D array
  4. Back transform the y-slice


The inverted variable.
  • b: A 2D variable that will be fourier decomposed, each fourier mode of this variable is going to be the right hand side of the equation Ax = b
  • x0: Variable used to set BC (if the right flags are set, see the user manual)

Private Members

Field2D A
Field2D C
Field2D D