DFT-EFE
 
Loading...
Searching...
No Matches
AtomIdsPartition.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 dftefeAtomIdsPartition_h
27#define dftefeAtomIdsPartition_h
28
29#include <utils/Point.h>
30#include <basis/Defaults.h>
31#include <utils/TypeConfig.h>
32#include <vector>
33#include <string>
34#include <utils/MPITypes.h>
35#include <utils/MPIWrapper.h>
36namespace dftefe
37{
38 namespace basis
39 {
48 template <size_type dim>
50 {
51 public:
65 const std::vector<utils::Point> & atomCoordinates,
66 const std::vector<double> & minbound,
67 const std::vector<double> & maxbound,
68 const std::vector<std::vector<utils::Point>> &cellVerticesVector,
69 const double tolerance,
70 const utils::mpi::MPIComm & comm);
71
75 ~AtomIdsPartition() = default;
76
80 std::vector<size_type>
81 nAtomIdsInProcessor() const;
82
86 std::vector<size_type>
88
92 std::vector<size_type>
93 oldAtomIds() const;
94
98 std::vector<size_type>
99 newAtomIds() const;
100
104 std::vector<size_type>
105 locallyOwnedAtomIds() const;
106
108 nTotalAtomIds() const;
109
110 private:
111 std::vector<size_type> d_nAtomIdsInProcessor;
112 std::vector<size_type> d_nAtomIdsInProcessorCumulative;
113 std::vector<size_type> d_oldAtomIds;
114 std::vector<size_type> d_newAtomIds;
115 std::vector<size_type> d_atomIdsInProcessor;
116 }; // end of class AtomIdsPartition
117 } // end of namespace basis
118} // end of namespace dftefe
119#include "AtomIdsPartition.t.cpp"
120#endif // dftefeAtomIdsPartition_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:50
std::vector< size_type > locallyOwnedAtomIds() const
Function to return the vector of locally owned atom is in each processor.
Definition: AtomIdsPartition.t.cpp:439
std::vector< size_type > d_oldAtomIds
Definition: AtomIdsPartition.h:113
std::vector< size_type > nAtomIdsInProcessor() const
Function to return the vector of number of atoms in each processor.
Definition: AtomIdsPartition.t.cpp:411
~AtomIdsPartition()=default
Destructor for the class.
std::vector< size_type > d_nAtomIdsInProcessorCumulative
Definition: AtomIdsPartition.h:112
size_type nTotalAtomIds() const
Definition: AtomIdsPartition.t.cpp:446
std::vector< size_type > oldAtomIds() const
Function to return the vector of old atom ids i.e. oldAtomIds[newatomid] = oldatomid.
Definition: AtomIdsPartition.t.cpp:425
std::vector< size_type > d_newAtomIds
Definition: AtomIdsPartition.h:114
std::vector< size_type > d_nAtomIdsInProcessor
Definition: AtomIdsPartition.h:111
std::vector< size_type > newAtomIds() const
Function to return the vector of new atom ids i.e. newAtomIds[oldatomid] = newatomid.
Definition: AtomIdsPartition.t.cpp:432
std::vector< size_type > nAtomIdsInProcessorCumulative() const
Function to return the vector of cumulative number of atoms in each processor.
Definition: AtomIdsPartition.t.cpp:418
std::vector< size_type > d_atomIdsInProcessor
Definition: AtomIdsPartition.h:115
int MPIComm
Definition: MPITypes.h:84
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
std::uint64_t size_type
Definition: TypeConfig.h:9