Advanced Multi-Physics (AMP)
On-Line Documentation
DiagonalSolver.h
Go to the documentation of this file.
1#ifndef included_AMP_DiagonalSolver
2#define included_AMP_DiagonalSolver
3
4#include "AMP/solvers/SolverStrategy.h"
5#include "AMP/solvers/SolverStrategyParameters.h"
6#include "AMP/utils/AMP_MPI.h"
7
8#include <string>
9
10namespace AMP::Solver {
11
16template<typename T = double>
18{
19public:
23 DiagonalSolver() = default;
24
38 explicit DiagonalSolver( std::shared_ptr<SolverStrategyParameters> params );
39
45 static std::unique_ptr<SolverStrategy>
46 createSolver( std::shared_ptr<SolverStrategyParameters> params )
47 {
48 return std::make_unique<DiagonalSolver<T>>( params );
49 }
50
54 virtual ~DiagonalSolver() = default;
55
56 std::string type() const override { return "DiagonalSolver"; }
57
63 void apply( std::shared_ptr<const AMP::LinearAlgebra::Vector> f,
64 std::shared_ptr<AMP::LinearAlgebra::Vector> u ) override;
65
70 void initialize( std::shared_ptr<const SolverStrategyParameters> params ) override;
71
76 void registerOperator( std::shared_ptr<AMP::Operator::Operator> op ) override;
77
78protected:
79 void getFromInput( std::shared_ptr<AMP::Database> db );
80
81private:
82 bool d_bUsesNestedSolver = false;
83 std::shared_ptr<AMP::LinearAlgebra::Vector> d_pDiagonalInverse;
84};
85} // namespace AMP::Solver
86
87#endif
std::string type() const override
Return the name of the solver.
DiagonalSolver(std::shared_ptr< SolverStrategyParameters > params)
std::shared_ptr< AMP::LinearAlgebra::Vector > d_pDiagonalInverse
virtual ~DiagonalSolver()=default
void registerOperator(std::shared_ptr< AMP::Operator::Operator > op) override
void initialize(std::shared_ptr< const SolverStrategyParameters > params) override
void getFromInput(std::shared_ptr< AMP::Database > db)
void apply(std::shared_ptr< const AMP::LinearAlgebra::Vector > f, std::shared_ptr< AMP::LinearAlgebra::Vector > u) override
static std::unique_ptr< SolverStrategy > createSolver(std::shared_ptr< SolverStrategyParameters > params)
std::shared_ptr< AMP::Solver::SolverStrategy > shared_ptr



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:41.
Comments on this page