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 <utils/TypeConfig.h>
31#include <vector>
32#include <string>
33#include <utils/MPITypes.h>
34#include <utils/MPIWrapper.h>
35namespace dftefe
36{
37 namespace basis
38 {
47 template <unsigned int dim>
49 {
50 public:
64 const std::vector<utils::Point> & atomCoordinates,
65 const std::vector<double> & minbound,
66 const std::vector<double> & maxbound,
67 const std::vector<std::vector<utils::Point>> &cellVerticesVector,
68 const double tolerance,
69 const utils::mpi::MPIComm & comm);
70
74 ~AtomIdsPartition() = default;
75
79 std::vector<size_type>
80 nAtomIdsInProcessor() const;
81
85 std::vector<size_type>
87
91 std::vector<size_type>
92 oldAtomIds() const;
93
97 std::vector<size_type>
98 newAtomIds() const;
99
103 std::vector<size_type>
104 locallyOwnedAtomIds() const;
105
106 private:
107 std::vector<size_type> d_nAtomIdsInProcessor;
108 std::vector<size_type> d_nAtomIdsInProcessorCumulative;
109 std::vector<size_type> d_oldAtomIds;
110 std::vector<size_type> d_newAtomIds;
111 std::vector<size_type> d_atomIdsInProcessor;
112 }; // end of class AtomIdsPartition
113 } // end of namespace basis
114} // end of namespace dftefe
115#include "AtomIdsPartition.t.cpp"
116#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:49
std::vector< size_type > locallyOwnedAtomIds() const
Function to return the vector of locally owned atom is in each processor.
Definition: AtomIdsPartition.t.cpp:438
std::vector< size_type > d_oldAtomIds
Definition: AtomIdsPartition.h:109
std::vector< size_type > nAtomIdsInProcessor() const
Function to return the vector of number of atoms in each processor.
Definition: AtomIdsPartition.t.cpp:410
~AtomIdsPartition()=default
Destructor for the class.
std::vector< size_type > d_nAtomIdsInProcessorCumulative
Definition: AtomIdsPartition.h:108
std::vector< size_type > oldAtomIds() const
Function to return the vector of old atom ids i.e. oldAtomIds[newatomid] = oldatomid.
Definition: AtomIdsPartition.t.cpp:424
std::vector< size_type > d_newAtomIds
Definition: AtomIdsPartition.h:110
std::vector< size_type > d_nAtomIdsInProcessor
Definition: AtomIdsPartition.h:107
std::vector< size_type > newAtomIds() const
Function to return the vector of new atom ids i.e. newAtomIds[oldatomid] = newatomid.
Definition: AtomIdsPartition.t.cpp:431
std::vector< size_type > nAtomIdsInProcessorCumulative() const
Function to return the vector of cumulative number of atoms in each processor.
Definition: AtomIdsPartition.t.cpp:417
std::vector< size_type > d_atomIdsInProcessor
Definition: AtomIdsPartition.h:111
int MPIComm
Definition: MPITypes.h:83
dealii includes
Definition: AtomFieldDataSpherical.cpp:31