ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem > Class Template Reference

VTK writer class. More...

#include <she_vtk_writer.hpp>

Public Member Functions

 she_vtk_writer ()
 
template<typename DeviceType , typename SHEQuantityT >
void operator() (DeviceType const &device, viennashe::config const &conf, SHEQuantityT const &quan, std::string const &filename)
 Triggers the write process. More...
 
bool write_segments () const
 
void write_segments (bool b)
 
bool with_debug_quantities () const
 
void with_debug_quantities (bool b)
 

Protected Types

enum  quantity_ids {
  VIENNASHE_SHE_VTK_QUAN_INVALID = 0 , VIENNASHE_SHE_VTK_QUAN_GENERALIZED_DISTRIBUTION_FUNCTION , VIENNASHE_SHE_VTK_QUAN_DISTRIBUTION_FUNCTION , VIENNASHE_SHE_VTK_QUAN_DENSITY_OF_STATES ,
  VIENNASHE_SHE_VTK_QUAN_GROUP_VELOCITY , VIENNASHE_SHE_VTK_QUAN_KINETIC_ENERGY , VIENNASHE_SHE_VTK_QUAN_EXPANSION_ORDER , VIENNASHE_SHE_VTK_QUAN_EXPANSION_ADAPTION ,
  VIENNASHE_SHE_VTK_QUAN_UNKNOWN_INDEX , VIENNASHE_SHE_VTK_QUAN_UNKNOWN_MASK , VIENNASHE_SHE_VTK_QUAN_UNKNOWN_NUM
}
 
typedef SHEDeviceType::mesh_type MeshType
 
typedef viennagrid::result_of::cell_tag< MeshType >::type CellTag
 
typedef viennagrid::result_of::point< MeshType >::type PointType
 
typedef viennagrid::result_of::vertex< MeshType >::type VertexType
 
typedef viennagrid::result_of::cell< MeshType >::type CellType
 

Protected Member Functions

template<typename DeviceType , typename SHEQuantity , typename CellType >
bool is_valid (DeviceType const &device, SHEQuantity const &quan, CellType const &cell, std::size_t index_H)
 Checks whether a certain cell in x-space is inside the conduction band or the valence band at total energy index index_H. More...
 
template<typename DeviceType , typename SegmentType , typename SHEQuantity >
long get_cell_num (DeviceType const &device, SegmentType const &segment, SHEQuantity const &quan)
 Determines the number of cells in the output mesh in (x, H)-space. More...
 
template<typename DeviceType , typename SegmentType , typename SHEQuantity >
long get_point_num (DeviceType const &device, SegmentType const &segment, SHEQuantity const &quan)
 Determines the number of vertices of the output mesh in (x, H)-space. More...
 
void writeHeader (std::ofstream &writer)
 Writes the VTK XML file header for the unstructured grid file format. More...
 
template<typename DeviceType , typename SegmentType , typename SHEQuantity >
void writePoints (DeviceType const &device, SegmentType const &segment, SHEQuantity const &quan, std::ofstream &writer)
 Implementation for writing the vertex coordinates in (x, H)-space. More...
 
template<typename DeviceType , typename SegmentType , typename SHEQuantity >
void writeCells (DeviceType const &device, SegmentType const &segment, SHEQuantity const &quan, std::ofstream &writer)
 Implementation for writing the cells in (x, H)-space (derived from a mesh in x-space) More...
 
template<typename DeviceType , typename SegmentType , typename SHEQuantity >
void writePointData (DeviceType const &device, SegmentType const &segment, SHEQuantity const &quan, std::ofstream &writer, std::string name_in_file="result")
 Implementation for writing the data (that is usually the energy distribution function) to the vertices in (x, H)-space. More...
 
template<typename DeviceType , typename SegmentType , typename SHEQuantity >
void writeCellDataArray (DeviceType const &device, SegmentType const &segment, viennashe::config const &conf, SHEQuantity const &quan, std::ofstream &writer, quantity_ids quan_id)
 Writes data defined on cells to file. More...
 
template<typename DeviceType , typename SegmentType , typename SHEQuantity >
void writeCellData (DeviceType const &device, SegmentType const &segment, viennashe::config const &conf, SHEQuantity const &quan, std::ofstream &writer)
 Writes data defined on cells to file. More...
 
void writeFooter (std::ofstream &writer)
 
