KASKADE 7 development version
Loading...
Searching...
No Matches
gridGeneration.hh File Reference
#include <dune/common/fvector.hh>
#include <dune/grid/common/gridfactory.hh>
#include "fem/fixdune.hh"
#include "GridGeneration/cube.hh"
#include "utilities/detailed_exception.hh"
#include "utilities/timing.hh"
#include <algorithm>
#include <cmath>
#include <memory>
#include <numbers>
#include <type_traits>
#include <utility>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  Kaskade
 

Typedefs

using Kaskade::IdentityDeformation = decltype(identityDeformation)

Functions

template<class Grid, class Type, class Deformation = IdentityDeformation>
std::unique_ptr< Grid > Kaskade::createGrid (std::vector< Type > const &cubes, Deformation phi=Deformation())
 Extract simplicial grid from list of cubes.
template<class Grid, class Scalar, int dim, class EdgeLength>
std::unique_ptr< Grid > Kaskade::createCuboid (Dune::FieldVector< Scalar, dim > const &x0, Dune::FieldVector< Scalar, dim > const &dx, EdgeLength const &dh, bool symmetric=true)
 Creates a uniform simplicial grid on a rectangular or cuboid domain.
template<class Grid>
std::unique_ptr< Grid > Kaskade::createUnitSquare (double dh=1., bool symmetric=true)
 Creates a unit square, filled regularly.
template<class Grid>
std::unique_ptr< Grid > Kaskade::createUnitCube (double dh=1., bool symmetric=true)
 Creates a unit cube.
template<class Grid, class Scalar, class Dh, class Deformation = IdentityDeformation>
std::unique_ptr< Grid > Kaskade::createRectangle (Dune::FieldVector< Scalar, 2 > const &x0, Dune::FieldVector< Scalar, 2 > const &dx, Dh dh, bool symmetric=true, Deformation phi=Deformation())
 Cartesian structured triangulation of a rectangular domain.
template<class Grid, class Scalar, int dim>
std::unique_ptr< Grid > Kaskade::createLShape (Dune::FieldVector< Scalar, dim > const &x0, Scalar dx, Scalar dy, Dune::FieldVector< Scalar, dim > const &thickness, Scalar dh, bool symmetric=true)
 Fill L-shaped domain with cubes.
template<class Grid, class Scalar, int dim>
std::unique_ptr< Grid > Kaskade::createTShape (Dune::FieldVector< Scalar, dim > const &x0, Scalar dx, Scalar dy, Dune::FieldVector< Scalar, dim > const &thickness, Scalar dh, bool symmetric=true)
 Fill L-shaped domain with cubes.
template<class Grid, class Scalar, int dim>
std::unique_ptr< Grid > Kaskade::createTwoLayerCuboid (Dune::FieldVector< Scalar, dim > const &x0, Dune::FieldVector< Scalar, dim > const &dx1, Dune::FieldVector< Scalar, dim > const &dx2, Dune::FieldVector< Scalar, dim > const &dh1, Scalar dh2, bool symmetric=true)
template<class Grid, class Scalar, int dim>
std::unique_ptr< Grid > Kaskade::createTwoLayerCuboid (Dune::FieldVector< Scalar, dim > const &x0, Dune::FieldVector< Scalar, dim > const &dx1, Dune::FieldVector< Scalar, dim > const &dx2, Dune::FieldVector< Scalar, dim > const &dh1, Dune::FieldVector< Scalar, dim > const &dh2, bool symmetric=true)
template<class Grid>
std::unique_ptr< Grid > Kaskade::createHexahedron ()
 Creates a hexahedron consisting of five tetrahedra.
template<class Grid>
std::unique_ptr< Grid > Kaskade::createOctahedron (Dune::FieldVector< typename Grid::ctype, 3 > extent=Dune::FieldVector< typename Grid::ctype, 3 >(1.0))
 Creates an octahedron consisting of eight tetrahedra.
template<class Grid>
std::unique_ptr< Grid > Kaskade::createIcosahedron ()
 Creates an icosahedron consisting of 20 tetrahedra.
template<class Grid>
std::unique_ptr< Grid > Kaskade::createCylinder (double radius, double height, int layers, int circumEdges=6)
 Creates a cylinder.
template<class Grid, class Deformation>
std::unique_ptr< Grid > Kaskade::createCylinder (double radius, double height, int layers, int circumEdges, Deformation const &deformation)
 Creates a deformed cylinder.
template<class Grid>
std::unique_ptr< Grid > Kaskade::createPentagon (double radius=1)
 Creates an regular pentagon consisting of five triangles, centered at the origin and with radius r.
template<class Grid>
std::unique_ptr< Grid > Kaskade::createUshape (double l, double d, double eps)
 Creates a U-shaped domain in \( \R^2 \).
template<int dim, class ctype, class GridView, class ... GridViews>
auto Kaskade::unionGrid (std::vector< Dune::FieldVector< ctype, dim > > vs, std::vector< std::array< size_t, dim+1 > > cs, GridView const &gv, GridViews const &...gvs)
template<class GridView, class ... GridViews>
auto Kaskade::unionGrid (GridView const &gv, GridViews const &...gvs)
 Creates a union grid from multiple given simplicial grid views.

Variables

auto constexpr Kaskade::identityDeformation = [](auto const& x) { return x; }