DFT-EFE
 
Loading...
Searching...
No Matches
AtomSphericalData.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 dftefeAtomSphericalData_h
27#define dftefeAtomSphericalData_h
28
29#include <utils/TypeConfig.h>
30#include <atoms/SphericalData.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 AtomSphericalData
57 {
58 public:
59 AtomSphericalData(const std::string fileName,
60 const std::vector<std::string> &fieldNames,
61 const std::vector<std::string> &metadataNames);
62
63 ~AtomSphericalData() = default;
64
65 std::string
66 getFileName() const;
67
68 std::vector<std::string>
69 getFieldNames() const;
70
71 std::vector<std::string>
72 getMetadataNames() const;
73
74 const std::vector<std::shared_ptr<SphericalData>> &
75 getSphericalData(const std::string fieldName) const;
76
77 const std::shared_ptr<SphericalData>
78 getSphericalData(const std::string fieldName,
79 const std::vector<int> &qNumbers) const;
80
81 std::string
82 getMetadata(const std::string metadataName) const;
83
85 getQNumberID(const std::string fieldName,
86 const std::vector<int> &qNumbers) const;
87
89 nSphericalData(std::string fieldName) const;
90
91 private:
92 std::string d_fileName;
93 std::vector<std::string> d_fieldNames;
94 std::vector<std::string> d_metadataNames;
95 std::unordered_map<std::string,
96 std::vector<std::shared_ptr<SphericalData>>>
97 d_sphericalData;
98 std::unordered_map<std::string, std::map<std::vector<int>, size_type>>
99 d_qNumbersToIdMap;
100 std::unordered_map<std::string, std::string> d_metadata;
101 };
102 } // end of namespace atoms
103} // end of namespace dftefe
104#endif // dftefeAtomSphericalData_h
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8