template<typename DeviceType , typename SegmentType >
bool segment_is_semiconductor_only (DeviceType const &device, SegmentType const &segment)
 
template<typename DeviceType , typename SegmentType , typename SHEQuantityT >
void write_segment (DeviceType const &device, SegmentType const &segment, viennashe::config const &conf, SHEQuantityT const &quan, std::string filename)
 

Detailed Description

template<typename SHEDeviceType, typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
class viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >

VTK writer class.

Definition at line 109 of file she_vtk_writer.hpp.

Member Typedef Documentation

◆ CellTag

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
typedef viennagrid::result_of::cell_tag<MeshType>::type viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::CellTag
protected

Definition at line 115 of file she_vtk_writer.hpp.

◆ CellType

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
typedef viennagrid::result_of::cell<MeshType>::type viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::CellType
protected

Definition at line 119 of file she_vtk_writer.hpp.

◆ MeshType

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
typedef SHEDeviceType::mesh_type viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::MeshType
protected

Definition at line 113 of file she_vtk_writer.hpp.

◆ PointType

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
typedef viennagrid::result_of::point<MeshType>::type viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::PointType
protected

Definition at line 117 of file she_vtk_writer.hpp.

◆ VertexType

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
typedef viennagrid::result_of::vertex<MeshType>::type viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::VertexType
protected

Definition at line 118 of file she_vtk_writer.hpp.

Member Enumeration Documentation

◆ quantity_ids

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
enum viennashe::io::she_vtk_writer::quantity_ids
protected
Enumerator
VIENNASHE_SHE_VTK_QUAN_INVALID 
VIENNASHE_SHE_VTK_QUAN_GENERALIZED_DISTRIBUTION_FUNCTION 
VIENNASHE_SHE_VTK_QUAN_DISTRIBUTION_FUNCTION 
VIENNASHE_SHE_VTK_QUAN_DENSITY_OF_STATES 
VIENNASHE_SHE_VTK_QUAN_GROUP_VELOCITY 
VIENNASHE_SHE_VTK_QUAN_KINETIC_ENERGY 
VIENNASHE_SHE_VTK_QUAN_EXPANSION_ORDER 
VIENNASHE_SHE_VTK_QUAN_EXPANSION_ADAPTION 
VIENNASHE_SHE_VTK_QUAN_UNKNOWN_INDEX 
VIENNASHE_SHE_VTK_QUAN_UNKNOWN_MASK 
VIENNASHE_SHE_VTK_QUAN_UNKNOWN_NUM 

Definition at line 400 of file she_vtk_writer.hpp.

Constructor & Destructor Documentation

◆ she_vtk_writer()

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::she_vtk_writer ( )
inline

Definition at line 590 of file she_vtk_writer.hpp.

Member Function Documentation

◆ get_cell_num()

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
template<typename DeviceType , typename SegmentType , typename SHEQuantity >
long viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::get_cell_num ( DeviceType const &  device,
SegmentType const &  segment,
SHEQuantity const &  quan 
)
inlineprotected

Determines the number of cells in the output mesh in (x, H)-space.

Definition at line 136 of file she_vtk_writer.hpp.

◆ get_point_num()

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
template<typename DeviceType , typename SegmentType , typename SHEQuantity >
long viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::get_point_num ( DeviceType const &  device,
SegmentType const &  segment,
SHEQuantity const &  quan 
)
inlineprotected

Determines the number of vertices of the output mesh in (x, H)-space.

Definition at line 198 of file she_vtk_writer.hpp.

◆ is_valid()

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
template<typename DeviceType , typename SHEQuantity , typename CellType >
bool viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::is_valid ( DeviceType const &  device,
SHEQuantity const &  quan,
CellType const &  cell,
std::size_t  index_H 
)
inlineprotected

Checks whether a certain cell in x-space is inside the conduction band or the valence band at total energy index index_H.

Definition at line 123 of file she_vtk_writer.hpp.

◆ operator()()

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
template<typename DeviceType , typename SHEQuantityT >
void viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::operator() ( DeviceType const &  device,
viennashe::config const &  conf,
SHEQuantityT const &  quan,
std::string const &  filename 
)
inline

Triggers the write process.

