ryujin 2.1.1 revision 0348cbb53a3e4b1da2a4c037e81f88f2d21ce219
vtu_output.h
Go to the documentation of this file.
1//
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3// Copyright (C) 2020 - 2024 by the ryujin authors
4//
5
6#pragma once
7
8#include <compile_time_options.h>
9
10#include "mpi_ensemble.h"
11#include "offline_data.h"
12#include "postprocessor.h"
13
14#include <deal.II/base/parameter_acceptor.h>
15#include <deal.II/base/smartpointer.h>
16#include <deal.II/grid/intergrid_map.h>
17#include <deal.II/multigrid/mg_transfer_matrix_free.h>
18
19namespace ryujin
20{
21
29 template <typename Description, int dim, typename Number = double>
30 class VTUOutput final : public dealii::ParameterAcceptor
31 {
32 public:
37
40
41 using View =
42 typename Description::template HyperbolicSystemView<dim, Number>;
43
44 static constexpr auto problem_dimension = View::problem_dimension;
45
46 using state_type = typename View::state_type;
47
48 static constexpr auto n_precomputed_values = View::n_precomputed_values;
49
50 using precomputed_type = typename View::precomputed_type;
51
53 using InitialPrecomputedVector = typename View::InitialPrecomputedVector;
55
57
61
65 VTUOutput(const MPIEnsemble &mpi_ensemble,
66 const OfflineData<dim, Number> &offline_data,
67 const HyperbolicSystem &hyperbolic_system,
68 const ParabolicSystem &parabolic_system,
69 const Postprocessor<Description, dim, Number> &postprocessor,
70 const InitialPrecomputedVector &initial_precomputed,
71 const ScalarVector &alpha,
72 const std::string &subsection = "/VTUOutput");
73
81 void prepare();
82
100 void schedule_output(const StateVector &state_vector,
101 std::string name,
102 Number t,
103 unsigned int cycle,
104 bool output_full = true,
105 bool output_cutplanes = true);
106
107 private:
112
113 bool use_mpi_io_;
114
115 std::vector<std::string> manifolds_;
116
117 std::vector<std::string> vtu_output_quantities_;
118
120
124
125 const MPIEnsemble &mpi_ensemble_;
126
127 dealii::SmartPointer<const OfflineData<dim, Number>> offline_data_;
128 dealii::SmartPointer<const HyperbolicSystem> hyperbolic_system_;
129 dealii::SmartPointer<const ParabolicSystem> parabolic_system_;
130 dealii::SmartPointer<const Postprocessor<Description, dim, Number>>
131 postprocessor_;
132
133 const InitialPrecomputedVector &initial_precomputed_;
134 const ScalarVector &alpha_;
136 };
137
138} /* namespace ryujin */
typename Description::template HyperbolicSystemView< dim, Number > View
Definition: vtu_output.h:42
typename View::StateVector StateVector
Definition: vtu_output.h:52
void schedule_output(const StateVector &state_vector, std::string name, Number t, unsigned int cycle, bool output_full=true, bool output_cutplanes=true)
VTUOutput(const MPIEnsemble &mpi_ensemble, const OfflineData< dim, Number > &offline_data, const HyperbolicSystem &hyperbolic_system, const ParabolicSystem &parabolic_system, const Postprocessor< Description, dim, Number > &postprocessor, const InitialPrecomputedVector &initial_precomputed, const ScalarVector &alpha, const std::string &subsection="/VTUOutput")
typename View::precomputed_type precomputed_type
Definition: vtu_output.h:50
typename Description::HyperbolicSystem HyperbolicSystem
Definition: vtu_output.h:38
typename View::state_type state_type
Definition: vtu_output.h:46
Vectors::ScalarVector< Number > ScalarVector
Definition: vtu_output.h:54
static constexpr auto n_precomputed_values
Definition: vtu_output.h:48
static constexpr auto problem_dimension
Definition: vtu_output.h:44
typename Description::ParabolicSystem ParabolicSystem
Definition: vtu_output.h:39
typename View::InitialPrecomputedVector InitialPrecomputedVector
Definition: vtu_output.h:53
dealii::LinearAlgebra::distributed::Vector< Number > ScalarVector
Definition: state_vector.h:31
std::tuple< MultiComponentVector< Number, problem_dim >, MultiComponentVector< Number, prec_dim >, BlockVector< Number > > StateVector
Definition: state_vector.h:51
Euler::ParabolicSystem ParabolicSystem
Definition: description.h:37
Euler::HyperbolicSystem HyperbolicSystem
Definition: description.h:32