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

Open-Sn / opensn / 21308346735

23 Jan 2026 06:13PM UTC coverage: 74.265% (-0.1%) from 74.361%
21308346735

push

github

web-flow
Merge pull request #907 from andrsd/py-ctor-update

Updating python binders for quadratures

5 of 5 new or added lines in 1 file covered. (100.0%)

118 existing lines in 7 files now uncovered.

18783 of 25292 relevant lines covered (74.26%)

67392416.31 hits per line

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

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

4
#include "modules/solver.h"
5
#include "framework/runtime.h"
6
#include "framework/logging/log.h"
7
#include "framework/object_factory.h"
8

9
namespace opensn
10
{
11

12
InputParameters
13
Solver::GetInputParameters()
380✔
14
{
15
  InputParameters params;
380✔
16

17
  params.AddRequiredParameter<std::string>(
760✔
18
    "name",
19
    "A text name to associate with the solver. This name will be used "
20
    "in status messages and verbose iterative convergence monitors.");
21
  params.AddOptionalParameter(
760✔
22
    "compute_balance", false, "If true, compute and print balance information.");
23

24
  return params;
380✔
25
}
×
26

27
Solver::Solver(std::string name) : name_(std::move(name))
×
28
{
UNCOV
29
}
×
30

31
Solver::Solver(const InputParameters& params)
380✔
32
  : name_(params.GetParamValue<std::string>("name")),
380✔
33
    compute_balance_(params.GetParamValue<bool>("compute_balance"))
760✔
34
{
35
}
380✔
36

37
std::string
UNCOV
38
Solver::GetName() const
×
39
{
40
  return name_;
×
41
}
42

43
void
UNCOV
44
Solver::Initialize()
×
45
{
46
  log.Log() << "\"Initialize()\" method not defined for " << GetName();
×
UNCOV
47
}
×
48

49
void
UNCOV
50
Solver::Execute()
×
51
{
52
  log.Log() << "\"Execute()\" method not defined for " << GetName();
×
UNCOV
53
}
×
54

55
void
UNCOV
56
Solver::Advance()
×
57
{
58
  log.Log() << "\"Advance()\" method not defined for " << GetName();
×
UNCOV
59
}
×
60

61
ParameterBlock
UNCOV
62
Solver::GetInfo(const ParameterBlock& params) const
×
63
{
64
  return ParameterBlock{};
×
65
}
66

67
ParameterBlock
68
Solver::GetInfoWithPreCheck(const ParameterBlock& params) const
×
69
{
70
  if (not params.Has("name"))
×
71
  {
72
    log.LogAllWarning() << "Solver::GetInfo called without "
×
UNCOV
73
                           "\"name\" in the parameter list";
×
UNCOV
74
    return ParameterBlock{};
×
75
  }
UNCOV
76
  return GetInfo(params);
×
77
}
78

79
} // 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