TBTK
Need a break? Support the development by playing
Polarity Puzzles
IndexTreeGenerator.h
1
/* Copyright 2019 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
25
#ifndef COM_DAFER45_TBTK_PROPERTY_EXTRACTOR_INDEX_TREE_GENERATOR
26
#define COM_DAFER45_TBTK_PROPERTY_EXTRACTOR_INDEX_TREE_GENERATOR
27
28
#include "
TBTK/Index.h
"
29
#include "TBTK/Property/AbstractProperty.h"
30
#include "
TBTK/Property/Density.h
"
31
#include "
TBTK/Property/DOS.h
"
32
#include "
TBTK/Property/LDOS.h
"
33
#include "
TBTK/Property/Magnetization.h
"
34
#include "
TBTK/Property/SpinPolarizedLDOS.h
"
35
36
#include <complex>
37
//#include <initializer_list>
38
39
namespace
TBTK{
40
namespace
PropertyExtractor{
41
77
class
IndexTreeGenerator
{
78
public
:
83
IndexTreeGenerator
(
const
Model
&model);
84
93
IndexTree
generateAllIndices
(
const
std::vector<Index> &patterns)
const
;
94
104
IndexTree
generateMemoryLayout
(
const
std::vector<Index> &patterns)
const
;
105
private
:
107
const
Model
&model;
108
118
IndexTree
generate(
119
const
std::vector<Index> &patterns,
120
bool
keepSummationWildcard
121
)
const
;
122
};
123
124
inline
IndexTree
IndexTreeGenerator::generateAllIndices
(
125
const
std::vector<Index> &patterns
126
)
const
{
127
return
generate(patterns,
false
);
128
}
129
130
inline
IndexTree
IndexTreeGenerator::generateMemoryLayout
(
131
const
std::vector<Index> &patterns
132
)
const
{
133
return
generate(patterns,
true
);
134
}
135
136
};
//End of namespace PropertyExtractor
137
};
//End of namespace TBTK
138
139
#endif
TBTK::Model
Container of Model related information.
Definition:
Model.h:57
TBTK::PropertyExtractor::IndexTreeGenerator::IndexTreeGenerator
IndexTreeGenerator(const Model &model)
Index.h
Physical index.
TBTK::PropertyExtractor::IndexTreeGenerator::generateMemoryLayout
IndexTree generateMemoryLayout(const std::vector< Index > &patterns) const
Definition:
IndexTreeGenerator.h:130
LDOS.h
Property container for local density of states (LDOS).
SpinPolarizedLDOS.h
Property container for spin-polarized local density of states (spin-polarized LDOS).
DOS.h
Property container for density of states (DOS).
Magnetization.h
Property container for magnetization.
TBTK::IndexTree
Data structure for mapping physical indices to linear indices.
Definition:
IndexTree.h:35
Density.h
Property container for density.
TBTK::PropertyExtractor::IndexTreeGenerator
Generates IndexTrees to be used as loop ranges and memory layout for Properties in the PropertyExtrac...
Definition:
IndexTreeGenerator.h:77
TBTK::PropertyExtractor::IndexTreeGenerator::generateAllIndices
IndexTree generateAllIndices(const std::vector< Index > &patterns) const
Definition:
IndexTreeGenerator.h:124
TBTK
Lib
include
TBTK
PropertyExtractor
IndexTreeGenerator.h
Generated on Sat Jul 27 2024 12:03:36 for TBTK by
1.8.17