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

Open-Sn / opensn / 18380674863

09 Oct 2025 02:45PM UTC coverage: 75.202% (+0.3%) from 74.862%
18380674863

push

github

web-flow
Merge pull request #793 from wdhawkins/remove_cmake_debug_flags

Removing forced use of -O0 for Debug config

18014 of 23954 relevant lines covered (75.2%)

56527302.01 hits per line

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

71.43
/framework/math/spatial_weight_function.h
1
// SPDX-FileCopyrightText: 2025 The OpenSn Authors <https://open-sn.github.io/opensn/>
2
// SPDX-License-Identifier: MIT
3

4
#pragma once
5

6
#include "framework/data_types/vector3.h"
7
#include "framework/mesh/mesh.h"
8

9
namespace opensn
10
{
11

12
struct SpatialWeightFunction
353,751✔
13
{
14
  virtual double operator()(const Vector3& pt) const = 0;
15
  virtual ~SpatialWeightFunction() = default;
16

17
  static std::shared_ptr<SpatialWeightFunction> FromCoordinateType(CoordinateSystemType coord_sys);
18
};
19

20
struct CartesianSpatialWeightFunction : public SpatialWeightFunction
343,099✔
21
{
22
  double operator()(const Vector3& pt) const override { return 1.0; }
2,147,483,647✔
23
};
24

25
struct SphericalSpatialWeightFunction : public CartesianSpatialWeightFunction
×
26
{
27
  double operator()(const Vector3& pt) const override { return pt[2] * pt[2]; }
×
28
};
29

30
struct CylindricalSpatialWeightFunction : public CartesianSpatialWeightFunction
10,652✔
31
{
32
  double operator()(const Vector3& pt) const override { return pt[0]; }
16,361,472✔
33
};
34

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