MPI_jacsolve
Functions
jacsolve.cpp File Reference
#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[])
 

Function Documentation

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]nnodelocal number of nodes and number of rows
[in]nxlocal number intervals in x-direction
[in]nylocal number intervals in x-direction
[in]neighneighbors in parallel
[in]colormy color in parallel
[in]icommMPI communicator
[in]skvector non-zero entries of CSR matrix
[in]idindex vector containing the first 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.