TBTK
Need a break? Support the development by playing Polarity Puzzles
LDOS.h
Go to the documentation of this file.
1 /* Copyright 2016 Kristofer Björnson
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
23 #ifndef COM_DAFER45_TBTK_LDOS
24 #define COM_DAFER45_TBTK_LDOS
25 
27 
28 namespace TBTK{
29 namespace Property{
30 
48 class LDOS : public EnergyResolvedProperty<double>{
49 public:
51  LDOS();
52 
62  LDOS(
63  const std::vector<int> &ranges,
64  double lowerBound,
65  double upperBound,
66  int resolution
67  );
68 
80  LDOS(
81  const std::vector<int> &ranges,
82  double lowerBound,
83  double upperBound,
84  int resolution,
85  const double *data
86  );
87 
97  LDOS(
98  const IndexTree &indexTree,
99  double lowerBound,
100  double upperBound,
101  int resolution
102  );
103 
115  LDOS(
116  const IndexTree &indexTree,
117  double lowerBound,
118  double upperBound,
119  int resolution,
120  const double *data
121  );
122 
129  LDOS(const std::string &serialization, Mode mode);
130 
132  LDOS& operator+=(const LDOS &rhs);
133 
140  LDOS operator+(const LDOS &rhs) const;
141 
143  LDOS& operator-=(const LDOS &rhs);
144 
151  LDOS operator-(const LDOS &rhs) const;
152 
154  LDOS& operator*=(const double &rhs);
155 
162  LDOS operator*(const double &rhs) const;
163 
170  friend LDOS operator*(const double &lhs, const LDOS &rhs){
171  return rhs*lhs;
172  }
173 
175  LDOS& operator/=(const double &rhs);
176 
183  LDOS operator/(const double &rhs) const;
184 
186  virtual std::string toString() const;
187 
189  virtual std::string serialize(Mode mode) const;
190 private:
191 };
192 
193 inline LDOS::LDOS(){
194 }
195 
196 inline LDOS& LDOS::operator+=(const LDOS &rhs){
198 
199  return *this;
200 }
201 
202 inline LDOS LDOS::operator+(const LDOS &rhs) const{
203  LDOS ldos = *this;
204 
205  return ldos += rhs;
206 }
207 
208 inline LDOS& LDOS::operator-=(const LDOS &rhs){
210 
211  return *this;
212 }
213 
214 inline LDOS LDOS::operator-(const LDOS &rhs) const{
215  LDOS ldos = *this;
216 
217  return ldos -= rhs;
218 }
219 
220 inline LDOS& LDOS::operator*=(const double &rhs){
222 
223  return *this;
224 }
225 
226 inline LDOS LDOS::operator*(const double &rhs) const{
227  LDOS ldos = *this;
228 
229  return ldos *= rhs;
230 }
231 
232 inline LDOS& LDOS::operator/=(const double &rhs){
234 
235  return *this;
236 }
237 
238 inline LDOS LDOS::operator/(const double &rhs) const{
239  LDOS ldos = *this;
240 
241  return ldos /= rhs;
242 }
243 
244 }; //End namespace Property
245 }; //End namespace TBTK
246 
247 #endif
Property container for the local density of states (LDOS).
Definition: LDOS.h:48
LDOS operator*(const double &rhs) const
Definition: LDOS.h:226
LDOS & operator*=(const double &rhs)
Definition: LDOS.h:220
LDOS & operator/=(const double &rhs)
Definition: LDOS.h:232
Base class for energy resolved Properties.
Definition: EnergyResolvedProperty.h:83
virtual std::string serialize(Mode mode) const
LDOS operator+(const LDOS &rhs) const
Definition: LDOS.h:202
LDOS & operator-=(const LDOS &rhs)
Definition: LDOS.h:208
LDOS & operator+=(const LDOS &rhs)
Definition: LDOS.h:196
LDOS operator-(const LDOS &rhs) const
Definition: LDOS.h:214
virtual std::string toString() const
EnergyResolvedProperty & operator*=(const DataType &rhs)
Definition: EnergyResolvedProperty.h:1379
Data structure for mapping physical indices to linear indices.
Definition: IndexTree.h:35
EnergyResolvedProperty & operator-=(const EnergyResolvedProperty &rhs)
Definition: EnergyResolvedProperty.h:1287
Base class for energy resolved Properties.
Definition: Boolean.h:32
EnergyResolvedProperty & operator/=(const DataType &rhs)
Definition: EnergyResolvedProperty.h:1389
Mode
Definition: Serializable.h:47
LDOS()
Definition: LDOS.h:193
LDOS operator/(const double &rhs) const
Definition: LDOS.h:238
EnergyResolvedProperty & operator+=(const EnergyResolvedProperty &rhs)
Definition: EnergyResolvedProperty.h:1195
friend LDOS operator*(const double &lhs, const LDOS &rhs)
Definition: LDOS.h:170