ryujin 2.5.0 revision c64172211cf21344cb9b9b0f3a1266aa6400d392
Loading...
Searching...
No Matches
geometry.h
Go to the documentation of this file.
1//
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3// Copyright (C) 2020 - 2026 by the ryujin authors
4//
5
6#pragma once
7
8#include <ryujin/base/compile_time_options.h>
10
11#include <deal.II/base/parameter_acceptor.h>
12#include <deal.II/dofs/dof_handler.h>
13#include <deal.II/grid/tria.h>
14
15#include <functional>
16#include <string>
17
18namespace ryujin
19{
20#ifndef DOXYGEN
21 /* forward declaration */
22 template <int dim>
23 class Discretization;
24#endif
25
32 template <int dim>
33 class Geometry : public dealii::ParameterAcceptor
34 {
35 public:
41 Geometry(const std::string &name, const std::string &subsection)
42 : ParameterAcceptor(subsection + "/" + name)
43 , name_(name)
44 {
45 }
46
52 dealii::Triangulation<dim> &triangulation) const = 0;
53
64 virtual void
65 update_dof_handler(dealii::DoFHandler<dim> & /*dof_handler*/) const
66 {
67 }
68
72 enum class HP_Collection {
73 /*
74 * Instruct the Discretization class to set up standard
75 * continuous/discontinuous Q_k spaces for quarilaterals/hexahedra.
76 */
78 /*
79 * Instruct the Discretization class to set up standard
80 * continuous/discontinuous P_k spaces for simplices.
81 */
83 /*
84 * Inform the Discretization class that the hp::*Collection objects
85 * have already been populated by the Geometry class.
86 */
88 };
89
97 const unsigned int /*fe_degree*/,
98 typename ryujin::Discretization<dim>::Collection & /*collection*/) const
99 {
100 /*
101 * Signal, that we did nothing. In this case the Discretization
102 * object will populate all collections with appropriate objects for
103 * the cG Qk, dG Qk finite element on purely quadrilateral, or
104 * hexahedral meshes.
105 */
107 }
108
120 ACCESSOR_READ_ONLY(transformation)
121
122
126
127 protected:
133 mutable std::function<dealii::Point<dim>(
134 const typename dealii::Triangulation<dim>::cell_iterator &,
135 const dealii::Point<dim> &)>
137
138 private:
139 const std::string name_;
140 };
141
142} // namespace ryujin
virtual HP_Collection populate_hp_collections(const unsigned int, typename ryujin::Discretization< dim >::Collection &) const
Definition geometry.h:96
Geometry(const std::string &name, const std::string &subsection)
Definition geometry.h:41
virtual void create_coarse_triangulation(dealii::Triangulation< dim > &triangulation) const =0
virtual void update_dof_handler(dealii::DoFHandler< dim > &) const
Definition geometry.h:65
std::function< dealii::Point< dim >(const typename dealii::Triangulation< dim >::cell_iterator &, const dealii::Point< dim > &)> transformation_
Definition geometry.h:136
#define ACCESSOR_READ_ONLY(member)