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
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 private:
218 std::shared_ptr<const EnrichmentIdsPartition<dim>>
220 std::shared_ptr<const AtomIdsPartition<dim>> d_atomIdsPartition;
221 std::shared_ptr<const atoms::AtomSphericalDataContainer>
223 std::shared_ptr<const TriangulationBase> d_triangulation;
225 std::shared_ptr<
228 std::shared_ptr<const FEBasisManager<ValueTypeBasisData,
229 ValueTypeBasisData,
230 memorySpace,
231 dim>>
233 const std::vector<std::string> d_atomSymbolVec;
234 const std::vector<utils::Point> d_atomCoordinatesVec;
235 const std::string d_fieldName;
236 std::vector<std::vector<global_size_type>>
238
239 std::unordered_map<global_size_type, utils::OptimizedIndexSet<size_type>>
241
242 std::unordered_map<global_size_type, std::vector<ValueTypeBasisData>>
244
245 std::shared_ptr<linearAlgebra::LinAlgOpContext<memorySpace>>
247
249
250 }; // end of class
251 } // end of namespace basis
252} // end of namespace dftefe
254#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:658
const std::vector< std::string > d_atomSymbolVec
Definition: EnrichmentClassicalInterfaceSpherical.h:233
size_type d_feOrder
Definition: EnrichmentClassicalInterfaceSpherical.h:248
bool isOrthogonalized() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:636
std::shared_ptr< const AtomIdsPartition< dim > > d_atomIdsPartition
Definition: EnrichmentClassicalInterfaceSpherical.h:220
std::unordered_map< global_size_type, std::vector< ValueTypeBasisData > > d_enrichmentIdToInterfaceCoeffMap
Definition: EnrichmentClassicalInterfaceSpherical.h:243
const std::unordered_map< global_size_type, std::vector< ValueTypeBasisData > > & getClassicalComponentCoeffMap() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:603
bool d_isOrthogonalized
Definition: EnrichmentClassicalInterfaceSpherical.h:224
std::shared_ptr< linearAlgebra::LinAlgOpContext< memorySpace > > d_linAlgOpContext
Definition: EnrichmentClassicalInterfaceSpherical.h:246
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:703
std::shared_ptr< const atoms::AtomSphericalDataContainer > getAtomSphericalDataContainer() const
Function to return AtomSphericalDataContainerObject.
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:517
std::shared_ptr< const atoms::AtomSphericalDataContainer > d_atomSphericalDataContainer
Definition: EnrichmentClassicalInterfaceSpherical.h:222
std::shared_ptr< const AtomIdsPartition< dim > > getAtomIdsPartition() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:541
const std::string d_fieldName
Definition: EnrichmentClassicalInterfaceSpherical.h:235
std::shared_ptr< const BasisDofHandler > getCFEBasisDofHandler() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:568
size_type getEnrichmentLocalId(global_size_type enrichmentId) const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:777
std::shared_ptr< const EnrichmentIdsPartition< dim > > getEnrichmentIdsPartition() const
Function to return EnrichmentIDsObject.
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:529
std::shared_ptr< const FEBasisManager< ValueTypeBasisData, ValueTypeBasisData, memorySpace, dim > > d_cfeBasisManager
Definition: EnrichmentClassicalInterfaceSpherical.h:232
const std::vector< utils::Point > d_atomCoordinatesVec
Definition: EnrichmentClassicalInterfaceSpherical.h:234
~EnrichmentClassicalInterfaceSpherical()=default
Destructor for the class.
size_type getFEOrder() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:691
std::shared_ptr< const FEBasisDofHandler< ValueTypeBasisData, memorySpace, dim > > d_cfeBasisDofHandler
Definition: EnrichmentClassicalInterfaceSpherical.h:227
std::vector< std::string > getAtomSymbolVec() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:647
std::shared_ptr< const TriangulationBase > d_triangulation
Definition: EnrichmentClassicalInterfaceSpherical.h:223
std::vector< std::vector< global_size_type > > d_overlappingEnrichmentIdsInCells
Definition: EnrichmentClassicalInterfaceSpherical.h:237
std::shared_ptr< const EnrichmentIdsPartition< dim > > d_enrichmentIdsPartition
Definition: EnrichmentClassicalInterfaceSpherical.h:219
std::shared_ptr< const BasisManager< ValueTypeBasisData, memorySpace > > getCFEBasisManager() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:552
std::shared_ptr< const TriangulationBase > getTriangulation() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:680
const std::unordered_map< global_size_type, utils::OptimizedIndexSet< size_type > > & getClassicalComponentLocalIdsMap() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:586
std::unordered_map< global_size_type, utils::OptimizedIndexSet< size_type > > d_enrichmentIdToClassicalLocalIdMap
Definition: EnrichmentClassicalInterfaceSpherical.h:240
std::string getFieldName() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:669
std::shared_ptr< linearAlgebra::LinAlgOpContext< memorySpace > > getLinAlgOpContext() const
Definition: EnrichmentClassicalInterfaceSpherical.t.cpp:620
An abstract class to store and access data for a given basis, such as the basis function values on a ...
Definition: FEBasisDataStorage.h:53
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