ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
viennashe::detail Namespace Reference

Namespace for implementation details. Typically not of interest for the library user. More...

Classes

struct  current_density_on_facet
 An accessor to the current density (drift diffusion only!) on edges. More...
 
struct  density_gradient_config
 
class  device_base
 Defines the physical properties of a device, e.g. doping. More...
 
struct  electric_field_on_facet
 An accessor to the electric field along a given edge. Electrostatic potential required. More...
 
struct  electric_flux_on_facet
 Simple accessor to get the electric flux density along an edge. More...
 
struct  is_1d_mesh
 Metafunction for the determination of whether a mesh is 1d. More...
 
struct  is_1d_mesh< MeshT, viennagrid::hypercube_tag< 1 > >
 Metafunction for the determination of whether a mesh is 1d. Specialization for 1d. More...
 
struct  is_1d_mesh< MeshT, viennagrid::simplex_tag< 1 > >
 Metafunction for the determination of whether a mesh is 1d. Specialization for 1d. More...
 
class  macroscopic_carrier_mask_filter
 

Functions

template<typename DeviceType , typename CellType >
void get_dopings_from_neighboring_semiconductor_cells (DeviceType const &device, CellType const &cell, double *doping_n_ret, double *doping_p_ret)
 Retrieves the averaged dopings from neighboring semiconductor cells. More...
 
template<typename CellType , typename SpatialUnknownT , typename SHEUnknownT , typename MatrixType >
void assemble_poisson_carrier_coupling (viennashe::config const &conf, CellType const &cell, SpatialUnknownT const &np_density, SHEUnknownT const &f_np, MatrixType &A, std::size_t row_index, double box_volume)
 Assembles, per cell, the carrier concentration coupling on the RHS of Poisson's equation. More...
 
template<typename DeviceType , typename CellType , typename SpatialUnknownT , typename SHEUnknownT >
double get_carrier_density_for_poisson (viennashe::config const &conf, CellType const &cell, SpatialUnknownT const &np_density, SHEUnknownT const &f_np)
 Returns the requested carrier concentration, calculated from a SHE or DD solution, for the RHS of Poisson's equation. More...
 
double density_gradient_flux (double E, double pot_i, double gamma_i, double T_i, double pot_j, double gamma_j, double T_j)
 Returns the quantum correction potential flux between two points (Density Gradient) More...
 
template<typename DeviceType , typename CellType , typename SHEQuantity >
void map_cell (DeviceType const &device, CellType const &cell, std::size_t index_H, SHEQuantity &quan, viennashe::config const &conf, long &current_index)
 Handles the mapping of a SHE unkown quantity on a single cell and H-space index. More...
 
template<typename DeviceType , typename SHEQuantity , typename FacetType >
void map_facet (DeviceType const &device, SHEQuantity &quan, viennashe::config const &conf, FacetType const &facet, std::size_t index_H, long &current_index)
 Assigns an unknown index for odd SHE unknowns to a facet. Preconditions: More...
 
template<typename DeviceT , typename QuantityT >
void set_unknown_for_material (DeviceT const &device, QuantityT &quan, materials::checker const &material_check)
 Sets the unknown masks per material. More...
 
template<typename DeviceT , typename QuantityT >
void set_she_unknown (DeviceT const &device, QuantityT &quan)
 
template<typename DeviceT , typename QuantityT , typename BoundaryValueAccessorT >
void set_boundary_for_material (DeviceT const &device, QuantityT &quan, materials::checker const &material_check, BoundaryValueAccessorT boundary_value_accessor, boundary_type_id bnd_id)
 Sets the boundary condition (type and value) per vertex depending on the material. More...
 
template<typename DeviceT , typename CellT , typename FacetT >
void set_boundary_for_material (DeviceT const &device, viennashe::she::unknown_she_quantity< CellT, FacetT > &quan, materials::checker const &material_check, boundary_type_id bnd_id)
 Sets the boundary condition type per material on vertices. Does not set the boundary value. More...
 
