Loading...
Searching...
No Matches
overlappingmerge.hh
Go to the documentation of this file.
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
#ifndef DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH
#define DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <dune/common/fmatrix.hh>
#include <dune/common/fvector.hh>
#include <dune/geometry/referenceelements.hh>
#include <dune/geometry/multilineargeometry.hh>
#include <dune/grid/common/grid.hh>
#include <dune/grid-glue/merging/standardmerge.hh>
#include <dune/grid-glue/merging/computeintersection.hh>
namespace Dune {
namespace GridGlue {
template<int dim1, int dim2, int dimworld, typename T = double>
class OverlappingMerge
: public StandardMerge<T,dim1,dim2,dimworld>
{
public:
/* E X P O R T E D T Y P E S A N D C O N S T A N T S */
typedef T ctype;
typedef Dune::FieldVector<T, dimworld> WorldCoords;
//typedef Dune::FieldVector<T, dim> LocalCoords;
OverlappingMerge()
{}
protected:
typedef typename StandardMerge<T,dim1,dim2,dimworld>::SimplicialIntersection SimplicialIntersection;
void computeIntersections(const Dune::GeometryType& grid1ElementType,
const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
std::bitset<(1<<dim1)>& neighborIntersects1,
unsigned int grid1Index,
const Dune::GeometryType& grid2ElementType,
const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
std::bitset<(1<<dim2)>& neighborIntersects2,
unsigned int grid2Index,
std::vector<SimplicialIntersection>& intersections);
private:
bool inPlane(std::vector<FieldVector<T,dimworld> >& points);
};
} /* namespace Dune::GridGlue */
} /* namespace Dune */
#include "overlappingmerge.cc"
#endif // DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH
standardmerge.hh
Common base class for many merger implementations: produce pairs of entities that may intersect.
overlappingmerge.cc
computeintersection.hh
Dune
Definition gridglue.hh:37
Dune::GridGlue
Definition gridglue.hh:38
Dune::GridGlue::OverlappingMerge::SimplicialIntersection
StandardMerge< T, dim1, dim2, dimworld >::SimplicialIntersection SimplicialIntersection
Definition overlappingmerge.hh:56
Dune::GridGlue::OverlappingMerge::OverlappingMerge
OverlappingMerge()
the coordinate type used in this interface
Definition overlappingmerge.hh:52
Dune::GridGlue::OverlappingMerge::computeIntersections
void computeIntersections(const Dune::GeometryType &grid1ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::bitset<(1<< dim1)> &neighborIntersects1, unsigned int grid1Index, const Dune::GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid2ElementCorners, std::bitset<(1<< dim2)> &neighborIntersects2, unsigned int grid2Index, std::vector< SimplicialIntersection > &intersections)
Compute the intersection between two overlapping elements.
Definition overlappingmerge.cc:34
Dune::GridGlue::OverlappingMerge::WorldCoords
Dune::FieldVector< T, dimworld > WorldCoords
the coordinate type used in this interface
Definition overlappingmerge.hh:47
Dune::GridGlue::OverlappingMerge::ctype
T ctype
the numeric type used in this interface
Definition overlappingmerge.hh:44
Dune::GridGlue::StandardMerge< double, dim1, dim2, dimworld >::StandardMerge
StandardMerge()
Definition standardmerge.hh:88
Dune::GridGlue::StandardMerge::SimplicialIntersection
typename IntersectionListProvider::SimplicialIntersection SimplicialIntersection
Definition standardmerge.hh:83