00001
00002
00003
00004
00005
00006
00007
00008 #ifndef SRC_AMG_MKB_AMG_DIRECTSOLVER_HPP_
00009 #define SRC_AMG_MKB_AMG_DIRECTSOLVER_HPP_
00010
00011 #include "Smoother.hpp"
00012 #include <stdexcept>
00013 #include <petscksp.h>
00014
00015 class DirectSolver : public Smoother {
00016 public:
00017 DirectSolver();
00018 virtual void Smooth(Vec x, int global, int local);
00019 virtual void PreSmoothing(Mat matrix, Vec b);
00020 virtual void SetRhs(Vec rhs);
00021 virtual Vec GetResidual(Vec x);
00022 virtual ~DirectSolver();
00023 private:
00024 Mat matrix;
00025 Vec rhs;
00026 KSP ksp;
00027 };
00028
00029 #endif