dune-vtk 2.8
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Dune::Vtk::GridCreatorInterface< GridType, DerivedType > Class Template Reference

Base class for grid creators in a CRTP style. More...

#include <dune/vtk/gridcreatorinterface.hh>

Inheritance diagram for Dune::Vtk::GridCreatorInterface< GridType, DerivedType >:
Inheritance graph

Public Types

using Grid = GridType
 
using GlobalCoordinate = typename Grid::template Codim< 0 >::Entity::Geometry::GlobalCoordinate
 
using Derived = DerivedType
 

Public Member Functions

 GridCreatorInterface (GridFactory< Grid > &factory)
 Constructor. Stores a reference to the passed GridFactory.
 
 GridCreatorInterface (std::shared_ptr< GridFactory< Grid > > factory)
 Constructor. Store the shared_ptr to the GridFactory.
 
template<class... Args, std::enable_if_t< std::is_constructible< GridFactory< Grid >, Args... >::value, int > = 0>
 GridCreatorInterface (Args &&... args)
 Constructor. Construct a new GridFactory from the passed arguments.
 
void insertVertices (std::vector< GlobalCoordinate > const &points, std::vector< std::uint64_t > const &point_ids)
 Insert all points as vertices into the factory.
 
void insertElements (std::vector< std::uint8_t > const &types, std::vector< std::int64_t > const &offsets, std::vector< std::int64_t > const &connectivity)
 Create elements based on type and connectivity description.
 
void insertPieces (std::vector< std::string > const &pieces)
 Insert part of a grid stored in file into factory.
 
std::unique_ptr< GridcreateGrid () const
 Construct the actual grid using the GridFactory.
 
GridFactory< Grid > & factory ()
 Return the associated GridFactory.
 
GridFactory< Grid > const & factory () const
 Return the associated (const) GridFactory.
 
auto comm () const
 Return the mpi collective communicator.
 
void insertVerticesImpl (std::vector< GlobalCoordinate > const &, std::vector< std::uint64_t > const &)
 
void insertElementsImpl (std::vector< std::uint8_t > const &, std::vector< std::int64_t > const &, std::vector< std::int64_t > const &)
 
void insertPiecesImpl (std::vector< std::string > const &)
 

Protected Member Functions

DerivedasDerived ()
 
const DerivedasDerived () const
 

Protected Attributes

std::shared_ptr< GridFactory< Grid > > factory_
 

Detailed Description

template<class GridType, class DerivedType>
class Dune::Vtk::GridCreatorInterface< GridType, DerivedType >

Base class for grid creators in a CRTP style.

Construct a grid from data read from VTK files.

Template Parameters
GridTypeModel of Dune::Grid
GlobalCoordTypeType of the global coordinates.
DerivedTypeImplementation of a concrete GridCreator.

Member Typedef Documentation

◆ Derived

template<class GridType , class DerivedType >
using Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::Derived = DerivedType

◆ GlobalCoordinate

template<class GridType , class DerivedType >
using Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::GlobalCoordinate = typename Grid::template Codim<0>::Entity::Geometry::GlobalCoordinate

◆ Grid

template<class GridType , class DerivedType >
using Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::Grid = GridType

Constructor & Destructor Documentation

◆ GridCreatorInterface() [1/3]

template<class GridType , class DerivedType >
Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::GridCreatorInterface ( GridFactory< Grid > &  factory)
inline

Constructor. Stores a reference to the passed GridFactory.

◆ GridCreatorInterface() [2/3]

template<class GridType , class DerivedType >
Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::GridCreatorInterface ( std::shared_ptr< GridFactory< Grid > >  factory)
inline

Constructor. Store the shared_ptr to the GridFactory.

◆ GridCreatorInterface() [3/3]

template<class GridType , class DerivedType >
template<class... Args, std::enable_if_t< std::is_constructible< GridFactory< Grid >, Args... >::value, int > = 0>
Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::GridCreatorInterface ( Args &&...  args)
inline

Constructor. Construct a new GridFactory from the passed arguments.

Member Function Documentation

◆ asDerived() [1/2]

template<class GridType , class DerivedType >
Derived & Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::asDerived ( )
inlineprotected

◆ asDerived() [2/2]

template<class GridType , class DerivedType >
const Derived & Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::asDerived ( ) const
inlineprotected

◆ comm()

template<class GridType , class DerivedType >
auto Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::comm ( ) const
inline

Return the mpi collective communicator.

◆ createGrid()

template<class GridType , class DerivedType >
std::unique_ptr< Grid > Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::createGrid ( ) const
inline

Construct the actual grid using the GridFactory.

◆ factory() [1/2]

template<class GridType , class DerivedType >
GridFactory< Grid > & Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::factory ( )
inline

Return the associated GridFactory.

◆ factory() [2/2]

template<class GridType , class DerivedType >
GridFactory< Grid > const & Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::factory ( ) const
inline

Return the associated (const) GridFactory.

◆ insertElements()

template<class GridType , class DerivedType >
void Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::insertElements ( std::vector< std::uint8_t > const &  types,
std::vector< std::int64_t > const &  offsets,
std::vector< std::int64_t > const &  connectivity 
)
inline

Create elements based on type and connectivity description.

◆ insertElementsImpl()

template<class GridType , class DerivedType >
void Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::insertElementsImpl ( std::vector< std::uint8_t > const &  ,
std::vector< std::int64_t > const &  ,
std::vector< std::int64_t > const &   
)
inline

◆ insertPieces()

template<class GridType , class DerivedType >
void Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::insertPieces ( std::vector< std::string > const &  pieces)
inline

Insert part of a grid stored in file into factory.

◆ insertPiecesImpl()

template<class GridType , class DerivedType >
void Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::insertPiecesImpl ( std::vector< std::string > const &  )
inline

◆ insertVertices()

template<class GridType , class DerivedType >
void Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::insertVertices ( std::vector< GlobalCoordinate > const &  points,
std::vector< std::uint64_t > const &  point_ids 
)
inline

Insert all points as vertices into the factory.

◆ insertVerticesImpl()

template<class GridType , class DerivedType >
void Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::insertVerticesImpl ( std::vector< GlobalCoordinate > const &  ,
std::vector< std::uint64_t > const &   
)
inline

Member Data Documentation

◆ factory_

template<class GridType , class DerivedType >
std::shared_ptr<GridFactory<Grid> > Dune::Vtk::GridCreatorInterface< GridType, DerivedType >::factory_
protected

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