Example which build a distributed laplacian and compute a product using Murge interface.
2 1 0 0 ... 0 1 4 1 2 1 0 ... 0 2 8 .... x . = . 0 ... 2 1 0 . . 0 ... 1 2 1 . . 0 ... 0 1 2 n .
X. LACOSTE
murge-product.c | Example which build a distributed laplacian and compute a product using Murge interface. |
Macros | |
Macros | |
MIN | Compute the minimum of two values. |
MURGE_CALL | Execute call fonction and test the return value. |
Defines | |
Macros | |
DIAG_VALUE | The value of the diagonal elements of the matrix |
LOWER_DIAG_VALUE | The value of the lower diagonal elements of the matrix. |
UPPER_DIAG_VALUE | The value of the upper diagonal elements of the matrix. |
Functions | |
main | Main function of <murge-product> example, solving laplacian. |
Macros | |
MIN | Compute the minimum of two values. |
MURGE_CALL | Execute call fonction and test the return value. |
Macros | |
DIAG_VALUE | The value of the diagonal elements of the matrix |
LOWER_DIAG_VALUE | The value of the lower diagonal elements of the matrix. |
UPPER_DIAG_VALUE | The value of the upper diagonal elements of the matrix. |
Main function of <murge-product> example, solving laplacian.
Initialize MURGE and default solver options,
Set the distribution using MURGE_ProductSetLocalNodeNbr and <MURGE_ProductSetetLocalNodeList>.
Fill the ditributed matrix, value by value using MURGE_AssemblyBegin, MURGE_AssemblySetValue and MURGE_AssemblyEnd.
Set the right hand side member using MURGE_SetLocalRHS.
Solve the problem and get the local solution using MURGE_GetLocalSolution.
INTS MURGE_ProductSetLocalNodeNbr ( INTS id, INTS n )
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 )