Loading [MathJax]/extensions/tex2jax.js
DFT-EFE
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Loading...
Searching...
No Matches
EnrichmentClassicalInterfaceSpherical.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 dftefeEnrichmentClassicalInterfaceSpherical_h
27#define dftefeEnrichmentClassicalInterfaceSpherical_h
28
29#include <utils/Point.h>
30#include <utils/TypeConfig.h>
31#include <vector>
32#include <string>
33#include <unordered_map>
35#include <utils/MPITypes.h>
36#include <utils/MPIWrapper.h>
37#include <memory>
38#include <utils/TypeConfig.h>
50
51namespace dftefe
52{
53 namespace basis
54 {
68 template <typename ValueTypeBasisData,
69 utils::MemorySpace memorySpace,
70 size_type dim>
72 {
73 public:
110 std::shared_ptr<
112 cfeBasisDataStorageOverlapMatrix,
113 std::shared_ptr<
115 cfeBasisDataStorageRhs,
116 std::shared_ptr<const atoms::AtomSphericalDataContainer>
117 atomSphericalDataContainer,
118 const double atomPartitionTolerance,
119 const std::vector<std::string> & atomSymbolVec,
120 const std::vector<utils::Point> &atomCoordinatesVec,
121 const std::string fieldName,
123 linAlgOpContext,
124 const utils::mpi::MPIComm &comm);
125
135 std::shared_ptr<const TriangulationBase> triangulation,
136 size_type feOrder,
137 std::shared_ptr<const atoms::AtomSphericalDataContainer>
138 atomSphericalDataContainer,
139 const double atomPartitionTolerance,
140 const std::vector<std::string> & atomSymbolVec,
141 const std::vector<utils::Point> &atomCoordinatesVec,
142 const std::string fieldName,
143 const utils::mpi::MPIComm & comm);
144
149
153 std::shared_ptr<const atoms::AtomSphericalDataContainer>
155
159 std::shared_ptr<const EnrichmentIdsPartition<dim>>
161
162 std::shared_ptr<const AtomIdsPartition<dim>>
163 getAtomIdsPartition() const;
164
165 std::shared_ptr<const BasisManager<ValueTypeBasisData, memorySpace>>
166 getCFEBasisManager() const;
167
168 std::shared_ptr<const BasisDofHandler>
169 getCFEBasisDofHandler() const;
170
171 const std::unordered_map<global_size_type,
174
175 const std::unordered_map<global_size_type,
176 std::vector<ValueTypeBasisData>> &
178
179 std::shared_ptr<linearAlgebra::LinAlgOpContext<memorySpace>>
180 getLinAlgOpContext() const;
181
182 bool
183 isOrthogonalized() const;
184
185 std::vector<std::string>
186 getAtomSymbolVec() const;
187
188 std::vector<utils::Point>
189 getAtomCoordinatesVec() const;
190
191 std::string
192 getFieldName() const;
193
194 std::shared_ptr<const TriangulationBase>
195 getTriangulation() const;
196
197 // no p refinement assumed
199 getFEOrder() const;
200
208 getEnrichmentId(size_type cellId, size_type enrichmentCellLocalId) const;
209
211 getEnrichmentLocalId(global_size_type enrichmentId) const;
212
215 size_type enrichmentCellLocalId) const;
216
217 std::vector<double>
218 getEnrichmentValue(const size_type cellId,
219 const std::vector<dftefe::utils::Point> &points) const;
220
221 std::vector<double>
223 const size_type cellId,
224 const std::vector<dftefe::utils::Point> &points) const;
225
226 std::vector<double>
228 const size_type cellId,
229 const std::vector<dftefe::utils::Point> &points) const;
230
231
232 private:
233 std::shared_ptr<EnrichmentIdsPartition<dim>> d_enrichmentIdsPartition;
234 std::shared_ptr<const AtomIdsPartition<dim>> d_atomIdsPartition;
235 std::shared_ptr<const atoms::AtomSphericalDataContainer>
237 std::shared_ptr<const TriangulationBase> d_triangulation;
239 std::shared_ptr<
242 std::shared_ptr<const FEBasisManager<ValueTypeBasisData,
243 ValueTypeBasisData,
244 memorySpace,
245 dim>>
247 const std::vector<std::string> d_atomSymbolVec;
248 const std::vector<utils::Point> d_atomCoordinatesVec;
249 const std::string d_fieldName;
250 std::vector<std::vector<global_size_type>>
252
253 std::unordered_map<global_size_type, utils::OptimizedIndexSet<size_type>>
255
256 std::unordered_map<global_size_type, std::vector<ValueTypeBasisData>>
258
259 std::shared_ptr<linearAlgebra::LinAlgOpContext<memorySpace>>
261
263
264 }; // end of class
265 } // end of namespace basis
266} // end of namespace dftefe
268#endif // dftefeEnrichmentClassicalInterfaceSpherical_h
Class to get the interface between Classical and Enrichment basis. It takes as the classical basis as...
Definition: EnrichmentClassicalInterfaceSpherical.h:72
std::vector< utils::Point > getAtomCoordinatesVec() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:904
const std::vector< std::string > d_atomSymbolVec
Definition: EnrichmentClassicalInterfaceSpherical.h:247
size_type d_feOrder
Definition: EnrichmentClassicalInterfaceSpherical.h:262
bool isOrthogonalized() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:882
std::shared_ptr< const AtomIdsPartition< dim > > d_atomIdsPartition
Definition: EnrichmentClassicalInterfaceSpherical.h:234
std::unordered_map< global_size_type, std::vector< ValueTypeBasisData > > d_enrichmentIdToInterfaceCoeffMap
Definition: EnrichmentClassicalInterfaceSpherical.h:257
const std::unordered_map< global_size_type, std::vector< ValueTypeBasisData > > & getClassicalComponentCoeffMap() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:849
std::vector< double > getEnrichmentDerivative(const size_type cellId, const std::vector< dftefe::utils::Point > &points) const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:1156
bool d_isOrthogonalized
Definition: EnrichmentClassicalInterfaceSpherical.h:238
std::shared_ptr< linearAlgebra::LinAlgOpContext< memorySpace > > d_linAlgOpContext
Definition: EnrichmentClassicalInterfaceSpherical.h:260
std::vector< double > getEnrichmentValue(const size_type cellId, const std::vector< dftefe::utils::Point > &points) const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:1079
global_size_type getEnrichmentId(size_type cellId, size_type enrichmentCellLocalId) const
The localid is determined by the storage pattern of the components of basisInterfaceCoeff multivector...
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:949
std::shared_ptr< const atoms::AtomSphericalDataContainer > getAtomSphericalDataContainer() const
Function to return AtomSphericalDataContainerObject.
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:763
std::shared_ptr< const atoms::AtomSphericalDataContainer > d_atomSphericalDataContainer
Definition: EnrichmentClassicalInterfaceSpherical.h:236
std::vector< double > getEnrichmentHessian(const size_type cellId, const std::vector< dftefe::utils::Point > &points) const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:1251
std::shared_ptr< const AtomIdsPartition< dim > > getAtomIdsPartition() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:787
const std::string d_fieldName
Definition: EnrichmentClassicalInterfaceSpherical.h:249
std::shared_ptr< EnrichmentIdsPartition< dim > > d_enrichmentIdsPartition
Definition: EnrichmentClassicalInterfaceSpherical.h:233
std::shared_ptr< const BasisDofHandler > getCFEBasisDofHandler() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:814
size_type getEnrichmentLocalId(global_size_type enrichmentId) const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:1023
std::shared_ptr< const EnrichmentIdsPartition< dim > > getEnrichmentIdsPartition() const
Function to return EnrichmentIDsObject.
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:775
std::shared_ptr< const FEBasisManager< ValueTypeBasisData, ValueTypeBasisData, memorySpace, dim > > d_cfeBasisManager
Definition: EnrichmentClassicalInterfaceSpherical.h:246
const std::vector< utils::Point > d_atomCoordinatesVec
Definition: EnrichmentClassicalInterfaceSpherical.h:248
~EnrichmentClassicalInterfaceSpherical()=default
Destructor for the class.
size_type getFEOrder() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:937
std::shared_ptr< const FEBasisDofHandler< ValueTypeBasisData, memorySpace, dim > > d_cfeBasisDofHandler
Definition: EnrichmentClassicalInterfaceSpherical.h:241
std::vector< std::string > getAtomSymbolVec() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:893
std::shared_ptr< const TriangulationBase > d_triangulation
Definition: EnrichmentClassicalInterfaceSpherical.h:237
std::vector< std::vector< global_size_type > > d_overlappingEnrichmentIdsInCells
Definition: EnrichmentClassicalInterfaceSpherical.h:251
std::shared_ptr< const BasisManager< ValueTypeBasisData, memorySpace > > getCFEBasisManager() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:798
std::shared_ptr< const TriangulationBase > getTriangulation() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:926
const std::unordered_map< global_size_type, utils::OptimizedIndexSet< size_type > > & getClassicalComponentLocalIdsMap() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:832
std::unordered_map< global_size_type, utils::OptimizedIndexSet< size_type > > d_enrichmentIdToClassicalLocalIdMap
Definition: EnrichmentClassicalInterfaceSpherical.h:254
std::string getFieldName() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:915
std::shared_ptr< linearAlgebra::LinAlgOpContext< memorySpace > > getLinAlgOpContext() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:866
An abstract class to store and access data for a given basis, such as the basis function values on a ...
Definition: FEBasisDataStorage.h:54
Definition: FEBasisDofHandler.h:57
An abstract class to encapsulate the partitioning of a finite element basis across multiple processor...
Definition: FEBasisManager.h:44
Definition: LinAlgOpContext.h:38
Definition: OptimizedIndexSet.h:48
int MPIComm
Definition: MPITypes.h:83
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8
unsigned long int global_size_type
Definition: TypeConfig.h:9