DFT-EFE
 
Loading...
Searching...
No Matches
FEBasisDataStorage.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, Vishal Subramanian
24 */
25
26#ifndef dftefeFEBasisDataStorage_h
27#define dftefeFEBasisDataStorage_h
28
29#include <utils/TypeConfig.h>
31#include <utils/MemoryStorage.h>
38#include <deal.II/matrix_free/matrix_free.h>
39#include <memory>
40#include <map>
41#include <vector>
42namespace dftefe
43{
44 namespace basis
45 {
51 template <typename ValueTypeBasisData, utils::MemorySpace memorySpace>
53 : public BasisDataStorage<ValueTypeBasisData, memorySpace>
54 {
55 public:
58 using Storage =
60
61
62 virtual std::shared_ptr<const BasisDofHandler>
63 getBasisDofHandler() const = 0;
64
65 virtual void
67 const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes,
68 const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap) = 0;
69
70 virtual void
72 const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes,
73 std::shared_ptr<const quadrature::QuadratureRuleContainer>
74 quadratureRuleContainer,
75 const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap) = 0;
76
77 virtual void
79 const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes,
80 std::vector<std::shared_ptr<const quadrature::QuadratureRule>>
81 quadratureRuleVec,
82 const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap) = 0;
83
84 virtual void
86 const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes,
87 std::shared_ptr<const quadrature::QuadratureRule>
88 baseQuadratureRuleAdaptive,
89 std::vector<std::shared_ptr<const utils::ScalarSpatialFunctionReal>>
90 & functions,
91 const std::vector<double> & absoluteTolerances,
92 const std::vector<double> & relativeTolerances,
93 const std::vector<double> & integralThresholds,
94 const double smallestCellVolume,
95 const unsigned int maxRecursion,
96 const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap) = 0;
97
98 virtual void
100
101
102
103 // std::shared_ptr<const quadrature::QuadratureRuleContainer>
104 // getCellQuadratureRuleContainer(std::shared_ptr<Storage>>
105 // const QuadratureRuleAttributes &quadratureRuleAttributes) const
106 // override;
107 // functions to get data for a basis function on a given quad point in a
108 // cell
109 virtual Storage
111 const size_type basisId) const = 0;
112 virtual Storage
114 const size_type basisId) const = 0;
115 virtual Storage
117 const size_type basisId) const = 0;
118
119 // functions to get data for a basis function on all quad points in a cell
120 virtual Storage
122 const size_type basisId) const = 0;
123 virtual Storage
125 const size_type basisId) const = 0;
126 virtual Storage
128 const size_type basisId) const = 0;
129
130 // functions to get data for all basis functions on all quad points in a
131 // cell
132 virtual Storage
133 getBasisDataInCell(const size_type cellId) const = 0;
134 virtual Storage
135 getBasisGradientDataInCell(const size_type cellId) const = 0;
136 virtual Storage
137 getBasisHessianDataInCell(const size_type cellId) const = 0;
138
139 virtual Storage
140 getJxWInCell(const size_type cellId) const = 0;
141
142 // functions to get data for all basis functions on all quad points in all
143 // cells
144 virtual const Storage &
146 virtual const Storage &
148 virtual const Storage &
150
151 virtual const Storage &
152 getJxWInAllCells() const = 0;
153
154 // get overlap of two basis functions in a cell
155 virtual Storage
157 const size_type basisId1,
158 const size_type basisId2) const = 0;
159
160 // get overlap of all the basis functions in a cell
161 virtual Storage
162 getBasisOverlapInCell(const size_type cellId) const = 0;
163
164 // get the laplace operator in a cell
165 virtual Storage
166 getBasisGradNiGradNjInCell(const size_type cellId) const = 0;
167
168 // get laplace operator in all cells
169 virtual const Storage &
171
172 // get overlap of all the basis functions in all cells
173 virtual const Storage &
175
176 virtual std::shared_ptr<const quadrature::QuadratureRuleContainer>
178
179 // functions to get data for basis functions on all quad points in range
180 // of cells
181 virtual void
182 getBasisDataInCellRange(std::pair<size_type, size_type> cellRange,
183 Storage &basisData) const = 0;
184 virtual void
185 getBasisGradientDataInCellRange(std::pair<size_type, size_type> cellRange,
186 Storage &basisGradientData) const = 0;
187
188 }; // end of FEBasisDataStorage
189 } // end of namespace basis
190} // end of namespace dftefe
191#endif // dftefeFEBasisDataStorage_h
An abstract class to store and access data for a given basis, such as the basis function values on a ...
Definition: BasisDataStorage.h:59
An abstract class to store and access data for a given basis, such as the basis function values on a ...
Definition: FEBasisDataStorage.h:54
virtual Storage getBasisHessianDataInCell(const size_type cellId) const =0
virtual void evaluateBasisData(const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes, std::shared_ptr< const quadrature::QuadratureRule > baseQuadratureRuleAdaptive, std::vector< std::shared_ptr< const utils::ScalarSpatialFunctionReal > > &functions, const std::vector< double > &absoluteTolerances, const std::vector< double > &relativeTolerances, const std::vector< double > &integralThresholds, const double smallestCellVolume, const unsigned int maxRecursion, const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap)=0
virtual void evaluateBasisData(const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes, std::shared_ptr< const quadrature::QuadratureRuleContainer > quadratureRuleContainer, const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap)=0
virtual std::shared_ptr< const BasisDofHandler > getBasisDofHandler() const =0
virtual const Storage & getBasisOverlapInAllCells() const =0
virtual void getBasisDataInCellRange(std::pair< size_type, size_type > cellRange, Storage &basisData) const =0
virtual void evaluateBasisData(const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes, std::vector< std::shared_ptr< const quadrature::QuadratureRule > > quadratureRuleVec, const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap)=0
virtual Storage getBasisHessianDataInCell(const size_type cellId, const size_type basisId) const =0
virtual void getBasisGradientDataInCellRange(std::pair< size_type, size_type > cellRange, Storage &basisGradientData) const =0
virtual Storage getBasisGradientDataInCell(const size_type cellId, const size_type basisId) const =0
virtual Storage getBasisGradientDataInCell(const size_type cellId) const =0
virtual Storage getBasisOverlapInCell(const size_type cellId) const =0
virtual Storage getBasisHessianData(const QuadraturePointAttributes &attributes, const size_type basisId) const =0
virtual Storage getJxWInCell(const size_type cellId) const =0
virtual Storage getBasisOverlap(const size_type cellId, const size_type basisId1, const size_type basisId2) const =0
virtual void evaluateBasisData(const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes, const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap)=0
virtual const Storage & getBasisDataInAllCells() const =0
virtual Storage getBasisDataInCell(const size_type cellId, const size_type basisId) const =0
virtual const Storage & getBasisGradientDataInAllCells() const =0
virtual std::shared_ptr< const quadrature::QuadratureRuleContainer > getQuadratureRuleContainer() const =0
virtual const Storage & getJxWInAllCells() const =0
virtual const Storage & getBasisGradNiGradNjInAllCells() const =0
typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage Storage
Definition: FEBasisDataStorage.h:59
virtual Storage getBasisDataInCell(const size_type cellId) const =0
virtual Storage getBasisGradientData(const QuadraturePointAttributes &attributes, const size_type basisId) const =0
virtual const Storage & getBasisHessianDataInAllCells() const =0
virtual Storage getBasisGradNiGradNjInCell(const size_type cellId) const =0
virtual Storage getBasisData(const QuadraturePointAttributes &attributes, const size_type basisId) const =0
Class to store the attributes of a quad point, such as the cell Id it belongs, the quadPointId within...
Definition: QuadratureAttributes.h:171
Definition: QuadratureAttributes.h:135
std::map< BasisStorageAttributes, bool > BasisStorageAttributesBoolMap
Definition: BasisDataStorage.h:50
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8