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

abstract base class to work on wavefunctions (states) More...

#include <abstract_state_worker.hpp>

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

Public Types

typedef STD_TR1::shared_ptr< const state_workerconst_ref
 
typedef STD_TR1::shared_ptr< state_workerref
 
- Public Types inherited from executable_Object
typedef STD_TR1::shared_ptr< executable_Objectref
 
- 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

void process_wvs (MPI_Comm comm, const state_collection::const_ref sc)
 process wavefunction of Rectangle in state, using filen and n More...
 
void process_geometry (const std::string &filen, const STD_TR1::shared_ptr< const Rectangle > &rect)
 create a wv showing geometry of Rectangle, use filen to create output filename
 
void process_potential (const std::string &filen, const STD_TR1::shared_ptr< const Rectangle > &rect)
 create a wv showing potential inside Rectangle, use filen to create output filename
 
int n_start ()
 return the starting index of a file
 
void prepare_wv (const STD_TR1::shared_ptr< const Rectangle > &r)
 prepae wavefunction creation, usually you do not need to call this explicitly
 
- Public Member Functions inherited from executable_Object
void setup_data (const std::string &f, size_t n)
 
void reinitialize_param (const std::string &param_name)
 
void perform (MPI_Comm comm, size_t rd)
 
void post_process (MPI_Comm comm, const std::vector< int > &thread_ids)
 
void perform (MPI_Comm comm, const std::string &f)
 
- 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 ()
 

Protected Member Functions

t_filename_list_ref get_filenames (MPI_Comm, const std::string &head, const std::string &getfilen, const std::string &identifier) const
 
- Protected Member Functions inherited from executable_Object
const std::string & get_filen () const
 
std::string get_id_filen () const
 
size_t get_run_id () const
 
size_t get_N () const
 
int get_thread_id (int i) const
 

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 base class to work on wavefunctions (states)

Abstract base class that processes states. Derived classes then output states as image, text-files etc.

Parameters: -[n_start]: index of first state -[write_geometry]: bool, default false, whether to output geometry as state -[write_potential]: bool, default false, whether to output potential as state -[geometry]: If one of the two flags above is used, provide the associated geometry. -[subtr_average]: bool, default false, whether to subtract the average value from the entire state, useful for potential etc. -[subtr_minimum:] bool, default false, whether to subtract the minimum value from the entire state, useful for potential etc. -[set_positive_potential:] bool, default false, whether to use the absolute value when processing the potential, useful for alternating potentials etc.

Member Function Documentation

◆ process_wvs()

void state_worker::process_wvs ( MPI_Comm  comm,
const state_collection::const_ref  sc 
)
inline

process wavefunction of Rectangle in state, using filen and n

create wvs of Rectangle in states, using filen to create output filename


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