DFT-EFE
 
Loading...
Searching...
No Matches
CFEOverlapOperatorContext.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 dftefeCFEOverlapOperatorContext_h
27#define dftefeCFEOverlapOperatorContext_h
28
38#include <memory>
39
40namespace dftefe
41{
42 namespace basis
43 {
56 template <typename ValueTypeOperator,
57 typename ValueTypeOperand,
58 utils::MemorySpace memorySpace,
59 size_type dim>
61 : public linearAlgebra::
62 OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>
63 {
64 public:
71 using ValueType =
73 ValueTypeOperand>;
74
75 using Storage =
77
78 public:
83 const FEBasisManager<ValueTypeOperand,
84 ValueTypeOperator,
85 memorySpace,
86 dim> &feBasisManager,
88 & feBasisDataStorage,
89 const size_type maxCellTimesNumVecs);
90
92 const FEBasisManager<ValueTypeOperand,
93 ValueTypeOperator,
94 memorySpace,
95 dim> &feBasisManager,
97 &feBasisDataStorage,
99 linAlgOpContext);
100
101 // void
102 // apply(const linearAlgebra::Vector<ValueTypeOperand, memorySpace> &x,
103 // linearAlgberba::Vector<ValueType, memorySpace> &y) const
104 // override;
105
106 void
107 apply(
110
111 // get overlap of two basis functions in a cell
112 Storage
113 getBasisOverlap(const size_type cellId,
114 const size_type basisId1,
115 const size_type basisId2) const;
116
117 // get overlap of all the basis functions in a cell
118 Storage
119 getBasisOverlapInCell(const size_type cellId) const;
120
121 // get overlap of all the basis functions in all cells
122 const Storage &
124
125 private:
126 const FEBasisManager<ValueTypeOperand,
127 ValueTypeOperator,
128 memorySpace,
130 std::shared_ptr<Storage> d_basisOverlap;
131 std::vector<size_type> d_cellStartIdsBasisOverlap;
132 std::vector<size_type> d_dofsInCell;
134
136 std::shared_ptr<linearAlgebra::Vector<ValueTypeOperator, memorySpace>>
138
139 }; // end of class CFEOverlapOperatorContext
140 } // end of namespace basis
141} // end of namespace dftefe
143#endif // dftefeCFEOverlapOperatorContext_h
A derived class of linearAlgebra::OperatorContext to encapsulate the action of a discrete operator on...
Definition: CFEOverlapOperatorContext.h:63
const size_type d_maxCellTimesNumVecs
Definition: CFEOverlapOperatorContext.h:133
const FEBasisManager< ValueTypeOperand, ValueTypeOperator, memorySpace, dim > * d_feBasisManager
Definition: CFEOverlapOperatorContext.h:129
std::shared_ptr< Storage > d_basisOverlap
Definition: CFEOverlapOperatorContext.h:130
const Storage & getBasisOverlapInAllCells() const
Definition: CFEOverlapOperatorContext.t.cpp:593
bool d_isMassLumping
Definition: CFEOverlapOperatorContext.h:135
Storage getBasisOverlap(const size_type cellId, const size_type basisId1, const size_type basisId2) const
Definition: CFEOverlapOperatorContext.t.cpp:629
std::vector< size_type > d_dofsInCell
Definition: CFEOverlapOperatorContext.h:132
void apply(linearAlgebra::MultiVector< ValueTypeOperand, memorySpace > &X, linearAlgebra::MultiVector< ValueType, memorySpace > &Y) const override
Definition: CFEOverlapOperatorContext.t.cpp:489
Storage getBasisOverlapInCell(const size_type cellId) const
Definition: CFEOverlapOperatorContext.t.cpp:606
std::vector< size_type > d_cellStartIdsBasisOverlap
Definition: CFEOverlapOperatorContext.h:131
std::shared_ptr< linearAlgebra::Vector< ValueTypeOperator, memorySpace > > d_diagonal
Definition: CFEOverlapOperatorContext.h:137
linearAlgebra::blasLapack::scalar_type< ValueTypeOperator, ValueTypeOperand > ValueType
define ValueType as the superior (bigger set) of the ValueTypeOperator and ValueTypeOperand (e....
Definition: CFEOverlapOperatorContext.h:73
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
Definition: LinAlgOpContext.h:38
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