Example which build a distributed laplacian and solves the system using Murge interface.
This example is independant of the Murged solver used.
The solved problem is very simple :
2 -1 0 0 ... 0 x_0 1 -1 2 -1 0 ... 0 x_1 1 .... x . = . 0 ... 2 -1 0 . . 0 ... -1 2 -1 . . 0 ... 0 -1 2 x_n 1
M. FAVERGE, J. GAIDAMOUR, P. HENON , X. LACOSTE
|murge-dist||Example which build a distributed laplacian and solves the system using Murge interface.|
|MIN||Compute the minimum of two values.|
|MURGE_CALL||Execute call fonction and test the return value.|
|DIAG_VALUE||The value of the diagonal elements of the matrix|
|EXTRA_DIAG_VALUE||The value of the extra diagonal elements of the matrix.|
|main||Main function of murge-dist example, solving laplacian.|
Main function of murge-dist example, solving laplacian.
Initialize MURGE and default solver options,
Set the right hand side member using MURGE_SetLocalRHS.
Solve the problem and get the local solution using MURGE_GetLocalSolution.
INTS MURGE_GraphBegin( INTS id, INTS N, INTL edgenbr )
INTS MURGE_GraphEdge ( INTS id, INTS ROW, INTS COL )
INTS MURGE_GraphEnd ( INTS id )
INTS MURGE_GetLocalUnknownNbr ( INTS id, INTS * unkownnbr )
INTS MURGE_GetLocalUnknownList( INTS id, INTS * unkownlist )
Check that preprocessing has been performed, if not performs it.
INTS MURGE_AssemblyBegin( INTS id, INTL coefnbr, INTS op, INTS op2, INTS mode, INTS sym )
INTS MURGE_AssemblySetValue ( INTS id, INTS ROW, INTS COL, COEF value )
We have on each proc a part of the matrix in two structure, one containing nodes to add to the CSCd the other containing simple values.
INTS MURGE_AssemblyEnd( INTS id )
INTS MURGE_SetLocalRHS ( INTS id, COEF * b, INTS op, INTS op2 )
INTS MURGE_GetLocalSolution ( INTS id, COEF * x )