OpenMC/include/openmc/output.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

93 lines
2.2 KiB
C
Raw Permalink Normal View History

2018-08-14 19:04:05 -04:00
//! \file output.h
//! Functions for ASCII output.
#ifndef OPENMC_OUTPUT_H
#define OPENMC_OUTPUT_H
2018-10-12 16:16:38 -05:00
#include <string>
2018-08-14 19:04:05 -04:00
2018-12-24 15:15:36 -05:00
#include "openmc/particle.h"
2018-08-14 19:04:05 -04:00
namespace openmc {
extern "C" const bool STRICT_FP_ENABLED;
//! \brief Display the main title banner as well as information about the
//! program developers, version, and date/time which the problem was run.
void title();
2018-08-14 19:04:05 -04:00
//! Display a header block.
//
2018-08-14 19:04:05 -04:00
//! \param msg The main text of the header
//! \param level The lowest verbosity level at which this header is printed
void header(const char* msg, int level);
2018-12-24 15:15:36 -05:00
//! Retrieve a time stamp.
//
2018-10-30 19:41:30 -05:00
//! \return current time stamp (format: "yyyy-mm-dd hh:mm:ss")
2018-10-12 16:16:38 -05:00
std::string time_stamp();
2018-12-24 15:15:36 -05:00
//! Display the attributes of a particle.
void print_particle(Particle& p);
2018-12-24 15:15:36 -05:00
//! Display plot information.
2019-01-23 10:35:28 -06:00
void print_plot();
2018-08-14 19:04:05 -04:00
//! Display information regarding cell overlap checking.
void print_overlap_check();
2018-08-14 19:04:05 -04:00
//! Display information about command line usage of OpenMC
void print_usage();
//! Display current version and copright/license information
void print_version();
2022-10-05 17:45:51 -04:00
//! Display compile flags employed, etc
void print_build_info();
//! Display header listing what physical values will displayed
void print_columns();
//! Display information about a generation of neutrons
void print_generation();
2019-02-05 08:17:56 -06:00
//! Display time elapsed for various stages of a run
void print_runtime();
2019-02-05 12:06:26 -06:00
//! Display results for global tallies including k-effective estimators
void print_results();
2019-02-21 16:04:21 -06:00
void write_tallies();
void show_time(const char* label, double secs, int indent_level = 0);
2018-08-14 19:04:05 -04:00
} // namespace openmc
//////////////////////////////////////
// Custom formatters
//////////////////////////////////////
namespace fmt {
template<typename T>
struct formatter<std::array<T, 2>> {
template<typename ParseContext>
constexpr auto parse(ParseContext& ctx)
{
return ctx.begin();
}
template<typename FormatContext>
#if FMT_VERSION >= 110000 // Version 11.0.0 and above
auto format(const std::array<T, 2>& arr, FormatContext& ctx) const {
#else // For versions below 11.0.0
auto format(const std::array<T, 2>& arr, FormatContext& ctx)
{
#endif
return format_to(ctx.out(), "({}, {})", arr[0], arr[1]);
}
}; // namespace fmt
} // namespace fmt
2026-03-05 17:29:36 -06:00
#endif // OPENMC_OUTPUT_H