DFT-EFE
 
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#include <basis/Defaults.h>
51
52namespace dftefe
53{
54 namespace basis
55 {
69 template <typename ValueTypeBasisData,
70 utils::MemorySpace memorySpace,
71 size_type dim>
73 {
74 public:
111 std::shared_ptr<
113 cfeBasisDataStorageOverlapMatrix,
114 std::shared_ptr<
116 cfeBasisDataStorageRhs,
117 std::shared_ptr<const atoms::AtomSphericalDataContainer>
118 atomSphericalDataContainer,
119 const double atomPartitionTolerance,
120 const std::vector<std::string> & atomSymbolVec,
121 const std::vector<utils::Point> &atomCoordinatesVec,
122 const std::string fieldName,
124 linAlgOpContext,
125 const utils::mpi::MPIComm &comm,
126 const size_type enrichmentBatchSize =
128
138 std::shared_ptr<const TriangulationBase> triangulation,
139 size_type feOrder,
140 std::shared_ptr<const atoms::AtomSphericalDataContainer>
141 atomSphericalDataContainer,
142 const double atomPartitionTolerance,
143 const std::vector<std::string> & atomSymbolVec,
144 const std::vector<utils::Point> &atomCoordinatesVec,
145 const std::string fieldName,
146 const utils::mpi::MPIComm & comm);
147
152
156 std::shared_ptr<const atoms::AtomSphericalDataContainer>
158
162 std::shared_ptr<const EnrichmentIdsPartition<dim>>
164
165 std::shared_ptr<const AtomIdsPartition<dim>>
166 getAtomIdsPartition() const;
167
168 std::shared_ptr<const BasisManager<ValueTypeBasisData, memorySpace>>
169 getCFEBasisManager() const;
170
171 std::shared_ptr<const BasisDofHandler>
172 getCFEBasisDofHandler() const;
173
174 const std::unordered_map<global_size_type,
177
178 const std::unordered_map<global_size_type,
179 std::vector<ValueTypeBasisData>> &
181
182 std::shared_ptr<linearAlgebra::LinAlgOpContext<memorySpace>>
183 getLinAlgOpContext() const;
184
185 bool
186 isOrthogonalized() const;
187
188 std::vector<std::string>
189 getAtomSymbolVec() const;
190
191 std::vector<utils::Point>
192 getAtomCoordinatesVec() const;
193
194 std::string
195 getFieldName() const;
196
197 std::shared_ptr<const TriangulationBase>
198 getTriangulation() const;
199
200 // no p refinement assumed
202 getFEOrder() const;
203
211 getEnrichmentId(size_type cellId, size_type enrichmentCellLocalId) const;
212
214 getEnrichmentLocalId(global_size_type enrichmentId) const;
215
218 size_type enrichmentCellLocalId) const;
219
220 std::vector<double>
221 getEnrichmentValue(const size_type cellId,
222 const std::vector<dftefe::utils::Point> &points) const;
223
224 std::vector<double>
226 const size_type cellId,
227 const std::vector<dftefe::utils::Point> &points) const;
228
229 std::vector<double>
231 const size_type cellId,
232 const std::vector<dftefe::utils::Point> &points) const;
233
234
235 private:
236 std::shared_ptr<EnrichmentIdsPartition<dim>> d_enrichmentIdsPartition;
237 std::shared_ptr<const AtomIdsPartition<dim>> d_atomIdsPartition;
238 std::shared_ptr<const atoms::AtomSphericalDataContainer>
240 std::shared_ptr<const TriangulationBase> d_triangulation;
242 std::shared_ptr<
245 std::shared_ptr<const FEBasisManager<ValueTypeBasisData,
246 ValueTypeBasisData,
247 memorySpace,
248 dim>>
250 const std::vector<std::string> d_atomSymbolVec;
251 const std::vector<utils::Point> d_atomCoordinatesVec;
252 const std::string d_fieldName;
253 std::vector<std::vector<global_size_type>>
255
256 std::unordered_map<global_size_type, utils::OptimizedIndexSet<size_type>>
258
259 std::unordered_map<global_size_type, std::vector<ValueTypeBasisData>>
261
262 std::shared_ptr<linearAlgebra::LinAlgOpContext<memorySpace>>
264
266
268
270
271 }; // end of class
272 } // end of namespace basis
273} // end of namespace dftefe
275#endif // dftefeEnrichmentClassicalInterfaceSpherical_h
static const size_type ENRICHMENT_BATCH_SIZE
Definition: Defaults.h:90
Class to get the interface between Classical and Enrichment basis. It takes as the classical basis as...
Definition: EnrichmentClassicalInterfaceSpherical.h:73
std::vector< utils::Point > getAtomCoordinatesVec() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:934
const std::vector< std::string > d_atomSymbolVec
Definition: EnrichmentClassicalInterfaceSpherical.h:250
size_type d_feOrder
Definition: EnrichmentClassicalInterfaceSpherical.h:265
bool isOrthogonalized() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:912
const utils::mpi::MPIComm d_comm
Definition: EnrichmentClassicalInterfaceSpherical.h:267
std::shared_ptr< const AtomIdsPartition< dim > > d_atomIdsPartition
Definition: EnrichmentClassicalInterfaceSpherical.h:237
std::unordered_map< global_size_type, std::vector< ValueTypeBasisData > > d_enrichmentIdToInterfaceCoeffMap
Definition: EnrichmentClassicalInterfaceSpherical.h:260
const std::unordered_map< global_size_type, std::vector< ValueTypeBasisData > > & getClassicalComponentCoeffMap() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:879
std::vector< double > getEnrichmentDerivative(const size_type cellId, const std::vector< dftefe::utils::Point > &points) const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:1186
bool d_isOrthogonalized
Definition: EnrichmentClassicalInterfaceSpherical.h:241
std::shared_ptr< linearAlgebra::LinAlgOpContext< memorySpace > > d_linAlgOpContext
Definition: EnrichmentClassicalInterfaceSpherical.h:263
std::vector< double > getEnrichmentValue(const size_type cellId, const std::vector< dftefe::utils::Point > &points) const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:1109
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:979
std::shared_ptr< const atoms::AtomSphericalDataContainer > getAtomSphericalDataContainer() const
Function to return AtomSphericalDataContainerObject.
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:793
std::shared_ptr< const atoms::AtomSphericalDataContainer > d_atomSphericalDataContainer
Definition: EnrichmentClassicalInterfaceSpherical.h:239
std::vector< double > getEnrichmentHessian(const size_type cellId, const std::vector< dftefe::utils::Point > &points) const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:1281
size_type d_enrichBatchSize
Definition: EnrichmentClassicalInterfaceSpherical.h:269
std::shared_ptr< const AtomIdsPartition< dim > > getAtomIdsPartition() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:817
const std::string d_fieldName
Definition: EnrichmentClassicalInterfaceSpherical.h:252
std::shared_ptr< EnrichmentIdsPartition< dim > > d_enrichmentIdsPartition
Definition: EnrichmentClassicalInterfaceSpherical.h:236
std::shared_ptr< const BasisDofHandler > getCFEBasisDofHandler() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:844
size_type getEnrichmentLocalId(global_size_type enrichmentId) const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:1053
std::shared_ptr< const EnrichmentIdsPartition< dim > > getEnrichmentIdsPartition() const
Function to return EnrichmentIDsObject.
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:805
std::shared_ptr< const FEBasisManager< ValueTypeBasisData, ValueTypeBasisData, memorySpace, dim > > d_cfeBasisManager
Definition: EnrichmentClassicalInterfaceSpherical.h:249
const std::vector< utils::Point > d_atomCoordinatesVec
Definition: EnrichmentClassicalInterfaceSpherical.h:251
~EnrichmentClassicalInterfaceSpherical()=default
Destructor for the class.
size_type getFEOrder() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:967
std::shared_ptr< const FEBasisDofHandler< ValueTypeBasisData, memorySpace, dim > > d_cfeBasisDofHandler
Definition: EnrichmentClassicalInterfaceSpherical.h:244
std::vector< std::string > getAtomSymbolVec() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:923
std::shared_ptr< const TriangulationBase > d_triangulation
Definition: EnrichmentClassicalInterfaceSpherical.h:240
std::vector< std::vector< global_size_type > > d_overlappingEnrichmentIdsInCells
Definition: EnrichmentClassicalInterfaceSpherical.h:254
std::shared_ptr< const BasisManager< ValueTypeBasisData, memorySpace > > getCFEBasisManager() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:828
std::shared_ptr< const TriangulationBase > getTriangulation() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:956
const std::unordered_map< global_size_type, utils::OptimizedIndexSet< size_type > > & getClassicalComponentLocalIdsMap() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:862
std::unordered_map< global_size_type, utils::OptimizedIndexSet< size_type > > d_enrichmentIdToClassicalLocalIdMap
Definition: EnrichmentClassicalInterfaceSpherical.h:257
std::string getFieldName() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:945
std::shared_ptr< linearAlgebra::LinAlgOpContext< memorySpace > > getLinAlgOpContext() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:896
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:84
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