Dune Core Modules (2.9.1)

Dune::StarCDReader< GridType > Class Template Reference

File reader for the Star-CD format. More...

#include <dune/grid/io/file/starcdreader.hh>

Static Public Member Functions

static std::unique_ptr< GridType > read (const std::string &fileName, bool verbose=true)
 Read grid from a Star-CD file. More...
 

Detailed Description

template<class GridType>
class Dune::StarCDReader< GridType >

File reader for the Star-CD format.

Reads grid data described by the Star-CD format and fills an empty grid with the data. Uses the grid creation methods described in "How to Write a File Reader for UGGrid Objects".

Two files fileName.vrt and fileName.cel have to be present. The file fileName.vrt contains the coordinates of the nodes, each row having the format

idx x-coordinate y-coordinate z-coordinate

The file fileName.cel contains the data of the volume and possibly the boundary elements, each row having the format

idx node1 node2 ... node8 material/boundaryId flag1 flag2

The flags flag1 and flag2 appear to be always identical to 1 in case of a volume element and to 4 in case of a boundary element. The element types simplex, pyramid, prism, and cube are supported:

  • For cubes, the indices node1 ... node8 are what you expect them to be.
  • For simplices, node3 and node4 are identical, as well as node5 ... node8.
  • For pyramids, node5 ... node8 are identical.
  • For prisms, node3 and node4 are identical, as well as node7 and node8.

This reader only supports three-dimensional grids.

Currently no boundary element data is passed to grid.

Member Function Documentation

◆ read()

template<class GridType >
static std::unique_ptr< GridType > Dune::StarCDReader< GridType >::read ( const std::string &  fileName,
bool  verbose = true 
)
inlinestatic

Read grid from a Star-CD file.

Returns
Pointer to the grid
Parameters
fileNameThe base file name of the Star-CD files
verboseTlag to set whether information should be printed
Returns
The return type is a special pointer type that casts into std::unique_ptr<GridType>, and std::shared_ptr<GridType>. It is scheduled to be replaced by std::unique_ptr<GridType> eventually.

References Dune::GridFactory< GridType >::createGrid(), DUNE_THROW, Dune::GeometryTypes::hexahedron, Dune::GridFactory< GridType >::insertElement(), Dune::GridFactory< GridType >::insertVertex(), Dune::GeometryTypes::prism, Dune::GeometryTypes::pyramid, and Dune::GeometryTypes::tetrahedron.


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 24, 23:30, 2024)