Dune Core Modules (unstable)

geometry.hh
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4// vi: set et ts=4 sw=2 sts=2:
5#ifndef DUNE_GRID_CONCEPTS_ARCHETYPES_GEOMETRY_HH
6#define DUNE_GRID_CONCEPTS_ARCHETYPES_GEOMETRY_HH
7
10#include <dune/geometry/type.hh>
11
12#ifndef DOXYGEN
13namespace Dune::Concept::Archetypes {
14
15struct ReferenceElement {};
16
17template <int mydim, int cdim = mydim>
18struct Geometry
19{
20 static constexpr int mydimension = mydim;
21 static constexpr int coorddimension = cdim;
22
23 using ctype = double;
24 using Volume = ctype;
25 using LocalCoordinate = Dune::FieldVector<ctype, mydim>;
26 using GlobalCoordinate = Dune::FieldVector<ctype, cdim>;
28 using JacobianTransposed = Dune::FieldMatrix<ctype, mydim, cdim>;
29 using JacobianInverse = Dune::FieldMatrix<ctype, mydim, cdim>;
30 using JacobianInverseTransposed = Dune::FieldMatrix<ctype, cdim, mydim>;
31
32 Dune::GeometryType type () const;
33 bool affine () const;
34 int corners () const;
35
36 GlobalCoordinate corner (int i) const;
37 GlobalCoordinate global (const LocalCoordinate& local) const;
38 LocalCoordinate local (const GlobalCoordinate& global) const;
39 GlobalCoordinate center () const;
40
41 Volume integrationElement (const LocalCoordinate& local) const;
42 Volume volume () const;
43
44 Jacobian jacobian (const LocalCoordinate& local) const;
45 JacobianTransposed jacobianTransposed (const LocalCoordinate& local) const;
46 JacobianInverse jacobianInverse (const LocalCoordinate& local) const;
47 JacobianInverseTransposed jacobianInverseTransposed (const LocalCoordinate& local) const;
48};
49
50template <int mydim, int cdim>
51Archetypes::ReferenceElement referenceElement (const Geometry<mydim,cdim>& g);
52
53} // end namespace Dune::Concept::Archetypes
54#endif // DOXYGEN
55
56#endif // DUNE_GRID_CONCEPTS_ARCHETYPES_GEOMETRY_HH
vector space out of a tensor product of fields.
Definition: fvector.hh:91
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:114
Implements a matrix constructed from a given type representing a field and compile-time given number ...
Implements a vector constructed from a given type representing a field and a compile-time given size.
unspecified value type referenceElement(T &&... t)
Returns a reference element for the objects t....
A unique label for each type of element that can occur in a grid.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 22, 23:33, 2024)