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

sxs-collaboration / spectre / 4138821718

pending completion
4138821718

push

github

GitHub
Merge pull request #4714 from nilsdeppe/fix_jac_diag_missing_include

63323 of 66009 relevant lines covered (95.93%)

403761.71 hits per line

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

93.94
/src/PointwiseFunctions/AnalyticData/ForceFree/FfeBreakdown.cpp
1
// Distributed under the MIT License.
2
// See LICENSE.txt for details.
3

4
#include "PointwiseFunctions/AnalyticData/ForceFree/FfeBreakdown.hpp"
5

6
#include <cstddef>
7
#include <memory>
8
#include <pup.h>
9

10
#include "DataStructures/DataVector.hpp"
11
#include "DataStructures/Tensor/Tensor.hpp"
12
#include "PointwiseFunctions/InitialDataUtilities/InitialData.hpp"
13
#include "Utilities/MakeWithValue.hpp"
14
#include "Utilities/TaggedTuple.hpp"
15

16
namespace ForceFree::AnalyticData {
17

18
FfeBreakdown::FfeBreakdown(CkMigrateMessage* msg) : InitialData(msg) {}
1✔
19

20
std::unique_ptr<evolution::initial_data::InitialData> FfeBreakdown::get_clone()
1✔
21
    const {
22
  return std::make_unique<FfeBreakdown>(*this);
1✔
23
}
24

25
void FfeBreakdown::pup(PUP::er& p) {
6✔
26
  InitialData::pup(p);
6✔
27
  p | background_spacetime_;
6✔
28
}
6✔
29

30
PUP::able::PUP_ID FfeBreakdown::my_PUP_ID = 0;
31

32
tuples::TaggedTuple<Tags::TildeE> FfeBreakdown::variables(
5✔
33
    const tnsr::I<DataVector, 3>& coords, tmpl::list<Tags::TildeE> /*meta*/) {
34
  auto result = make_with_value<tnsr::I<DataVector, 3>>(coords, 0.0);
10✔
35
  result.get(1) = 0.5;
5✔
36
  result.get(2) = -0.5;
5✔
37
  return result;
10✔
38
}
39

40
tuples::TaggedTuple<Tags::TildeB> FfeBreakdown::variables(
5✔
41
    const tnsr::I<DataVector, 3>& coords, tmpl::list<Tags::TildeB> /*meta*/) {
42
  auto result = make_with_value<tnsr::I<DataVector, 3>>(coords, 1.0);
10✔
43
  for (size_t i = 0; i < result.get(0).size(); ++i) {
55✔
44
    const double& x = coords.get(0)[i];
50✔
45
    if (x > -0.1) {
50✔
46
      if (x <= 0.1) {
40✔
47
        result.get(1)[i] = -10.0 * x;
×
48
        result.get(2)[i] = -10.0 * x;
×
49
      } else {
50
        result.get(1)[i] = -1.0;
40✔
51
        result.get(2)[i] = -1.0;
80✔
52
      }
53
    }
54
  }
55
  return result;
10✔
56
}
57

58
tuples::TaggedTuple<Tags::TildePsi> FfeBreakdown::variables(
5✔
59
    const tnsr::I<DataVector, 3>& coords, tmpl::list<Tags::TildePsi> /*meta*/) {
60
  return {make_with_value<Scalar<DataVector>>(coords, 0.0)};
15✔
61
}
62

63
tuples::TaggedTuple<Tags::TildePhi> FfeBreakdown::variables(
5✔
64
    const tnsr::I<DataVector, 3>& coords, tmpl::list<Tags::TildePhi> /*meta*/) {
65
  return {make_with_value<Scalar<DataVector>>(coords, 0.0)};
15✔
66
}
67

68
tuples::TaggedTuple<Tags::TildeQ> FfeBreakdown::variables(
5✔
69
    const tnsr::I<DataVector, 3>& coords, tmpl::list<Tags::TildeQ> /*meta*/) {
70
  return {make_with_value<Scalar<DataVector>>(coords, 0.0)};
15✔
71
}
72

73
bool operator==(const FfeBreakdown& lhs, const FfeBreakdown& rhs) {
5✔
74
  return lhs.background_spacetime_ == rhs.background_spacetime_;
5✔
75
}
76

77
bool operator!=(const FfeBreakdown& lhs, const FfeBreakdown& rhs) {
1✔
78
  return not(lhs == rhs);
1✔
79
}
80

81
}  // namespace ForceFree::AnalyticData
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