17 #pragma warning(disable:4503)
29#include "viennagrid/config/default_configs.hpp"
71template <
typename DeviceType>
74 typedef typename DeviceType::segment_type SegmentType;
77 SegmentType
const & source_segment = device.segmentation()[1];
78 SegmentType
const & channel_segment = device.segmentation()[2];
79 SegmentType
const & drain_segment = device.segmentation()[3];
80 SegmentType
const & oxide_segment = device.segmentation()[4];
81 SegmentType
const & gate_segment = device.segmentation()[5];
82 SegmentType
const & body_segment = device.segmentation()[6];
84 SegmentType
const & source_contact_segment = device.segmentation()[7];
85 SegmentType
const & drain_contact_segment = device.segmentation()[8];
86 SegmentType
const & body_contact_segment = device.segmentation()[9];
90 std::cout <<
"* init_device(): Setting materials..." << std::endl;
109 std::cout <<
"* init_device(): Setting doping..." << std::endl;
111 device.set_doping_n(1e18, channel_segment);
112 device.set_doping_p(1e14, channel_segment);
114 device.set_doping_n(1e26, source_segment);
115 device.set_doping_p(1e6, source_segment);
117 device.set_doping_n(1e26, drain_segment);
118 device.set_doping_p(1e6, drain_segment);
120 device.set_doping_n(1e18, body_segment);
121 device.set_doping_p(1e14, body_segment);
127 std::cout <<
"* init_device(): Setting contacts..." << std::endl;
133 device.set_contact_potential(vgate, gate_segment);
134 device.set_contact_potential(gnd, source_contact_segment);
135 device.set_contact_potential(vcc, drain_contact_segment);
136 device.set_contact_potential(gnd, body_contact_segment);
147int main(
int argc,
char** argv)
164 std::cout <<
"* main(): Creating and scaling device..." << std::endl;
166 device.load_mesh(
"../examples/data/half-trigate57656.mesh");
168 PetscInitialize(&argc, &argv, (
char *) 0,
"");
169 std::string LSolver(
"petsc_parallel_linear_solver");
170 MPI_Comm_size(MPI_COMM_WORLD, &size);
171 PetscInitialize(&argc, &argv, (
char *) 0,
"");
175 opt = getopt(argc, argv,
"seS");
177 case 's': s = 1;h = 0 ;
break;
178 case 'e': s = 0;h = 1 ;
break;
179 case 'S': s = 0;h = 0 ;
break;
185 std::cout <<
"* main(): Initializing device..." << std::endl;
187 if(s == 1 && size != 1) device.refine(size) ;
196 std::cout <<
"* main(): Creating DD simulator..." << std::endl;
238 std::cout <<
"* main(): Creating and launching DD simulator..." << std::endl;
251 "half-trigate_dd_quan");
275 std::cout <<
"* main(): Setting up first-order SHE (non-self consistent!)..." << std::endl;
302 std::cout <<
"* main(): Computing first-order SHE (requires about 5 GB RAM)..." << std::endl;
323 "half-trigate_she_quan");
331 std::cout <<
"* main(): Results can now be viewed with your favorite VTK viewer (e.g. ParaView)." << std::endl;
332 std::cout << std::endl;
333 std::cout <<
"*********************************************************" << std::endl;
334 std::cout <<
"* ViennaSHE finished successfully *" << std::endl;
335 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.
void set(long solver_id)
Sets a new linear solver. Provide IDs defined in.
std::size_t max_iters() const
Returns the maximum number of iterative linear solver iterations.
void setArgv(char **argv)
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.