Exemplo n.º 1
0
        public static int MatrixAssemble(LisMatrix A)
        {
            int ret = 0;

            unsafe
            {
                ret = IvyFEM.Lis.ImportedFunctions.lis_matrix_assemble(A.Native);
            }
            return(ret);
        }
Exemplo n.º 2
0
        public static int MatrixSetSize(LisMatrix A, int localN, int globalN)
        {
            int ret = 0;

            unsafe
            {
                ret = IvyFEM.Lis.ImportedFunctions.lis_matrix_set_size(A.Native, localN, globalN);
            }
            return(ret);
        }
Exemplo n.º 3
0
        /////////////////////////////////////////////////////////////////////////
        // Matrix-Vector Operations
        public static int Matvec(LisMatrix A, LisVector x, LisVector y)
        {
            int ret = 0;

            unsafe
            {
                ret = IvyFEM.Lis.ImportedFunctions.lis_matvec(A.Native, x.Native, y.Native);
            }
            return(ret);
        }
Exemplo n.º 4
0
        public static int Solve(LisMatrix A, LisVector b, LisVector x, LisSolver solver)
        {
            int ret = 0;

            unsafe
            {
                ret = IvyFEM.Lis.ImportedFunctions.lis_solve(A.Native, b.Native, x.Native, solver.Native);
            }
            return(ret);
        }
Exemplo n.º 5
0
        public static int MatrixSetType(LisMatrix A, MatrixType matrixType)
        {
            int ret = 0;

            unsafe
            {
                IvyFEM.Lis.ImportedFunctions.lis_matrix_set_type(A.Native, matrixType);
            }
            return(ret);
        }
Exemplo n.º 6
0
        public static int MatrixDestroy(LisMatrix A)
        {
            int ret = 0;

            unsafe
            {
                ret      = IvyFEM.Lis.ImportedFunctions.lis_matrix_destroy(A.Native);
                A.Native = null;
            }
            return(ret);
        }
Exemplo n.º 7
0
        public static int MatrixSetValueNew(
            SetValueFlag flag, int i, int j, LisScalar value, LisMatrix A)
        {
            int ret = 0;

            unsafe
            {
                ret = IvyFEM.Lis.ImportedFunctions.lis_matrix_set_value_new(
                    flag, i, j, value, A.Native);
            }
            return(ret);
        }
Exemplo n.º 8
0
        public static int MatrixGetType(LisMatrix A, out MatrixType matrixType)
        {
            int ret = 0;

            unsafe
            {
                fixed(MatrixType *matrixTypeP = &matrixType)
                {
                    ret = IvyFEM.Lis.ImportedFunctions.lis_matrix_get_type(A.Native, matrixTypeP);
                }
            }
            return(ret);
        }
Exemplo n.º 9
0
        /////////////////////////////////////////////////////////////////////////
        // Matrix Operations
        public static int MatrixCreate(int comm, LisMatrix A)
        {
            int ret = 0;

            unsafe
            {
                A.Native = null;
                fixed(NativeLisMatrix **nativeAPP = &A.Native)
                {
                    ret = IvyFEM.Lis.ImportedFunctions.lis_matrix_create(comm, nativeAPP);
                }
            }
            return(ret);
        }
Exemplo n.º 10
0
        public static int MatrixSetValues(
            SetValueFlag flag, int n, LisScalar[] values, LisMatrix A)
        {
            int ret = 0;

            unsafe
            {
                fixed(LisScalar *valuesP = &values[0])
                {
                    ret = IvyFEM.Lis.ImportedFunctions.lis_matrix_set_values(
                        flag, n, valuesP, A.Native);
                }
            }
            return(ret);
        }
Exemplo n.º 11
0
        public static int MatrixGetSize(LisMatrix A, out int localN, out int globalN)
        {
            int ret = 0;

            localN  = 0;
            globalN = 0;
            unsafe
            {
                fixed(int *localNP = &localN)
                fixed(int *globalNP = &globalN)
                {
                    ret = IvyFEM.Lis.ImportedFunctions.lis_matrix_get_size(A.Native, localNP, globalNP);
                }
            }
            return(ret);
        }
Exemplo n.º 12
0
        public static int MatrixGetRange(LisMatrix A, out int @is, out int ie)
        {
            int ret = 0;

            @is = 0;
            ie  = 0;
            unsafe
            {
                fixed(int *isP = & @is)
                fixed(int *ieP = &ie)
                {
                    ret = IvyFEM.Lis.ImportedFunctions.lis_matrix_get_range(A.Native, isP, ieP);
                }
            }
            return(ret);
        }
Exemplo n.º 13
0
 public static int Matvec(LisMatrix A, LisVector x, LisVector y)
 {
     return(IvyFEM.Lis.Functions.Matvec(A, x, y));
 }
Exemplo n.º 14
0
 public int Solve(LisMatrix A, LisVector b, LisVector x)
 {
     return(IvyFEM.Lis.Functions.Solve(A, b, x, this));
 }