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

#include <dune/vtk/gridcreators/lagrangegridcreator.hh>

Inheritance diagram for Dune::Vtk::LagrangeGridCreator< GridType >:
Inheritance graph

Classes

struct  ElementParametrization
 
struct  EntitySet
 
class  LocalFunction
 
class  LocalParametrization
 

Public Types

using Self = LagrangeGridCreator
 
using Super = GridCreatorInterface< GridType, Self >
 
using GlobalCoordinate = typename Super::GlobalCoordinate
 
using Nodes = std::vector< GlobalCoordinate >
 
using Parametrization = std::vector< ElementParametrization >
 
using Element = typename GridType::template Codim< 0 >::Entity
 
using LocalCoordinate = typename Element::Geometry::LocalCoordinate
 
using LocalGeometry = MultiLinearGeometry< typename Element::Geometry::ctype, Element::dimension, Element::dimension >
 
template<class F >
using HasParametrizedElements = decltype(std::declval< F >().insertElement(std::declval< GeometryType >(), std::declval< std::vector< unsigned int > const & >(), std::declval< std::function< GlobalCoordinate(LocalCoordinate)> >()))
 
using Grid = GridType
 
using Derived = LagrangeGridCreator< GridType >
 

Public Member Functions

void insertVerticesImpl (std::vector< GlobalCoordinate > const &points, std::vector< std::uint64_t > const &)
 Implementation of the interface function insertVertices() More...
 
void insertElementsImpl (std::vector< std::uint8_t > const &types, std::vector< std::int64_t > const &offsets, std::vector< std::int64_t > const &connectivity)
 Implementation of the interface function insertElements() More...
 
LocalParametrization localParametrization (unsigned int insertionIndex) const
 Construct an element parametrization. More...
 
LocalParametrization localParametrization (Element const &element) const
 Construct an element parametrization. More...
 
LocalGeometry localGeometry (Element const &element) const
 Construct a transformation of local element coordinates. More...
 
int order (GeometryType type, std::size_t nNodes) const
 Determine lagrange order from number of points. More...
 
int order (ElementParametrization const &localParam) const
 
int order () const
 Determine lagrange order from number of points from the first element parametrization. More...
 
std::string name () const
 
int numComponents () const
 
Vtk::DataTypes dataType () const
 
EntitySet entitySet () const
 Dummy function returning a placeholder entityset. More...
 
GlobalCoordinate operator() (GlobalCoordinate const &) const
 Dummy function returning a placeholder entityset. More...
 
GridFactory< Grid > & factory ()
 Return the associated GridFactory. More...
 
GridFactory< Grid > const & factory () const
 Return the associated (const) GridFactory. More...
 
void insertVertices (std::vector< GlobalCoordinate > const &points, std::vector< std::uint64_t > const &point_ids)
 Insert all points as vertices into the factory. More...
 
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. More...
 
void insertPieces (std::vector< std::string > const &pieces)
 Insert part of a grid stored in file into factory. More...
 
std::unique_ptr< GridcreateGrid () const
 Construct the actual grid using the GridFactory. More...
 
auto comm () const
 Return the mpi collective communicator. More...
 
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 Dune::Vtk::LagrangeGridCreator< GridType >

The grid is created from the first nodes of a cell parametrization, representing the corner vertices. Thus a piecewise "flat" grid is constructed. The parametrization is 1. passed as a local element parametrization to the insertElement() function of a gridFactory to allow the grid itself to handle the parametrization and 2. is stored internally that can be accessed by using this GridCreator object as a grid function, or by extracting locally the parametrization on each existing grid element after creation of the grid.

So, the LagrangeGridCreator models both, a GridCreator and a GridFunction.

Member Typedef Documentation

◆ Derived

using Dune::Vtk::GridCreatorInterface< GridType, LagrangeGridCreator< GridType > >::Derived = LagrangeGridCreator< GridType >
inherited

◆ Element

template<class GridType >
using Dune::Vtk::LagrangeGridCreator< GridType >::Element = typename GridType::template Codim<0>::Entity

◆ GlobalCoordinate

template<class GridType >
using Dune::Vtk::LagrangeGridCreator< GridType >::GlobalCoordinate = typename Super::GlobalCoordinate

◆ Grid

using Dune::Vtk::GridCreatorInterface< GridType, LagrangeGridCreator< GridType > >::Grid = GridType
inherited

◆ HasParametrizedElements

template<class GridType >
template<class F >
using Dune::Vtk::LagrangeGridCreator< GridType >::HasParametrizedElements = decltype(std::declval<F>().insertElement(std::declval<GeometryType>(), std::declval<std::vector<unsigned int> const&>(), std::declval<std::function<GlobalCoordinate(LocalCoordinate)> >()))

◆ LocalCoordinate

template<class GridType >
using Dune::Vtk::LagrangeGridCreator< GridType >::LocalCoordinate = typename Element::Geometry::LocalCoordinate

◆ LocalGeometry

template<class GridType >
using Dune::Vtk::LagrangeGridCreator< GridType >::LocalGeometry = MultiLinearGeometry<typename Element::Geometry::ctype,Element::dimension,Element::dimension>

◆ Nodes

template<class GridType >
using Dune::Vtk::LagrangeGridCreator< GridType >::Nodes = std::vector<GlobalCoordinate>

◆ Parametrization

template<class GridType >
using Dune::Vtk::LagrangeGridCreator< GridType >::Parametrization = std::vector<ElementParametrization>

◆ Self

template<class GridType >
using Dune::Vtk::LagrangeGridCreator< GridType >::Self = LagrangeGridCreator

