OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Ifpack2Preconditioner.h
Go to the documentation of this file.
1//
2// Class Ifpack2Preconditioner
3// Interface to Ifpack2 preconditioners.
4//
5// Copyright (c) 2017 - 2020, Matthias Frey, Paul Scherrer Institut, Villigen PSI, Switzerland
6// All rights reserved
7//
8// Implemented as part of the PhD thesis
9// "Precise Simulations of Multibunches in High Intensity Cyclotrons"
10//
11// This file is part of OPAL.
12//
13// OPAL is free software: you can redistribute it and/or modify
14// it under the terms of the GNU General Public License as published by
15// the Free Software Foundation, either version 3 of the License, or
16// (at your option) any later version.
17//
18// You should have received a copy of the GNU General Public License
19// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
20//
21#ifndef IFPACK_2_PRECONDITIONER_H
22#define IFPACK_2_PRECONDITIONER_H
23
24#include "AmrPreconditioner.h"
25
26#include <Ifpack2_Factory.hpp>
27
28template <class Level>
29class Ifpack2Preconditioner : public AmrPreconditioner<amr::matrix_t, Level>
30{
31public:
39
40 typedef std::map<std::string, Preconditioner> map_t;
41
42public:
43
45
46 void create(const Teuchos::RCP<amr::matrix_t>& A, Level* level_p = nullptr);
47
48 Teuchos::RCP<amr::operator_t> get();
49
50 static void fillMap(map_t& map);
51
52private:
56 void init_m(Preconditioner prec);
57
58private:
60 std::string prectype_m;
61
63 Teuchos::RCP<Teuchos::ParameterList> params_mp;
64
65 Teuchos::RCP<precond_t> prec_mp;
66};
67
69
70#endif
long global_ordinal_t
KokkosClassic::DefaultNode::DefaultNodeType node_t
int local_ordinal_t
double scalar_t
Ifpack2::Preconditioner< amr::scalar_t, amr::local_ordinal_t, amr::global_ordinal_t, amr::node_t > precond_t
Ifpack2Preconditioner(Preconditioner prec)
void create(const Teuchos::RCP< amr::matrix_t > &A, Level *level_p=nullptr)
std::map< std::string, Preconditioner > map_t
std::string prectype_m
preconditioner type
Teuchos::RCP< Teuchos::ParameterList > params_mp
parameter list of preconditioner
amr::Preconditioner Preconditioner
Teuchos::RCP< precond_t > prec_mp
static void fillMap(map_t &map)
Teuchos::RCP< amr::operator_t> get()
void init_m(Preconditioner prec)