DFT-EFE
 
Loading...
Searching...
No Matches
PoissonLinearSolverFunctionFE.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 dftefePoissonLinearSolverFunctionFE_h
27#define dftefePoissonLinearSolverFunctionFE_h
28
29#include <utils/TypeConfig.h>
41#include <vector>
42#include <memory>
43
44namespace dftefe
45{
46 namespace electrostatics
47 {
69 template <typename ValueTypeOperator,
70 typename ValueTypeOperand,
71 utils::MemorySpace memorySpace,
72 size_type dim>
74 : public linearAlgebra::
75 LinearSolverFunction<ValueTypeOperator, ValueTypeOperand, memorySpace>
76 {
77 public:
84 using ValueType =
86 ValueTypeOperand>;
87
88 public:
93 std::shared_ptr<const basis::FEBasisManager<ValueTypeOperand,
94 ValueTypeOperator,
95 memorySpace,
96 dim>> feBasisManagerField,
97 std::shared_ptr<
99 feBasisDataStorageStiffnessMatrix,
100 std::shared_ptr<
102 feBasisDataStorageRhs,
104 & inpRhs,
107 linAlgOpContext,
108 const size_type maxCellTimesNumVecs);
109
110 void
111 reinit(
112 std::shared_ptr<const basis::FEBasisManager<ValueTypeOperand,
113 ValueTypeOperator,
114 memorySpace,
115 dim>> feBasisManagerField,
116 std::shared_ptr<
118 feBasisDataStorageRhs,
120 &inpRhs);
121
123
124 const linearAlgebra::
125 OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace> &
126 getAxContext() const override;
127
128 const linearAlgebra::
129 OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace> &
130 getPCContext() const override;
131
132 void
135
136 void
139
141 getRhs() const override;
142
144 getInitialGuess() const override;
145
146 const utils::mpi::MPIComm &
147 getMPIComm() const override;
148
149 private:
151 std::shared_ptr<
152 const basis::
153 FEBasisManager<ValueTypeOperand, ValueTypeOperator, memorySpace, dim>>
155 std::shared_ptr<
156 const basis::
157 FEBasisManager<ValueTypeOperand, ValueTypeOperator, memorySpace, dim>>
159 std::shared_ptr<const linearAlgebra::OperatorContext<ValueTypeOperator,
160 ValueTypeOperand,
161 memorySpace>>
163 std::shared_ptr<const linearAlgebra::OperatorContext<ValueTypeOperator,
164 ValueTypeOperand,
165 memorySpace>>
167 std::shared_ptr<const linearAlgebra::OperatorContext<ValueTypeOperator,
168 ValueTypeOperand,
169 memorySpace>>
177 std::shared_ptr<linearAlgebra::LinAlgOpContext<memorySpace>>
180 std::shared_ptr<
183 std::shared_ptr<
186
187 }; // end of class PoissonLinearSolverFunctionFE
188 } // namespace electrostatics
189} // end of namespace dftefe
191#endif // dftefePoissonLinearSolverFunctionFE_h
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 Poisson partial differentia...
Definition: PoissonLinearSolverFunctionFE.h:76
size_type d_numComponents
Definition: PoissonLinearSolverFunctionFE.h:150
const utils::mpi::MPIComm & getMPIComm() const override
Definition: PoissonLinearSolverFunctionFE.t.cpp:486
void getSolution(linearAlgebra::MultiVector< ValueType, memorySpace > &solution) override
Definition: PoissonLinearSolverFunctionFE.t.cpp:425
linearAlgebra::MultiVector< ValueTypeOperand, memorySpace > d_fieldInHomoDBCVec
Definition: PoissonLinearSolverFunctionFE.h:176
void setSolution(const linearAlgebra::MultiVector< ValueType, memorySpace > &x) override
Definition: PoissonLinearSolverFunctionFE.t.cpp:408
linearAlgebra::MultiVector< ValueType, memorySpace > d_b
Definition: PoissonLinearSolverFunctionFE.h:173
std::shared_ptr< const linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > > d_PCContext
Definition: PoissonLinearSolverFunctionFE.h:170
linearAlgebra::PreconditionerType d_pcType
Definition: PoissonLinearSolverFunctionFE.h:171
const linearAlgebra::MultiVector< ValueType, memorySpace > & getInitialGuess() const override
Definition: PoissonLinearSolverFunctionFE.t.cpp:473
void reinit(std::shared_ptr< const basis::FEBasisManager< ValueTypeOperand, ValueTypeOperator, memorySpace, dim > > feBasisManagerField, std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeOperator, memorySpace > > feBasisDataStorageRhs, const quadrature::QuadratureValuesContainer< ValueType, memorySpace > &inpRhs)
Definition: PoissonLinearSolverFunctionFE.t.cpp:274
const size_type d_maxCellTimesNumVecs
Definition: PoissonLinearSolverFunctionFE.h:179
linearAlgebra::MultiVector< ValueType, memorySpace > d_initial
Definition: PoissonLinearSolverFunctionFE.h:174
linearAlgebra::MultiVector< ValueType, memorySpace > d_x
Definition: PoissonLinearSolverFunctionFE.h:172
const linearAlgebra::MultiVector< ValueTypeOperand, memorySpace > & getRhs() const override
Definition: PoissonLinearSolverFunctionFE.t.cpp:457
std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeOperator, memorySpace > > d_feBasisDataStorageRhs
Definition: PoissonLinearSolverFunctionFE.h:185
linearAlgebra::blasLapack::scalar_type< ValueTypeOperator, ValueTypeOperand > ValueType
define ValueType as the superior (bigger set) of the ValueTypeOperator and ValueTypeOperand (e....
Definition: PoissonLinearSolverFunctionFE.h:86
std::shared_ptr< const linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > > d_AxContext
Definition: PoissonLinearSolverFunctionFE.h:162
std::shared_ptr< const basis::FEBasisManager< ValueTypeOperand, ValueTypeOperator, memorySpace, dim > > d_feBasisManagerHomo
Definition: PoissonLinearSolverFunctionFE.h:158
std::shared_ptr< const basis::FEBasisManager< ValueTypeOperand, ValueTypeOperator, memorySpace, dim > > d_feBasisManagerField
Definition: PoissonLinearSolverFunctionFE.h:154
std::shared_ptr< linearAlgebra::LinAlgOpContext< memorySpace > > d_linAlgOpContext
Definition: PoissonLinearSolverFunctionFE.h:178
const linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > & getPCContext() const override
Definition: PoissonLinearSolverFunctionFE.t.cpp:394
std::shared_ptr< const linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > > d_AxContextNHDB
Definition: PoissonLinearSolverFunctionFE.h:166
const linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > & getAxContext() const override
Definition: PoissonLinearSolverFunctionFE.t.cpp:380
std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeOperator, memorySpace > > d_feBasisDataStorageStiffnessMatrix
Definition: PoissonLinearSolverFunctionFE.h:182
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