|
dune-grid-glue 2.10
|
sequential adapter to couple two grids at specified close together boundaries More...
#include <dune/grid-glue/gridglue.hh>
Public Types | |
| template<int side> | |
| using | GridPatch = std::conditional_t< side==0, P0, std::conditional_t< side==1, P1, void > > |
| template<int side> | |
| using | GridView = typename GridPatch< side >::GridView |
| template<int side> | |
| using | Grid = typename GridView< side >::Grid |
| using | Grid0View = GridView< 0 > |
| GridView of grid 0 (aka domain grid) | |
| using | Grid0 = Grid< 0 > |
| Grid 0 type. | |
| using | Grid0Patch = GridPatch< 0 > |
| Coupling patch of grid 0. | |
| using | Grid1View = GridView< 1 > |
| GridView of grid 1 (aka target grid) | |
| using | Grid1 = Grid< 1 > |
| Grid 1 type. | |
| using | Grid1Patch = GridPatch< 1 > |
| Coupling patch of grid 1. | |
| typedef unsigned int | IndexType |
| typedef PromotionTraits< typenameGridView< 0 >::ctype, typenameGridView< 1 >::ctype >::PromotedType | ctype |
| The type used for coordinates. | |
| typedef Dune::FieldVector< ctype, dimworld > | Coords |
| The type used for coordinate vectors. | |
| template<int side> | |
| using | GridElement = typename GridView< side >::Traits::template Codim< 0 >::Entity |
type of grid elements on side side | |
| template<int side> | |
| using | GridVertex = typename GridView< side >::Traits::template Codim< Grid< side >::dimension >::Entity |
type of grid vertices on side side | |
| using | Grid0Element = GridElement< 0 > |
| The type of the Grid0 elements. | |
| using | Grid0Vertex = GridVertex< 0 > |
| The type of the Grid0 vertices. | |
| using | Grid1Element = GridElement< 1 > |
| The type of the Grid1 elements. | |
| using | Grid1Vertex = GridVertex< 1 > |
| The type of the Grid1 vertices. | |
| typedef Dune::GridGlue::Merger< ctype, Grid< 0 >::dimension - GridPatch< 0 >::codim, Grid< 1 >::dimension - GridPatch< 1 >::codim, dimworld > | Merger |
| Instance of a Merger. | |
| typedef Dune::GridGlue::Intersection< P0, P1, 0, 1 > | Intersection |
| Type of remote intersection objects. | |
| typedef Dune::GridGlue::IntersectionIndexSet< P0, P1 > | IndexSet |
| Type of remote intersection indexSet. | |
| template<int side> | |
| using | IntersectionIterator = Dune::GridGlue::IntersectionIterator< P0, P1, side,(side+1) % 2 > |
| Type of the iterator that iterates over remove intersections. | |
| using | Grid0IntersectionIterator = IntersectionIterator< 0 > |
| using | Grid1IntersectionIterator = IntersectionIterator< 1 > |
Public Member Functions | |
| GridGlue (const std::shared_ptr< const GridPatch< 0 > > &gp0, const std::shared_ptr< const GridPatch< 1 > > &gp1, const std::shared_ptr< Merger > &merger) | |
| constructor | |
| template<int P> | |
| const GridPatch< P > & | patch () const |
| template<int P> | |
| const GridView< P > & | gridView () const |
| getter for the GridView of patch P | |
| void | build () |
| template<int I = 0> | |
| IntersectionIterator< I > | ibegin () const |
| gets an iterator over all remote intersections in the merged grid between grid0 and grid1 | |
| template<int I = 0> | |
| IntersectionIterator< I > | iend () const |
| gets the (general) end-iterator for grid glue iterations | |
| template<class DataHandleImp , class DataTypeImp > | |
| void | communicate (Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp > &data, Dune::InterfaceType iftype, Dune::CommunicationDirection dir) const |
| Communicate information on the MergedGrid of a GridGlue. | |
| IndexSet | indexSet () const |
| Intersection | getIntersection (int i) const |
| size_t | size () const |
Static Public Member Functions | |
| template<int side> | |
| static constexpr auto | griddim () |
| template<int side> | |
| static constexpr auto | griddimworld () |
Static Public Attributes | |
| static constexpr auto | grid0dim = griddim<0>() |
| dimension of the grid 0 extractor | |
| static constexpr auto | domdim = griddim<0>() |
| static constexpr auto | grid0dimworld = griddimworld<0>() |
| world dimension of the grid 0 extractor | |
| static constexpr auto | domdimworld = griddimworld<0>() |
| static constexpr auto | grid1dim = griddim<1>() |
| dimension of the grid 1 extractor | |
| static constexpr auto | tardim = griddim<1>() |
| static constexpr auto | grid1dimworld = griddimworld<1>() |
| world dimension of the grid 1 extractor | |
| static constexpr auto | tardimworld = griddimworld<1>() |
| static constexpr int | dimworld = (int)griddimworld<0>() > (int)griddimworld<1>() ? (int)griddimworld<0>() : (int)griddimworld<1>() |
| export the world dimension This is the maximum of the extractors' world dimensions. | |
Protected Member Functions | |
| void | mergePatches (const std::vector< Dune::FieldVector< ctype, dimworld > > &patch0coords, const std::vector< unsigned int > &patch0entities, const std::vector< Dune::GeometryType > &patch0types, const int patch0rank, const std::vector< Dune::FieldVector< ctype, dimworld > > &patch1coords, const std::vector< unsigned int > &patch1entities, const std::vector< Dune::GeometryType > &patch1types, const int patch1rank) |
| after building the merged grid the intersection can be updated through this method (for internal use) | |
| template<typename Extractor > | |
| void | extractGrid (const Extractor &extractor, std::vector< Dune::FieldVector< ctype, dimworld > > &coords, std::vector< unsigned int > &faces, std::vector< Dune::GeometryType > &geometryTypes) const |
Related Symbols | |
(Note that these are not member symbols.) | |
| template<... > | |
| IteratorRange<... > | intersections (const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed) |
| Iterate over all intersections of a GridGlue. | |
sequential adapter to couple two grids at specified close together boundaries
| P0 | patch (extractor) to use for grid 0 |
| P1 | patch (extractor) to use for grid 1 |
| typedef Dune::FieldVector<ctype, dimworld> Dune::GridGlue::GridGlue< P0, P1 >::Coords |
The type used for coordinate vectors.
| typedef PromotionTraits<typenameGridView<0>::ctype,typenameGridView<1>::ctype>::PromotedType Dune::GridGlue::GridGlue< P0, P1 >::ctype |
The type used for coordinates.
| using Dune::GridGlue::GridGlue< P0, P1 >::Grid = typename GridView<side>::Grid |
Grid type of grid side
| using Dune::GridGlue::GridGlue< P0, P1 >::Grid0 = Grid<0> |
Grid 0 type.
| using Dune::GridGlue::GridGlue< P0, P1 >::Grid0Element = GridElement<0> |
The type of the Grid0 elements.
| using Dune::GridGlue::GridGlue< P0, P1 >::Grid0IntersectionIterator = IntersectionIterator<0> |
| using Dune::GridGlue::GridGlue< P0, P1 >::Grid0Patch = GridPatch<0> |
Coupling patch of grid 0.
| using Dune::GridGlue::GridGlue< P0, P1 >::Grid0Vertex = GridVertex<0> |
The type of the Grid0 vertices.
| using Dune::GridGlue::GridGlue< P0, P1 >::Grid0View = GridView<0> |
GridView of grid 0 (aka domain grid)
| using Dune::GridGlue::GridGlue< P0, P1 >::Grid1 = Grid<1> |
Grid 1 type.
| using Dune::GridGlue::GridGlue< P0, P1 >::Grid1Element = GridElement<1> |
The type of the Grid1 elements.
| using Dune::GridGlue::GridGlue< P0, P1 >::Grid1IntersectionIterator = IntersectionIterator<1> |
| using Dune::GridGlue::GridGlue< P0, P1 >::Grid1Patch = GridPatch<1> |
Coupling patch of grid 1.
| using Dune::GridGlue::GridGlue< P0, P1 >::Grid1Vertex = GridVertex<1> |
The type of the Grid1 vertices.
| using Dune::GridGlue::GridGlue< P0, P1 >::Grid1View = GridView<1> |
GridView of grid 1 (aka target grid)
| using Dune::GridGlue::GridGlue< P0, P1 >::GridElement = typename GridView<side>::Traits::template Codim<0>::Entity |
type of grid elements on side side
| using Dune::GridGlue::GridGlue< P0, P1 >::GridPatch = std::conditional_t<side == 0, P0, std::conditional_t<side == 1, P1, void> > |
coupling patch of grid side
| using Dune::GridGlue::GridGlue< P0, P1 >::GridVertex = typename GridView<side>::Traits::template Codim<Grid<side>::dimension>::Entity |
type of grid vertices on side side
| using Dune::GridGlue::GridGlue< P0, P1 >::GridView = typename GridPatch<side>::GridView |
GridView of grid side
| typedef Dune::GridGlue::IntersectionIndexSet<P0,P1> Dune::GridGlue::GridGlue< P0, P1 >::IndexSet |
Type of remote intersection indexSet.
| typedef unsigned int Dune::GridGlue::GridGlue< P0, P1 >::IndexType |
| typedef Dune::GridGlue::Intersection<P0,P1,0,1> Dune::GridGlue::GridGlue< P0, P1 >::Intersection |
Type of remote intersection objects.
| using Dune::GridGlue::GridGlue< P0, P1 >::IntersectionIterator = Dune::GridGlue::IntersectionIterator<P0, P1, side, (side+1) % 2> |
Type of the iterator that iterates over remove intersections.
| typedef Dune::GridGlue::Merger<ctype, Grid<0>::dimension - GridPatch<0>::codim, Grid<1>::dimension - GridPatch<1>::codim, dimworld> Dune::GridGlue::GridGlue< P0, P1 >::Merger |
Instance of a Merger.
| Dune::GridGlue::GridGlue< P0, P1 >::GridGlue | ( | const std::shared_ptr< const GridPatch< 0 > > & | gp0, |
| const std::shared_ptr< const GridPatch< 1 > > & | gp1, | ||
| const std::shared_ptr< Merger > & | merger | ||
| ) |
constructor
Initializes components but does not "glue" the surfaces. The surfaces are extracted from the grids here though.
| gp0 | the grid0 patch |
| gp1 | the grid1 patch |
| merger | The merger object that is used to compute the merged grid. This class has to be a model of the SurfaceMergeConcept. |
| void Dune::GridGlue::GridGlue< P0, P1 >::build | ( | ) |
| void Dune::GridGlue::GridGlue< P0, P1 >::communicate | ( | Dune::GridGlue< P0, P1 >::CommDataHandle< DataHandleImp, DataTypeImp > & | data, |
| Dune::InterfaceType | iftype, | ||
| Dune::CommunicationDirection | dir | ||
| ) | const |
Communicate information on the MergedGrid of a GridGlue.
Template parameter is a model of Dune::GridGlue::CommDataHandle
| data | GridGlueDataHandle |
| iftype | Interface for which the Communication should take place |
| dir | Communication direction (Forward means grid0 to grid1, Backward is the reverse) |
fix mixed communication: seq->par use commSeq, par->seq use commPar
add directed version communicate<FROM,TO, DH,DT>(data,iftype,dir)
|
protected |
|
inline |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inline |
getter for the GridView of patch P
|
inline |
gets an iterator over all remote intersections in the merged grid between grid0 and grid1
| I | select inside grid I=0 or I=1 |
|
inline |
gets the (general) end-iterator for grid glue iterations
| I | select inside grid I=0 or I=1 |
|
inline |
|
protected |
after building the merged grid the intersection can be updated through this method (for internal use)
| patch0coords | the patch0 vertices' coordinates ordered like e.g. in 3D x_0 y_0 z_0 x_1 y_1 ... y_(n-1) z_(n-1) |
| patch0entities | array with all patch0 entities represented as corner indices into patch0coords. Free of (potentially heterogeneous) block structure, the last component of one entity is immediately followed by the first component of the next entity here. |
| patch0types | array with all patch0 entities types |
| patch0rank | rank of the process where patch0 was extracted |
| patch1coords | the patch2 vertices' coordinates ordered like e.g. in 3D x_0 y_0 z_0 x_1 y_1 ... y_(n-1) z_(n-1) |
| patch1entities | just like with the patch0entities and patch0corners |
| patch1types | array with all patch1 entities types |
| patch1rank | rank of the process where patch1 was extracted |
|
inline |
|
inline |
|
related |
Iterate over all intersections of a GridGlue.
This function returns an object representing the range of intersections with respect to the GridGlue glue. Its main purpose is to enable iteration over these intersections by means of a range-based for loop:
The in- and outside of the intersection can be reversed by passing reversed as the second argument. The fourth form can be used in case a template parameter for reversal is required.
| glue | GridGlue to obtain the intersections from |
| reverse | Tag to indicate reversal of in- and outside of intersections |
|
staticconstexpr |
export the world dimension This is the maximum of the extractors' world dimensions.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
dimension of the grid 0 extractor
|
staticconstexpr |
world dimension of the grid 0 extractor
|
staticconstexpr |
dimension of the grid 1 extractor
|
staticconstexpr |
world dimension of the grid 1 extractor
|
staticconstexpr |
|
staticconstexpr |