DFT-EFE
 
Loading...
Searching...
No Matches
LinearSolverFunction.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2021. *
3 * The Regents of the University of Michigan and DFT-EFE developers. *
4 * *
5 * This file is part of the DFT-EFE code. *
6 * *
7 * DFT-EFE is free software: you can redistribute it and/or modify *
8 * it under the terms of the Lesser GNU General Public License as *
9 * published by the Free Software Foundation, either version 3 of *
10 * the License, or (at your option) any later version. *
11 * *
12 * DFT-EFE is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
15 * See the Lesser GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License at the top level of DFT-EFE distribution. If not, see *
19 * <https://www.gnu.org/licenses/>. *
20 ******************************************************************************/
21
22/*
23 * @author Bikash Kanungo
24 */
25
26#ifndef dftefeLinearSolverFunction_h
27#define dftefeLinearSolverFunction_h
28
29#include <utils/TypeConfig.h>
31#include <utils/MPITypes.h>
36
37namespace dftefe
38{
39 namespace linearAlgebra
40 {
63 template <typename ValueTypeOperator,
64 typename ValueTypeOperand,
65 utils::MemorySpace memorySpace>
66 class LinearSolverFunction
67 {
68 public:
75 using ValueType =
76 blasLapack::scalar_type<ValueTypeOperator, ValueTypeOperand>;
77
78 public:
79 virtual ~LinearSolverFunction() = default;
80
81 virtual const OperatorContext<ValueTypeOperator,
82 ValueTypeOperand,
83 memorySpace> &
84 getAxContext() const = 0;
85
86 virtual const OperatorContext<ValueTypeOperator,
87 ValueTypeOperand,
88 memorySpace> &
89 getPCContext() const = 0;
90
91 virtual void
92 setSolution(const MultiVector<ValueTypeOperand, memorySpace> &x) = 0;
93
94 virtual void
95 getSolution(
96 linearAlgebra::MultiVector<ValueType, memorySpace> &solution) = 0;
97
98 virtual const MultiVector<ValueTypeOperand, memorySpace> &
99 getRhs() const = 0;
100
101 virtual const MultiVector<ValueType, memorySpace> &
102 getInitialGuess() const = 0;
103
104 virtual const utils::mpi::MPIComm &
105 getMPIComm() const = 0;
106 }; // end of class LinearSolverFunction
107 } // end of namespace linearAlgebra
108} // end of namespace dftefe
109#endif // dftefeLinearSolverFunction_h
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31