template<typename DeviceT , typename QuantityT , typename BoundaryValueAccessorT >
void set_initial_guess (DeviceT const &device, QuantityT &quan, BoundaryValueAccessorT const &initial_guess_accessor)
 Sets the initial guess per quantity and device. More...
 
template<typename ElementTagT , typename DeviceType , typename AccessorType , typename FilterType , typename CheckerType >
bool check_quantity_on_ncell (DeviceType const &device, AccessorType const &accessor, FilterType const &filter, CheckerType const &checker)
 Ensures that a quantity is available on n-cells of a certain dimension. If this is not the case, the quantity is transferred (averaged/interpolated) from cells of other dimension. An exception is thrown if the fallback-transfer fails. More...
 
template<typename TagT , typename FallbackTagT , typename DeviceType , typename AccessorType , typename FilterType , typename CheckerType , typename FallbackAccessorType , typename FallbackSetterType , typename FallbackAveragerType , typename FallbackFilterType , typename FallbackCheckerType >
bool setup_and_check_quantity_on_ncell_with_fallback (DeviceType &device, AccessorType const &accessor, FilterType const &filter, CheckerType const &checker, FallbackAccessorType const &fallback_accessor, FallbackSetterType &fallback_setter, FallbackAveragerType const &fallback_averager, FallbackFilterType const &fallback_filter, FallbackCheckerType const &fallback_checker)
 Ensures that a quantity is available on n-cells of a certain dimension. If this is not the case, the quantity is transferred (averaged/interpolated) from cells of other dimension. More...
 
invalid_doping_in_device_exception get_invalid_doping_exception (viennashe::carrier_type_id ctype)
 Helper routine for creating the exception thrown if the donator doping is found to be invalid on the device. More...
 
template<typename DeviceT >
void smooth_doping_at_contacts (DeviceT &d)
 Utility function for smoothing the doping next to contacts. More...
 

Detailed Description

Namespace for implementation details. Typically not of interest for the library user.

Function Documentation

◆ assemble_poisson_carrier_coupling()

template<typename CellType , typename SpatialUnknownT , typename SHEUnknownT , typename MatrixType >
void viennashe::detail::assemble_poisson_carrier_coupling ( viennashe::config const &  conf,
CellType const &  cell,
SpatialUnknownT const &  np_density,
SHEUnknownT const &  f_np,
MatrixType &  A,
std::size_t  row_index,
double  box_volume 
)

Assembles, per cell, the carrier concentration coupling on the RHS of Poisson's equation.

Parameters
confThe simulator configuration
cellThe cell on which to assemble
np_densityThe carrier density
f_npThe SHE guess/solution
AThe system matrix
row_indexThe row index associated with the potential unkown and the vertex
box_volumeThe volume of the current finite box associated with the vertex

Definition at line 76 of file assemble.hpp.

◆ check_quantity_on_ncell()

template<typename ElementTagT , typename DeviceType , typename AccessorType , typename FilterType , typename CheckerType >
bool viennashe::detail::check_quantity_on_ncell ( DeviceType const &  device,
AccessorType const &  accessor,
FilterType const &  filter,
CheckerType const &  checker 
)

Ensures that a quantity is available on n-cells of a certain dimension. If this is not the case, the quantity is transferred (averaged/interpolated) from cells of other dimension. An exception is thrown if the fallback-transfer fails.

Template Parameters
dimTopological dimension of the n-cell for which the quantity should be available
DeviceTypeType of the device
AccessorTypeAn accessor for the quantity for an n-cell
CheckerTypeType of the checker functor, which checks for a valid range
FilterTypeA filter for the n-cells to actually consider

Definition at line 65 of file simulator_setup.hpp.

◆ density_gradient_flux()

double viennashe::detail::density_gradient_flux ( double  E,
double  pot_i,
double  gamma_i,
double  T_i,
double  pot_j,
double  gamma_j,
double  T_j 
)
inline

Returns the quantum correction potential flux between two points (Density Gradient)

