3.3.0
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Member Functions | List of all members
Dumux::GridData< Grid > Class Template Reference

Class for grid data attached to dgf or gmsh grid files. More...

#include <dumux/io/grid/griddata.hh>

Description

template<class Grid>
class Dumux::GridData< Grid >

Class for grid data attached to dgf or gmsh grid files.

Public Member Functions

 GridData (std::shared_ptr< Grid > grid, std::shared_ptr< Dune::GridFactory< Grid > > factory, std::vector< int > &&elementMarkers, std::vector< int > &&boundaryMarkers, std::vector< int > &&faceMarkers=std::vector< int >{})
 constructor for gmsh grid data More...
 
 GridData (Dune::GridPtr< Grid > grid)
 constructor for dgf grid data More...
 
 GridData (std::shared_ptr< Grid > grid, std::shared_ptr< Dune::GridFactory< Grid > > factory, VTKReader::Data &&cellData, VTKReader::Data &&pointData)
 constructor for gmsh grid data More...
 
DGF interface functions
const std::vector< double > & parameters (const Vertex &vertex) const
 Call the parameters function of the DGF grid pointer if available for vertex data. More...
 
const std::vector< double > & parameters (const Element &element) const
 Call the parameters function of the DGF grid pointer if available for element data. More...
 
template<class GridImp , class IntersectionImp >
const Dune::DGFBoundaryParameter::type & parameters (const Dune::Intersection< GridImp, IntersectionImp > &intersection) const
 Call the parameters function of the DGF grid pointer if available. More...
 
Gmsh interface functions
int getBoundaryDomainMarker (int boundarySegmentIndex) const
 Return the boundary domain marker (Gmsh physical entity number) of an intersection Only available when using Gmsh with GridParameterGroup.DomainMarkers = 1. More...
 
int getBoundaryDomainMarker (const Intersection &intersection) const
 Return the boundary domain marker (Gmsh physical entity number) of an intersection Only available when using Gmsh with GridParameterGroup.DomainMarkers = 1. More...
 
bool wasInserted (const Intersection &intersection) const
 Returns true if an intersection was inserted during grid creation. More...
 
int getElementDomainMarker (const Element &element) const
 Return the element domain marker (Gmsh physical entity number) of an element. Only available when using Gmsh with GridParameterGroup.DomainMarkers = 1. More...
 
template<bool ug = Detail::isUG<Grid>::value, typename std::enable_if_t<!ug, int > = 0>
DataHandle createGmshDataHandle ()
 Create a data handle for communication of the data in parallel simulations. More...
 
template<bool ug = Detail::isUG<Grid>::value, typename std::enable_if_t< ug, int > = 0>
DataHandle createGmshDataHandle ()
 Create a data handle for communication of the data in parallel simulations. More...
 

VTK interface functions

double getParameter (const Element &element, const std::string &fieldName) const
 Get a element parameter. More...
 
double getParameter (const Vertex &vertex, const std::string &fieldName) const
 Call the parameters function of the DGF grid pointer if available for vertex data. More...
 

Constructor & Destructor Documentation

◆ GridData() [1/3]

template<class Grid >
Dumux::GridData< Grid >::GridData ( std::shared_ptr< Grid >  grid,
std::shared_ptr< Dune::GridFactory< Grid > >  factory,
std::vector< int > &&  elementMarkers,
std::vector< int > &&  boundaryMarkers,
std::vector< int > &&  faceMarkers = std::vector<int>{} 
)
inline

constructor for gmsh grid data

◆ GridData() [2/3]

template<class Grid >
Dumux::GridData< Grid >::GridData ( Dune::GridPtr< Grid >  grid)
inline

constructor for dgf grid data

◆ GridData() [3/3]

template<class Grid >
Dumux::GridData< Grid >::GridData ( std::shared_ptr< Grid >  grid,
std::shared_ptr< Dune::GridFactory< Grid > >  factory,
VTKReader::Data &&  cellData,
VTKReader::Data &&  pointData 
)
inline

constructor for gmsh grid data

Member Function Documentation

◆ createGmshDataHandle() [1/2]

template<class Grid >
template<bool ug = Detail::isUG<Grid>::value, typename std::enable_if_t<!ug, int > = 0>
DataHandle Dumux::GridData< Grid >::createGmshDataHandle ( )
inline

Create a data handle for communication of the data in parallel simulations.

Note
this data hande is the default

◆ createGmshDataHandle() [2/2]

template<class Grid >
template<bool ug = Detail::isUG<Grid>::value, typename std::enable_if_t< ug, int > = 0>
DataHandle Dumux::GridData< Grid >::createGmshDataHandle ( )
inline

Create a data handle for communication of the data in parallel simulations.

Note
this data hande is the specialized for UGGrid since UGGrid can't communicate element data (yet)

◆ getBoundaryDomainMarker() [1/2]

template<class Grid >
int Dumux::GridData< Grid >::getBoundaryDomainMarker ( const Intersection &  intersection) const
inline

Return the boundary domain marker (Gmsh physical entity number) of an intersection Only available when using Gmsh with GridParameterGroup.DomainMarkers = 1.

Parameters
intersectionThe intersection to be evaluated

◆ getBoundaryDomainMarker() [2/2]

template<class Grid >
int Dumux::GridData< Grid >::getBoundaryDomainMarker ( int  boundarySegmentIndex) const
inline

Return the boundary domain marker (Gmsh physical entity number) of an intersection Only available when using Gmsh with GridParameterGroup.DomainMarkers = 1.

Parameters
boundarySegmentIndexThe boundary segment index of the intersection (intersection.boundarySegmentIndex()

◆ getElementDomainMarker()

template<class Grid >
int Dumux::GridData< Grid >::getElementDomainMarker ( const Element &  element) const
inline

Return the element domain marker (Gmsh physical entity number) of an element. Only available when using Gmsh with GridParameterGroup.DomainMarkers = 1.

Parameters
elementThe element to be evaluated

◆ getParameter() [1/2]

template<class Grid >
double Dumux::GridData< Grid >::getParameter ( const Element &  element,
const std::string &  fieldName 
) const
inline

Get a element parameter.

Parameters
elementthe element
fieldNamethe name of the field to read from the vtk data

◆ getParameter() [2/2]

template<class Grid >
double Dumux::GridData< Grid >::getParameter ( const Vertex &  vertex,
const std::string &  fieldName 
) const
inline

Call the parameters function of the DGF grid pointer if available for vertex data.

Parameters
vertexthe vertex
fieldNamethe name of the field to read from the vtk data
Note
You can only pass vertices that exist on level 0!

◆ parameters() [1/3]

template<class Grid >
template<class GridImp , class IntersectionImp >
const Dune::DGFBoundaryParameter::type & Dumux::GridData< Grid >::parameters ( const Dune::Intersection< GridImp, IntersectionImp > &  intersection) const
inline

Call the parameters function of the DGF grid pointer if available.

◆ parameters() [2/3]

template<class Grid >
const std::vector< double > & Dumux::GridData< Grid >::parameters ( const Element &  element) const
inline

Call the parameters function of the DGF grid pointer if available for element data.

◆ parameters() [3/3]

template<class Grid >
const std::vector< double > & Dumux::GridData< Grid >::parameters ( const Vertex &  vertex) const
inline

Call the parameters function of the DGF grid pointer if available for vertex data.

Note
You can only pass vertices that exist on level 0!

◆ wasInserted()

template<class Grid >
bool Dumux::GridData< Grid >::wasInserted ( const Intersection &  intersection) const
inline

Returns true if an intersection was inserted during grid creation.


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