1#ifndef VIENNASHE_SHE_CONFIG_HPP 
    2#define VIENNASHE_SHE_CONFIG_HPP 
   46        robin_coeffs_.
alpha = 0.0;
 
   47        robin_coeffs_.
beta = 0.0;
 
   53        robin_coeffs_.
alpha = alpha;
 
   54        robin_coeffs_.
beta  = beta;
 
   57      double lambda()
 const   { 
return lambda_; }
 
   58      void   lambda(
double l) { lambda_ = l; }
 
  102        she_bnd_id_ = new_id;
 
  132       with_electrons_( true ),
 
  136       with_traps_( false ),
 
  137       with_trap_selfconsistency_( false ),
 
  142       L_max_(1), adaptive_expansions_(false),
 
  148       use_h_transformation_(true),
 
  149       use_quantum_correction_(false),
 
  151       linear_solver_conf_(),
 
  152       nonlinear_solver_conf_(),
 
  154       with_quantum_correction_(false),
 
  156       she_boundary_conf_(),
 
  157       dg_config_electrons_(0.2, -5.5e-4, -7.5e-5),
 
  158       dg_config_holes_(0.22, -4.2e-4, 8.3e-5)
 
  162       with_electrons_( other.with_electrons_ ),
 
  163       electron_equation_id_(other.electron_equation_id_),
 
  164       with_holes_( other.with_holes_ ),
 
  165       hole_equation_id_(other.hole_equation_id_),
 
  166       with_traps_( other.with_traps_ ),
 
  167       with_trap_selfconsistency_(other.with_trap_selfconsistency_),
 
  168       dispersion_relation_electrons_(other.dispersion_relation_electrons_->clone()) ,
 
  169       dispersion_relation_holes_(other.dispersion_relation_holes_->clone()) ,
 
  170       she_discretization_id_(other.she_discretization_id_),
 
  171       she_scaling_id_(other.she_scaling_id_),
 
  172       L_max_(other.L_max_), adaptive_expansions_(other.adaptive_expansions_),
 
  173       energy_spacing_(other.energy_spacing_),
 
  174       min_kinetic_energy_range_electrons_(other.min_kinetic_energy_range_electrons_),
 
  175       min_kinetic_energy_range_holes_(other.min_kinetic_energy_range_holes_),
 
  176       max_kinetic_energy_range_electrons_(other.max_kinetic_energy_range_electrons_),
 
  177       max_kinetic_energy_range_holes_(other.max_kinetic_energy_range_holes_),
 
  178       use_h_transformation_(other.use_h_transformation_),
 
  179       use_quantum_correction_(other.use_quantum_correction_),
 
  180       scatter_conf_(other.scatter_conf_),
 
  181       linear_solver_conf_(other.linear_solver_conf_),
 
  182       nonlinear_solver_conf_(other.nonlinear_solver_conf_),
 
  183       with_hde_(other.with_hde_),
 
  184       with_quantum_correction_(other.with_quantum_correction_),
 
  185       time_step_size_(other.time_step_size_),
 
  186       she_boundary_conf_(other.she_boundary_conf_),
 
  187       dg_config_electrons_(other.dg_config_electrons_),
 
  188       dg_config_holes_(other.dg_config_holes_)
 
  193        with_electrons_ = other.with_electrons_;
 
  194        with_holes_ = other.with_holes_;
 
  195        with_traps_ = other.with_traps_;
 
  196        with_trap_selfconsistency_ = other.with_trap_selfconsistency_;
 
  199        dispersion_relation_electrons_ = std::unique_ptr< viennashe::physics::dispersion_base >(other.dispersion_relation_electrons_->clone());
 
  200        dispersion_relation_holes_ = std::unique_ptr< viennashe::physics::dispersion_base >(other.dispersion_relation_holes_->clone());
 
  201        she_discretization_id_ = other.she_discretization_id_;
 
  202        she_scaling_id_        = other.she_scaling_id_;
 
  203        L_max_ = other.L_max_;
 
  204        adaptive_expansions_ = other.adaptive_expansions_;
 
  205        energy_spacing_ = other.energy_spacing_;
 
  206        min_kinetic_energy_range_electrons_ = other.min_kinetic_energy_range_electrons_;
 
  207        min_kinetic_energy_range_holes_ = other.min_kinetic_energy_range_holes_;
 
  208        max_kinetic_energy_range_electrons_ = other.max_kinetic_energy_range_electrons_;
 
  209        max_kinetic_energy_range_holes_ = other.max_kinetic_energy_range_holes_;
 
  210        use_h_transformation_ = other.use_h_transformation_;
 
  211        use_quantum_correction_ = other.use_quantum_correction_;
 
  212        scatter_conf_ = other.scatter_conf_;
 
  213        linear_solver_conf_ = other.linear_solver_conf_;
 
  214        nonlinear_solver_conf_ = other.nonlinear_solver_conf_;
 
  215        with_hde_ = other.with_hde_;
 
  216        with_quantum_correction_ = other.with_quantum_correction_;
 
  217        time_step_size_ = other.time_step_size_;
 
  218        she_boundary_conf_ = other.she_boundary_conf_;
 
  219        dg_config_electrons_ = other.dg_config_electrons_;
 
  220        dg_config_holes_ = other.dg_config_holes_;
 
  285        if (disp_ptr == NULL)
 
  287          std::stringstream ss;
 
  288          ss << 
