DFT-EFE
 
Loading...
Searching...
No Matches
L2ProjectionLinearSolverFunction.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 dftefeL2ProjectionLinearSolverFunction_h
27#define dftefeL2ProjectionLinearSolverFunction_h
28
29#include <utils/TypeConfig.h>
41#include <vector>
42#include <memory>
43
44namespace dftefe
45{
46 namespace basis
47 {
61 template <typename ValueTypeOperator,
62 typename ValueTypeOperand,
63 utils::MemorySpace memorySpace,
64 size_type dim>
66 : public linearAlgebra::
67 LinearSolverFunction<ValueTypeOperator, ValueTypeOperand, memorySpace>
68 {
69 public:
76 using ValueType =
78 ValueTypeOperand>;
79
80 public:
85 std::shared_ptr<const FEBasisManager<ValueTypeOperand,
86 ValueTypeOperator,
87 memorySpace,
88 dim>> cfeBasisManager,
89 std::shared_ptr<const CFEOverlapOperatorContext<ValueTypeOperator,
90 ValueTypeOperand,
91 memorySpace,
92 dim>>
93 cfeBasisDataStorageOverlapMatrix,
94 std::shared_ptr<
96 cfeBasisDataStorageRhs,
99 ValueTypeOperand>,
100 memorySpace> & inp,
103 linAlgOpContext,
104 const size_type maxCellTimesNumVecs);
105
106 const linearAlgebra::
107 OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace> &
108 getAxContext() const override;
109
110 const linearAlgebra::
111 OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace> &
112 getPCContext() const override;
113
114 void
117
118 void
121
123 getRhs() const override;
124
126 getInitialGuess() const override;
127
128 const utils::mpi::MPIComm &
129 getMPIComm() const override;
130
131 private:
132 std::shared_ptr<
133 const basis::
134 FEBasisManager<ValueTypeOperand, ValueTypeOperator, memorySpace, dim>>
136 std::shared_ptr<const CFEOverlapOperatorContext<ValueTypeOperator,
137 ValueTypeOperand,
138 memorySpace,
139 dim>>
141 std::shared_ptr<const linearAlgebra::OperatorContext<ValueTypeOperator,
142 ValueTypeOperand,
143 memorySpace>>
149 std::shared_ptr<const utils::mpi::MPIPatternP2P<memorySpace>>
151 }; // end of class L2ProjectionLinearSolverFunction
152 } // namespace basis
153} // end of namespace dftefe
155#endif // dftefeL2ProjectionLinearSolverFunction_h
A derived class of linearAlgebra::OperatorContext to encapsulate the action of a discrete operator on...
Definition: CFEOverlapOperatorContext.h:63
An abstract class to store and access data for a given basis, such as the basis function values on a ...
Definition: FEBasisDataStorage.h:53
An abstract class to encapsulate the partitioning of a finite element basis across multiple processor...
Definition: FEBasisManager.h:44
A derived class of linearAlgebra::LinearSolverFunction to encapsulate the L2 Projecton partial differ...
Definition: L2ProjectionLinearSolverFunction.h:68
std::shared_ptr< const utils::mpi::MPIPatternP2P< memorySpace > > d_mpiPatternP2P
Definition: L2ProjectionLinearSolverFunction.h:150
void setSolution(const linearAlgebra::MultiVector< ValueType, memorySpace > &x) override
Definition: L2ProjectionLinearSolverFunction.t.cpp:241
const linearAlgebra::MultiVector< ValueType, memorySpace > d_initial
Definition: L2ProjectionLinearSolverFunction.h:148
linearAlgebra::PreconditionerType d_pcType
Definition: L2ProjectionLinearSolverFunction.h:147
const utils::mpi::MPIComm & getMPIComm() const override
Definition: L2ProjectionLinearSolverFunction.t.cpp:317
const linearAlgebra::MultiVector< ValueType, memorySpace > & getInitialGuess() const override
Definition: L2ProjectionLinearSolverFunction.t.cpp:304
linearAlgebra::blasLapack::scalar_type< ValueTypeOperator, ValueTypeOperand > ValueType
define ValueType as the superior (bigger set) of the ValueTypeOperator and ValueTypeOperand (e....
Definition: L2ProjectionLinearSolverFunction.h:78
const linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > & getPCContext() const override
Definition: L2ProjectionLinearSolverFunction.t.cpp:227
std::shared_ptr< const CFEOverlapOperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace, dim > > d_AxContext
Definition: L2ProjectionLinearSolverFunction.h:140
const linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > & getAxContext() const override
Definition: L2ProjectionLinearSolverFunction.t.cpp:213
linearAlgebra::MultiVector< ValueType, memorySpace > d_b
Definition: L2ProjectionLinearSolverFunction.h:146
std::shared_ptr< const linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > > d_PCContext
Definition: L2ProjectionLinearSolverFunction.h:144
const linearAlgebra::MultiVector< ValueTypeOperand, memorySpace > & getRhs() const override
Definition: L2ProjectionLinearSolverFunction.t.cpp:288
void getSolution(linearAlgebra::MultiVector< ValueType, memorySpace > &solution) override
Definition: L2ProjectionLinearSolverFunction.t.cpp:258
linearAlgebra::MultiVector< ValueType, memorySpace > d_x
Definition: L2ProjectionLinearSolverFunction.h:145
std::shared_ptr< const basis::FEBasisManager< ValueTypeOperand, ValueTypeOperator, memorySpace, dim > > d_feBasisManager
Definition: L2ProjectionLinearSolverFunction.h:135
Definition: LinAlgOpContext.h:38
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition: MultiVector.h:134
Abstract class to encapsulate the action of a discrete operator on vectors, matrices,...
Definition: OperatorContext.h:51
Definition: QuadratureValuesContainer.h:39
blas::scalar_type< ValueType1, ValueType2 > scalar_type
Definition: BlasLapackTypedef.h:70
PreconditionerType
Definition: LinearAlgebraTypes.h:41
int MPIComm
Definition: MPITypes.h:83
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8