DFT-EFE
 
Loading...
Searching...
No Matches
AtomSphericalDataContainer.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
24 */
25
26#ifndef dftefeAtomSphericalDataContainer_h
27#define dftefeAtomSphericalDataContainer_h
28
29#include <utils/TypeConfig.h>
30#include <unordered_map>
31#include <map>
32#include <string>
33#include <utils/Spline.h>
34#include <memory>
36#include <atoms/SphericalData.h>
38namespace dftefe
39{
40 namespace atoms
41 {
43 {
46 };
61 class AtomSphericalDataContainer
62 {
63 public:
73 AtomSphericalDataContainer(
74 const AtomSphericalDataType & atomSphericalDataType,
75 const std::map<std::string, std::string> &atomSymbolToFilename,
76 const std::vector<std::string> & fieldNames,
77 const std::vector<std::string> & metadataNames,
78 const bool isSplineHarmonicEval = true);
79
83 ~AtomSphericalDataContainer() = default;
84
85 void
86 addFieldName(const std::string fieldName);
87
88 const std::vector<std::string> &
89 getFieldNames();
90
91 const std::vector<std::string> &
92 getMetadataNames();
93
102 const std::vector<std::shared_ptr<SphericalData>> &
103 getSphericalData(std::string atomSymbol,
104 const std::string fieldName) const;
105
106
107 const std::shared_ptr<SphericalData>
108 getSphericalData(std::string atomSymbol,
109 const std::string fieldName,
110 const std::vector<int> &qNumbers) const;
111
112 std::string
113 getMetadata(std::string atomSymbol, std::string metadataName) const;
114
116 nSphericalData(std::string atomSymbol, std::string fieldName) const;
117
118 std::vector<std::vector<int>>
119 getQNumbers(std::string atomSymbol, const std::string fieldName) const;
120
122 getQNumberID(std::string atomSymbol,
123 const std::string fieldName,
124 const std::vector<int> &qNumbers) const;
125
126 std::map<std::string, std::string>
127 atomSymbolToFileMap() const; // Name is fine ??
128 // added a d_atomSymbolToFilename return function
129
130 private:
131 std::map<std::string, std::string> d_atomSymbolToFilename;
132 std::vector<std::string> d_fieldNames;
133 std::vector<std::string> d_metadataNames;
134 std::unordered_map<std::string, std::shared_ptr<AtomSphericalData>>
135 d_mapAtomSymbolToAtomSphericalData;
136
137 std::shared_ptr<const SphericalHarmonicFunctions>
138 d_SphericalHarmonicFunctions;
139 const bool d_isAssocLegendreSplineEval;
140
141 }; // end of class AtomSphericalDataContainer
142 } // end of namespace atoms
143} // end of namespace dftefe
144#endif // dftefeAtomSphericalDataContainer_h
AtomSphericalDataType
Definition: AtomSphericalDataContainer.h:43
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8