Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
        public static int SolverSetOptionC(LisSolver solver)
        {
            int ret = 0;

            unsafe
            {
                ret = IvyFEM.Lis.ImportedFunctions.lis_solver_set_optionC(solver.Native);
            }
            return(ret);
        }
Ejemplo n.º 3
0
        public static int SolverSetOption(string text, LisSolver solver)
        {
            int ret = 0;

            byte[] textBytes = System.Text.Encoding.UTF8.GetBytes(text);
            unsafe
            {
                ret = IvyFEM.Lis.ImportedFunctions.lis_solver_set_option(textBytes, solver.Native);
            }
            return(ret);
        }
Ejemplo n.º 4
0
        public static int SolverDestroy(LisSolver solver)
        {
            int ret = 0;

            unsafe
            {
                ret           = IvyFEM.Lis.ImportedFunctions.lis_solver_destroy(solver.Native);
                solver.Native = null;
            }
            return(ret);
        }
Ejemplo n.º 5
0
        /////////////////////////////////////////////////////////////////////////
        // Linear Solvers
        public static int SolverCreate(LisSolver solver)
        {
            int ret = 0;

            unsafe
            {
                solver.Native = null;

                fixed(NativeLisSolver **nativePP = &solver.Native)
                ret = IvyFEM.Lis.ImportedFunctions.lis_solver_create(nativePP);
            }
            return(ret);
        }
Ejemplo n.º 6
0
        public static int SolverGetIter(LisSolver solver, out int iter)
        {
            int ret = 0;

            iter = 0;
            unsafe
            {
                fixed(int *iterP = &iter)
                {
                    ret = IvyFEM.Lis.ImportedFunctions.lis_solver_get_iter(solver.Native, iterP);
                }
            }
            return(ret);
        }