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

📄 directsolvers.tcc

📁 Flens库-一个在C++的矩阵运算库
💻 TCC
字号:
#include <iostream>#include <limits>namespace flens {//-- stationary iterative solver -----------------------------------------------template <typename Meth>StationaryIterativeSolver<Meth>::StationaryIterativeSolver(const MatrixType &_A,                                                           const VectorType &_f,                                                           VectorType &_u)    : S(_A, _f), A(_A), f(_f), u(_u), r(f){}template <typename Method>voidStationaryIterativeSolver<Method>::solve(){    double eps = std::numeric_limits<double>::epsilon();    r = f - A*u;    for (int i=1; (i<=5000) && (normL2(r)>eps); ++i) {        u = S*u;        r = f - A*u;    }}//-- fast poisson solver -------------------------------------------------------template <typename MatrixType, typename VectorType>FastPoissonSolver<MatrixType, VectorType>::~FastPoissonSolver(){    // fftw_destroy_plan(plan);}} // namespace flens

⌨️ 快捷键说明

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