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

Open-Sn / opensn / 25359736025

04 May 2026 04:34PM UTC coverage: 75.416% (-0.001%) from 75.417%
25359736025

push

github

web-flow
Merge pull request #1038 from quocdang1998/sycl-mod

Extend SYCL implementation for caribou and OpenSn

21817 of 28929 relevant lines covered (75.42%)

65645385.67 hits per line

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

35.48
/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/logging/log.h"
6
#include "framework/object_factory.h"
7

8
namespace opensn
9
{
10

11
InputParameters
12
Solver::GetInputParameters()
798✔
13
{
14
  InputParameters params;
798✔
15

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

23
  return params;
798✔
24
}
×
25

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

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

36
std::string
37
Solver::GetName() const
2,798✔
38
{
39
  return name_;
2,798✔
40
}
41

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

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

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

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

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

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