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

Namespace for all (file-)IO specific code
More...

Namespaces

namespace  detail
 Namespace for implementation details within viennashe::io. Typically not of interest for a library user.
 
namespace  result_of
 Auxiliary namespace with metafunctions.
 

Classes

class  cannot_open_file_exception
 Exception which is thrown if a file cannot be opened. More...
 
class  file_attribute_not_found_exception
 Exception which is thrown whenever a requested attribute was not found in a file.
More...
 
class  file_segment_not_found_exception
 Exception which is thrown whenever a requested segment was not found in a file.
More...
 
struct  gnuplot_edf_writer
 Writes the energy distribution function to a file which can be processed by Gnuplot. Works for 1d, 2d and 3d only. More...
 
struct  gnuplot_writer
 Writes quantities to a file which can be processed by Gnuplot. Works for 1d, 2d and 3d only. More...
 
class  invalid_dimension_exception
 Exception which is thrown if a dimension different from the current dimension of viennagrid is found in the file.
More...
 
class  io_operation_unsupported_exception
 Exception which is thrown whenever a requested IO feature is currently not supported.
More...
 
struct  log_she_vtk_writer
 Tag class for logging inside the she_vtk_writer. More...
 
class  premature_end_of_file_exception
 Exception which is thrown if a End-of-File is encountered even though further data is expected. More...
 
class  she_vtk_writer
 VTK writer class. More...
 
class  she_vtk_writer< DeviceType, viennagrid::cartesian_cs< 3 > >
 Compatibility overload in order to enable compilation for three-dimensional devices. No action if called. More...
 

Functions

template<typename MacroscopicQuantityAccessor , typename WriterType >
void add_macroscopic_quantity_to_writer (MacroscopicQuantityAccessor const &quantity, WriterType &writer, std::string name)
 Adds a quantity to a writer. More...
 
template<typename PotentialAccessor , typename WriterType >
void add_potential_to_writer (PotentialAccessor const &pot, WriterType &writer, std::string name)
 Special free function to add the potential to a writer. More...
 
template<typename DeviceType , typename SHEQuantity , typename WriterType >
void add_current_density_to_writer (DeviceType const &device, viennashe::config const &conf, SHEQuantity const &quan, WriterType &writer, std::string name)
 Special free function to add the current density - calculated from a solution of the BTE - to a writer. More...
 
template<typename DeviceType , typename PotentialQuantityType , typename CarrierQuantityType , typename MobilityModel , typename WriterType >
void add_current_density_to_writer (DeviceType const &device, PotentialQuantityType const &potential, CarrierQuantityType const &carrier, viennashe::carrier_type_id ctype, MobilityModel const &mobility_model, WriterType &writer, std::string name)
 Special free function to add the current density - calculated from DD - to a writer. More...
 
template<typename SHEQuantity , typename WriterType >
void add_kinetic_carrier_energy_to_writer (viennashe::config const &conf, SHEQuantity const &quan, WriterType &writer, std::string name)
 Free function to add the average carrier energy to a writer. More...
 
template<typename DeviceType >
bool read_device_vtk (DeviceType &device, std::string filename, std::string doping_n_key, std::string doping_p_key, std::string material_key)
 Reads and initalises a device from a VTK file. If material_key is empty the material IDs will not be initalised! More...
 
template<typename DeviceT , typename SimulatorT >
bool read_initial_guess_vtk (DeviceT const &device, SimulatorT &simulator, std::string filename, std::string quantity_name, std::string vtk_quantity_key)
 
template<typename DeviceType >
void read_device_vtk (DeviceType &device, const std::string filename)
 Reads and initalises a device from a VTK file. Assumes that the doping and material can be found using "doping_n", "doping_p", "material". More...
 
template<typename DeviceType , typename AccessorType >
void write_cell_quantity_for_gnuplot (AccessorType const &quan, DeviceType const &device, std::string filename)
 Writes a quantity (on vertices) per point to a text file suitable for gnuplot. More...
 
template<typename MeshT , typename QuanAssembler >
void write_initial_guess (MeshT const &mesh, std::string const &key, QuanAssembler qas)
 Writes the inital guess to a VTK file. More...
 
