File pcr_thomas.hxx#
Perpendicular Laplacian inversion. Parallel code using FFT and tridiagonal solver.
-
class LaplacePCR_THOMAS : public Laplacian#
Public Functions
-
LaplacePCR_THOMAS(Options *opt = nullptr, CELL_LOC loc = CELL_CENTRE, Mesh *mesh_in = nullptr, Solver *solver = nullptr)#
-
~LaplacePCR_THOMAS() = default#
-
inline virtual void setCoefA(const Field2D &val) override#
Set coefficients for inversion. Re-builds matrices if necessary.
-
void cr_solver(double *a_mpi, double *b_mpi, double *c_mpi, double *r_mpi, double *x_mpi)#
-
void cr_pcr_solver(Matrix<dcomplex> &a_mpi, Matrix<dcomplex> &b_mpi, Matrix<dcomplex> &c_mpi, Matrix<dcomplex> &r_mpi, Matrix<dcomplex> &x_mpi)#
-
void pcr_thomas_solver(Matrix<dcomplex> &a_mpi, Matrix<dcomplex> &b_mpi, Matrix<dcomplex> &c_mpi, Matrix<dcomplex> &r_mpi, Matrix<dcomplex> &x_mpi)#
-
void Thomas_pcr_solver(double *a_mpi, double *b_mpi, double *c_mpi, double *r_mpi, double *x_mpi)#
-
void verify_solution(double *a_ver, double *b_ver, double *c_ver, double *r_ver, double *x_sol)#
-
void setCoefA(const Field2D &val) = 0
Set coefficients for inversion. Re-builds matrices if necessary.
-
void setCoefC(const Field2D &val) = 0
-
inline void setCoefC1(const Field2D &val)
-
inline void setCoefC2(const Field2D &val)
-
void setCoefD(const Field2D &val) = 0
-
void setCoefEx(const Field2D &val) = 0
-
void setCoefEz(const Field2D &val) = 0
Private Functions
-
void cr_forward_multiple_row(Matrix<dcomplex> &a, Matrix<dcomplex> &b, Matrix<dcomplex> &c, Matrix<dcomplex> &r) const#
-
void cr_backward_multiple_row(Matrix<dcomplex> &a, Matrix<dcomplex> &b, Matrix<dcomplex> &c, Matrix<dcomplex> &r, Matrix<dcomplex> &x) const#
-
void apply_boundary_conditions(const Matrix<dcomplex> &a, const Matrix<dcomplex> &b, const Matrix<dcomplex> &c, const Matrix<dcomplex> &r, Matrix<dcomplex> &x)#
-
void eliminate_boundary_rows(const Matrix<dcomplex> &a, Matrix<dcomplex> &b, const Matrix<dcomplex> &c, Matrix<dcomplex> &r)#
-
void cr_forward_single_row()#
-
void cr_backward_single_row()#
-
void pcr_forward_single_row(Matrix<dcomplex> &a, Matrix<dcomplex> &b, Matrix<dcomplex> &c, Matrix<dcomplex> &r, Matrix<dcomplex> &x) const#
-
void pThomas_forward_multiple_row(Matrix<dcomplex> &a, Matrix<dcomplex> &b, Matrix<dcomplex> &c, Matrix<dcomplex> &r) const#
Private Members
-
int n_mpi#
Number of rows per MPI process and should be 2^n.
-
int nprocs#
Number of MPI process and should be also 2^m.
-
int myrank#
MPI process ID.
-
int xproc#
MPI process x ID.
-
int nmode#
Number of unfiltered Fourier modes.
-
int nsys = {}#
Number of systems to solve = number of unfiltered Fourier modes times number of y points
-
int ncx#
Number of local x, y points.
-
int ny#
-
int ncalls = {0}#
Counter for the number of times the solver has been called.
-
int xs#
First and last interior points xstart, xend.
-
int xe#
-
bool dst = {false}#
-
LaplacePCR_THOMAS(Options *opt = nullptr, CELL_LOC loc = CELL_CENTRE, Mesh *mesh_in = nullptr, Solver *solver = nullptr)#