◆ Super

template<class GridType >
using Dune::Vtk::LagrangeGridCreator< GridType >::Super = GridCreatorInterface<GridType, Self>

Member Function Documentation

◆ asDerived() [1/2]

Derived & Dune::Vtk::GridCreatorInterface< GridType, LagrangeGridCreator< GridType > >::asDerived ( )
inlineprotectedinherited

◆ asDerived() [2/2]

const Derived & Dune::Vtk::GridCreatorInterface< GridType, LagrangeGridCreator< GridType > >::asDerived ( ) const
inlineprotectedinherited

◆ comm()

auto Dune::Vtk::GridCreatorInterface< GridType, LagrangeGridCreator< GridType > >::comm ( ) const
inlineinherited

Return the mpi collective communicator.

◆ createGrid()

std::unique_ptr< Grid > Dune::Vtk::GridCreatorInterface< GridType, LagrangeGridCreator< GridType > >::createGrid ( ) const
inlineinherited

Construct the actual grid using the GridFactory.

◆ dataType()

template<class GridType >
Vtk::DataTypes Dune::Vtk::LagrangeGridCreator< GridType >::dataType ( ) const
inline

◆ entitySet()

template<class GridType >
EntitySet Dune::Vtk::LagrangeGridCreator< GridType >::entitySet ( ) const
inline

Dummy function returning a placeholder entityset.

◆ factory() [1/2]

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

Return the associated GridFactory.

◆ factory() [2/2]

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

Return the associated (const) GridFactory.

◆ insertElements()

void Dune::Vtk::GridCreatorInterface< GridType, LagrangeGridCreator< GridType > >::insertElements ( std::vector< std::uint8_t > const &  types,
std::vector< std::int64_t > const &  offsets,
std::vector< std::int64_t > const &  connectivity 
)
inlineinherited

Create elements based on type and connectivity description.

◆ insertElementsImpl()

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

Implementation of the interface function insertElements()

◆ insertPieces()

void Dune::Vtk::GridCreatorInterface< GridType, LagrangeGridCreator< GridType > >::insertPieces ( std::vector< std::string > const &  pieces)
inlineinherited

Insert part of a grid stored in file into factory.

◆ insertPiecesImpl()

void Dune::Vtk::GridCreatorInterface< GridType, LagrangeGridCreator< GridType > >::insertPiecesImpl ( std::vector< std::string > const &  )
inlineinherited

◆ insertVertices()

void Dune::Vtk::GridCreatorInterface< GridType, LagrangeGridCreator< GridType > >::insertVertices ( std::vector< GlobalCoordinate > const &  points,
std::vector< std::uint64_t > const &  point_ids 
)
inlineinherited

Insert all points as vertices into the factory.

◆ insertVerticesImpl()

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

Implementation of the interface function insertVertices()

◆ localGeometry()

template<class GridType >
LocalGeometry Dune::Vtk::LagrangeGridCreator< GridType >::localGeometry ( Element const &  element) const
inline

Construct a transformation of local element coordinates.

An element might have a different local coordinate system than the coordinate system used to defined the element parametrization. Thus coordinate transform of the local parametrization is needed for element-local evaluations. This local geometry transform is obtained by figuring out the permutation of corners in the element corresponding to the inserted corner vertices.

◆ localParametrization() [1/2]

template<class GridType >
LocalParametrization Dune::Vtk::LagrangeGridCreator< GridType >::localParametrization ( Element const &  element) const
inline

Construct an element parametrization.

The returned LocalParametrization is a mapping GlobalCoordinate(LocalCoordinate) where LocalCoordinate is w.r.t. the local coordinate system in the passed element andGlobalCoordinate` a world coordinate in the parametrized grid.

◆ localParametrization() [2/2]

template<class GridType >
LocalParametrization Dune::Vtk::LagrangeGridCreator< GridType >::localParametrization ( unsigned int  insertionIndex) const
inline

Construct an element parametrization.

The returned LocalParametrization is a mapping GlobalCoordinate(LocalCoordinate) where LocalCoordinate is w.r.t. the local coordinate system in an element with giveninsertionIndex<tt>(defined by the inserted corner vertices) and GlobalCoordinate` a world coordinate in the parametrized grid.

◆ name()

template<class GridType >
std::string Dune::Vtk::LagrangeGridCreator< GridType >::name ( ) const
inline

◆ numComponents()

template<class GridType >
int Dune::Vtk::LagrangeGridCreator< GridType >::numComponents ( ) const
inline

◆ operator()()

template<class GridType >
GlobalCoordinate Dune::Vtk::LagrangeGridCreator< GridType >::operator() ( GlobalCoordinate const &  ) const
inline

Dummy function returning a placeholder entityset.

◆ order() [1/3]

template<class GridType >
int Dune::Vtk::LagrangeGridCreator< GridType >::order ( ) const
inline

Determine lagrange order from number of points from the first element parametrization.

◆ order() [2/3]

template<class GridType >
int Dune::Vtk::LagrangeGridCreator< GridType >::order ( ElementParametrization const &  localParam) const
inline

◆ order() [3/3]

template<class GridType >
int Dune::Vtk::LagrangeGridCreator< GridType >::order ( GeometryType  type,
std::size_t  nNodes 
) const
inline

Determine lagrange order from number of points.

Member Data Documentation

◆ factory_

std::shared_ptr<GridFactory<Grid> > Dune::Vtk::GridCreatorInterface< GridType, LagrangeGridCreator< GridType > >::factory_
protectedinherited

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