dune-grid-glue
2.6-git
|
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 | instead = GridView< 0 > |
using | instead = Grid< 0 > |
using | instead = GridPatch< 0 > |
using | instead = GridView< 1 > |
using | instead = Grid< 1 > |
using | instead = GridPatch< 1 > |
typedef unsigned int | IndexType |
typedef PromotionTraits< typename GridView< 0 >::ctype, typename GridView< 1 >::ctype >::PromotedType | ctype |
The type used for coordinates. More... | |
typedef Dune::FieldVector< ctype, dimworld > | Coords |
The type used for coordinate vectors. More... | |
template<int side> | |
using | GridElement = typename GridView< side >::Traits::template Codim< 0 >::Entity |
type of grid elements on side side More... | |
template<int side> | |
using | GridVertex = typename GridView< side >::Traits::template Codim< Grid< side >::dimension >::Entity |
type of grid vertices on side side More... | |
using | instead = GridElement< 0 > |
using | instead = GridVertex< 0 > |
using | instead = GridElement< 1 > |
using | instead = GridVertex< 1 > |
typedef Dune::GridGlue::Merger< ctype, Grid< 0 >::dimension - GridPatch< 0 >::codim, Grid< 1 >::dimension - GridPatch< 1 >::codim, dimworld > | Merger |
Instance of a Merger. More... | |
typedef Dune::GridGlue::Intersection< P0, P1, 0, 1 > | Intersection |
Type of remote intersection objects. More... | |
typedef Dune::GridGlue::IntersectionIndexSet< P0, P1 > | IndexSet |
Type of remote intersection indexSet. More... | |
template<int side> | |
using | IntersectionIterator = Dune::GridGlue::IntersectionIterator< P0, P1, side,(side+1) % 2 > |
Type of the iterator that iterates over remove intersections. More... | |
using | instead = IntersectionIterator< 0 > |
using | instead = IntersectionIterator< 1 > |
Public Member Functions | |
DUNE_DEPRECATED_MSG ("please use griddim<0>() instead") static const expr auto grid0dim | |
dimension of the grid 0 extractor More... | |
DUNE_DEPRECATED_MSG ("please use griddim<0>() instead") static const expr auto domdim | |
DUNE_DEPRECATED_MSG ("please use griddimworld<0>() instead") static const expr auto grid0dimworld | |
world dimension of the grid 0 extractor More... | |
DUNE_DEPRECATED_MSG ("please use griddimworld<0>() instead") static const expr auto domdimworld | |
DUNE_DEPRECATED_MSG ("please use griddim<1>() instead") static const expr auto grid1dim | |
dimension of the grid 1 extractor More... | |
DUNE_DEPRECATED_MSG ("please use griddim<1>() instead") static const expr auto tardim | |
DUNE_DEPRECATED_MSG ("please use griddimworld<1>() instead") static const expr auto grid1dimworld | |
world dimension of the grid 1 extractor More... | |
DUNE_DEPRECATED_MSG ("please use griddimworld<1>() instead") static const expr auto tardimworld | |
GridGlue (const std::shared_ptr< const GridPatch< 0 > > &gp0, const std::shared_ptr< const GridPatch< 1 > > &gp1, const std::shared_ptr< Merger > &merger) | |
constructor More... | |
template<int P> | |
const GridPatch< P > & | patch () const |
template<int P> | |
const GridView< P > & | gridView () const |
getter for the GridView of patch P More... | |
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 More... | |
template<int I = 0> | |
IntersectionIterator< I > | iend () const |
gets the (general) end-iterator for grid glue iterations More... | |
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. More... | |
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 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. More... | |
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) More... | |
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 Functions | |
(Note that these are not member functions.) | |
template<... > | |
IteratorRange<... > | intersections (const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed) |
Iterate over all intersections of a GridGlue. More... | |
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::Coords |
The type used for coordinate vectors.
typedef PromotionTraits<typename GridView<0>::ctype, typename GridView<1>::ctype>::PromotedType Dune::GridGlue::GridGlue::ctype |
The type used for coordinates.
using Dune::GridGlue::GridGlue::Grid = typename GridView<side>::Grid |
Grid type of grid side
using Dune::GridGlue::GridGlue::GridElement = typename GridView<side>::Traits::template Codim<0>::Entity |
type of grid elements on side side
using Dune::GridGlue::GridGlue::GridPatch = std::conditional_t<side == 0, P0, std::conditional_t<side == 1, P1, void> > |
coupling patch of grid side
using Dune::GridGlue::GridGlue::GridVertex = typename GridView<side>::Traits::template Codim<Grid<side>::dimension>::Entity |
type of grid vertices on side side
using Dune::GridGlue::GridGlue::GridView = typename GridPatch<side>::GridView |
GridView of grid side
Type of remote intersection indexSet.
typedef unsigned int Dune::GridGlue::GridGlue::IndexType |
using Dune::GridGlue::GridGlue::instead = GridView<0> |
using Dune::GridGlue::GridGlue::instead = Grid<0> |
using Dune::GridGlue::GridGlue::instead = GridPatch<0> |
using Dune::GridGlue::GridGlue::instead = GridView<1> |
using Dune::GridGlue::GridGlue::instead = Grid<1> |
using Dune::GridGlue::GridGlue::instead = GridPatch<1> |
using Dune::GridGlue::GridGlue::instead = GridElement<0> |
using Dune::GridGlue::GridGlue::instead = GridVertex<0> |
using Dune::GridGlue::GridGlue::instead = GridElement<1> |
using Dune::GridGlue::GridGlue::instead = GridVertex<1> |
typedef Dune::GridGlue::Intersection<P0,P1,0,1> Dune::GridGlue::GridGlue::Intersection |
Type of remote intersection objects.
using Dune::GridGlue::GridGlue::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::Merger |
Instance of a Merger.
Dune::GridGlue::GridGlue::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::build | ( | ) |
void Dune::GridGlue::GridGlue::communicate | ( | Dune::GridGlue::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)
dimension of the grid 0 extractor
dimension of the grid 1 extractor
Dune::GridGlue::GridGlue::DUNE_DEPRECATED_MSG | ( | "please use griddimworld<0>() instead" | ) | const |
Dune::GridGlue::GridGlue::DUNE_DEPRECATED_MSG | ( | "please use griddimworld<0>() instead" | ) | const |
world dimension of the grid 0 extractor
Dune::GridGlue::GridGlue::DUNE_DEPRECATED_MSG | ( | "please use griddimworld<1>() instead" | ) | const |
world dimension of the grid 1 extractor
Dune::GridGlue::GridGlue::DUNE_DEPRECATED_MSG | ( | "please use griddimworld<1>() instead" | ) | const |
|
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.