svMultiPhysics
Loading...
Searching...
No Matches
output.h
1// SPDX-FileCopyrightText: Copyright (c) Stanford University, The Regents of the University of California, and others.
2// SPDX-License-Identifier: BSD-3-Clause
3
4#ifndef OUTPUT__H
5#define OUTPUT__H
6
7#include "Simulation.h"
8#include "SolutionStates.h"
9
10#include<fstream>
11#include<iostream>
12
13namespace output {
14
15/**
16 * @brief Write the header of the history table to the standard output and to
17 * the history file.
18 *
19 * The elapsed time reported by the rows of the table is measured from the
20 * moment this function is called.
21 *
22 * @param[in] simulation Simulation whose logger the header is written to.
23 * @param[in,out] timeP Timers of the history table: the elapsed time of the
24 * runs preceding this one, replaced by the instant the elapsed time is
25 * measured from, the elapsed time of the previous row and the elapsed time of
26 * the current row.
27 */
28void output_header(const Simulation *simulation, std::array<double, 3> &timeP);
29
30/**
31 * @brief Write one row of the history table to the standard output and to the
32 * history file.
33 *
34 * The row reports the residuals and the linear solver statistics of the
35 * nonlinear iteration that has just been completed.
36 *
37 * @param[in] simulation Simulation whose logger the row is written to.
38 * @param[in,out] timeP Timers of the history table: the instant the elapsed
39 * time is measured from, the elapsed time of the previous row, which is
40 * replaced by the one of this row, and the elapsed time of this row.
41 * @param[in] save_results True if the results of this time step are written to
42 * a VTU file, which flags the row with an 's'.
43 * @param[in] iEq Index of the equation the row reports on.
44 */
45void output_result(const Simulation *simulation, std::array<double, 3> &timeP,
46 const bool save_results, const int iEq);
47
48void read_restart_header(ComMod& com_mod, std::array<int,7>& tStamp, double& timeP, std::ifstream& restart_file);
49
50void write_restart(Simulation* simulation, std::array<double,3>& timeP, const SolutionStates& solutions);
51
52void write_restart_header(ComMod& com_mod, std::array<double,3>& timeP, std::ofstream& restart_file);
53
54void write_results(ComMod& com_mod, const std::array<double,3>& timeP, const std::string& fName, const bool sstEq, const SolutionStates& solutions);
55
56void write_ris_data(ComMod& com_mod, std::ofstream& restart_file);
57void write_uris_data(ComMod& com_mod, std::ofstream& restart_file);
58
59};
60
61#endif
62
The ComMod class duplicates the data structures in the Fortran COMMOD module defined in MOD....
Definition ComMod.h:1597
Definition Simulation.h:19
Holds solution state at old, current, and intermediate time levels.
Definition SolutionStates.h:39