GCC Code Coverage Report


Directory: ./
File: openvdb/openvdb/unittest/TestCurl.cc
Date: 2022-07-25 17:40:05
Exec Total Coverage
Lines: 295 295 100.0%
Functions: 8 8 100.0%
Branches: 468 2732 17.1%

Line Branch Exec Source
1 // Copyright Contributors to the OpenVDB Project
2 // SPDX-License-Identifier: MPL-2.0
3
4 #include <openvdb/Types.h>
5 #include <openvdb/openvdb.h>
6 #include <openvdb/tools/GridOperators.h>
7
8 #include <gtest/gtest.h>
9
10 #define ASSERT_DOUBLES_EXACTLY_EQUAL(expected, actual) \
11 EXPECT_NEAR((expected), (actual), /*tolerance=*/1e-6);
12
13 namespace {
14 const int GRID_DIM = 10;
15 }
16
17
18 6 class TestCurl: public ::testing::Test
19 {
20 public:
21 6 void SetUp() override { openvdb::initialize(); }
22 6 void TearDown() override { openvdb::uninitialize(); }
23 };
24
25
26
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 TEST_F(TestCurl, testCurlTool)
27 {
28 using namespace openvdb;
29
30 1 VectorGrid::Ptr inGrid = VectorGrid::create();
31 const VectorTree& inTree = inGrid->tree();
32
1/16
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
1 EXPECT_TRUE(inTree.empty());
33
34 VectorGrid::Accessor inAccessor = inGrid->getAccessor();
35 int dim = GRID_DIM;
36
2/2
✓ Branch 0 taken 20 times.
✓ Branch 1 taken 1 times.
21 for (int x = -dim; x<dim; ++x) {
37
2/2
✓ Branch 0 taken 400 times.
✓ Branch 1 taken 20 times.
420 for (int y = -dim; y<dim; ++y) {
38
2/2
✓ Branch 0 taken 8000 times.
✓ Branch 1 taken 400 times.
8400 for (int z = -dim; z<dim; ++z) {
39
1/2
✓ Branch 1 taken 8000 times.
✗ Branch 2 not taken.
8000 inAccessor.setValue(Coord(x,y,z),
40
1/2
✓ Branch 1 taken 8000 times.
✗ Branch 2 not taken.
8000 VectorTree::ValueType(float(y), float(-x), 0.f));
41 }
42 }
43 }
44
1/16
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
1 EXPECT_TRUE(!inTree.empty());
45
3/20
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
1 EXPECT_EQ(math::Pow3(2*dim), int(inTree.activeVoxelCount()));
46
47
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 VectorGrid::Ptr curl_grid = tools::curl(*inGrid);
48
3/20
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
1 EXPECT_EQ(math::Pow3(2*dim), int(curl_grid->activeVoxelCount()));
49
50 VectorGrid::ConstAccessor curlAccessor = curl_grid->getConstAccessor();
51 --dim;//ignore boundary curl vectors
52
2/2
✓ Branch 0 taken 18 times.
✓ Branch 1 taken 1 times.
19 for (int x = -dim; x<dim; ++x) {
53
2/2
✓ Branch 0 taken 324 times.
✓ Branch 1 taken 18 times.
342 for (int y = -dim; y<dim; ++y) {
54
2/2
✓ Branch 0 taken 5832 times.
✓ Branch 1 taken 324 times.
6156 for (int z = -dim; z<dim; ++z) {
55 Coord xyz(x,y,z);
56
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 VectorTree::ValueType v = inAccessor.getValue(xyz);
57 //std::cout << "vec(" << xyz << ")=" << v << std::endl;
58
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( y,v[0]);
59
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-x,v[1]);
60
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[2]);
61
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 v = curlAccessor.getValue(xyz);
62 //std::cout << "curl(" << xyz << ")=" << v << std::endl;
63
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
64
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
65
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
66 }
67 }
68 }
69 1 }
70
71
72
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 TEST_F(TestCurl, testCurlMaskedTool)
73 {
74 using namespace openvdb;
75
76 1 VectorGrid::Ptr inGrid = VectorGrid::create();
77 const VectorTree& inTree = inGrid->tree();
78
1/16
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
1 EXPECT_TRUE(inTree.empty());
79
80 VectorGrid::Accessor inAccessor = inGrid->getAccessor();
81 int dim = GRID_DIM;
82
2/2
✓ Branch 0 taken 20 times.
✓ Branch 1 taken 1 times.
21 for (int x = -dim; x<dim; ++x) {
83
2/2
✓ Branch 0 taken 400 times.
✓ Branch 1 taken 20 times.
420 for (int y = -dim; y<dim; ++y) {
84
2/2
✓ Branch 0 taken 8000 times.
✓ Branch 1 taken 400 times.
8400 for (int z = -dim; z<dim; ++z) {
85
1/2
✓ Branch 1 taken 8000 times.
✗ Branch 2 not taken.
8000 inAccessor.setValue(Coord(x,y,z),
86
1/2
✓ Branch 1 taken 8000 times.
✗ Branch 2 not taken.
8000 VectorTree::ValueType(float(y), float(-x), 0.f));
87 }
88 }
89 }
90
1/16
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
1 EXPECT_TRUE(!inTree.empty());
91
3/18
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
1 EXPECT_EQ(math::Pow3(2*dim), int(inTree.activeVoxelCount()));
92
93 1 openvdb::CoordBBox maskBBox(openvdb::Coord(0), openvdb::Coord(dim));
94
2/6
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
1 BoolGrid::Ptr maskGrid = BoolGrid::create(false);
95
2/4
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
2 maskGrid->fill(maskBBox, true /*value*/, true /*activate*/);
96
97 1 openvdb::CoordBBox testBBox(openvdb::Coord(-dim+1), openvdb::Coord(dim));
98
2/6
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
1 BoolGrid::Ptr testGrid = BoolGrid::create(false);
99
2/6
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
2 testGrid->fill(testBBox, true, true);
100
101 testGrid->topologyIntersection(*maskGrid);
102
103
104
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 VectorGrid::Ptr curl_grid = tools::curl(*inGrid, *maskGrid);
105
3/20
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
1 EXPECT_EQ(math::Pow3(dim), int(curl_grid->activeVoxelCount()));
106
107 VectorGrid::ConstAccessor curlAccessor = curl_grid->getConstAccessor();
108 --dim;//ignore boundary curl vectors
109
2/2
✓ Branch 0 taken 18 times.
✓ Branch 1 taken 1 times.
19 for (int x = -dim; x<dim; ++x) {
110
2/2
✓ Branch 0 taken 324 times.
✓ Branch 1 taken 18 times.
342 for (int y = -dim; y<dim; ++y) {
111
2/2
✓ Branch 0 taken 5832 times.
✓ Branch 1 taken 324 times.
6156 for (int z = -dim; z<dim; ++z) {
112 Coord xyz(x,y,z);
113
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 VectorTree::ValueType v = inAccessor.getValue(xyz);
114
115
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( y,v[0]);
116
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-x,v[1]);
117
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[2]);
118
119
3/4
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2916 times.
✓ Branch 4 taken 2916 times.
5832 v = curlAccessor.getValue(xyz);
120 if (maskBBox.isInside(xyz)) {
121
2/16
✓ Branch 1 taken 729 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 729 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
729 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
122
2/16
✓ Branch 1 taken 729 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 729 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
729 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
123
2/16
✓ Branch 1 taken 729 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 729 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
729 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
124 } else {
125 // get the background value outside masked region
126
2/16
✓ Branch 1 taken 5103 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5103 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5103 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
127
2/16
✓ Branch 1 taken 5103 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5103 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5103 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
128
2/16
✓ Branch 1 taken 5103 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5103 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5103 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[2]);
129 }
130 }
131 }
132 }
133 1 }
134
135
136
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 TEST_F(TestCurl, testISCurl)
137 {
138 using namespace openvdb;
139
140 1 VectorGrid::Ptr inGrid = VectorGrid::create();
141 const VectorTree& inTree = inGrid->tree();
142
1/16
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
1 EXPECT_TRUE(inTree.empty());
143
144 VectorGrid::Accessor inAccessor = inGrid->getAccessor();
145 int dim = GRID_DIM;
146
2/2
✓ Branch 0 taken 20 times.
✓ Branch 1 taken 1 times.
21 for (int x = -dim; x<dim; ++x) {
147
2/2
✓ Branch 0 taken 400 times.
✓ Branch 1 taken 20 times.
420 for (int y = -dim; y<dim; ++y) {
148
2/2
✓ Branch 0 taken 8000 times.
✓ Branch 1 taken 400 times.
8400 for (int z = -dim; z<dim; ++z) {
149
1/2
✓ Branch 1 taken 8000 times.
✗ Branch 2 not taken.
8000 inAccessor.setValue(Coord(x,y,z),
150
1/2
✓ Branch 1 taken 8000 times.
✗ Branch 2 not taken.
8000 VectorTree::ValueType(float(y), float(-x), 0.f));
151 }
152 }
153 }
154
1/16
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
1 EXPECT_TRUE(!inTree.empty());
155
3/20
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
1 EXPECT_EQ(math::Pow3(2*dim), int(inTree.activeVoxelCount()));
156
157
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 VectorGrid::Ptr curl_grid = tools::curl(*inGrid);
158
3/20
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
1 EXPECT_EQ(math::Pow3(2*dim), int(curl_grid->activeVoxelCount()));
159
160 --dim;//ignore boundary curl vectors
161 // test unit space operators
162 VectorGrid::ConstAccessor inConstAccessor = inGrid->getConstAccessor();
163
2/2
✓ Branch 0 taken 18 times.
✓ Branch 1 taken 1 times.
19 for (int x = -dim; x<dim; ++x) {
164
2/2
✓ Branch 0 taken 324 times.
✓ Branch 1 taken 18 times.
342 for (int y = -dim; y<dim; ++y) {
165
2/2
✓ Branch 0 taken 5832 times.
✓ Branch 1 taken 324 times.
6156 for (int z = -dim; z<dim; ++z) {
166 Coord xyz(x,y,z);
167
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 VectorTree::ValueType v = inAccessor.getValue(xyz);
168
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( y,v[0]);
169
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-x,v[1]);
170
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[2]);
171
172
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 v = math::ISCurl<math::CD_2ND>::result(inConstAccessor, xyz);
173
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
174
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
175
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
176
177
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 v = math::ISCurl<math::FD_1ST>::result(inConstAccessor, xyz);
178
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
179
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
180
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
181
182
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 v = math::ISCurl<math::BD_1ST>::result(inConstAccessor, xyz);
183
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
184
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
185
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
186 }
187 }
188 }
189
190 --dim;//ignore boundary curl vectors
191
2/2
✓ Branch 0 taken 16 times.
✓ Branch 1 taken 1 times.
17 for (int x = -dim; x<dim; ++x) {
192
2/2
✓ Branch 0 taken 256 times.
✓ Branch 1 taken 16 times.
272 for (int y = -dim; y<dim; ++y) {
193
2/2
✓ Branch 0 taken 4096 times.
✓ Branch 1 taken 256 times.
4352 for (int z = -dim; z<dim; ++z) {
194 Coord xyz(x,y,z);
195
1/2
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
4096 VectorTree::ValueType v = inAccessor.getValue(xyz);
196
197
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL( y,v[0]);
198
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL(-x,v[1]);
199
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[2]);
200
1/2
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
4096 v = math::ISCurl<math::CD_4TH>::result(inConstAccessor, xyz);
201
202
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
203
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
204
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
205
206
1/2
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
4096 v = math::ISCurl<math::FD_2ND>::result(inConstAccessor, xyz);
207
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
208
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
209
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
210
211
1/2
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
4096 v = math::ISCurl<math::BD_2ND>::result(inConstAccessor, xyz);
212
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
213
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
214
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
215 }
216 }
217 }
218
219 --dim;//ignore boundary curl vectors
220
2/2
✓ Branch 0 taken 14 times.
✓ Branch 1 taken 1 times.
15 for (int x = -dim; x<dim; ++x) {
221
2/2
✓ Branch 0 taken 196 times.
✓ Branch 1 taken 14 times.
210 for (int y = -dim; y<dim; ++y) {
222
2/2
✓ Branch 0 taken 2744 times.
✓ Branch 1 taken 196 times.
2940 for (int z = -dim; z<dim; ++z) {
223 Coord xyz(x,y,z);
224
1/2
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
2744 VectorTree::ValueType v = inAccessor.getValue(xyz);
225
226
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL( y, v[0]);
227
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL(-x, v[1]);
228
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL( 0, v[2]);
229
1/2
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
2744 v = math::ISCurl<math::CD_6TH>::result(inConstAccessor, xyz);
230
231
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL( 0, v[0]);
232
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL( 0, v[1]);
233
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL(-2, v[2]);
234
235
1/2
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
2744 v = math::ISCurl<math::FD_3RD>::result(inConstAccessor, xyz);
236
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL( 0, v[0]);
237
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 EXPECT_NEAR( 0, v[1], /*tolerance=*/0.00001);
238
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 EXPECT_NEAR(-2, v[2], /*tolerance=*/0.00001);
239
240
1/2
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
2744 v = math::ISCurl<math::BD_3RD>::result(inConstAccessor, xyz);
241
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL( 0, v[0]);
242
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL( 0, v[1]);
243
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 EXPECT_NEAR(-2, v[2], /*tolerance=*/0.00001);
244 }
245 }
246 }
247 1 }
248
249
250
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 TEST_F(TestCurl, testISCurlStencil)
251 {
252 using namespace openvdb;
253
254 1 VectorGrid::Ptr inGrid = VectorGrid::create();
255 const VectorTree& inTree = inGrid->tree();
256
1/16
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
1 EXPECT_TRUE(inTree.empty());
257
258 VectorGrid::Accessor inAccessor = inGrid->getAccessor();
259 int dim = GRID_DIM;
260
2/2
✓ Branch 0 taken 20 times.
✓ Branch 1 taken 1 times.
21 for (int x = -dim; x<dim; ++x) {
261
2/2
✓ Branch 0 taken 400 times.
✓ Branch 1 taken 20 times.
420 for (int y = -dim; y<dim; ++y) {
262
2/2
✓ Branch 0 taken 8000 times.
✓ Branch 1 taken 400 times.
8400 for (int z = -dim; z<dim; ++z) {
263
1/2
✓ Branch 1 taken 8000 times.
✗ Branch 2 not taken.
8000 inAccessor.setValue(Coord(x,y,z),
264
1/2
✓ Branch 1 taken 8000 times.
✗ Branch 2 not taken.
8000 VectorTree::ValueType(float(y), float(-x), 0.f));
265 }
266 }
267 }
268
1/16
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
1 EXPECT_TRUE(!inTree.empty());
269
3/20
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
1 EXPECT_EQ(math::Pow3(2*dim), int(inTree.activeVoxelCount()));
270
271
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 VectorGrid::Ptr curl_grid = tools::curl(*inGrid);
272
3/20
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
1 EXPECT_EQ(math::Pow3(2*dim), int(curl_grid->activeVoxelCount()));
273
274 math::SevenPointStencil<VectorGrid> sevenpt(*inGrid);
275 math::ThirteenPointStencil<VectorGrid> thirteenpt(*inGrid);
276 math::NineteenPointStencil<VectorGrid> nineteenpt(*inGrid);
277
278 // test unit space operators
279
280 --dim;//ignore boundary curl vectors
281
2/2
✓ Branch 0 taken 18 times.
✓ Branch 1 taken 1 times.
19 for (int x = -dim; x<dim; ++x) {
282
2/2
✓ Branch 0 taken 324 times.
✓ Branch 1 taken 18 times.
342 for (int y = -dim; y<dim; ++y) {
283
2/2
✓ Branch 0 taken 5832 times.
✓ Branch 1 taken 324 times.
6156 for (int z = -dim; z<dim; ++z) {
284 Coord xyz(x,y,z);
285
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 sevenpt.moveTo(xyz);
286
287
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 VectorTree::ValueType v = inAccessor.getValue(xyz);
288
289
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( y,v[0]);
290
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-x,v[1]);
291
2/22
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[2]);
292
293 5832 v = math::ISCurl<math::CD_2ND>::result(sevenpt);
294
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
295
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
296
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
297
298 5832 v = math::ISCurl<math::FD_1ST>::result(sevenpt);
299
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
300
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
301
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
302
303 5832 v = math::ISCurl<math::BD_1ST>::result(sevenpt);
304
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
305
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
306
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
307 }
308 }
309 }
310
311 --dim;//ignore boundary curl vectors
312
2/2
✓ Branch 0 taken 16 times.
✓ Branch 1 taken 1 times.
17 for (int x = -dim; x<dim; ++x) {
313
2/2
✓ Branch 0 taken 256 times.
✓ Branch 1 taken 16 times.
272 for (int y = -dim; y<dim; ++y) {
314
2/2
✓ Branch 0 taken 4096 times.
✓ Branch 1 taken 256 times.
4352 for (int z = -dim; z<dim; ++z) {
315 Coord xyz(x,y,z);
316
1/2
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
4096 thirteenpt.moveTo(xyz);
317
318
1/2
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
4096 VectorTree::ValueType v = inAccessor.getValue(xyz);
319
320
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL( y,v[0]);
321
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL(-x,v[1]);
322
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[2]);
323 4096 v = math::ISCurl<math::CD_4TH>::result(thirteenpt);
324
325
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
326
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
327
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
328
329
330 4096 v = math::ISCurl<math::FD_2ND>::result(thirteenpt);
331
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
332
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
333
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
334
335 4096 v = math::ISCurl<math::BD_2ND>::result(thirteenpt);
336
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
337
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
338
2/16
✓ Branch 1 taken 4096 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4096 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
4096 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
339 }
340 }
341 }
342
343
344 --dim;//ignore boundary curl vectors
345
2/2
✓ Branch 0 taken 14 times.
✓ Branch 1 taken 1 times.
15 for (int x = -dim; x<dim; ++x) {
346
2/2
✓ Branch 0 taken 196 times.
✓ Branch 1 taken 14 times.
210 for (int y = -dim; y<dim; ++y) {
347
2/2
✓ Branch 0 taken 2744 times.
✓ Branch 1 taken 196 times.
2940 for (int z = -dim; z<dim; ++z) {
348 Coord xyz(x,y,z);
349
1/2
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
2744 nineteenpt.moveTo(xyz);
350
351
1/2
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
2744 VectorTree::ValueType v = inAccessor.getValue(xyz);
352
353
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL( y,v[0]);
354
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL(-x,v[1]);
355
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[2]);
356 2744 v = math::ISCurl<math::CD_6TH>::result(nineteenpt);
357
358
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
359
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
360
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
361
362 2744 v = math::ISCurl<math::FD_3RD>::result(nineteenpt);
363
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
364
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
365
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 EXPECT_NEAR(-2,v[2], /*tolerance=*/0.00001);
366
367 2744 v = math::ISCurl<math::BD_3RD>::result(nineteenpt);
368
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
369
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
370
2/16
✓ Branch 1 taken 2744 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2744 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2744 EXPECT_NEAR(-2,v[2], /*tolerance=*/0.00001);
371 }
372 }
373 }
374 1 }
375
376
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 TEST_F(TestCurl, testWSCurl)
377 {
378 using namespace openvdb;
379
380 1 VectorGrid::Ptr inGrid = VectorGrid::create();
381 const VectorTree& inTree = inGrid->tree();
382
1/16
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
1 EXPECT_TRUE(inTree.empty());
383
384 VectorGrid::Accessor inAccessor = inGrid->getAccessor();
385 int dim = GRID_DIM;
386
2/2
✓ Branch 0 taken 20 times.
✓ Branch 1 taken 1 times.
21 for (int x = -dim; x<dim; ++x) {
387
2/2
✓ Branch 0 taken 400 times.
✓ Branch 1 taken 20 times.
420 for (int y = -dim; y<dim; ++y) {
388
2/2
✓ Branch 0 taken 8000 times.
✓ Branch 1 taken 400 times.
8400 for (int z = -dim; z<dim; ++z) {
389
1/2
✓ Branch 1 taken 8000 times.
✗ Branch 2 not taken.
8000 inAccessor.setValue(Coord(x,y,z),
390
1/2
✓ Branch 1 taken 8000 times.
✗ Branch 2 not taken.
8000 VectorTree::ValueType(float(y), float(-x), 0.f));
391 }
392 }
393 }
394
1/16
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
1 EXPECT_TRUE(!inTree.empty());
395
3/20
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
1 EXPECT_EQ(math::Pow3(2*dim), int(inTree.activeVoxelCount()));
396
397
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 VectorGrid::Ptr curl_grid = tools::curl(*inGrid);
398
3/20
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
1 EXPECT_EQ(math::Pow3(2*dim), int(curl_grid->activeVoxelCount()));
399
400 // test with a map
401 1 math::AffineMap map;
402 math::UniformScaleMap uniform_map;
403
404
405 // test unit space operators
406
407 --dim;//ignore boundary curl vectors
408
2/2
✓ Branch 0 taken 18 times.
✓ Branch 1 taken 1 times.
19 for (int x = -dim; x<dim; ++x) {
409
2/2
✓ Branch 0 taken 324 times.
✓ Branch 1 taken 18 times.
342 for (int y = -dim; y<dim; ++y) {
410
2/2
✓ Branch 0 taken 5832 times.
✓ Branch 1 taken 324 times.
6156 for (int z = -dim; z<dim; ++z) {
411 Coord xyz(x,y,z);
412
413
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 VectorTree::ValueType v = inAccessor.getValue(xyz);
414
415
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( y,v[0]);
416
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-x,v[1]);
417
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[2]);
418
419
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 v = math::Curl<math::AffineMap, math::CD_2ND>::result(map, inAccessor, xyz);
420
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
421
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
422
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
423
424
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 v = math::Curl<math::AffineMap, math::FD_1ST>::result(map, inAccessor, xyz);
425
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
426
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
427
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
428
429
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 v = math::Curl<math::AffineMap, math::BD_1ST>::result(map, inAccessor, xyz);
430
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
431
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
432
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
433
434 v = math::Curl<math::UniformScaleMap, math::CD_2ND>::result(
435
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 uniform_map, inAccessor, xyz);
436
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
437
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
438
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
439
440 v = math::Curl<math::UniformScaleMap, math::FD_1ST>::result(
441
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 uniform_map, inAccessor, xyz);
442
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
443
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
444
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
445
446 v = math::Curl<math::UniformScaleMap, math::BD_1ST>::result(
447
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 uniform_map, inAccessor, xyz);
448
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
449
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
450
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
451 }
452 }
453 }
454 1 }
455
456
457
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 TEST_F(TestCurl, testWSCurlStencil)
458 {
459 using namespace openvdb;
460
461 1 VectorGrid::Ptr inGrid = VectorGrid::create();
462 const VectorTree& inTree = inGrid->tree();
463
1/16
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
1 EXPECT_TRUE(inTree.empty());
464
465 VectorGrid::Accessor inAccessor = inGrid->getAccessor();
466 int dim = GRID_DIM;
467
2/2
✓ Branch 0 taken 20 times.
✓ Branch 1 taken 1 times.
21 for (int x = -dim; x<dim; ++x) {
468
2/2
✓ Branch 0 taken 400 times.
✓ Branch 1 taken 20 times.
420 for (int y = -dim; y<dim; ++y) {
469
2/2
✓ Branch 0 taken 8000 times.
✓ Branch 1 taken 400 times.
8400 for (int z = -dim; z<dim; ++z) {
470
1/2
✓ Branch 1 taken 8000 times.
✗ Branch 2 not taken.
8000 inAccessor.setValue(Coord(x,y,z),
471
1/2
✓ Branch 1 taken 8000 times.
✗ Branch 2 not taken.
8000 VectorTree::ValueType(float(y), float(-x), 0.f));
472 }
473 }
474 }
475
1/16
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
1 EXPECT_TRUE(!inTree.empty());
476
3/20
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
1 EXPECT_EQ(math::Pow3(2*dim), int(inTree.activeVoxelCount()));
477
478
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 VectorGrid::Ptr curl_grid = tools::curl(*inGrid);
479
3/20
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
1 EXPECT_EQ(math::Pow3(2*dim), int(curl_grid->activeVoxelCount()));
480
481 // test with a map
482 1 math::AffineMap map;
483 math::UniformScaleMap uniform_map;
484
485 math::SevenPointStencil<VectorGrid> sevenpt(*inGrid);
486 math::SecondOrderDenseStencil<VectorGrid> dense_2ndOrder(*inGrid);
487
488
489 // test unit space operators
490
491 --dim;//ignore boundary curl vectors
492
2/2
✓ Branch 0 taken 18 times.
✓ Branch 1 taken 1 times.
19 for (int x = -dim; x<dim; ++x) {
493
2/2
✓ Branch 0 taken 324 times.
✓ Branch 1 taken 18 times.
342 for (int y = -dim; y<dim; ++y) {
494
2/2
✓ Branch 0 taken 5832 times.
✓ Branch 1 taken 324 times.
6156 for (int z = -dim; z<dim; ++z) {
495 Coord xyz(x,y,z);
496
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 sevenpt.moveTo(xyz);
497
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 dense_2ndOrder.moveTo(xyz);
498
499
1/2
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
5832 VectorTree::ValueType v = inAccessor.getValue(xyz);
500
501
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( y,v[0]);
502
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-x,v[1]);
503
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[2]);
504
505 5832 v = math::Curl<math::AffineMap, math::CD_2ND>::result(map, dense_2ndOrder);
506
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
507
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
508
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
509
510 5832 v = math::Curl<math::AffineMap, math::FD_1ST>::result(map, dense_2ndOrder);
511
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
512
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
513
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
514
515 5832 v = math::Curl<math::AffineMap, math::BD_1ST>::result(map, dense_2ndOrder);
516
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
517
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
518
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
519
520 5832 v = math::Curl<math::UniformScaleMap, math::CD_2ND>::result(uniform_map, sevenpt);
521
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
522
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
523
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
524
525 5832 v = math::Curl<math::UniformScaleMap, math::FD_1ST>::result(uniform_map, sevenpt);
526
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
527
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
528
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
529
530 5832 v = math::Curl<math::UniformScaleMap, math::BD_1ST>::result(uniform_map, sevenpt);
531
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[0]);
532
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL( 0,v[1]);
533
2/16
✓ Branch 1 taken 5832 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5832 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5832 ASSERT_DOUBLES_EXACTLY_EQUAL(-2,v[2]);
534 }
535 }
536 }
537 1 }
538