Parameters
deviceThe device (includes a ViennaGrid mesh) on which simulation is carried out
quanThe SHE quantity in (x, H)-space to be written (typically distribution function, expansion order or error indicator)
filenameName of the file to be written to
confThe simulator configuration

Definition at line 600 of file she_vtk_writer.hpp.

◆ segment_is_semiconductor_only()

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
template<typename DeviceType , typename SegmentType >
bool viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::segment_is_semiconductor_only ( DeviceType const &  device,
SegmentType const &  segment 
)
inlineprotected

Definition at line 537 of file she_vtk_writer.hpp.

◆ with_debug_quantities() [1/2]

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
bool viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::with_debug_quantities ( ) const
inline

Definition at line 664 of file she_vtk_writer.hpp.

◆ with_debug_quantities() [2/2]

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
void viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::with_debug_quantities ( bool  b)
inline

Definition at line 665 of file she_vtk_writer.hpp.

◆ write_segment()

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
template<typename DeviceType , typename SegmentType , typename SHEQuantityT >
void viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::write_segment ( DeviceType const &  device,
SegmentType const &  segment,
viennashe::config const &  conf,
SHEQuantityT const &  quan,
std::string  filename 
)
inlineprotected

Definition at line 554 of file she_vtk_writer.hpp.

◆ write_segments() [1/2]

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
bool viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::write_segments ( ) const
inline

Definition at line 661 of file she_vtk_writer.hpp.

◆ write_segments() [2/2]

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
void viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::write_segments ( bool  b)
inline

Definition at line 662 of file she_vtk_writer.hpp.

◆ writeCellData()

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
template<typename DeviceType , typename SegmentType , typename SHEQuantity >
void viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::writeCellData ( DeviceType const &  device,
SegmentType const &  segment,
viennashe::config const &  conf,
SHEQuantity const &  quan,
std::ofstream &  writer 
)
inlineprotected

Writes data defined on cells to file.

Definition at line 506 of file she_vtk_writer.hpp.

◆ writeCellDataArray()

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
template<typename DeviceType , typename SegmentType , typename SHEQuantity >
void viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::writeCellDataArray ( DeviceType const &  device,
SegmentType const &  segment,
viennashe::config const &  conf,
SHEQuantity const &  quan,
std::ofstream &  writer,
quantity_ids  quan_id 
)
inlineprotected

Writes data defined on cells to file.

Definition at line 416 of file she_vtk_writer.hpp.

◆ writeCells()

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
template<typename DeviceType , typename SegmentType , typename SHEQuantity >
void viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::writeCells ( DeviceType const &  device,
SegmentType const &  segment,
SHEQuantity const &  quan,
std::ofstream &  writer 
)
inlineprotected

Implementation for writing the cells in (x, H)-space (derived from a mesh in x-space)

Definition at line 271 of file she_vtk_writer.hpp.

◆ writeFooter()

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
void viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::writeFooter ( std::ofstream &  writer)
inlineprotected

Definition at line 530 of file she_vtk_writer.hpp.

◆ writeHeader()

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
void viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::writeHeader ( std::ofstream &  writer)
inlineprotected

Writes the VTK XML file header for the unstructured grid file format.

Definition at line 227 of file she_vtk_writer.hpp.

◆ writePointData()

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
template<typename DeviceType , typename SegmentType , typename SHEQuantity >
void viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::writePointData ( DeviceType const &  device,
SegmentType const &  segment,
SHEQuantity const &  quan,
std::ofstream &  writer,
std::string  name_in_file = "result" 
)
inlineprotected

Implementation for writing the data (that is usually the energy distribution function) to the vertices in (x, H)-space.

Definition at line 369 of file she_vtk_writer.hpp.

◆ writePoints()

template<typename SHEDeviceType , typename CoordSystem = typename viennagrid::result_of::coordinate_system<typename viennagrid::result_of::point<typename SHEDeviceType::mesh_type>::type>::type>
template<typename DeviceType , typename SegmentType , typename SHEQuantity >
void viennashe::io::she_vtk_writer< SHEDeviceType, CoordSystem >::writePoints ( DeviceType const &  device,
SegmentType const &  segment,
SHEQuantity const &  quan,
std::ofstream &  writer 
)
inlineprotected

Implementation for writing the vertex coordinates in (x, H)-space.

Definition at line 236 of file she_vtk_writer.hpp.


The documentation for this class was generated from the following file: