ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
reaction_rates.hpp
Go to the documentation of this file.
1#ifndef VIENNASHE_MODELS_MARKOVCHAIN_REACTION_RATES_HPP
2#define VIENNASHE_MODELS_MARKOVCHAIN_REACTION_RATES_HPP
3/* ============================================================================
4 Copyright (c) 2011-2022, Institute for Microelectronics,
5 Institute for Analysis and Scientific Computing,
6 TU Wien.
7
8 -----------------
9 ViennaSHE - The Vienna Spherical Harmonics Expansion Boltzmann Solver
10 -----------------
11
12 http://viennashe.sourceforge.net/
13
14 License: MIT (X11), see file LICENSE in the base directory
15=============================================================================== */
16
21namespace viennashe
22{
23 namespace models
24 {
25
27 struct rate_base
28 {
29 typedef double value_type;
30
31 virtual ~rate_base() { }
32
37 virtual value_type value() const = 0;
38
43 virtual rate_base * clone() const = 0;
44
49 virtual value_type operator()() const { return this->value(); }
50
51 };
52
54 struct const_rate : public rate_base
55 {
57
58 const_rate(value_type rate) : rate_(rate) { }
60
61 virtual value_type value() const { return rate_; }
62
63 virtual rate_base * clone() const
64 {
65 return new const_rate(this->rate_);
66 }
67
68 private:
69 value_type rate_;
70 };
71
72
73 } // namespace models
74} // namespace viennashe
75
76
77
78#endif /* VIENNASHE_MODELS_MARKOVCHAIN_REACTION_RATES_HPP */
79
The main ViennaSHE namespace. All functionality resides inside this namespace.
Definition: accessors.hpp:40
A simple constant rate.
rate_base::value_type value_type
virtual rate_base * clone() const
virtual value_type value() const
The basic rate interface.
virtual value_type value() const =0
virtual rate_base * clone() const =0
virtual value_type operator()() const