DFT-EFE
 
Loading...
Searching...
No Matches
EFEBasisDataStorage.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 dftefeEFEBasisDataStorage_h
27#define dftefeEFEBasisDataStorage_h
28
29#include <utils/TypeConfig.h>
31#include <utils/MemoryStorage.h>
36#include <deal.II/matrix_free/matrix_free.h>
37#include <memory>
38#include <map>
39#include <vector>
40namespace dftefe
41{
42 namespace basis
43 {
49 template <typename ValueTypeBasisData, utils::MemorySpace memorySpace>
51 : public FEBasisDataStorage<ValueTypeBasisData, memorySpace>
52 {
53 public:
56 using Storage =
58
59
60 virtual std::shared_ptr<const BasisDofHandler>
61 getBasisDofHandler() const = 0;
62
63 virtual void
65 const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes,
66 const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap) = 0;
67
68 virtual void
70 const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes,
71 std::shared_ptr<const quadrature::QuadratureRuleContainer>
72 quadratureRuleContainer,
73 const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap) = 0;
74
75 virtual void
77 const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes,
78 std::vector<std::shared_ptr<const quadrature::QuadratureRule>>
79 quadratureRuleVec,
80 const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap) = 0;
81
82 virtual void
84 const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes,
85 std::shared_ptr<const quadrature::QuadratureRule>
86 baseQuadratureRuleAdaptive,
87 std::vector<std::shared_ptr<const utils::ScalarSpatialFunctionReal>>
88 & functions,
89 const std::vector<double> & absoluteTolerances,
90 const std::vector<double> & relativeTolerances,
91 const std::vector<double> & integralThresholds,
92 const double smallestCellVolume,
93 const unsigned int maxRecursion,
94 const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap) = 0;
95
96 virtual void
98
99
100
101 // std::shared_ptr<const quadrature::QuadratureRuleContainer>
102 // getCellQuadratureRuleContainer(std::shared_ptr<Storage>>
103 // const QuadratureRuleAttributes &quadratureRuleAttributes) const
104 // override;
105 // functions to get data for a basis function on a given quad point in a
106 // cell
107 virtual Storage
109 const size_type basisId) const = 0;
110 virtual Storage
112 const size_type basisId) const = 0;
113 virtual Storage
115 const size_type basisId) const = 0;
116
117 // functions to get data for a basis function on all quad points in a cell
118 virtual Storage
120 const size_type basisId) const = 0;
121 virtual Storage
123 const size_type basisId) const = 0;
124 virtual Storage
126 const size_type basisId) const = 0;
127
128 // functions to get data for all basis functions on all quad points in a
129 // cell
130 virtual Storage
131 getBasisDataInCell(const size_type cellId) const = 0;
132 virtual Storage
133 getBasisGradientDataInCell(const size_type cellId) const = 0;
134 virtual Storage
135 getBasisHessianDataInCell(const size_type cellId) const = 0;
136
137 virtual Storage
138 getJxWInCell(const size_type cellId) const = 0;
139
140 // functions to get data for all basis functions on all quad points in all
141 // cells
142 virtual const Storage &
144 virtual const Storage &
146 virtual const Storage &
148
149 virtual const Storage &
150 getJxWInAllCells() const = 0;
151
152 // get overlap of two basis functions in a cell
153 virtual Storage
155 const size_type basisId1,
156 const size_type basisId2) const = 0;
157
158 // get overlap of all the basis functions in a cell
159 virtual Storage
160 getBasisOverlapInCell(const size_type cellId) const = 0;
161
162 // get the laplace operator in a cell
163 virtual Storage
164 getBasisGradNiGradNjInCell(const size_type cellId) const = 0;
165
166 // get laplace operator in all cells
167 virtual const Storage &
169
170 // get overlap of all the basis functions in all cells
171 virtual const Storage &
173
174 virtual std::shared_ptr<const quadrature::QuadratureRuleContainer>
176
177 }; // end of EFEBasisDataStorage
178 } // end of namespace basis
179} // end of namespace dftefe
180#endif // dftefeEFEBasisDataStorage_h
An abstract class to store and access data for a given basis, such as the basis function values on a ...
Definition: EFEBasisDataStorage.h:52
virtual Storage getBasisData(const QuadraturePointAttributes &attributes, const size_type basisId) const =0
virtual const Storage & getJxWInAllCells() const =0
virtual Storage getBasisGradientData(const QuadraturePointAttributes &attributes, const size_type basisId) 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 Storage getBasisOverlap(const size_type cellId, const size_type basisId1, const size_type basisId2) const =0
virtual Storage getBasisGradNiGradNjInCell(const size_type cellId) const =0
virtual std::shared_ptr< const quadrature::QuadratureRuleContainer > getQuadratureRuleContainer() const =0
virtual const Storage & getBasisHessianDataInAllCells() const =0
virtual const Storage & getBasisDataInAllCells() const =0
virtual std::shared_ptr< const BasisDofHandler > getBasisDofHandler() const =0
virtual Storage getBasisHessianDataInCell(const size_type cellId, const size_type basisId) const =0
virtual const Storage & getBasisGradientDataInAllCells() const =0
virtual Storage getBasisDataInCell(const size_type cellId, const size_type basisId) const =0
virtual void evaluateBasisData(const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes, std::shared_ptr< const quadrature::QuadratureRuleContainer > quadratureRuleContainer, const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap)=0
typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage Storage
Definition: EFEBasisDataStorage.h:57
virtual const Storage & getBasisGradNiGradNjInAllCells() const =0
virtual Storage getBasisHessianData(const QuadraturePointAttributes &attributes, const size_type basisId) const =0
virtual Storage getJxWInCell(const size_type cellId) const =0
virtual void evaluateBasisData(const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes, const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap)=0
virtual const Storage & getBasisOverlapInAllCells() const =0
virtual Storage getBasisGradientDataInCell(const size_type cellId, const size_type basisId) const =0
virtual Storage getBasisDataInCell(const size_type cellId) const =0
virtual Storage getBasisHessianDataInCell(const size_type cellId) const =0
virtual void evaluateBasisData(const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes, std::vector< std::shared_ptr< const quadrature::QuadratureRule > > quadratureRuleVec, const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap)=0
virtual Storage getBasisOverlapInCell(const size_type cellId) const =0
virtual Storage getBasisGradientDataInCell(const size_type cellId) const =0
An abstract class to store and access data for a given basis, such as the basis function values on a ...
Definition: FEBasisDataStorage.h:53
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