template<typename QuantityType , typename DeviceType >
void write_vertex_quantity_to_VTK_file (QuantityType const &quantity, DeviceType const &device, std::string filename, std::string name_in_file="viennashe_quantity")
 Convenience routine for writing a single macroscopic quantity to a VTK file. More...
 
template<typename QuantityType , typename DeviceType >
void write_cell_quantity_to_VTK_file (QuantityType const &quantity, DeviceType const &device, std::string filename, std::string name_in_file="viennashe_quantity")
 Convenience routine for writing a single macroscopic quantity to a VTK file. More...
 
template<typename QuantityType , typename DeviceType >
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 vertex and cell quantity. More...
 
template<typename DeviceType >
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. More...
 
template<typename VectorType >
void read_vector_from_file (VectorType &vec, const std::string &filename)
 Reads a vector from a file. More...
 
template<typename VectorType >
void write_vector_to_file (VectorType &vec, const std::string &filename)
 Writes a vector to a file. More...
 

Detailed Description

Namespace for all (file-)IO specific code

Function Documentation

◆ add_current_density_to_writer() [1/2]

template<typename DeviceType , typename PotentialQuantityType , typename CarrierQuantityType , typename MobilityModel , typename WriterType >
void viennashe::io::add_current_density_to_writer ( DeviceType const &  device,
PotentialQuantityType const &  potential,
CarrierQuantityType const &  carrier,
viennashe::carrier_type_id  ctype,
MobilityModel const &  mobility_model,
WriterType &  writer,
std::string  name 
)

Special free function to add the current density - calculated from DD - to a writer.

Parameters
deviceThe device
potentialAccessor to the elec. potential
carrierAccessor to the carrier density
ctypeCarrier type (electrons or holes)
mobility_modelThe mobility model
writerThe writer
nameThe name of the current density in the file

Definition at line 206 of file add_to_writer.hpp.

◆ add_current_density_to_writer() [2/2]

template<typename DeviceType , typename SHEQuantity , typename WriterType >
void viennashe::io::add_current_density_to_writer ( DeviceType const &  device,
viennashe::config const &  conf,
SHEQuantity const &  quan,
WriterType &  writer,
std::string  name 
)

Special free function to add the current density - calculated from a solution of the BTE - to a writer.

Parameters
deviceThe device
quanThe SHE quantity, i.e. the EDF
confThe simulator configuration
writerThe writer
nameThe name of the current density in the file

Definition at line 180 of file add_to_writer.hpp.

◆ add_kinetic_carrier_energy_to_writer()

template<typename SHEQuantity , typename WriterType >
void viennashe::io::add_kinetic_carrier_energy_to_writer ( viennashe::config const &  conf,
SHEQuantity const &  quan,
WriterType &  writer,
std::string  name 
)

Free function to add the average carrier energy to a writer.

Parameters
quanThe SHE quantity, that is the EDF
confThe simulator configuration
writerThe writer
nameName of the average carrier energy in the file

Definition at line 230 of file add_to_writer.hpp.

◆ add_macroscopic_quantity_to_writer()

template<typename MacroscopicQuantityAccessor , typename WriterType >
void viennashe::io::add_macroscopic_quantity_to_writer ( MacroscopicQuantityAccessor const &  quantity,
WriterType &  writer,
std::string  name 
)

Adds a quantity to a writer.

Parameters
quantityThe accessor to the quantity
writerThe writer
nameName of the quantity in the file

Definition at line 129 of file add_to_writer.hpp.

◆ add_potential_to_writer()

template<typename PotentialAccessor , typename WriterType >
void viennashe::io::add_potential_to_writer ( PotentialAccessor const &  pot,
WriterType &  writer,
std::string  name 
)

Special free function to add the potential to a writer.

Parameters
potThe accessor to the electrostatic potential
writerThe writer
nameName of the elec. potential in the file

Definition at line 145 of file add_to_writer.hpp.

◆ read_device_vtk() [1/2]

template<typename DeviceType >
void viennashe::io::read_device_vtk ( DeviceType &  device,
const std::string  filename 
)

Reads and initalises a device from a VTK file. Assumes that the doping and material can be found using "doping_n", "doping_p", "material".

Parameters
deviceThe device to initalise
filenameThe name/path to the VTK file

Definition at line 382 of file device_reader_vtk.hpp.