Parameters
EThe band edge energy
pot_iPotential at the source
gamma_iCorrection potential at the source
T_iTemperature (lattice) at the source
pot_jPotential at the sink
gamma_jCorrection potential at the sink
T_jTemperature at the sink
Returns
The flux

Definition at line 538 of file assemble.hpp.

◆ get_carrier_density_for_poisson()

template<typename DeviceType , typename CellType , typename SpatialUnknownT , typename SHEUnknownT >
double viennashe::detail::get_carrier_density_for_poisson ( viennashe::config const &  conf,
CellType const &  cell,
SpatialUnknownT const &  np_density,
SHEUnknownT const &  f_np 
)

Returns the requested carrier concentration, calculated from a SHE or DD solution, for the RHS of Poisson's equation.

Parameters
confThe simulator configuration
cellThe vertex on which the concentration is requested
np_densityThe spatial unkown for n or p (dummy if not used)
f_npThe SHE solution (dummy if not used)
Returns
The requested carrier concentration

Definition at line 127 of file assemble.hpp.

◆ get_dopings_from_neighboring_semiconductor_cells()

template<typename DeviceType , typename CellType >
void viennashe::detail::get_dopings_from_neighboring_semiconductor_cells ( DeviceType const &  device,
CellType const &  cell,
double *  doping_n_ret,
double *  doping_p_ret 
)

Retrieves the averaged dopings from neighboring semiconductor cells.

Parameters
deviceThe device
cellA cell in the device
doping_n_retReturn by reference; The averaged donor doping
doping_p_retReturn by reference; The averaged acceptor doping

Definition at line 51 of file accessors.hpp.

◆ get_invalid_doping_exception()

invalid_doping_in_device_exception viennashe::detail::get_invalid_doping_exception ( viennashe::carrier_type_id  ctype)
inline

Helper routine for creating the exception thrown if the donator doping is found to be invalid on the device.

Definition at line 146 of file simulator_setup.hpp.

◆ map_cell()

template<typename DeviceType , typename CellType , typename SHEQuantity >
void viennashe::detail::map_cell ( DeviceType const &  device,
CellType const &  cell,
std::size_t  index_H,
SHEQuantity &  quan,
viennashe::config const &  conf,
long &  current_index 
)

Handles the mapping of a SHE unkown quantity on a single cell and H-space index.

Parameters
deviceThe device ...
cellThe Cell for which to do the mapping
index_HThe H index to map
quanThe quantity the mapping is for
confThe simulator configuration
current_indexThe current index

Definition at line 97 of file mapping.hpp.

◆ map_facet()

template<typename DeviceType , typename SHEQuantity , typename FacetType >
void viennashe::detail::map_facet ( DeviceType const &  device,
SHEQuantity &  quan,
viennashe::config const &  conf,
FacetType const &  facet,
std::size_t  index_H,
long &  current_index 
)

Assigns an unknown index for odd SHE unknowns to a facet. Preconditions:

  • Even unknowns on vertices already assigned

Definition at line 141 of file mapping.hpp.

◆ set_boundary_for_material() [1/2]

template<typename DeviceT , typename QuantityT , typename BoundaryValueAccessorT >
void viennashe::detail::set_boundary_for_material ( DeviceT const &  device,
QuantityT &  quan,
materials::checker const &  material_check,
BoundaryValueAccessorT  boundary_value_accessor,
boundary_type_id  bnd_id 
)

Sets the boundary condition (type and value) per vertex depending on the material.

Parameters
deviceThe device for which to set boundary conditions
quanThe unkown quantity for which to set boundary conditions
material_checkA functor, which is given a ViennaGrid cell and returns true if there are boundary conditions to be set on the vertices of that cell
boundary_value_accessorAn accessor, which returns the boundary value given a ViennaGrid vertex
bnd_idThe id of the boundary type

Definition at line 134 of file simulator.hpp.

◆ set_boundary_for_material() [2/2]

