|
MPI_jacsolve
|
#include <iostream>#include <cmath>#include <omp.h>#include "vdop.h"#include "getmatrix.h"#include "jacsolve.h"Functions | |
| void | JacobiSolve (const int nnode, const int id[], const int ik[], const float sk[], const float f[], float u[]) |
| void JacobiSolve | ( | const int | nnode, |
| const int | id[], | ||
| const int | ik[], | ||
| const float | sk[], | ||
| const float | f[], | ||
| float | 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 | number of nodes and number of rows |
| [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