DFT-EFE
 
Loading...
Searching...
No Matches
PristineEFEOverlapOperatorContext.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 Avirup Sircar
24 */
25
26#ifndef dftefeEFEOverlapOperatorContext_h
27#define dftefeEFEOverlapOperatorContext_h
28
41#include <memory>
42
43namespace dftefe
44{
45 namespace basis
46 {
60 template <typename ValueTypeOperator,
61 typename ValueTypeOperand,
62 utils::MemorySpace memorySpace,
63 size_type dim>
65 : public linearAlgebra::
66 OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>
67 {
68 public:
75 using ValueType =
77 ValueTypeOperand>;
78
79 using Storage =
81
82 public:
92 const FEBasisManager<ValueTypeOperand,
93 ValueTypeOperator,
94 memorySpace,
95 dim> &feBasisManagerX,
96 const FEBasisManager<ValueTypeOperand,
97 ValueTypeOperator,
98 memorySpace,
99 dim> &feBasisManagerY,
101 & feBasisDataStorage,
102 const size_type maxCellTimesNumVecs);
103
117 const FEBasisManager<ValueTypeOperand,
118 ValueTypeOperator,
119 memorySpace,
120 dim> &feBasisManagerX,
121 const FEBasisManager<ValueTypeOperand,
122 ValueTypeOperator,
123 memorySpace,
124 dim> &feBasisManagerY,
126 &cfeBasisDataStorage,
128 & efeBasisDataStorage,
129 const size_type maxCellTimesNumVecs);
130
134 void
135 apply(
138
139 // get overlap of two basis functions in a cell
140 Storage
141 getBasisOverlap(const size_type cellId,
142 const size_type basisId1,
143 const size_type basisId2) const;
144
145 // get overlap of all the basis functions in a cell
146 Storage
147 getBasisOverlapInCell(const size_type cellId) const;
148
149 // get overlap of all the basis functions in all cells
150 const Storage &
152
153
154 private:
155 const FEBasisManager<ValueTypeOperand,
156 ValueTypeOperator,
157 memorySpace,
159 const FEBasisManager<ValueTypeOperand,
160 ValueTypeOperator,
161 memorySpace,
163 std::shared_ptr<Storage> d_basisOverlap;
164 std::vector<size_type> d_cellStartIdsBasisOverlap;
165 std::vector<size_type> d_dofsInCell;
167 }; // end of class PristineEFEOverlapOperatorContext
168 } // end of namespace basis
169} // end of namespace dftefe
171#endif // dftefeEFEOverlapOperatorContext_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::OperatorContext to encapsulate the action of a discrete operator on...
Definition: PristineEFEOverlapOperatorContext.h:67
const size_type d_maxCellTimesNumVecs
Definition: PristineEFEOverlapOperatorContext.h:166
Storage getBasisOverlap(const size_type cellId, const size_type basisId1, const size_type basisId2) const
Definition: PristineEFEOverlapOperatorContext.t.cpp:763
void apply(linearAlgebra::MultiVector< ValueTypeOperand, memorySpace > &X, linearAlgebra::MultiVector< ValueType, memorySpace > &Y) const override
Apply AX = B where A is the discretized matrix, X is the operand and B is the result.
Definition: PristineEFEOverlapOperatorContext.t.cpp:650
const FEBasisManager< ValueTypeOperand, ValueTypeOperator, memorySpace, dim > * d_feBasisManagerX
Definition: PristineEFEOverlapOperatorContext.h:158
linearAlgebra::blasLapack::scalar_type< ValueTypeOperator, ValueTypeOperand > ValueType
define ValueType as the superior (bigger set) of the ValueTypeOperator and ValueTypeOperand (e....
Definition: PristineEFEOverlapOperatorContext.h:77
std::vector< size_type > d_dofsInCell
Definition: PristineEFEOverlapOperatorContext.h:165
const FEBasisManager< ValueTypeOperand, ValueTypeOperator, memorySpace, dim > * d_feBasisManagerY
Definition: PristineEFEOverlapOperatorContext.h:162
std::vector< size_type > d_cellStartIdsBasisOverlap
Definition: PristineEFEOverlapOperatorContext.h:164
std::shared_ptr< Storage > d_basisOverlap
Definition: PristineEFEOverlapOperatorContext.h:163
Storage getBasisOverlapInCell(const size_type cellId) const
Definition: PristineEFEOverlapOperatorContext.t.cpp:740
const Storage & getBasisOverlapInAllCells() const
Definition: PristineEFEOverlapOperatorContext.t.cpp:726
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition: MultiVector.h:134
blas::scalar_type< ValueType1, ValueType2 > scalar_type
Definition: BlasLapackTypedef.h:70
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8