Advanced Multi-Physics (AMP)
On-Line Documentation
UASolver.h
Go to the documentation of this file.
1#ifndef included_AMP_UAAMGSolver
2#define included_AMP_UAAMGSolver
3
4#include "AMP/solvers/SolverStrategy.h"
5#include "AMP/solvers/SolverStrategyParameters.h"
6#include "AMP/solvers/amg/Aggregation.h"
7#include "AMP/solvers/amg/Aggregator.h"
8#include "AMP/solvers/amg/Cycle.h"
9#include "AMP/solvers/amg/Relaxation.h"
10
11namespace AMP::Solver::AMG {
12
14 explicit UASolver( std::shared_ptr<SolverStrategyParameters> );
15 std::string type() const override { return "UASolver"; }
16
17 static std::unique_ptr<SolverStrategy>
18 createSolver( std::shared_ptr<SolverStrategyParameters> params )
19 {
20 return std::make_unique<UASolver>( params );
21 }
22
23 void setup();
24
25 void registerOperator( std::shared_ptr<AMP::Operator::Operator> ) override;
26 void getFromInput( std::shared_ptr<AMP::Database> );
27
28 void apply( std::shared_ptr<const AMP::LinearAlgebra::Vector> f,
29 std::shared_ptr<AMP::LinearAlgebra::Vector> u ) override;
30
31private:
32 coarse_ops_type coarsen( std::shared_ptr<Operator::LinearOperator> A,
34 std::shared_ptr<Operator::OperatorParameters> );
35 static std::unique_ptr<SolverStrategy>
37 std::shared_ptr<AMP::Operator::LinearOperator> A,
38 std::shared_ptr<RelaxationParameters> params );
49 std::shared_ptr<Aggregator> d_aggregator;
51 std::vector<KCycleLevel> d_levels;
52 std::shared_ptr<RelaxationParameters> d_pre_relax_params;
53 std::shared_ptr<RelaxationParameters> d_post_relax_params;
54 std::shared_ptr<SolverStrategyParameters> d_coarse_solver_params;
55 std::unique_ptr<SolverStrategy> d_coarse_solver;
56};
57
58} // namespace AMP::Solver::AMG
59
60#endif
std::shared_ptr< AMP::Solver::SolverStrategy > shared_ptr
std::tuple< std::shared_ptr< AMP::Operator::Operator >, std::shared_ptr< AMP::Operator::LinearOperator >, std::shared_ptr< AMP::Operator::Operator > > coarse_ops_type
Definition Aggregation.h:14
MemoryType
Enum to store pointer type.
Definition Memory.h:21
Settings for the Kappa K-cycle.
Definition Cycle.h:84
std::shared_ptr< RelaxationParameters > d_post_relax_params
Definition UASolver.h:53
KappaKCycle::settings d_cycle_settings
Definition UASolver.h:46
void registerOperator(std::shared_ptr< AMP::Operator::Operator >) override
std::unique_ptr< SolverStrategy > d_coarse_solver
Definition UASolver.h:55
Utilities::MemoryType d_mem_loc
Definition UASolver.h:48
static std::unique_ptr< SolverStrategy > createSolver(std::shared_ptr< SolverStrategyParameters > params)
Definition UASolver.h:18
std::string type() const override
Return the name of the solver.
Definition UASolver.h:15
void getFromInput(std::shared_ptr< AMP::Database >)
std::shared_ptr< SolverStrategyParameters > d_coarse_solver_params
Definition UASolver.h:54
std::shared_ptr< RelaxationParameters > d_pre_relax_params
Definition UASolver.h:52
static std::unique_ptr< SolverStrategy > create_relaxation(size_t lvl, std::shared_ptr< AMP::Operator::LinearOperator > A, std::shared_ptr< RelaxationParameters > params)
PairwiseCoarsenSettings d_coarsen_settings
Definition UASolver.h:50
std::vector< KCycleLevel > d_levels
Definition UASolver.h:51
coarse_ops_type coarsen(std::shared_ptr< Operator::LinearOperator > A, const PairwiseCoarsenSettings &, std::shared_ptr< Operator::OperatorParameters >)
std::shared_ptr< Aggregator > d_aggregator
Definition UASolver.h:49
UASolver(std::shared_ptr< SolverStrategyParameters >)
void apply(std::shared_ptr< const AMP::LinearAlgebra::Vector > f, std::shared_ptr< AMP::LinearAlgebra::Vector > u) override



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