⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 petsclusolver.h

📁 Dolfin provide a high-performance linear algebra library
💻 H
字号:
// Copyright (C) 2005-2006 Anders Logg.// Licensed under the GNU LGPL Version 2.1.//// First added:  2005// Last changed: 2006-08-15#ifndef __PETSC_LU_SOLVER_H#define __PETSC_LU_SOLVER_H#ifdef HAVE_PETSC_H#include <dolfin/PETScLinearSolver.h>#include <dolfin/Parametrized.h>#include <dolfin/PETScManager.h>#include <dolfin/PETScVector.h>namespace dolfin{  /// Forward declarations  class PETScManager;  class PETScMatrix;  class PETScKrylovMatrix;  /// This class implements the direct solution (LU factorization) for  /// linear systems of the form Ax = b. It is a wrapper for the LU  /// solver of PETSc.    class PETScLUSolver : public PETScLinearSolver, public Parametrized  {  public:        /// Constructor    PETScLUSolver();    /// Destructor    ~PETScLUSolver();    /// Solve linear system Ax = b    uint solve(const PETScMatrix& A, PETScVector& x, const PETScVector& b);    /// Solve linear system Ax = b    uint solve(const PETScKrylovMatrix& A, PETScVector& x, const PETScVector& b);    /// Display LU solver data    void disp() const;  private:        // Create dense copy of virtual matrix    real copyToDense(const PETScKrylovMatrix& A);    KSP ksp;    Mat B;    int* idxm;    int* idxn;    PETScVector e;    PETScVector y;  };}#endif#endif

⌨️ 快捷键说明

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