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 std::map<std::string, std::string> additionalParams =
79 std::map<std::string, std::string>(), // additionalParams["rcSmear"]
80 const bool isSplineHarmonicEval = true);
81
82 AtomSphericalDataContainer(
83 const std::map<std::string,
84 std::map<std::string, std::vector<std::vector<int>>>>
85 &atomSymbolToFieldToQuantumNumVec,
86 const std::map<
87 std::string,
88 std::map<
89 std::string,
90 std::vector<std::shared_ptr<utils::ScalarSpatialFunctionReal>>>>
91 &atomSymbolToFieldToScalarSpatialFnRealVec,
92 const std::vector<std::string> &fieldNames,
93 const bool isSplineHarmonicEval = true);
94
98 ~AtomSphericalDataContainer() = default;
99
100 void
101 addFieldName(const std::string fieldName);
102
103 const std::vector<std::string> &
104 getFieldNames();
105
106 const std::vector<std::string> &
107 getMetadataNames();
108
117 const std::vector<std::shared_ptr<SphericalData>> &
118 getSphericalData(std::string atomSymbol,
119 const std::string fieldName) const;
120
121
122 const std::shared_ptr<SphericalData>
123 getSphericalData(std::string atomSymbol,
124 const std::string fieldName,
125 const std::vector<int> &qNumbers) const;
126
127 std::string
128 getMetadata(std::string atomSymbol, std::string metadataName) const;
129
131 nSphericalData(std::string atomSymbol, std::string fieldName) const;
132
133 std::vector<std::vector<int>>
134 getQNumbers(std::string atomSymbol, const std::string fieldName) const;
135
137 getQNumberID(std::string atomSymbol,
138 const std::string fieldName,
139 const std::vector<int> &qNumbers) const;
140
141 std::map<std::string, std::string>
142 atomSymbolToFileMap() const; // Name is fine ??
143 // added a d_atomSymbolToFilename return function
144
145 private:
146 std::map<std::string, std::string> d_atomSymbolToFilename;
147 std::vector<std::string> d_fieldNames;
148 std::vector<std::string> d_metadataNames;
149 std::unordered_map<std::string, std::shared_ptr<AtomSphericalData>>
150 d_mapAtomSymbolToAtomSphericalData;
151
152 std::shared_ptr<const SphericalHarmonicFunctions>
153 d_SphericalHarmonicFunctions;
154 const bool d_isAssocLegendreSplineEval;
155
156 }; // end of class AtomSphericalDataContainer
157 } // end of namespace atoms
158} // end of namespace dftefe
159#endif // dftefeAtomSphericalDataContainer_h
AtomSphericalDataType
Definition: AtomSphericalDataContainer.h:43
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8