File serial_tri.hxx#

class LaplaceSerialTri : public Laplacian#

Public Functions

LaplaceSerialTri(Options *opt = nullptr, const CELL_LOC loc = CELL_CENTRE, Mesh *mesh_in = nullptr, Solver *solver = nullptr)#
inline ~LaplaceSerialTri()#
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 FieldPerp solve(const FieldPerp &b, const FieldPerp &x0) override#

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

Input:

Parameters:
  • b[in] 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[in] Variable used to set BC (if the right flags are set, see the user manual)

Returns:

The inverted variable.

void setCoefA(const Field2D &val) = 0

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

inline void setCoefA(const Field3D &val)#
inline void setCoefA(BoutReal r)#
void setCoefC(const Field2D &val) = 0
inline void setCoefC(const Field3D &val)#
inline void setCoefC(BoutReal r)#
void setCoefD(const Field2D &val) = 0
inline void setCoefD(const Field3D &val)#
inline void setCoefD(BoutReal r)#
void setCoefEx(const Field2D &val) = 0
inline void setCoefEx(const Field3D &val)#
inline void setCoefEx(BoutReal r)#
void setCoefEz(const Field2D &val) = 0
inline void setCoefEz(const Field3D &val)#
inline void setCoefEz(BoutReal r)#
FieldPerp solve(const FieldPerp &b) = 0
Field3D solve(const Field3D &b)#
Field2D solve(const Field2D &b)#
inline FieldPerp solve(const FieldPerp &b, const FieldPerp &x0)
Field3D solve(const Field3D &b, const Field3D &x0)#

Performs the laplacian inversion y-slice by y-slice

Parameters:
  • b[in] All the y-slices of b_slice, which is the right hand side of the equation A*x_slice = b_slice

  • x0[in] All the y-slices of the variable eventually used to set BC

Returns:

x All the y-slices of x_slice in the equation A*x_slice = b_slice

Field2D solve(const Field2D &b, const Field2D &x0)#

Private Members

Field2D A#
Field2D C#
Field2D D#