1#ifndef VIENNASHE_SHE_CARRIER_VELOCITY_HPP
2#define VIENNASHE_SHE_CARRIER_VELOCITY_HPP
24#include "viennagrid/mesh/mesh.hpp"
25#include "viennagrid/algorithm/volume.hpp"
49 template <
typename DeviceType,
58 SHEQuantity
const & quan)
59 : device_(
device), quan_(quan),
60 current_density_(
device, conf, quan), carrier_density_(conf, quan) {}
63 template <
typename CellT>
66 typedef typename viennagrid::result_of::point<CellT>::type PointType;
68 std::vector<double> carrier_velocity(3);
71 return carrier_velocity;
74 double polarity = (quan_.get_carrier_type_id() ==
ELECTRON_TYPE_ID) ? -1.0 : 1.0;
76 carrier_velocity = current_density_(cell);
77 double carrier_density = carrier_density_(cell);
79 for (std::size_t i=0; i<static_cast<std::size_t>(PointType::dim); ++i)
82 return carrier_velocity;
87 DeviceType
const & device_;
88 SHEQuantity
const & quan_;
102 template <
typename DeviceType,
103 typename SHEQuantity,
104 typename ContainerType>
107 SHEQuantity
const & quan,
108 ContainerType & container)
Common routines for the assembly of SHE equations.
Provides an accessor for the carrier density.
The main SHE configuration class. To be adjusted by the user for his/her needs.
Defines the physical properties of a device, e.g. doping. This is the implementation for 2d and highe...
An accessor for the carrier density in the device.
Accessor class providing the carrier velocity inside the device.
carrier_velocity_wrapper(DeviceType const &device, viennashe::config const &conf, SHEQuantity const &quan)
value_type operator()(CellT const &cell) const
Functor interface returning the average carrier drift velocity at the provided cell.
std::vector< double > value_type
Accessor class providing the carrier velocity inside the device.
Contains forward declarations and definition of small classes that must be defined at an early stage.
Provides the SHE coupling matrices and computes higher-order coupling matrices if required....
Implementation of numerical integration routines.
Writer for arbitrary macroscopic quantities.
Provides a number of fundamental math constants.
bool is_semiconductor(long material_id)
Convenience function for checking whether the supplied material ID refers to a semiconductor.
void write_carrier_velocity_to_container(DeviceType const &device, viennashe::config const &conf, SHEQuantity const &quan, ContainerType &container)
Convenience function for writing the average expansion order to the container provided.
The main ViennaSHE namespace. All functionality resides inside this namespace.
void write_macroscopic_quantity_to_container(DeviceType const &device, MacroscopicQuantityAccessor const &quantity, ContainerType &quantity_container)
Writes the provided macroscopic quantity to the container provided.
Provides a number of fundamental constants. All constants in SI units.
Provides an accessor for the current density.
static const double q
Elementary charge.