MPI_mgparc
|
Functions | |
void | JacobiSmooth (const int nx, const int ny, const int neigh[], const int color, const int myid, const MPI::Intracomm &icomm, const double sk[], const int id[], const int ik[], const double f[], double u[], const double dd[], double aux[], const int maxiter) |
void | JacobiSolveGlob (const int myid, const MPI::Intracomm &icomm, const int nloc, const int nglob, const double csk[], const int cid[], const int cik[], const int l2g[], const double f[], double u[]) |
void JacobiSmooth | ( | const int | nx, |
const int | ny, | ||
const int | neigh[], | ||
const int | color, | ||
const int | myid, | ||
const MPI::Intracomm & | icomm, | ||
const double | sk[], | ||
const int | id[], | ||
const int | ik[], | ||
const double | f[], | ||
double | u[], | ||
const double | dd[], | ||
double | aux[], | ||
const int | maxiter | ||
) |
Iterates maxiter
with the linear system of equations K u
= f
via the Jacobi iteration. We use a distributed symmetric CSR matrix K(sk
,id
, ik
).
[in] | nx | number of discretization intervals in x-direction |
[in] | ny | number of discretization intervals in y-direction |
[in] | neigh | vector of 4 elements containing the ranks of neighbouring processes, -1 indicates a boundary in this direction |
[in] | color | red/black coloring of subdomains (0/1) |
[in] | myid | rank of my process |
[in] | icomm | communicator |
[in] | sk | vector non-zero entries of CSR matrix |
[in] | id | index vector containing the last entry in a CSR row |
[in] | ik | column index vector of CSR matrix |
[in] | f | distributed local vector storing the right hand side |
[in,out] | u | accumulated local vector storing the solution. |
[in] | dd | accumualted diagonal of striffness matrix |
[out] | aux | auxilliary vector used for the intermediate residuum in the iteration |
[in] | maxiter | number of iterations / smoothing weeps |
void JacobiSolveGlob | ( | const int | myid, |
const MPI::Intracomm & | icomm, | ||
const int | nnode, | ||
const int | nglob, | ||
const double | sk[], | ||
const int | id[], | ||
const int | ik[], | ||
const int | l2g[], | ||
const double | f[], | ||
double | u[] | ||
) |
Solves the global parallel system with Jacobi iterations until a predefined accuracy is reached. We use a distributed symmetric CSR matrix K(sk
,id
, ik
).
[in] | myid | rank of my process |
[in] | icomm | communicator |
[in] | nloc | local number of unknowns |
[in] | nglob | global number of unknowns |
[in] | sk | vector non-zero entries of CSR matrix |
[in] | id | index vector containing the last entry in a CSR row |
[in] | ik | column index vector of CSR matrix |
[in] | l2g | index vector containing global indices of local degrees of freedom |
[in] | f | distributed local vector storing the right hand side |
[out] | u | accumulated local vector storing the solution. |