• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Open-Sn / opensn / 16766938693

05 Aug 2025 03:26PM UTC coverage: 73.386% (+0.1%) from 73.282%
16766938693

push

github

web-flow
Merge pull request #693 from andrsd/move-bnds

Moving sweep boundaries into `DiscreteOrdinatesProblem`

247 of 311 new or added lines in 19 files covered. (79.42%)

625 existing lines in 49 files now uncovered.

18320 of 24964 relevant lines covered (73.39%)

43106214.05 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

84.0
/framework/runtime.cc
1
// SPDX-FileCopyrightText: 2024 The OpenSn Authors <https://open-sn.github.io/opensn/>
2
// SPDX-License-Identifier: MIT
3

4
#include "framework/runtime.h"
5
#include "framework/event_system/system_wide_event_publisher.h"
6
#include "framework/post_processors/post_processor.h"
7
#include "framework/event_system/event.h"
8
#include "framework/math/math.h"
9
#include "framework/object_factory.h"
10
#include "framework/logging/log.h"
11
#include "framework/utils/timer.h"
12
#include "config.h"
13
#include "caliper/cali.h"
14
#include "hdf5.h"
15
#include <iostream>
16

17
namespace opensn
18
{
19

20
// Global variables
21
Logger& log = Logger::GetInstance();
22
mpi::Communicator mpi_comm;
23
bool use_caliper = false;
24
std::string cali_config("runtime-report(calc.inclusive=true),max_column_width=80");
25
cali::ConfigManager cali_mgr;
26
Timer program_timer;
27
bool suppress_color = false;
28
std::filesystem::path input_path;
29

30
std::vector<std::shared_ptr<FieldFunctionInterpolation>> field_func_interpolation_stack;
31
std::vector<std::shared_ptr<MultiGroupXS>> multigroup_xs_stack;
32
std::vector<std::shared_ptr<FieldFunction>> field_function_stack;
33
std::vector<std::shared_ptr<SpatialDiscretization>> sdm_stack;
34
std::vector<std::shared_ptr<PostProcessor>> postprocessor_stack;
35

36
int
37
Initialize()
479✔
38
{
39
  if (use_caliper)
479✔
40
  {
UNCOV
41
    cali_mgr.add(cali_config.c_str());
×
42
    cali_set_global_string_byname("opensn.version", GetVersionStr().c_str());
×
43
    cali_set_global_string_byname("opensn.input", input_path.c_str());
×
44
    cali_mgr.start();
×
45
  }
46

47
  CALI_MARK_BEGIN(opensn::program.c_str());
479✔
48

49
  SystemWideEventPublisher::GetInstance().PublishEvent(Event("ProgramStart"));
479✔
50

51
  // Disable internal HDF error reporting
52
  H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
479✔
53

54
  return 0;
479✔
55
}
56

57
void
58
Finalize()
479✔
59
{
60
  SystemWideEventPublisher::GetInstance().PublishEvent(Event("ProgramExecuted"));
479✔
61

62
  field_func_interpolation_stack.clear();
479✔
63
  multigroup_xs_stack.clear();
479✔
64
  field_function_stack.clear();
479✔
65
  sdm_stack.clear();
479✔
66
  postprocessor_stack.clear();
479✔
67

68
  // Flush standard streams
69
  std::cout.flush();
479✔
70
  std::cerr.flush();
479✔
71
  std::clog.flush();
479✔
72

73
  opensn::mpi_comm.barrier();
479✔
74

75
  CALI_MARK_END(opensn::program.c_str());
479✔
76
}
479✔
77

78
std::string
79
GetVersionStr()
126✔
80
{
81
  return PROJECT_VERSION;
126✔
82
}
83

84
} // namespace opensn
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc