File cyclic_laplace.hxx

class LaplaceCyclic : public Laplacian
#include <cyclic_laplace.hxx>

Solves the 2D Laplacian equation using the CyclicReduce class.

Public Functions

LaplaceCyclic(Options *opt = nullptr, const CELL_LOC loc = CELL_CENTRE, Mesh *mesh_in = nullptr, Solver *solver = nullptr, Datafile *dump = nullptr)
~LaplaceCyclic()
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 setCoefC1(const Field2D &val) override
inline virtual void setCoefC2(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
inline virtual FieldPerp solve(const FieldPerp &b) override
virtual FieldPerp solve(const FieldPerp &b, const FieldPerp &x0) override
inline virtual Field3D solve(const Field3D &b) override
virtual Field3D solve(const Field3D &b, const Field3D &x0) override

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

void verify_solution(const Matrix<dcomplex> &a_ver, const Matrix<dcomplex> &b_ver, const Matrix<dcomplex> &c_ver, const Matrix<dcomplex> &r_ver, const Matrix<dcomplex> &x_sol, int nsys)

Private Members

Field2D Acoef
Field2D C1coef
Field2D C2coef
Field2D Dcoef
int nmode
int xs
int xe
Matrix<dcomplex> a
Matrix<dcomplex> b
Matrix<dcomplex> c
Matrix<dcomplex> bcmplx
Matrix<dcomplex> xcmplx
bool dst
CyclicReduce<dcomplex> *cr

Tridiagonal solver.