DFT-EFE
 
Loading...
Searching...
No Matches
AtomSphericalDataAnalytical.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 dftefeAtomSphericalDataAnalytical_h
27#define dftefeAtomSphericalDataAnalytical_h
28
29#include <utils/TypeConfig.h>
32#include <memory>
33#include <unordered_map>
34#include <map>
35#include <vector>
36#include <string>
37namespace dftefe
38{
39 namespace atoms
40 {
56 class AtomSphericalDataAnalytical : public AtomSphericalData
57 {
58 public:
59 AtomSphericalDataAnalytical(
60 const std::map<std::string, std::vector<std::vector<int>>>
61 &fieldToQuantumNumbersVec,
62 const std::map<
63 std::string,
64 std::vector<std::shared_ptr<utils::ScalarSpatialFunctionReal>>>
65 & fieldToScalarSpatialFnRealVec,
66 const std::vector<std::string> & fieldNames,
67 const SphericalHarmonicFunctions &sphericalHarmonicFunc);
68
69 ~AtomSphericalDataAnalytical() = default;
70
71 void
72 addFieldName(const std::string fieldName) override;
73
74 std::string
75 getFileName() const override;
76
77 std::vector<std::string>
78 getFieldNames() const override;
79
80 std::vector<std::string>
81 getMetadataNames() const override;
82
83 const std::vector<std::shared_ptr<SphericalData>> &
84 getSphericalData(const std::string fieldName) const override;
85
86 const std::shared_ptr<SphericalData>
87 getSphericalData(const std::string fieldName,
88 const std::vector<int> &qNumbers) const override;
89
90 std::string
91 getMetadata(const std::string metadataName) const override;
92
94 getQNumberID(const std::string fieldName,
95 const std::vector<int> &qNumbers) const override;
96
98 nSphericalData(std::string fieldName) const override;
99
100 private:
101 void
102 getSphericalDataFromSpatialFn(
103 std::vector<std::shared_ptr<SphericalData>> &sphericalDataVec,
104 const std::map<std::string, std::vector<std::vector<int>>>
105 &fieldToQuantumNumbersVec,
106 const std::map<
107 std::string,
108 std::vector<std::shared_ptr<utils::ScalarSpatialFunctionReal>>>
109 & fieldToScalarSpatialFnRealVec,
110 const std::string & fieldName,
111 const SphericalHarmonicFunctions &sphericalHarmonicFunc);
112
113 std::vector<std::string> d_fieldNames;
114 const double d_radialPointMax;
115 std::unordered_map<std::string,
116 std::vector<std::shared_ptr<SphericalData>>>
117 d_sphericalData;
118 std::unordered_map<std::string, std::map<std::vector<int>, size_type>>
119 d_qNumbersToIdMap;
120 const SphericalHarmonicFunctions &d_sphericalHarmonicFunc;
121 };
122 } // end of namespace atoms
123} // end of namespace dftefe
124#endif // dftefeAtomSphericalDataAnalytical_h
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8