ryujin 2.1.1 revision dbf0e3ba7acdb60b6d558e4257815df4a8f8daf9
geometry.h
Go to the documentation of this file.
1//
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3// Copyright (C) 2020 - 2023 by the ryujin authors
4//
5
6#pragma once
7
8#include <compile_time_options.h>
9
10#include "convenience_macros.h"
11
12#include <deal.II/base/parameter_acceptor.h>
13#include <deal.II/dofs/dof_handler.h>
14#include <deal.II/grid/tria.h>
15
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 */
77 standard_quadrilaterals,
78 /*
79 * Instruct the Discretization class to set up standard
80 * continuous/discontinuous P_k spaces for simplices.
81 */
82 standard_simplices,
83 /*
84 * Inform the Discretization class that the hp::*Collection objects
85 * have already been populated by the Geometry class.
86 */
87 populated_by_geometry
88 };
89
97 const unsigned int /*fe_degree*/,
98 const bool /*have_discontinuous_ansatz*/,
99 typename ryujin::Discretization<dim>::Collection & /*collection*/) const
100 {
101 /*
102 * Signal, that we did nothing. In this case the Discretization
103 * object will populate all collections with appropriate objects for
104 * the cG Qk, dG Qk finite element on purely quadrilateral, or
105 * hexahedral meshes.
106 */
108 }
109
114
115 private:
116 const std::string name_;
117 };
118
119} /* namespace ryujin */
virtual HP_Collection populate_hp_collections(const unsigned int, const bool, 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
#define ACCESSOR_READ_ONLY(member)