ryujin 2.1.1 revision ee5cbcbf2346c1299c942d0e1f13b46449973c18
Loading...
Searching...
No Matches
geometry_reader.h
Go to the documentation of this file.
1#pragma once
2
3#include <compile_time_options.h>
4
6
7#include <deal.II/grid/grid_in.h>
8
9#include <fstream>
10
11namespace ryujin
12{
13 namespace Geometries
14 {
27 template <int dim>
28 class Reader : public Geometry<dim>
29 {
30 public:
31 Reader(const std::string &subsection)
32 : Geometry<dim>("reader", subsection)
33 {
34 filename_ = "ryujin.msh";
35 this->add_parameter("filename",
36 filename_,
37 "The mesh file to read in via dealii::GridIn. This "
38 "class supports, among others, reading in Gmsh "
39 "*.msh files, and the *.ucd file format.");
40
41 use_simplices_ = false;
42 this->add_parameter(
43 "simplex mesh",
44 use_simplices_,
45 "If set to true, the triangulation is assumed to use simplices "
46 "instead of quadrangles.");
47 }
48
50 dealii::Triangulation<dim> &triangulation) const final
51 {
52 dealii::GridIn<dim> gridin;
53 gridin.attach_triangulation(triangulation);
54 gridin.read(filename_);
55 }
56
58 populate_hp_collections(const unsigned int /*fe_degree*/,
60 & /*collection*/) const override
61 {
62 if (use_simplices_) {
64 } else {
66 }
67 }
68
69 private:
70 std::string filename_;
71 bool use_simplices_;
72 };
73 } // namespace Geometries
74} // namespace ryujin
Reader(const std::string &subsection)
Geometry< dim >::HP_Collection populate_hp_collections(const unsigned int, typename ryujin::Discretization< dim >::Collection &) const override
void create_coarse_triangulation(dealii::Triangulation< dim > &triangulation) const final