template<typename DeviceT , typename CellT , typename FacetT >
void viennashe::detail::set_boundary_for_material ( DeviceT const &  device,
viennashe::she::unknown_she_quantity< CellT, FacetT > &  quan,
materials::checker const &  material_check,
boundary_type_id  bnd_id 
)

Sets the boundary condition type per material on vertices. Does not set the boundary value.

Parameters
deviceThe device
quanThe unkown quantity for which to set the boundary condition type
material_checkA functor, which is given a ViennaGrid cell and returns true if there are boundary conditions to be set on the vertices of that cell
bnd_idThe id of the boundary type

Definition at line 171 of file simulator.hpp.

◆ set_initial_guess()

template<typename DeviceT , typename QuantityT , typename BoundaryValueAccessorT >
void viennashe::detail::set_initial_guess ( DeviceT const &  device,
QuantityT &  quan,
BoundaryValueAccessorT const &  initial_guess_accessor 
)

Sets the initial guess per quantity and device.

Parameters
deviceThe device
quanThe unkown quantity for which the initial guess has to be set
initial_guess_accessorAn accessor, which returns a value given a ViennaGrid vertex

Definition at line 200 of file simulator.hpp.

◆ set_she_unknown()

template<typename DeviceT , typename QuantityT >
void viennashe::detail::set_she_unknown ( DeviceT const &  device,
QuantityT &  quan 
)

Definition at line 94 of file simulator.hpp.

◆ set_unknown_for_material()

template<typename DeviceT , typename QuantityT >
void viennashe::detail::set_unknown_for_material ( DeviceT const &  device,
QuantityT &  quan,
materials::checker const &  material_check 
)

Sets the unknown masks per material.

Parameters
deviceThe device for which to set the unkown masks
quanThe unkown quantity for which to set the mask
material_checkA functor, which takes a ViennaGrid cell and returns true if the mask has to be set on the given cell (does a material check)

Definition at line 74 of file simulator.hpp.

◆ setup_and_check_quantity_on_ncell_with_fallback()

template<typename TagT , typename FallbackTagT , typename DeviceType , typename AccessorType , typename FilterType , typename CheckerType , typename FallbackAccessorType , typename FallbackSetterType , typename FallbackAveragerType , typename FallbackFilterType , typename FallbackCheckerType >
bool viennashe::detail::setup_and_check_quantity_on_ncell_with_fallback ( DeviceType &  device,
AccessorType const &  accessor,
FilterType const &  filter,
CheckerType const &  checker,
FallbackAccessorType const &  fallback_accessor,
FallbackSetterType &  fallback_setter,
FallbackAveragerType const &  fallback_averager,
FallbackFilterType const &  fallback_filter,
FallbackCheckerType const &  fallback_checker 
)

Ensures that a quantity is available on n-cells of a certain dimension. If this is not the case, the quantity is transferred (averaged/interpolated) from cells of other dimension.

Template Parameters
TagTTopological tag of the n-cell for which the quantity should be available
FallbackTagTTopological tag of the n-cells from which the data should be taken otherwise
DeviceTypeType of the device
AccessorTypeAn accessor for the quantity for an n-cell
CheckerTypeType of the checker functor, which checks for a valid range
FallbackAccessorTypeType of the accessor to be used if the quantity is not set up properly on the mesh
FallbackSetterTypeType of the setter to be used if the quantity is not set up properly on the mesh
FallbackAveragerTypeType of the averager to be used if the quantity is not set up properly on the mesh
FallbackFilterTypeType of the filter to be used for grabbing data from fallback cells. Allows to exclude specific fallback cells
FallbackCheckerTypeType of the checker to ensure that the quantity is set up correctly after the fallback
Returns
True if a fallback has been used, otherwise false.

Definition at line 115 of file simulator_setup.hpp.

◆ smooth_doping_at_contacts()

template<typename DeviceT >
void viennashe::detail::smooth_doping_at_contacts ( DeviceT &  d)

Utility function for smoothing the doping next to contacts.

Otherwise, all types of funny (and not so funny) effects can happen, potentially making the simulation result complete bogus.

Definition at line 42 of file smooth_doping.hpp.