"No electron dispersion found with id: " << dispersion_id << std::endl;
 
  291        dispersion_relation_electrons_ = std::unique_ptr< viennashe::physics::dispersion_base >( disp_ptr );
 
  338        if (disp_ptr == NULL)
 
  340          std::stringstream ss;
 
  341          ss << 
"No hole dispersion found with id: " << dispersion_id << std::endl;
 
  346        dispersion_relation_holes_ = std::unique_ptr< viennashe::physics::dispersion_base >( disp_ptr );
 
  391          return min_kinetic_energy_range_electrons_;
 
  393          return min_kinetic_energy_range_holes_;
 
  402            min_kinetic_energy_range_electrons_ = e_new;
 
  404            min_kinetic_energy_range_holes_ = e_new;
 
  415          min_kinetic_energy_range_electrons_ = e_new;
 
  416          min_kinetic_energy_range_holes_ = e_new;
 
  428          return max_kinetic_energy_range_electrons_;
 
  430          return max_kinetic_energy_range_holes_;
 
  439            max_kinetic_energy_range_electrons_ = e_new;
 
  441            max_kinetic_energy_range_holes_ = e_new;
 
  452          max_kinetic_energy_range_electrons_ = e_new;
 
  453          max_kinetic_energy_range_holes_ = e_new;
 
  510      void quantum_correction(
bool use_quantum_correction)  { use_quantum_correction_ = use_quantum_correction; }
 
  522          return dg_config_electrons_;
 
  524          return dg_config_holes_;
 
  530          return dg_config_electrons_;
 
  532          return dg_config_holes_;
 
  550      template <
typename MaterialTag>
 
  553        switch(dispersion_id)
 
  567      long get_dispersion_relation_id_impl(std::string name)
 
  570        std::transform(name.begin(), name.end(), name.begin(), ::tolower);
 
  572        if (name == 
"parabolic_dispersion")
 
  576        else if (name == 
"modena_dispersion")
 
  580        else if (name == 
"ext_vecchi_dispersion" || name == 
"fullband")
 
  590      bool with_electrons_;
 
  595      bool with_trap_selfconsistency_;
 
  596      std::unique_ptr< viennashe::physics::dispersion_base >  dispersion_relation_electrons_;
 
  597      std::unique_ptr< viennashe::physics::dispersion_base >  dispersion_relation_holes_;
 
  602      bool adaptive_expansions_;
 
  604      double energy_spacing_;
 
  605      double min_kinetic_energy_range_electrons_;
 
  606      double min_kinetic_energy_range_holes_;
 
  607      double max_kinetic_energy_range_electrons_;
 
  608      double max_kinetic_energy_range_holes_;
 
  609      bool   use_h_transformation_;
 
  611      bool use_quantum_correction_;
 
  617      bool with_quantum_correction_;
 
  619      double time_step_size_;
 
  620      she_boundary_conditions_config she_boundary_conf_;
 
  622      detail::density_gradient_config dg_config_electrons_;
 
  623      detail::density_gradient_config dg_config_holes_;
 
