MPI_jacsolve
 All Files Functions
Functions
jacsolve.cpp File Reference
#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 double sk[], const double f[], double u[])
 

Function Documentation

void JacobiSolve ( const int  nnode,
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]nnodenumber of nodes and number of rows
[in]skvector non-zero entries of CSR matrix
[in]idindex vector containing the last entry in a CSR row
[in]ikcolumn index vector of CSR matrix
[in]fdistributed local vector storing the right hand side
[out]uaccumulated local vector storing the solution.