17 #pragma warning(disable:4503)
28#include "viennagrid/config/default_configs.hpp"
56template <
typename DeviceType>
59 typedef typename DeviceType::mesh_type MeshType;
60 typedef typename DeviceType::segment_type SegmentType;
63 SegmentType
const & contact_left = device.segment(1);
64 SegmentType
const & i_center = device.segment(3);
65 SegmentType
const & contact_right = device.segment(5);
69 device.set_doping_n(1e24);
70 device.set_doping_p(1e8);
73 device.set_doping_n(1e21, i_center);
74 device.set_doping_p(1e11, i_center);
82 device.set_contact_potential(0.0, contact_left);
83 device.set_contact_potential(0.5, contact_right);
89 typedef typename viennagrid::result_of::const_cell_range<MeshType>::type CellContainer;
90 typedef typename viennagrid::result_of::iterator<CellContainer>::type CellIterator;
92 CellContainer cells(device.mesh());
93 for (CellIterator cit = cells.begin();
97 device.set_lattice_temperature(300.0, *cit);
116 typedef viennagrid::triangular_2d_mesh MeshType;
127 std::cout <<
"* main(): Creating device..." << std::endl;
129 device.load_mesh(
"../examples/data/nin2d.mesh");
135 std::cout <<
"* main(): Creating device..." << std::endl;
146 std::cout <<
"* main(): Creating DD simulator..." << std::endl;
172 std::cout <<
"* main(): Launching DD simulator..." << std::endl;
198 std::cout <<
"* main(): Setting up SHE..." << std::endl;
231 std::cout <<
"* main(): Computing SHE..." << std::endl;
243 std::cout <<
"* main(): Writing SHE result..." << std::endl;
246 she_simulator.config(),
247 she_simulator.quantities().electron_distribution_function(),
255 std::cout <<
"* main(): Results can now be viewed with your favorite VTK viewer (e.g. ParaView)." << std::endl;
256 std::cout <<
"* main(): Don't forget to scale the z-axis by about a factor of 1e11 when examining the distribution function." << std::endl;
257 std::cout << std::endl;
258 std::cout <<
"*********************************************************" << std::endl;
259 std::cout <<
"* ViennaSHE finished successfully *" << std::endl;
260 std::cout <<
"*********************************************************" << std::endl;
The main SHE configuration class. To be adjusted by the user for his/her needs.
long max_expansion_order() const
Returns the current maximum expansion order.
bool with_holes() const
Returns true if holes are considered in the simulation.
nonlinear_solver_config_type & nonlinear_solver()
Returns the configuration object for the nonlinear solver.
void set_electron_equation(equation_id equ_id)
linear_solver_config_type & linear_solver()
Returns the configuration object for the linear solver.
double energy_spacing() const
Returns the uniform energy spacing of discrete energies.
void set_hole_equation(equation_id equ_id)
bool with_electrons() const
Returns true if electrons are considered in the simulation.
Defines the physical properties of a device, e.g. doping. This is the implementation for 2d and highe...
Class for self-consistent SHE simulations.
std::size_t max_iters() const
Returns the maximum number of iterative linear solver iterations.
std::size_t max_iters() const
Returns the maximum number of nonlinear solver iterations.
double damping() const
Returns the damping for the nonlinear solver.
Convenience header, which includes all core functionality available in ViennaSHE.
void init_device(DeviceType &device, double Vg_init, double Nd, double Na)
Initalizes the MOS 1D device for testing.
void write_quantities_to_VTK_file(viennashe::simulator< DeviceType > const &simulator_obj, std::string filename, bool include_debug_information=false)
Generic interface function for writing simulated quantities to a VTK file.
std::string hole_density()
std::string electron_density()
std::string preamble()
Prints the ViennaSHE preamble (header). Used in all the examples as well as the standalone-applicatio...
A class referring to silicon and providing certain material parameters Note that this is the default ...
static const double q
Elementary charge.