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