DFT-EFE
 
Loading...
Searching...
No Matches
RDM1.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 dftefe_RDM1_h
27#define dftefe_RDM1_h
28
29// C++ standard libraries
30#include <vector>
31#include <set>
32#include <utility>
33#include <unordered_map>
34#include <functional>
35#include <memory>
36
37#include <utils/MemoryStorage.h>
38#include <utils/TypeConfig.h>
39#include <ksdft/KSAttributes.h>
42
43namespace dftefe
44{
45 namespace ksdft
46 {
50 template <typename ValueType, dftefe::utils::MemorySpace memorySpace>
51 class RDM1
52 {
53 /*
54 * @brief typdefs
55 */
56 public:
57 using AttrStorage = std::vector<
58 dftefe::quadrature::
59 QuadratureValuesContainer<double, dftefe::utils::MemorySpace::HOST>>;
60 using AttrStorageRef = std::reference_wrapper<AttrStorage>;
61 using AttrStorageConstRef = std::reference_wrapper<const AttrStorage>;
62
63 public:
67 virtual ~RDM1() = default;
68
69 virtual void
70 setEvalDescrFlag(const bool evalFlag) = 0;
71
72 virtual void
74 const std::set<DensityDescrAttr> & densityAttrs,
75 const std::set<WfcDescrAttr> & wfcAttrs,
76 std::unordered_map<DensityDescrAttr, AttrStorage> &densityAttrVals,
77 std::unordered_map<WfcDescrAttr, AttrStorage> & wfcAttrVals) = 0;
78
79 virtual void
81 const std::unordered_map<DensityDescrAttr, AttrStorage>
82 & densityAttrVals,
83 const std::unordered_map<WfcDescrAttr, AttrStorage> &wfcAttrVals) = 0;
84
85 virtual void
87 const std::set<DensityObsAttr> &densityObsAttrs,
88 std::unordered_map<DensityObsAttr, std::vector<std::vector<double>>>
89 &densityObsAttrVals) = 0;
90
91 virtual bool
92 isSpinPolarized() const = 0;
93
94 virtual bool
95 isNonCollinear() const = 0;
96
97 virtual bool
98 isSOC() const = 0;
99
100 virtual size_type
101 getnKSOrbs() const = 0;
102
103 virtual std::vector<double>
104 getkPointCoords() const = 0;
105
106 virtual std::vector<double>
107 getkPointWeights() const = 0;
108
109 virtual std::unique_ptr<RDM1<ValueType, memorySpace>>
110 clone() const = 0;
111 };
112
113 } // namespace ksdft
114} // namespace dftefe
115#endif // dftefe_RDM1_h
Abstract class for the one-particle reduced density matrix.
Definition: RDM1.h:52
virtual std::vector< double > getkPointWeights() const =0
virtual std::unique_ptr< RDM1< ValueType, memorySpace > > clone() const =0
std::vector< dftefe::quadrature::QuadratureValuesContainer< double, dftefe::utils::MemorySpace::HOST > > AttrStorage
Definition: RDM1.h:59
virtual bool isNonCollinear() const =0
virtual ~RDM1()=default
Default destructor.
virtual std::vector< double > getkPointCoords() const =0
virtual bool isSpinPolarized() const =0
std::reference_wrapper< AttrStorage > AttrStorageRef
Definition: RDM1.h:60
std::reference_wrapper< const AttrStorage > AttrStorageConstRef
Definition: RDM1.h:61
virtual void getDensityObs(const std::set< DensityObsAttr > &densityObsAttrs, std::unordered_map< DensityObsAttr, std::vector< std::vector< double > > > &densityObsAttrVals)=0
virtual void setDescriptors(const std::unordered_map< DensityDescrAttr, AttrStorage > &densityAttrVals, const std::unordered_map< WfcDescrAttr, AttrStorage > &wfcAttrVals)=0
virtual void getDescriptors(const std::set< DensityDescrAttr > &densityAttrs, const std::set< WfcDescrAttr > &wfcAttrs, std::unordered_map< DensityDescrAttr, AttrStorage > &densityAttrVals, std::unordered_map< WfcDescrAttr, AttrStorage > &wfcAttrVals)=0
virtual void setEvalDescrFlag(const bool evalFlag)=0
virtual size_type getnKSOrbs() const =0
virtual bool isSOC() const =0
DensityObsAttr
Definition: KSAttributes.h:48
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
std::uint64_t size_type
Definition: TypeConfig.h:9