krylovsolver.h

来自「Dolfin provide a high-performance linear」· C头文件 代码 · 共 50 行

H
50
字号
// Copyright (C) 2007 Garth N. Wells.// Licensed under the GNU LGPL Version 2.1.//// First added:  2007-07-03// Last changed: 2007-07-11#ifndef __KRYLOV_SOLVER_H#define __KRYLOV_SOLVER_H#include <dolfin/LinearSolver.h>#include <dolfin/Parametrized.h>#include <dolfin/Vector.h>#include <dolfin/Matrix.h>#include <dolfin/KrylovMethod.h>#include <dolfin/Preconditioner.h>#include <dolfin/default_la_types.h>namespace dolfin{  class KrylovSolver : public LinearSolver, public Parametrized  {    /// This class defines an interface for a Krylov solver. The underlying     /// Krylov solver type is defined in default_type.h.        public:      KrylovSolver() : solver() {}      KrylovSolver(KrylovMethod method) : solver(method, default_pc) {}      KrylovSolver(KrylovMethod method, Preconditioner pc)                   : solver(method, pc) {}      ~KrylovSolver() {}      inline uint solve(const Matrix& A, Vector& x, const Vector& b)        { return solver.solve(A.mat(), x.vec(), b.vec()); }    private:      DefaultKrylovSolver solver;  };}#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?