◆ read_device_vtk() [2/2]

template<typename DeviceType >
bool viennashe::io::read_device_vtk ( DeviceType &  device,
std::string  filename,
std::string  doping_n_key,
std::string  doping_p_key,
std::string  material_key 
)

Reads and initalises a device from a VTK file. If material_key is empty the material IDs will not be initalised!

Parameters
deviceThe device to initalise
filenameThe name/path to the VTK file
doping_n_keyThe VTK key to the donor doping
doping_p_keyThe VTK key to the acceptor doping
material_keyThe VTK key to the material id

Definition at line 77 of file device_reader_vtk.hpp.

◆ read_initial_guess_vtk()

template<typename DeviceT , typename SimulatorT >
bool viennashe::io::read_initial_guess_vtk ( DeviceT const &  device,
SimulatorT &  simulator,
std::string  filename,
std::string  quantity_name,
std::string  vtk_quantity_key 
)

Definition at line 260 of file device_reader_vtk.hpp.

◆ read_vector_from_file()

template<typename VectorType >
void viennashe::io::read_vector_from_file ( VectorType &  vec,
const std::string &  filename 
)

Reads a vector from a file.

Parameters
vecThe vector
filenameThe filename

Definition at line 40 of file vector.hpp.

◆ write_cell_quantity_for_gnuplot()

template<typename DeviceType , typename AccessorType >
void viennashe::io::write_cell_quantity_for_gnuplot ( AccessorType const &  quan,
DeviceType const &  device,
std::string  filename 
)

Writes a quantity (on vertices) per point to a text file suitable for gnuplot.

Definition at line 132 of file gnuplot_writer.hpp.

◆ write_cell_quantity_to_VTK_file()

template<typename QuantityType , typename DeviceType >
void viennashe::io::write_cell_quantity_to_VTK_file ( QuantityType const &  quantity,
DeviceType const &  device,
std::string  filename,
std::string  name_in_file = "viennashe_quantity" 
)

Convenience routine for writing a single macroscopic quantity to a VTK file.

Parameters
quantityAn accessor for a macroscopic quantity
deviceThe device (includes a ViennaGrid mesh) on which simulation is carried out
filenameName of the file to be written to
name_in_fileThe quantity name to be used in the VTK file

Definition at line 743 of file she_vtk_writer.hpp.

◆ write_initial_guess()

template<typename MeshT , typename QuanAssembler >
void viennashe::io::write_initial_guess ( MeshT const &  mesh,
std::string const &  key,
QuanAssembler  qas 
)

Writes the inital guess to a VTK file.

Parameters
meshThe mesh on which the guess is defined
keyThe key to the inital guess used in the VTK file
qasThe quantity accessor

Definition at line 39 of file initial_guess_writer.hpp.

◆ write_quantities_to_VTK_file()

template<typename DeviceType >
void viennashe::io::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.

Definition at line 868 of file she_vtk_writer.hpp.

◆ write_quantity_to_VTK_file()

template<typename QuantityType , typename DeviceType >
void viennashe::io::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 vertex and cell quantity.

Custom functors may need to overload detail::extract_topology_tag if writing cell quantities (by default, unidentified quantities are assumed to be vertex-quantities)

Definition at line 824 of file she_vtk_writer.hpp.

◆ write_vector_to_file()

template<typename VectorType >
void viennashe::io::write_vector_to_file ( VectorType &  vec,
const std::string &  filename 
)

Writes a vector to a file.

Parameters
vecThe vector
filenameThe filename

Definition at line 71 of file vector.hpp.

◆ write_vertex_quantity_to_VTK_file()

template<typename QuantityType , typename DeviceType >
void viennashe::io::write_vertex_quantity_to_VTK_file ( QuantityType const &  quantity,
DeviceType const &  device,
std::string  filename,
std::string  name_in_file = "viennashe_quantity" 
)

Convenience routine for writing a single macroscopic quantity to a VTK file.

Parameters
quantityAn accessor for a macroscopic quantity
deviceThe device (includes a ViennaGrid mesh) on which simulation is carried out
filenameName of the file to be written to
name_in_fileThe quantity name to be used in the VTK file

Definition at line 702 of file she_vtk_writer.hpp.