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... | |
Namespace for all (file-)IO specific code
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.
device | The device |
potential | Accessor to the elec. potential |
carrier | Accessor to the carrier density |
ctype | Carrier type (electrons or holes) |
mobility_model | The mobility model |
writer | The writer |
name | The name of the current density in the file |
Definition at line 206 of file add_to_writer.hpp.
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.
device | The device |
quan | The SHE quantity, i.e. the EDF |
conf | The simulator configuration |
writer | The writer |
name | The name of the current density in the file |
Definition at line 180 of file add_to_writer.hpp.
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.
quan | The SHE quantity, that is the EDF |
conf | The simulator configuration |
writer | The writer |
name | Name of the average carrier energy in the file |
Definition at line 230 of file add_to_writer.hpp.
void viennashe::io::add_macroscopic_quantity_to_writer | ( | MacroscopicQuantityAccessor const & | quantity, |
WriterType & | writer, | ||
std::string | name | ||
) |
Adds a quantity to a writer.
quantity | The accessor to the quantity |
writer | The writer |
name | Name of the quantity in the file |
Definition at line 129 of file add_to_writer.hpp.
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.
pot | The accessor to the electrostatic potential |
writer | The writer |
name | Name of the elec. potential in the file |
Definition at line 145 of file add_to_writer.hpp.
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".
device | The device to initalise |
filename | The name/path to the VTK file |
Definition at line 382 of file device_reader_vtk.hpp.
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!
device | The device to initalise |
filename | The name/path to the VTK file |
doping_n_key | The VTK key to the donor doping |
doping_p_key | The VTK key to the acceptor doping |
material_key | The VTK key to the material id |
Definition at line 77 of file device_reader_vtk.hpp.
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.
void viennashe::io::read_vector_from_file | ( | VectorType & | vec, |
const std::string & | filename | ||
) |
Reads a vector from a file.
vec | The vector |
filename | The filename |
Definition at line 40 of file vector.hpp.
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.
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.
quantity | An accessor for a macroscopic quantity |
device | The device (includes a ViennaGrid mesh) on which simulation is carried out |
filename | Name of the file to be written to |
name_in_file | The quantity name to be used in the VTK file |
Definition at line 743 of file she_vtk_writer.hpp.
void viennashe::io::write_initial_guess | ( | MeshT const & | mesh, |
std::string const & | key, | ||
QuanAssembler | qas | ||
) |
Writes the inital guess to a VTK file.
mesh | The mesh on which the guess is defined |
key | The key to the inital guess used in the VTK file |
qas | The quantity accessor |
Definition at line 39 of file initial_guess_writer.hpp.
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.
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.
void viennashe::io::write_vector_to_file | ( | VectorType & | vec, |
const std::string & | filename | ||
) |
Writes a vector to a file.
vec | The vector |
filename | The filename |
Definition at line 71 of file vector.hpp.
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.
quantity | An accessor for a macroscopic quantity |
device | The device (includes a ViennaGrid mesh) on which simulation is carried out |
filename | Name of the file to be written to |
name_in_file | The quantity name to be used in the VTK file |
Definition at line 702 of file she_vtk_writer.hpp.