#include <mpi.h>
Go to the source code of this file.
|
| void | JacobiSolve (const int nnode, const int nx, const int ny, const int neigh[], const int color, const MPI::Intracomm &icomm, const int id[], const int ik[], const double sk[], const double f[], double u[]) |
| |
| void JacobiSolve |
( |
const int |
nnode, |
|
|
const int |
nx, |
|
|
const int |
ny, |
|
|
const int |
neigh[], |
|
|
const int |
color, |
|
|
const MPI::Intracomm & |
icomm, |
|
|
const int |
id[], |
|
|
const int |
ik[], |
|
|
const double |
sk[], |
|
|
const double |
f[], |
|
|
double |
u[] |
|
) |
| |
Solves linear system of equations K u = f via the Jacobi iteration. We use a distributed symmetric CSR matrix K(sk,id, ik) and initial guess of the solution is set to 0.
- Parameters
-
| [in] | nnode | local number of nodes and number of rows |
| [in] | nx | local number intervals in x-direction |
| [in] | ny | local number intervals in x-direction |
| [in] | neigh | neighbors in parallel |
| [in] | color | my color in parallel |
| [in] | icomm | MPI communicator |
| [in] | sk | vector non-zero entries of CSR matrix |
| [in] | id | index vector containing the first entry in a CSR row |
| [in] | ik | column index vector of CSR matrix |
| [in] | f | distributed local vector storing the right hand side |
| [out] | u | accumulated local vector storing the solution. |