ryujin 2.5.0 revision 3a6c8d57210175dea14d8116e1fe878f349f8c1c
Loading...
Searching...
No Matches
postprocessor.h
Go to the documentation of this file.
1//
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3// Copyright (C) 2026 by the ryujin authors
4//
5
6#pragma once
7
8#include <ryujin/base/compile_time_options.h>
10
11#include <cstdint>
12#include <string>
13#include <utility>
14#include <vector>
15
16namespace ryujin
17{
18 namespace Interface
19 {
57 template <int dim, typename Number = double>
59 {
60 public:
64 virtual ~Postprocessor() = default;
65
70 struct Selection {
74 unsigned int size() const
75 {
76 return static_cast<unsigned int>(quantities.size());
77 }
78
84 std::vector<std::pair<std::uint8_t, unsigned int>> components;
85
90 std::vector<std::pair<std::uint8_t, unsigned int>> quantities;
91 };
92
101 virtual Selection
102 prepare(const std::vector<std::string> &selected) const = 0;
103
114 virtual std::vector<ScalarHostVector<Number>>
115 extract(const Selection &selection,
116 const StateVector<Number> &state_vector) const = 0;
117
133 virtual void extract(const Selection &selection,
134 const StateVector<Number> &state_vector,
135 const unsigned int *indices,
136 const unsigned int n_points,
137 Number *values) const = 0;
138 };
139 } // namespace Interface
140} // namespace ryujin
virtual void extract(const Selection &selection, const StateVector< Number > &state_vector, const unsigned int *indices, const unsigned int n_points, Number *values) const =0
virtual std::vector< ScalarHostVector< Number > > extract(const Selection &selection, const StateVector< Number > &state_vector) const =0
virtual ~Postprocessor()=default
virtual Selection prepare(const std::vector< std::string > &selected) const =0
std::vector< std::pair< std::uint8_t, unsigned int > > quantities
std::vector< std::pair< std::uint8_t, unsigned int > > components