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