DFT-EFE
 
Loading...
Searching...
No Matches
EnrichmentIdsPartition.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 dftefeEnrichmentIdsPartition_h
27#define dftefeEnrichmentIdsPartition_h
28
29#include <utils/Point.h>
30#include <utils/TypeConfig.h>
31#include <set>
32#include <string>
33#include <vector>
37#include <utils/Exceptions.h>
38#include <utils/MPITypes.h>
39#include <utils/MPIWrapper.h>
40#include <map>
41namespace dftefe
42{
43 namespace basis
44 {
46 {
49 };
57 template <unsigned int dim>
59 {
60 public:
78 std::shared_ptr<const atoms::AtomSphericalDataContainer>
79 atomSphericalDataContainer,
80 std::shared_ptr<const AtomIdsPartition<dim>> atomIdsPartition,
81 const std::vector<std::string> & atomSymbol,
82 const std::vector<utils::Point> & atomCoordinates,
83 const std::string fieldName,
84 const std::vector<double> & minbound,
85 const std::vector<double> & maxbound,
86 double additionalCutoff,
87 const std::vector<utils::Point> & globalDomainBoundVec,
88 const std::vector<bool> & isPeriodicFlags,
89 const std::vector<std::vector<utils::Point>> &cellVerticesVector,
90 const utils::mpi::MPIComm & comm);
91
96
97 std::vector<global_size_type>
99
100 std::vector<std::vector<global_size_type>>
102
103 std::pair<global_size_type, global_size_type>
105
106 std::vector<global_size_type>
107 ghostEnrichmentIds() const;
108
109 // Works with the global enrichmentid
110
112 getAtomId(const global_size_type enrichmentId) const;
113
115 getEnrichmentIdAttribute(const global_size_type enrichmentId) const;
116
119
121 nLocalEnrichmentIds() const;
122
124 nTotalEnrichmentIds() const;
125
126 // std::map<size_type, size_type>
127 // enrichmentIdToNewAtomIdMap() const;
128
129 // std::map<size_type, size_type>
130 // enrichmentIdToQuantumIdMap() const;
131
135 private:
136 std::vector<global_size_type> d_newAtomIdToEnrichmentIdOffset;
137 std::vector<std::vector<global_size_type>>
139 std::vector<global_size_type> d_enrichmentIdsInProcessor;
140 std::pair<global_size_type, global_size_type> d_locallyOwnedEnrichmentIds;
141 std::vector<global_size_type> d_ghostEnrichmentIds;
142 std::map<global_size_type, size_type> d_enrichmentIdToOldAtomIdMap;
143 std::map<global_size_type, size_type> d_enrichmentIdToQuantumIdMap;
144
145 }; // end of class EnrichmentIdsPartition
146 } // end of namespace basis
147} // end of namespace dftefe
149#endif // dftefeEnrichement_h
Class to get the renumbered Ids of the locally owned Atom ids returns the vector of no of atoms in ea...
Definition: AtomIdsPartition.h:49
Class to get the gost and locally owned enrichment ids from the renumbered atom ids in Atom Partition...
Definition: EnrichmentIdsPartition.h:59
std::vector< global_size_type > d_enrichmentIdsInProcessor
Definition: EnrichmentIdsPartition.h:139
std::map< global_size_type, size_type > d_enrichmentIdToOldAtomIdMap
Definition: EnrichmentIdsPartition.h:142
size_type getAtomId(const global_size_type enrichmentId) const
Definition: EnrichmentIdsPartition.t.cpp:549
global_size_type nTotalEnrichmentIds() const
Definition: EnrichmentIdsPartition.t.cpp:594
std::pair< global_size_type, global_size_type > locallyOwnedEnrichmentIds() const
Definition: EnrichmentIdsPartition.t.cpp:535
size_type nLocallyOwnedEnrichmentIds() const
Definition: EnrichmentIdsPartition.t.cpp:577
std::vector< std::vector< global_size_type > > d_overlappingEnrichmentIdsInCells
Definition: EnrichmentIdsPartition.h:138
std::vector< global_size_type > ghostEnrichmentIds() const
Definition: EnrichmentIdsPartition.t.cpp:542
std::map< global_size_type, size_type > d_enrichmentIdToQuantumIdMap
Definition: EnrichmentIdsPartition.h:143
EnrichmentIdAttribute getEnrichmentIdAttribute(const global_size_type enrichmentId) const
Definition: EnrichmentIdsPartition.t.cpp:561
std::vector< global_size_type > newAtomIdToEnrichmentIdOffset() const
Definition: EnrichmentIdsPartition.t.cpp:521
std::vector< std::vector< global_size_type > > overlappingEnrichmentIdsInCells() const
Definition: EnrichmentIdsPartition.t.cpp:528
size_type nLocalEnrichmentIds() const
Definition: EnrichmentIdsPartition.t.cpp:585
~EnrichmentIdsPartition()=default
Destructor.
std::vector< global_size_type > d_ghostEnrichmentIds
Definition: EnrichmentIdsPartition.h:141
std::vector< global_size_type > d_newAtomIdToEnrichmentIdOffset
Definition: EnrichmentIdsPartition.h:136
std::pair< global_size_type, global_size_type > d_locallyOwnedEnrichmentIds
Definition: EnrichmentIdsPartition.h:140
int MPIComm
Definition: MPITypes.h:83
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8
unsigned long int global_size_type
Definition: TypeConfig.h:9
Definition: EnrichmentIdsPartition.h:46
size_type atomId
Definition: EnrichmentIdsPartition.h:47
size_type localIdInAtom
Definition: EnrichmentIdsPartition.h:48