Jacobi
Documentation for Jacobi Solver
Functions
jacobi_functions.c File Reference

This file is a part of the Jacobi solver for Laplace equation. More...

#include <stdio.h>
Include dependency graph for jacobi_functions.c:

Functions

void setBoundaryConditions (double *grid, double *gridNew, int dimension)
 
void update (double *grid, double *gridNew, int dimension)
 
void printOutput (double *grid, int dimension)
 

Detailed Description

This file is a part of the Jacobi solver for Laplace equation.

This file provides several routines for the solver of the Laplace equation using Jacobi iterative method on a square grid, given the boundary conditions

Author
Giuseppe Piero Brandino - eXact-lab s.r.l.

Function Documentation

◆ printOutput()

void printOutput ( double *  grid,
int  dimension 
)

Prints the output in text format

Parameters
[in]griddouble precision array containing the first grid buffer
[in]dimensionthe size of the system. The buffers should be of size (dimension + 2)^2

◆ setBoundaryConditions()

void setBoundaryConditions ( double *  grid,
double *  gridNew,
int  dimension 
)

Sets the boundary conditions on both the grid buffers

Parameters
[in]griddouble precision array containing the first grid buffer
[in]gridNewdouble precision array containing the second grid buffer
[in]dimensionthe size of the system. The buffers should be of size (dimension + 2)^2

◆ update()

void update ( double *  grid,
double *  gridNew,
int  dimension 
)

Performs one step of the Jacobi iteravite process

Parameters
[in]griddouble precision array containing the first grid buffer
[in]gridNewdouble precision array containing the second grid buffer
[in]dimensionthe size of the system. The buffers should be of size (dimension + 2)^2