Exception thrown in the case that any code does not support the given carrier type.
 
The main SHE configuration class. To be adjusted by the user for his/her needs.
 
void she_scaling_type(she_scaling_type_id scaling_id)
 
void with_electrons(bool b)
Activates are deactivates electrons in the simulation.
 
void dispersion_relation_electrons(const std::string name)
Sets a new dispersion relation for electrons.
 
linear_solver_config_type const & linear_solver() const
Returns the configuration object for the linear solver.
 
she_boundary_conditions_config const & she_boundary_conditions() const
 
double min_kinetic_energy_range(viennashe::carrier_type_id ctype) const
Returns the minimum kinetic energy range for the selected carrier.
 
void with_trap_selfconsistency(bool b)
Activates or deactivates trap self-consistency in the simulation.
 
viennashe::physics::dispersion_proxy dispersion_relation(viennashe::carrier_type_id ctype) const
Returns the dispersion relation for electrons.
 
viennashe::physics::dispersion_proxy dispersion_relation_type
 
she_boundary_conditions_config & she_boundary_conditions()
 
long max_expansion_order() const
Returns the current maximum expansion order.
 
void dispersion_relation_holes(long dispersion_id)
Sets a new dispersion relation for holes.
 
void with_traps(bool b)
Activates or deactivates traps in the simulation.
 
void max_kinetic_energy_range(double e_new)
Sets the minimum kinetic energy range in the conduction band for electrons and in the valence band fo...
 
equation_id get_electron_equation() const
 
bool with_holes() const
Returns true if holes are considered in the simulation.
 
double time_step_size() const
 
bool quantum_correction() const
 
void dispersion_relation_electrons(long dispersion_id)
Sets a new dispersion relation for electrons.
 
equation_id get_hole_equation() const
 
bool with_traps() const
Returns true if traps are considered in the simulation.
 
void she_discretization_type(she_discretization_type_id discretization_id)
 
viennashe::physics::dispersion_proxy dispersion_relation_electrons() const
Returns the dispersion relation for electrons.
 
nonlinear_solver_config_type & nonlinear_solver()
Returns the configuration object for the nonlinear solver.
 
void dispersion_relation(long dispersion_id, viennashe::carrier_type_id ctype)
Sets a new dispersion relation for electrons.
 
void set_electron_equation(equation_id equ_id)
 
viennashe::solvers::linear_solver_config linear_solver_config_type
 
double max_kinetic_energy_range(viennashe::carrier_type_id ctype) const
Returns the minimum kinetic energy range for the selected carrier.
 
linear_solver_config_type & linear_solver()
Returns the configuration object for the linear solver.
 
double energy_spacing() const
Returns the uniform energy spacing of discrete energies.
 
void quantum_correction(bool use_quantum_correction)
 
viennashe::solvers::nonlinear_solver_config nonlinear_solver_config_type
 
she_scaling_type_id she_scaling_type() const
 
void energy_spacing(double new_spacing)
Sets a new discrete energy spacing.
 
void dispersion_relation(const std::string name)
Sets a new dispersion relation for electrons and holes.
 
bool with_trap_selfconsistency() const
Returns true if traps are considered self-consistently in the simulation.
 
config(config const &other)
 
void set_hole_equation(equation_id equ_id)
 
bool use_h_transformation() const
Returns whether the H-transformation is used.
 
bool adaptive_expansions() const
Returns the flag for the use of adaptive expansions.
 
viennashe::she::scatter_config const & scattering() const
Returns the configuration object for scattering.
 
detail::density_gradient_config & density_gradient(viennashe::carrier_type_id ctype)
 
void min_kinetic_energy_range(double e_new)
Sets the minimum kinetic energy range in the conduction band for electrons and in the valence band fo...
 
bool with_electrons() const
Returns true if electrons are considered in the simulation.
 
void max_expansion_order(long new_L)
Sets a new maximum expansion order. For uniform expansions, new_L will be used all over the device....
 
void operator=(config const &other)
 
void dispersion_relation_holes(const std::string name)
Sets a new dispersion relation for holes.
 
void max_kinetic_energy_range(double e_new, viennashe::carrier_type_id ctype)
Sets the minimum kinetic energy range for the selected carrier.
 
void with_holes(bool b)
Activates are deactivates holes in the simulation.
 
she_discretization_type_id she_discretization_type() const
 
viennashe::physics::dispersion_proxy dispersion_relation_holes() const
Returns the dispersion relation for holes.
 
viennashe::she::scatter_config & scattering()
Returns the configuration object for scattering.
 
void use_h_transformation(bool b)
Sets whether the H-transformation should be used for the energy discretization.
 
detail::density_gradient_config const & density_gradient(viennashe::carrier_type_id ctype) const
 
bool with_quantum_correction() const
 
void with_quantum_correction(bool b)
 
nonlinear_solver_config_type const & nonlinear_solver() const
Returns the configuration object for the nonlinear solver.
 
void adaptive_expansions(bool b)
Sets the use of adaptive expansions.
 
void min_kinetic_energy_range(double e_new, viennashe::carrier_type_id ctype)
Sets the minimum kinetic energy range for the selected carrier.
 
bool setup_insulator_distances() const
 
Exception for the case that a segment or a segment that does not belong to a mesh is encountered.
 
Common interface for band structures.
 
A proxy object for a dispersion relation. Does NOT take ownership of the provided pointer!
 
Non-parabolic isotropic dispersion relation proposed by Jin et al. TED 2011 (uses real DOS)
 
Non-parabolic dispersion relation proposed by the Modena group (spherically symmetric).
 
Parabolic dispersion relation (spherically symmetric)
 
A configuration class for scattering mechanisms. Enable or disable scattering mechanisms here.
 
surface_scattering_parameters const & surface() const
Returns the parameters for surface scattering. Const-version.
 
Exception for the case that an invalid dispersion relation is specified.
 
The boundary condition configuration for SHE
 
she_boundary_conditions_config()
 
void generation_recombination_rate(double new_tau)
Sets the recombination rate used in a Robin boundary condition.
 
double generation_recombination_rate() const
Returns the recombination rate used in a Robin boundary condition.
 
viennashe::boundary_type_id type() const
Returns the type of boundary conditions used by SHE.
 
void type(viennashe::boundary_type_id new_id)
Setter for the type of boundary conditions used by SHE.
 
A configuration class holding options for use within the different linear solvers.
 
A configuration class holding options for use within the different linear solvers.
 
Contains the dispersion relations for different materials and different polarities.
 
Provides the exceptions used in the main viennashe namespace.
 
Contains forward declarations and definition of small classes that must be defined at an early stage.
 
detail::constants constants
Convenience typedef for accessing mathematical constants, e.g. viennashe::math::constants::pi.
 
The main ViennaSHE namespace. All functionality resides inside this namespace.
 
she_discretization_type_id
 
@ SHE_DISCRETIZATION_EVEN_ODD_ORDER_DF
 
carrier_type_id
Enumeration type for selecting the carrier type.
 
equation_id
An enumeration of all equation types ViennaSHE supports.
 
boundary_type_id
An enumeration of all boundary conditions ViennaSHE supports.
 
@ BOUNDARY_GENERATION_RECOMBINATION
 
@ SHE_SCALING_KINETIC_ENERGY
 
Provides a number of fundamental constants. All constants in SI units.
 
Provides the exceptions used inside the viennashe::she namespace.
 
Scattering operators (and their parameters) are defined here.
 
Defines a generic simulator quantity for use within the solvers of ViennaSHE.
 
The SHE configuration class is defined here.
 
void dirichlet_boundary_value(double d)
 
viennashe::robin_boundary_coefficients< double > & robin_coeffs()
 
density_gradient_config()
 
double dirichlet_boundary_value() const
 
viennashe::robin_boundary_coefficients< double > robin_coeffs() const
 
density_gradient_config(double lambda, double alpha, double beta)
 
viennashe::boundary_type_id boundary_type() const
 
void boundary_type(viennashe::boundary_type_id newid)
 
Provides IDs for the dispersion relations.