DFT-EFE
 
Loading...
Searching...
No Matches
BasisManager.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 Bikash Kanungo, Avirup Sircar
24 */
25
26#ifndef dftefeBasisManager_h
27#define dftefeBasisManager_h
28
30#include <utils/Point.h>
34#include "DealiiConversions.h"
35#include <utils/TypeConfig.h>
36#include <utils/MemoryStorage.h>
37#include <utils/MPIPatternP2P.h>
38#include <string>
39namespace dftefe
40{
41 namespace basis
42 {
51 template <typename ValueTypeBasisCoeff,
54 {
55 //
56 // typedefs
57 //
58 public:
67
68 public:
69 ~BasisManager() = default;
70
71 virtual const BasisDofHandler &
72 getBasisDofHandler() const = 0;
73
75 getConstraints() const = 0;
76
77 virtual std::shared_ptr<const utils::mpi::MPIPatternP2P<memorySpace>>
78 getMPIPatternP2P() const = 0;
79
80 virtual std::vector<std::pair<global_size_type, global_size_type>>
82
83 virtual const GlobalSizeTypeVector &
84 getGhostIndices() const = 0;
85
86 virtual size_type
87 nLocal() const = 0;
88
89 virtual size_type
90 nLocallyOwned() const = 0;
91
92 virtual size_type
93 nGhost() const = 0;
94
95 virtual std::pair<bool, size_type>
96 inLocallyOwnedRanges(const global_size_type globalId) const = 0;
97
98 virtual std::pair<bool, size_type>
99 isGhostEntry(const global_size_type ghostId) const = 0;
100
101 virtual size_type
102 globalToLocalIndex(const global_size_type globalId) const = 0;
103
104 virtual global_size_type
105 localToGlobalIndex(const size_type localId) const = 0;
106
107 virtual void
109 dftefe::utils::Point &basisCenter) const = 0;
110 };
111
112 } // end of namespace basis
113} // end of namespace dftefe
114#endif // dftefeBasisManager_h
Definition: BasisDofHandler.h:41
An abstract class to encapsulate the partitioning of a basis across multiple processors.
Definition: BasisManager.h:54
virtual const BasisDofHandler & getBasisDofHandler() const =0
virtual void getBasisCenters(const size_type localId, dftefe::utils::Point &basisCenter) const =0
virtual size_type nGhost() const =0
virtual const ConstraintsLocal< ValueTypeBasisCoeff, memorySpace > & getConstraints() const =0
virtual const GlobalSizeTypeVector & getGhostIndices() const =0
virtual size_type nLocal() const =0
virtual std::pair< bool, size_type > inLocallyOwnedRanges(const global_size_type globalId) const =0
virtual std::shared_ptr< const utils::mpi::MPIPatternP2P< memorySpace > > getMPIPatternP2P() const =0
typename GlobalSizeTypeVector::iterator GlobalIndexIter
Definition: BasisManager.h:64
virtual global_size_type localToGlobalIndex(const size_type localId) const =0
virtual size_type nLocallyOwned() const =0
typename SizeTypeVector::iterator LocalIndexIter
Definition: BasisManager.h:62
virtual size_type globalToLocalIndex(const global_size_type globalId) const =0
typename GlobalSizeTypeVector::const_iterator const_GlobalIndexIter
Definition: BasisManager.h:66
typename SizeTypeVector::const_iterator const_LocalIndexIter
Definition: BasisManager.h:63
virtual std::vector< std::pair< global_size_type, global_size_type > > getLocallyOwnedRanges() const =0
virtual std::pair< bool, size_type > isGhostEntry(const global_size_type ghostId) const =0
Definition: ConstraintsLocal.h:43
const size_type * const_iterator
Definition: MemoryStorage.h:60
size_type * iterator
Definition: MemoryStorage.h:59
Definition: PointImpl.h:13
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