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

Open-Sn / opensn / 20185909776

12 Dec 2025 06:55PM UTC coverage: 74.333% (+0.3%) from 74.037%
20185909776

push

github

web-flow
Merge pull request #859 from wdhawkins/td_source_driver

Adding time-dependent solver and time-dependent sources

367 of 398 new or added lines in 23 files covered. (92.21%)

113 existing lines in 28 files now uncovered.

18610 of 25036 relevant lines covered (74.33%)

68947552.69 hits per line

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

66.67
/framework/field_functions/field_function.h
1
// SPDX-FileCopyrightText: 2024 The OpenSn Authors <https://open-sn.github.io/opensn/>
2
// SPDX-License-Identifier: MIT
3

4
#pragma once
5

6
#include "framework/parameters/input_parameters.h"
7
#include "framework/math/unknown_manager/unknown_manager.h"
8
#include "framework/mesh/mesh.h"
9

10
namespace opensn
11
{
12
class Cell;
13

14
class FieldFunction
15
{
16
public:
17
  explicit FieldFunction(const InputParameters& params);
18

19
  FieldFunction(std::string name, Unknown unknown);
20

21
  virtual ~FieldFunction() = default;
76,008✔
22

23
  /// Returns the text name of the field function.
24
  const std::string& GetName() const { return name_; }
6,469✔
25

26
  /// Returns a reference to the unknown structure.
27
  const Unknown& GetUnknown() const { return unknown_; }
5,954✔
28

29
  /// Returns a reference to the unknown manager that can be with spatial discretizations.
30
  const UnknownManager& GetUnknownManager() const { return unknown_manager_; }
89,011✔
31

32
  /// Evaluate the field function on a given cell, at a given position, for the given component.
UNCOV
33
  virtual double Evaluate(const Cell& cell, const Vector3& position, int component) const
×
34
  {
UNCOV
35
    return 0.0;
×
36
  }
37

38
protected:
39
  std::string name_;
40
  Unknown unknown_;
41
  UnknownManager unknown_manager_;
42

43
public:
44
  static InputParameters GetInputParameters();
45
};
46

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