mesh_converter::MeshParser

Parser class to read different data formats.

#include <MeshParser.hpp>

Inherited by mesh_converter::DFISEParser, mesh_converter::SilvacoParser

Public Functions

Name
std::shared_ptr< MeshParser > factory(const allpix::Configuration & config)
virtual ~MeshParser() =default
Default destructor.
std::vector< Point > getMesh(const std::string & file, const std::vector< std::string > & regions)
std::vector< Point > getField(const std::string & file, const std::string & observable, const std::vector< std::string > & regions)

Protected Functions

Name
MeshParser() =default
Default constructor.
virtual MeshMap read_meshes(const std::string & file_name) =0
Method to read grids of mesh points from the given file.
virtual FieldMap read_fields(const std::string & file_name, const std::string & observable) =0
Method to read fields from the given file.

Public Functions Documentation

function factory

static std::shared_ptr< MeshParser > factory(
    const allpix::Configuration & config
)

function ~MeshParser

virtual ~MeshParser() =default

Default destructor.

function getMesh

std::vector< Point > getMesh(
    const std::string & file,
    const std::vector< std::string > & regions
)

function getField

std::vector< Point > getField(
    const std::string & file,
    const std::string & observable,
    const std::vector< std::string > & regions
)

Protected Functions Documentation

function MeshParser

MeshParser() =default

Default constructor.

function read_meshes

virtual MeshMap read_meshes(
    const std::string & file_name
) =0

Method to read grids of mesh points from the given file.

Parameters:

  • file_name Canonical path of the input file

Return: Map with mesh points for all regions found in the file

Reimplemented by: mesh_converter::DFISEParser::read_meshes, mesh_converter::SilvacoParser::read_meshes

function read_fields

virtual FieldMap read_fields(
    const std::string & file_name,
    const std::string & observable
) =0

Method to read fields from the given file.

Parameters:

  • file_name Canonical path pof the input file
  • observable Optionally the observable of interest, required by some parsers

Return: Map with all fields for the different regions

Reimplemented by: mesh_converter::DFISEParser::read_fields, mesh_converter::SilvacoParser::read_fields


Updated on 2024-12-13 at 08:31:36 +0000