ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
setters.hpp
Go to the documentation of this file.
1#ifndef VIENNASHE_SETTERS_HPP
2#define VIENNASHE_SETTERS_HPP
3
4/* ============================================================================
5 Copyright (c) 2011-2022, Institute for Microelectronics,
6 Institute for Analysis and Scientific Computing,
7 TU Wien.
8
9 -----------------
10 ViennaSHE - The Vienna Spherical Harmonics Expansion Boltzmann Solver
11 -----------------
12
13 http://viennashe.sourceforge.net/
14
15 License: MIT (X11), see file LICENSE in the base directory
16=============================================================================== */
17
18// viennagrid
19#include "viennagrid/forwards.hpp"
20#include "viennagrid/mesh/mesh.hpp"
21
22// viennashe
23#include "viennashe/forwards.h"
27#include "viennashe/device.hpp"
29
34namespace viennashe
35{
36
37 //
38 // Setters
39 //
40
41
43 template <typename DeviceType>
45 {
46 public:
47 typedef double value_type;
48
49 doping_setter(DeviceType & d, viennashe::carrier_type_id ctype) : device_(d), is_doping_n_(ctype == viennashe::ELECTRON_TYPE_ID) {}
50
51 template <typename T>
52 void operator()(T const & t, value_type value) const { is_doping_n_ ? device_.set_doping_n(value, t) : device_.set_doping_p(value, t); }
53
54 private:
55 DeviceType & device_;
56 bool is_doping_n_;
57 };
58
59
60
61
62} // namespace viennashe
63
64#endif
65
Convenience functor for setting the doping across the device.
Definition: setters.hpp:45
doping_setter(DeviceType &d, viennashe::carrier_type_id ctype)
Definition: setters.hpp:49
void operator()(T const &t, value_type value) const
Definition: setters.hpp:52
Contains the definition of a device class independent of the actual macroscopic model to be solved.
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.
A very simple material database. Needs to be replaced by something more versatile soon.
The main ViennaSHE namespace. All functionality resides inside this namespace.
Definition: accessors.hpp:40
carrier_type_id
Enumeration type for selecting the carrier type.
Definition: forwards.h:185
@ ELECTRON_TYPE_ID
Definition: forwards.h:187
Provides a number of fundamental constants. All constants in SI units.
Contains the definition of a trap level.