DFT-EFE
 
Loading...
Searching...
No Matches
FEBasisOperations.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, Avirup Sircar
24 */
25
26#ifndef dftefeFEBasisOperations_h
27#define dftefeFEBasisOperations_h
28
29#include <utils/TypeConfig.h>
32#include <basis/Field.h>
41#include <memory>
42namespace dftefe
43{
44 namespace basis
45 {
50 template <typename ValueTypeBasisCoeff,
51 typename ValueTypeBasisData,
52 utils::MemorySpace memorySpace,
53 size_type dim>
54 class FEBasisOperations : public BasisOperations<ValueTypeBasisCoeff,
55 ValueTypeBasisData,
56 memorySpace>
57 {
58 //
59 // typedefs
60 //
61 public:
62 //
63 // Get the union of the ValueTypeBasisCoeff and ValueTypeBasisData
64 // (.e.g, the union of double and complex<double> is complex<double>)
65 //
67 typename BasisOperations<ValueTypeBasisCoeff,
68 ValueTypeBasisData,
69 memorySpace>::ValueTypeUnion;
70
71 using StorageUnion = typename BasisOperations<ValueTypeBasisCoeff,
72 ValueTypeBasisData,
73 memorySpace>::StorageUnion;
74
75 using StorageBasis = typename BasisOperations<ValueTypeBasisCoeff,
76 ValueTypeBasisData,
77 memorySpace>::StorageBasis;
78
81 basisDataStorage,
82 const size_type maxCellBlockSize,
83 const size_type maxFieldBlockSize = 0);
84
85 void
86 reinit(const size_type maxCellBlockSize,
87 const size_type maxFieldBlockSize = 0);
88
89 ~FEBasisOperations() = default;
90
91 void
95 &quadValuesContainer) const override;
96
97 void
100 & vectorData,
103 linearAlgebra::blasLapack::scalar_type<ValueTypeBasisCoeff,
104 ValueTypeBasisData>,
105 memorySpace> &quadValuesContainer) const override;
106
107 void
110 & vectorData,
113 linearAlgebra::blasLapack::scalar_type<ValueTypeBasisCoeff,
114 ValueTypeBasisData>,
115 memorySpace> &quadValuesContainer) const override;
116
117 void
120 & inp,
122
123 void
126 linearAlgebra::blasLapack::scalar_type<ValueTypeBasisCoeff,
127 ValueTypeBasisData>,
128 memorySpace> & inp,
131 &vectorData) const override;
132
133 /* FE functions for local kernel computations*/
134 void
141 & f,
142 StorageUnion & cellWiseFEData,
143 linearAlgebra::LinAlgOpContext<memorySpace> &linAlgOpContext) const;
144
145 void
150 StorageBasis & cellWiseFEData,
151 linearAlgebra::LinAlgOpContext<memorySpace> &linAlgOpContext) const;
152
153 private:
154 std::shared_ptr<const FEBasisDataStorage<ValueTypeBasisData, memorySpace>>
156 // size_type d_maxCellTimesFieldBlock;
159
164 // TODO: initilize this
165 // (VecN is vector * N (like grad/curl), ScalN is scalar x N)
166
169
170 }; // end of FEBasisOperations
171 } // end of namespace basis
172} // end of namespace dftefe
174#endif // dftefeBasisOperations_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 encapsulate the partitioning of a basis across multiple processors.
Definition: BasisManager.h:54
Definition: BasisOperations.h:66
Definition: FEBasisOperations.h:57
void interpolate(const Field< ValueTypeBasisCoeff, memorySpace > &field, quadrature::QuadratureValuesContainer< ValueTypeUnion, memorySpace > &quadValuesContainer) const override
Definition: FEBasisOperations.t.cpp:982
utils::MemoryStorage< ValueTypeBasisData, memorySpace > d_tmpCellValuesBlock
Definition: FEBasisOperations.h:168
typename BasisOperations< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace >::ValueTypeUnion ValueTypeUnion
Definition: FEBasisOperations.h:69
utils::MemoryStorage< ValueTypeBasisCoeff, memorySpace > d_tmpFieldxVecN
Definition: FEBasisOperations.h:163
void reinit(const size_type maxCellBlockSize, const size_type maxFieldBlockSize=0)
Definition: FEBasisOperations.t.cpp:966
utils::MemoryStorage< ValueTypeBasisCoeff, memorySpace > d_tmpFieldxScalN
Definition: FEBasisOperations.h:163
utils::MemoryStorage< ValueTypeBasisData, memorySpace > d_tmpCellGradientsBlock
Definition: FEBasisOperations.h:168
utils::MemoryStorage< ValueTypeBasisCoeff, memorySpace > d_tmpFieldCellValues
Definition: FEBasisOperations.h:162
utils::MemoryStorage< ValueTypeBasisCoeff, memorySpace > d_tmpJxWxScalN
Definition: FEBasisOperations.h:163
void interpolateWithBasisGradient(const linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > &vectorData, const BasisManager< ValueTypeBasisCoeff, memorySpace > &basisManager, quadrature::QuadratureValuesContainer< linearAlgebra::blasLapack::scalar_type< ValueTypeBasisCoeff, ValueTypeBasisData >, memorySpace > &quadValuesContainer) const override
Definition: FEBasisOperations.t.cpp:1301
typename BasisOperations< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace >::StorageBasis StorageBasis
Definition: FEBasisOperations.h:77
typename BasisOperations< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace >::StorageUnion StorageUnion
Definition: FEBasisOperations.h:73
utils::MemoryStorage< ValueTypeBasisCoeff, memorySpace > d_tmpJxWxVecN
Definition: FEBasisOperations.h:162
void computeFEMatrices(realspace::LinearLocalOp L1, realspace::VectorMathOp Op1, realspace::VectorMathOp L2, realspace::LinearLocalOp Op2, const quadrature::QuadratureValuesContainer< ValueTypeUnion, memorySpace > &f, StorageUnion &cellWiseFEData, linearAlgebra::LinAlgOpContext< memorySpace > &linAlgOpContext) const
Definition: FEBasisOperations.t.cpp:2235
size_type d_maxCellBlock
Definition: FEBasisOperations.h:157
std::shared_ptr< const FEBasisDataStorage< ValueTypeBasisData, memorySpace > > d_feBasisDataStorage
Definition: FEBasisOperations.h:155
size_type d_maxFieldBlock
Definition: FEBasisOperations.h:158
void integrateWithBasisValues(const quadrature::QuadratureValuesContainer< ValueTypeUnion, memorySpace > &inp, Field< ValueTypeBasisCoeff, memorySpace > &f) const override
Definition: FEBasisOperations.t.cpp:1868
utils::MemoryStorage< ValueTypeBasisCoeff, memorySpace > d_tmpCellMatrixBlock
Definition: FEBasisOperations.h:162
Definition: Field.h:47
Definition: LinAlgOpContext.h:38
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition: MultiVector.h:134
Definition: QuadratureValuesContainer.h:39
Definition: MemoryStorage.h:38
VectorMathOp
Definition: BasisOperations.h:43
LinearLocalOp
Definition: BasisOperations.h:51
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