Greens-code
A modular quantum transport code
Public Types | Public Member Functions | Friends | List of all members
Rectangle Class Referenceabstract

Abstract class that defines a geomeetry. More...

#include <rectangle.hpp>

Inheritance diagram for Rectangle:
Inheritance graph
[legend]
Collaboration diagram for Rectangle:
Collaboration graph
[legend]

Public Types

typedef STD_TR1::shared_ptr< Rectangleref
 
typedef STD_TR1::shared_ptr< const Rectangleconst_ref
 
- Public Types inherited from loadable_Object
typedef STD_TR1::shared_ptr< loadable_Objectref
 
typedef STD_TR1::shared_ptr< const loadable_Objectconst_ref
 
typedef std::pair< std::string, ref > ref_pair
 
typedef STD_TR1::weak_ptr< loadable_Objectlink
 
typedef STD_TR1::weak_ptr< const loadable_Objectconst_link
 

Public Member Functions

geometry_Iterator begin ()
 Return an iterator to the first rectangle slice.
 
geometry_Iterator end ()
 Return an iterator to one behind the last slice.
 
geometry_Iterator rbegin ()
 Return an iterator to the last slice.
 
geometry_const_Iterator begin () const
 Return a const iterator to the first rectangle slice.
 
geometry_const_Iterator end () const
 Return a const iterator to one behind the last slice.
 
geometry_const_Iterator rbegin () const
 Return a const iterator to the last slice.
 
void create_H (Matrix &m) const
 
void create_H (Matrix &m, const geometry_const_Iterator &pos, size_t nx) const
 
void visit (Rectangle_Visitor &) const
 Perform a visit using a angle_Visitor.
 
size_t layers () const
 number of physical layers
 
size_t drawing_layers () const
 number of drawing layers of the Hamiltonians
 
size_t grid_points () const
 total number of grid points
 
size_t blocks () const
 number of building blocks
 
const_ref block (size_t block_number) const
 const_ref to building block (is ref to self if no such block there
 
Interface_const_ref interface (size_t block_number) const
 const_ref to the interfaces between the blocks
 
STD_TR1::shared_ptr< index_connectorleft (size_t index) const
 const_ref to the index connectors of interfaces between blocks
 
STD_TR1::shared_ptr< index_connectorright (size_t index) const
 
size_t nx () const
 
size_t nx (size_t block_max) const
 
double dy (const geometry_const_Iterator &ci) const
 return offset in y direction to next slice, usually zero
 
double dx (const geometry_const_Iterator &ci) const
 return offset in x direction to next slice
 
double dphi (const geometry_const_Iterator &ci) const
 return rotation change to next slice
 
double rotation () const
 return total rotation of rectangle
 
virtual bool leaf () const =0
 
virtual size_t size () const =0
 
Rectangle::const_ref get_R (size_t pos) const
 
Hamiltonian::const_ref get_H (size_t pos) const
 
Rectangle::ref get_R (size_t pos)
 
Hamiltonian::ref get_H (size_t pos)
 
- Public Member Functions inherited from loadable_Object
void write_xml (std::ostream &) const
 Output the xml code that would construct the object to stream.
 
 loadable_Object ()
 Empty construction, objects are initialized by init routine.
 
const char * class_Name () const
 Calls virtual const char* name(), which must be redefined for derived classes.
 
bool get_param (const std::string &s, double &v) const
 get a double, integer or string parameter by name (s), return wether parameter exists
 
bool get_param (const std::string &s, int &v) const
 
bool get_param (const std::string &s, std::string &v) const
 
double get_double_param (const std::string &s) const
 get a double, integer or string parameter, throw if it does not exist
 
int get_int_param (const std::string &s) const
 
std::string get_string_param (const std::string &s) const
 
void set_param (const std::string &s, double v)
 set a double, integer or string parameter
 
void set_param (const std::string &s, int v)
 
void set_param (const std::string &s, std::string v)
 
bool get_bool (const std::string &s, const bool def) const
 return bool parameter, return def if string not found
 
void acquire_params (const const_ref &)
 import all parameters from another object
 
void insert_object (const std::string &s, ref o)
 insert an object as parameter
 
void link_object (const std::string &s, ref o)
 insert a link to an object as parameter, the refered object must be defined elsewhere
 
bool get_component (const std::string &s, const_ref &) const
 get a contained object by string s, return wether it exists
 
bool get_component (const std::string &s, ref &)
 
const_ref get_component (const std::string &s) const
 get a contained object by string s, throw if it does not exist
 
ref get_component (const std::string &s)
 
template<typename T >
STD_TR1::shared_ptr< T > get_dynamic_component (const std::string &s)
 get a contained object with a dynamic cast More...
 
template<typename T >
STD_TR1::shared_ptr< const T > get_dynamic_component (const std::string &s) const
 
ref get_ref ()
 Get a shared_ptr to this object. More...
 
const_ref get_ref () const
 
template<typename T >
STD_TR1::shared_ptr< T > get_dynamic_ref ()
 Get a dynamic reference to this object. More...
 
template<typename T >
STD_TR1::shared_ptr< const T > get_dynamic_ref () const
 
void initialize (ref me)
 called by the xml_parser to initialize the object More...
 
void set_correct_ref (ref me)
 called to set reference to object More...
 
bool is_initialized () const
 returns whether the object has been correctly initialized
 
void require_initialized () const
 throws if is_initialized returns false
 
void force_reinit ()
 call if parameters are changed, object is completely reinitialized, children are not
 
void register_Observer (Observer::ref)
 register/unregister Observer: All registered Observers will have notify() called upon state change (reinit)
 
void unregister_Observer (Observer::ref)
 
size_t nparams () const
 returns total number of parameters
 
ref clone () const
 returns a complete clone of the Object and all parameters (with correct dynamic type)
 
virtual size_t verbosity ()
 

Friends

class geometry_Iterator
 
class geometry_const_Iterator
 

Additional Inherited Members

- Static Public Member Functions inherited from loadable_Object
template<class T >
static STD_TR1::shared_ptr< const T > clone (const STD_TR1::shared_ptr< const T > r)
 
template<class T >
static STD_TR1::shared_ptr< T > clone (STD_TR1::shared_ptr< T > r)
 

Detailed Description

Abstract class that defines a geomeetry.

Abstract base class that builds up geometries. A rectangle consists of either other rectangles, or slices . Each slice is represented by a Hamiltonian. Adjacent rectangles are connected using an Interface. A rectangle keeps track of all Hamiltonians needed to represent it and offers a method to fill a matrix with the correct matrix elements. Rectangle supports a visiting class (i.e. a Visitor pattern) using Rectangle_Visitor to allow for more complex operations on a geometry


The documentation for this class was generated from the following files: