OGS
OutputDataSpecification.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <ostream>
7#include <set>
8#include <string>
9#include <vector>
10
11#include "BaseLib/Error.h"
12
13namespace NumLib
14{
15struct Time;
16}
17
18namespace ProcessLib
19{
21{
22 explicit PairRepeatEachSteps(int c, int e) : repeat(c), each_steps(e) {}
23
24 const int repeat;
25 const int each_steps;
26};
27
28std::ostream& operator<<(std::ostream& os, PairRepeatEachSteps const& pair);
29
32{
34 std::set<std::string>&& output_variables_,
35 std::vector<double>&& fixed_output_times_,
36 std::vector<PairRepeatEachSteps>&& repeats_each_steps_,
37 bool const output_residuals_);
38
40 std::set<std::string> output_variables;
41
43 std::vector<double> fixed_output_times;
44
46 std::vector<PairRepeatEachSteps> repeats_each_steps;
47
50
53 bool isOutputStep(int timestep, NumLib::Time const& time) const;
54};
55
56std::ostream& operator<<(std::ostream& os, OutputDataSpecification const& o);
57
58} // namespace ProcessLib
std::ostream & operator<<(std::ostream &os, Output const &output)
Holds information about which variables to write to output files.
bool isOutputStep(int timestep, NumLib::Time const &time) const
std::vector< PairRepeatEachSteps > repeats_each_steps
Describes after which timesteps to write output.
std::vector< double > fixed_output_times
Given times that steps have to reach.
bool output_residuals
Tells if also to output extrapolation residuals.
std::set< std::string > output_variables
All variables that shall be output.
OutputDataSpecification(std::set< std::string > &&output_variables_, std::vector< double > &&fixed_output_times_, std::vector< PairRepeatEachSteps > &&repeats_each_steps_, bool const output_residuals_)
const int repeat
Apply each_steps repeat times.
const int each_steps
Do output every each_steps timestep.