File spt.hxx#
-
class LaplaceSPT : public Laplacian#
Simple parallelisation of the Thomas tridiagonal solver algorithm (serial code)
This is a reference code which performs the same operations as the serial code. To invert a single XZ slice (FieldPerp object), data must pass from the innermost processor (localmesh->PE_XIND = 0) to the outermost (localmesh->PE_XIND = localmesh->NXPE-1) and back again.
Some parallelism is achieved by running several inversions simultaneously, so while processor #1 is inverting Y=0, processor #0 is starting on Y=1. This works ok as long as the number of slices to be inverted is greater than the number of X processors (MYSUB > localmesh->NXPE). If MYSUB < localmesh->NXPE then not all processors can be busy at once, and so efficiency will fall sharply.
- Param b:
[in] RHS values (Ax = b)
- Param flags:
[in] Inversion settings (see boundary.h for values)
- Param a:
[in] This is a 2D matrix which allows solution of A = Delp2 + a
- Param data:
[out] Structure containing data needed for second half of inversion
- Param ccoef:
[in] Optional coefficient for first-order derivative
- Param d:
[in] Optional factor to multiply the Delp2 operator
Public Functions
-
LaplaceSPT(Options *opt = nullptr, const CELL_LOC = CELL_CENTRE, Mesh *mesh_in = nullptr, Solver *solver = nullptr)#
-
inline virtual void setCoefA(const Field2D &val) override#
Set coefficients for inversion. Re-builds matrices if necessary.
-
void setCoefA(const Field2D &val) = 0
Set coefficients for inversion. Re-builds matrices if necessary.
-
void setCoefC(const Field2D &val) = 0
-
void setCoefD(const Field2D &val) = 0
-
void setCoefEx(const Field2D &val) = 0
-
void setCoefEz(const Field2D &val) = 0
Private Functions
Private Static Attributes
-
static constexpr int SPT_DATA = 1123#
‘magic’ number for SPT MPI messages