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 maxCellTimesFieldBlock);
83
84 void
85 reinit(const size_type maxCellTimesFieldBlock);
86
87 ~FEBasisOperations() = default;
88
89 void
93 &quadValuesContainer) const override;
94
95 void
98 & vectorData,
101 linearAlgebra::blasLapack::scalar_type<ValueTypeBasisCoeff,
102 ValueTypeBasisData>,
103 memorySpace> &quadValuesContainer) const override;
104
105 void
108 & vectorData,
111 linearAlgebra::blasLapack::scalar_type<ValueTypeBasisCoeff,
112 ValueTypeBasisData>,
113 memorySpace> &quadValuesContainer) const override;
114
115 void
118 & inp,
120
121 void
124 linearAlgebra::blasLapack::scalar_type<ValueTypeBasisCoeff,
125 ValueTypeBasisData>,
126 memorySpace> & inp,
129 &vectorData) const override;
130
131 /* FE functions for local kernel computations*/
132 void
139 & f,
140 StorageUnion & cellWiseFEData,
141 linearAlgebra::LinAlgOpContext<memorySpace> &linAlgOpContext) const;
142
143 void
148 StorageBasis & cellWiseFEData,
149 linearAlgebra::LinAlgOpContext<memorySpace> &linAlgOpContext) const;
150
151 private:
152 std::shared_ptr<const FEBasisDataStorage<ValueTypeBasisData, memorySpace>>
155
156 }; // end of FEBasisOperations
157 } // end of namespace basis
158} // end of namespace dftefe
160#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
size_type d_maxCellTimesFieldBlock
Definition: FEBasisOperations.h:154
void interpolate(const Field< ValueTypeBasisCoeff, memorySpace > &field, quadrature::QuadratureValuesContainer< ValueTypeUnion, memorySpace > &quadValuesContainer) const override
Definition: FEBasisOperations.t.cpp:914
void reinit(const size_type maxCellTimesFieldBlock)
Definition: FEBasisOperations.t.cpp:900
typename BasisOperations< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace >::ValueTypeUnion ValueTypeUnion
Definition: FEBasisOperations.h:69
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:1191
typename BasisOperations< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace >::StorageBasis StorageBasis
Definition: FEBasisOperations.h:77
typename BasisOperations< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace >::StorageUnion StorageUnion
Definition: FEBasisOperations.h:73
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:2070
std::shared_ptr< const FEBasisDataStorage< ValueTypeBasisData, memorySpace > > d_feBasisDataStorage
Definition: FEBasisOperations.h:153
void integrateWithBasisValues(const quadrature::QuadratureValuesContainer< ValueTypeUnion, memorySpace > &inp, Field< ValueTypeBasisCoeff, memorySpace > &f) const override
Definition: FEBasisOperations.t.cpp:1744
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
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