17 #pragma warning(disable:4503)
28#include "viennagrid/config/default_configs.hpp"
69template <
typename DeviceType>
72 typedef typename DeviceType::segment_type SegmentType;
75 SegmentType
const & source_segment = device.segmentation()[1];
76 SegmentType
const & channel_segment = device.segmentation()[2];
77 SegmentType
const & drain_segment = device.segmentation()[3];
78 SegmentType
const & oxide_segment = device.segmentation()[4];
79 SegmentType
const & gate_segment = device.segmentation()[5];
80 SegmentType
const & body_segment = device.segmentation()[6];
82 SegmentType
const & source_contact_segment = device.segmentation()[7];
83 SegmentType
const & drain_contact_segment = device.segmentation()[8];
84 SegmentType
const & body_contact_segment = device.segmentation()[9];
88 std::cout <<
"* init_device(): Setting materials..." << std::endl;
107 std::cout <<
"* init_device(): Setting doping..." << std::endl;
109 device.set_doping_n(1e18, channel_segment);
110 device.set_doping_p(1e14, channel_segment);
112 device.set_doping_n(1e26, source_segment);
113 device.set_doping_p(1e6, source_segment);
115 device.set_doping_n(1e26, drain_segment);
116 device.set_doping_p(1e6, drain_segment);
118 device.set_doping_n(1e18, body_segment);
119 device.set_doping_p(1e14, body_segment);
125 std::cout <<
"* init_device(): Setting contacts..." << std::endl;
131 device.set_contact_potential(vgate, gate_segment);
132 device.set_contact_potential(gnd, source_contact_segment);
133 device.set_contact_potential(vcc, drain_contact_segment);
134 device.set_contact_potential(gnd, body_contact_segment);
161 std::cout <<
"* main(): Creating and scaling device..." << std::endl;
165 device.load_mesh(
"../examples/data/half-trigate57656.mesh");
167 catch (std::runtime_error
const & e)
169 std::cerr <<
"-----------------------------------------------------------" << std::endl;
170 std::cerr <<
"--- NOTE: Please download the mesh file from:" << std::endl;
171 std::cerr <<
"--- http://viennashe.sourceforge.net/half-trigate57656.mesh" << std::endl;
172 std::cerr <<
"--- and place it in folder ../examples/data/" << std::endl;
173 std::cerr <<
"--- (this way the repository remains light-weight)" << std::endl;
174 std::cerr <<
"-----------------------------------------------------------" << std::endl;
184 std::cout <<
"* main(): Initializing device..." << std::endl;
195 std::cout <<
"* main(): Creating DD simulator..." << std::endl;
237 std::cout <<
"* main(): Creating and launching DD simulator..." << std::endl;
250 "half-trigate_dd_quan");
274 std::cout <<
"* main(): Setting up first-order SHE (non-self consistent!)..." << std::endl;
297 std::cout <<
"* main(): Computing first-order SHE (requires about 5 GB RAM)..." << std::endl;
317 "half-trigate_she_quan");
325 std::cout <<
"* main(): Results can now be viewed with your favorite VTK viewer (e.g. ParaView)." << std::endl;
326 std::cout << std::endl;
328 std::cout <<
"*********************************************************" << std::endl;
329 std::cout <<
"* ViennaSHE finished successfully *" << std::endl;
330 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)
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 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.
void write_quantity_to_VTK_file(QuantityType const &quantity, DeviceType const &device, std::string filename, std::string name_in_file="viennashe_quantity")
Generic interface function for writing a quantity to a VTK file. Automatically dispatches between ver...
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 hafnium dioxide.
A class referring to silicon and providing certain material parameters Note that this is the default ...
static const double q
Elementary charge.