ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
macroscopic.hpp
Go to the documentation of this file.
1#ifndef VIENNASHE_SHE_POSTPROC_MACROSCOPIC_HPP
2#define VIENNASHE_SHE_POSTPROC_MACROSCOPIC_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
19
20#include <math.h>
21#include <fstream>
22#include <iostream>
23
24#include "viennagrid/mesh/mesh.hpp"
25
26#include "viennashe/forwards.h"
28
34namespace viennashe
35{
43 template <typename DeviceType,
44 typename MacroscopicQuantityAccessor,
45 typename ContainerType>
47 MacroscopicQuantityAccessor const & quantity,
48 ContainerType & quantity_container)
49 {
50 typedef typename DeviceType::mesh_type MeshType;
51
52 typedef typename viennagrid::result_of::const_cell_range<MeshType>::type CellContainer;
53 typedef typename viennagrid::result_of::iterator<CellContainer>::type CellIterator;
54
55 MeshType const & mesh = device.mesh();
56
57 CellContainer cells(mesh);
58 for (CellIterator cit = cells.begin();
59 cit != cells.end();
60 ++cit)
61 {
62 quantity_container.at(static_cast<std::size_t>(cit->id().get())) = quantity(*cit);
63 }
64 }
65
66} //namespace viennashe
67
68#endif
MeshT const & mesh() const
Returns the underlying mesh.
Definition: device.hpp:145
Defines the physical properties of a device, e.g. doping. This is the implementation for 2d and highe...
Definition: device.hpp:818
Contains forward declarations and definition of small classes that must be defined at an early stage.
The main ViennaSHE namespace. All functionality resides inside this namespace.
Definition: accessors.hpp:40
void write_macroscopic_quantity_to_container(DeviceType const &device, MacroscopicQuantityAccessor const &quantity, ContainerType &quantity_container)
Writes the provided macroscopic quantity to the container provided.
Definition: macroscopic.hpp:46
Provides a number of fundamental constants. All constants in SI units.