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>
37#include <deal.II/matrix_free/matrix_free.h>
38#include <memory>
39#include <map>
40#include <vector>
41namespace dftefe
42{
43 namespace basis
44 {
50 template <typename ValueTypeBasisData, utils::MemorySpace memorySpace>
52 : public BasisDataStorage<ValueTypeBasisData, memorySpace>
53 {
54 public:
57 using Storage =
59
60
61 virtual std::shared_ptr<const BasisDofHandler>
62 getBasisDofHandler() const = 0;
63
64 virtual void
66 const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes,
67 const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap) = 0;
68
69 virtual void
71 const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes,
72 std::shared_ptr<const quadrature::QuadratureRuleContainer>
73 quadratureRuleContainer,
74 const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap) = 0;
75
76 virtual void
78 const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes,
79 std::vector<std::shared_ptr<const quadrature::QuadratureRule>>
80 quadratureRuleVec,
81 const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap) = 0;
82
83 virtual void
85 const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes,
86 std::shared_ptr<const quadrature::QuadratureRule>
87 baseQuadratureRuleAdaptive,
88 std::vector<std::shared_ptr<const utils::ScalarSpatialFunctionReal>>
89 & functions,
90 const std::vector<double> & absoluteTolerances,
91 const std::vector<double> & relativeTolerances,
92 const std::vector<double> & integralThresholds,
93 const double smallestCellVolume,
94 const unsigned int maxRecursion,
95 const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap) = 0;
96
97 virtual void
99
100
101
102 // std::shared_ptr<const quadrature::QuadratureRuleContainer>
103 // getCellQuadratureRuleContainer(std::shared_ptr<Storage>>
104 // const QuadratureRuleAttributes &quadratureRuleAttributes) const
105 // override;
106 // functions to get data for a basis function on a given quad point in a
107 // cell
108 virtual Storage
110 const size_type basisId) const = 0;
111 virtual Storage
113 const size_type basisId) const = 0;
114 virtual Storage
116 const size_type basisId) const = 0;
117
118 // functions to get data for a basis function on all quad points in a cell
119 virtual Storage
121 const size_type basisId) const = 0;
122 virtual Storage
124 const size_type basisId) const = 0;
125 virtual Storage
127 const size_type basisId) const = 0;
128
129 // functions to get data for all basis functions on all quad points in a
130 // cell
131 virtual Storage
132 getBasisDataInCell(const size_type cellId) const = 0;
133 virtual Storage
134 getBasisGradientDataInCell(const size_type cellId) const = 0;
135 virtual Storage
136 getBasisHessianDataInCell(const size_type cellId) const = 0;
137
138 virtual Storage
139 getJxWInCell(const size_type cellId) const = 0;
140
141 // functions to get data for all basis functions on all quad points in all
142 // cells
143 virtual const Storage &
145 virtual const Storage &
147 virtual const Storage &
149
150 virtual const Storage &
151 getJxWInAllCells() const = 0;
152
153 // get overlap of two basis functions in a cell
154 virtual Storage
156 const size_type basisId1,
157 const size_type basisId2) const = 0;
158
159 // get overlap of all the basis functions in a cell
160 virtual Storage
161 getBasisOverlapInCell(const size_type cellId) const = 0;
162
163 // get the laplace operator in a cell
164 virtual Storage
165 getBasisGradNiGradNjInCell(const size_type cellId) const = 0;
166
167 // get laplace operator in all cells
168 virtual const Storage &
170
171 // get overlap of all the basis functions in all cells
172 virtual const Storage &
174
175 virtual std::shared_ptr<const quadrature::QuadratureRuleContainer>
177
178 }; // end of FEBasisDataStorage
179 } // end of namespace basis
180} // end of namespace dftefe
181#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:53
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 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 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:58
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
Definition: MemoryStorage.h:38
std::map< BasisStorageAttributes, bool > BasisStorageAttributesBoolMap
Definition: BasisDataStorage.h:50
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8