1#ifndef VIENNASHE_SHE_POSTPROC_MACROSCOPIC_HPP
2#define VIENNASHE_SHE_POSTPROC_MACROSCOPIC_HPP
24#include "viennagrid/mesh/mesh.hpp"
43 template <
typename DeviceType,
44 typename MacroscopicQuantityAccessor,
45 typename ContainerType>
47 MacroscopicQuantityAccessor
const & quantity,
48 ContainerType & quantity_container)
50 typedef typename DeviceType::mesh_type MeshType;
52 typedef typename viennagrid::result_of::const_cell_range<MeshType>::type CellContainer;
53 typedef typename viennagrid::result_of::iterator<CellContainer>::type CellIterator;
57 CellContainer cells(mesh);
58 for (CellIterator cit = cells.begin();
62 quantity_container.at(
static_cast<std::size_t
>(cit->id().get())) = quantity(*cit);
MeshT const & mesh() const
Returns the underlying mesh.
Defines the physical properties of a device, e.g. doping. This is the implementation for 2d and highe...
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.
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.