1#ifndef VIENNASHE_SHE_POSTPROC_EXPANSION_ORDER_HPP
2#define VIENNASHE_SHE_POSTPROC_EXPANSION_ORDER_HPP
24#include "viennagrid/mesh/mesh.hpp"
40 template <
typename DeviceType,
typename SHEQuantity>
49 double energy_end) : quan_(quan),
50 energy_start_(energy_start),
51 energy_end_(energy_end) {}
53 template <
typename CellType>
57 long num_energies = 0;
59 for (std::size_t index_H=1; index_H<quan_.get_value_H_size() - 1; ++index_H)
61 double kinetic_energy = quan_.get_kinetic_energy(cell, index_H);
63 if (kinetic_energy >= energy_start_ && kinetic_energy <= energy_end_)
65 sum_order += quan_.get_expansion_order(cell, index_H);
70 return sum_order / num_energies;
87 template <
typename DeviceType,
89 typename ContainerType>
91 SHEQuantity
const & quan,
92 ContainerType & container,
93 double energy_start = 0.0,
94 double energy_end = 1.0)
Defines the physical properties of a device, e.g. doping. This is the implementation for 2d and highe...
Accessor class providing the average expansion order inside the device.
average_expansion_order_wrapper(SHEQuantity const &quan, double energy_start, double energy_end)
value_type operator()(CellType const &cell) const
Contains forward declarations and definition of small classes that must be defined at an early stage.
Writer for arbitrary macroscopic quantities.
void write_average_expansion_order_to_container(DeviceType const &device, SHEQuantity const &quan, ContainerType &container, double energy_start=0.0, double energy_end=1.0)
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.