|
MPI_jacsolve
|
#include <iostream>#include <cmath>#include <mpi.h>#include "vdop.h"#include "getmatrix.h"#include "vecaccu.h"#include "accudiag.h"#include "skalar.h"#include "debugd.h"Functions | |
| 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.
| [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. |
1.8.11