1 #ifndef GENERATE_WF_HPP 2 #define GENERATE_WF_HPP 8 #include "executable.hpp" 15 #include "abstract_state_worker.hpp" 28 double d()
const {
return d_;};
31 double width()
const {
return width_;};
33 double length()
const {
return length_;};
35 size_t nx()
const {
return nx_;};
37 size_t ny()
const {
return ny_;};
39 size_t size()
const {
return data.size();};
45 complex
pixel(
size_t ix,
size_t iy)
const {
46 size_t index(ix + iy *
nx());
47 return index <
size() ? data[index] : complex(0.);};
50 size_t index(ix + iy *
nx());
51 if (index <
size()) data[index] = v;
55 for(std::vector<complex>::iterator value=data.begin();value!=data.end();value++) *value *= v;
58 typedef std::vector<complex>::const_iterator const_iterator;
60 const_iterator begin()
const {
return data.begin();};
61 const_iterator end()
const {
return data.end();};
63 std::unique_ptr<Bild> identical_image_from_vector(Vector&
d)
70 std::unique_ptr<Bild> image_from_vector(Vector& data,
78 std::vector<complex> data;
117 typedef STD_TR1::shared_ptr<image_Factory> ref;
122 std::unique_ptr<Bild> Image(MPI_Comm comm,
124 const size_t drawing_layer);
135 std::unique_ptr<Bild> prepbild;
137 STD_TR1::shared_ptr< std::list< STD_TR1::shared_ptr< abstract_image_parser> > >
140 void process_wv_(MPI_Comm,
const state s);
142 void init_state_worker();
144 void prepare_Image_(
const STD_TR1::shared_ptr<const Rectangle>&);
146 const char* name()
const {
return "Image";};
149 void post_process_(MPI_Comm);
size_t size() const
total number of pixels
Definition: generate_wavefunction.hpp:39
Class to contain wave-function image data.
Definition: generate_wavefunction.hpp:25
double rotation() const
rotation of the geometry
Definition: generate_wavefunction.hpp:43
complex pixel(size_t ix, size_t iy) const
value of wavefunction at pixel ix,iy
Definition: generate_wavefunction.hpp:45
Helper class to draw images efficiently.
Definition: pencils.hpp:13
double d() const
length (in units of the Hamiltonian geometry) of one pixel
Definition: generate_wavefunction.hpp:28
Abstract base class to process calculated wavefunctions.
Definition: image_parser.hpp:21
size_t nx() const
number of pixels in x direction
Definition: generate_wavefunction.hpp:35
void set_pixel(size_t ix, size_t iy, complex v)
change value of wavefunction at pixel ix,iy
Definition: generate_wavefunction.hpp:49
A class to create wavefunctions out of eigenstates, scattering states, or geometries.
Definition: generate_wavefunction.hpp:114
std::unique_ptr< std::vector< complex > > identical_vector_from_image(void) const
Added by AG.
Definition: generate_wavefunction.cpp:62
double length() const
length of the image (in units of the Hamiltonian geometry
Definition: generate_wavefunction.hpp:33
double width() const
width of the image (in units of the Hamiltonian geometry
Definition: generate_wavefunction.hpp:31
Definition: points.hpp:12
const point & pos_0() const
position where to start drawing the image
Definition: generate_wavefunction.hpp:41
size_t ny() const
number of pixels in y direction
Definition: generate_wavefunction.hpp:37
void multiply_by_number(complex v)
multiply whole image with complex number v; Added by AG
Definition: generate_wavefunction.hpp:54
abstract base class to work on wavefunctions (states)
Definition: abstract_state_worker.hpp:23