Quantum 3xplorer (Q3)
Loading...
Searching...
No Matches
ff_transformable.hpp
Go to the documentation of this file.
1
#pragma once
2
3
/**
4
* FFTransformable — base class for planewave fields with dual real/reciprocal space storage.
5
*
6
* Provides typed storage for both the real-space and reciprocal-space
7
* representations of a Fourier-transformable field, plus pure virtual
8
* transform methods that subclasses implement using their specific FFT basis.
9
*
10
* Template parameters:
11
* RealRepresentationType — e.g. std::vector<std::vector<Real>> for spin-resolved grids
12
* ReciprocalRepresentationType — e.g. std::vector<Complex> for G-space coefficients
13
*/
14
15
namespace
q3
{
16
17
template
<
typename
RealRepresentationType,
typename
ReciprocalRepresentationType>
18
class
FFTransformable
{
19
public
:
20
virtual
~FFTransformable
() =
default
;
21
22
// ─── Representation access ───────────────────────────────────────────────
23
[[nodiscard]]
const
RealRepresentationType&
real_space_representation
()
const
{
24
return
real_space_data_
;
25
}
26
RealRepresentationType&
real_space_representation
() {
27
return
real_space_data_
;
28
}
29
[[nodiscard]]
const
ReciprocalRepresentationType&
reciprocal_space_representation
()
const
{
30
return
reciprocal_space_data_
;
31
}
32
ReciprocalRepresentationType&
reciprocal_space_representation
() {
33
return
reciprocal_space_data_
;
34
}
35
36
// ─── Transforms ─────────────────────────────────────────────────────────
37
virtual
void
to_reciprocal_space
() = 0;
38
virtual
void
to_real_space
() = 0;
39
40
protected
:
41
RealRepresentationType
real_space_data_
;
42
ReciprocalRepresentationType
reciprocal_space_data_
;
43
};
44
45
}
// namespace q3
q3::FFTransformable
Definition
ff_transformable.hpp:18
q3::FFTransformable::real_space_representation
RealRepresentationType & real_space_representation()
Definition
ff_transformable.hpp:26
q3::FFTransformable::real_space_representation
const RealRepresentationType & real_space_representation() const
Definition
ff_transformable.hpp:23
q3::FFTransformable::~FFTransformable
virtual ~FFTransformable()=default
q3::FFTransformable::reciprocal_space_representation
const ReciprocalRepresentationType & reciprocal_space_representation() const
Definition
ff_transformable.hpp:29
q3::FFTransformable::real_space_data_
RealRepresentationType real_space_data_
Definition
ff_transformable.hpp:41
q3::FFTransformable::to_real_space
virtual void to_real_space()=0
q3::FFTransformable::to_reciprocal_space
virtual void to_reciprocal_space()=0
q3::FFTransformable::reciprocal_space_representation
ReciprocalRepresentationType & reciprocal_space_representation()
Definition
ff_transformable.hpp:32
q3::FFTransformable::reciprocal_space_data_
ReciprocalRepresentationType reciprocal_space_data_
Definition
ff_transformable.hpp:42
q3
Definition
q3_core_api.hpp:33
src
layer_3_representation
mixins
ff_transformable.hpp
Generated by
1.9.8