|
31 | 31 | #include <Core/Datatypes/Legacy/Field/VField.h> |
32 | 32 | #include <Core/Datatypes/Legacy/Field/FieldInformation.h> |
33 | 33 | #include <Core/Datatypes/Matrix.h> |
34 | | -#include <Core/Algorithms/Field/InterfaceWithCleaverAlgorithm.h> |
| 34 | +#include <Core/Algorithms/Field/InterfaceWithCleaver2Algorithm.h> |
| 35 | +#include <Core/Algorithms/Base/AlgorithmVariableNames.h> |
35 | 36 | #include <Testing/Utils/SCIRunUnitTests.h> |
36 | 37 | #include <Core/Datatypes/DenseMatrix.h> |
37 | 38 |
|
38 | 39 | using namespace SCIRun; |
39 | 40 | using namespace SCIRun::Core::Datatypes; |
40 | 41 | using namespace SCIRun::Core::Geometry; |
| 42 | +using namespace SCIRun::Core::Algorithms; |
41 | 43 | using namespace SCIRun::Core::Algorithms::Fields; |
42 | 44 | using namespace SCIRun::TestUtils; |
43 | 45 |
|
@@ -96,20 +98,20 @@ using namespace SCIRun::TestUtils; |
96 | 98 |
|
97 | 99 | TEST(CleaverInterfaceTest, SphereSignedDistanceFieldMatrix1) |
98 | 100 | { |
99 | | - InterfaceWithCleaverAlgorithm algo; |
| 101 | + InterfaceWithCleaver2Algorithm algo; |
100 | 102 |
|
101 | 103 | std::vector<FieldHandle> inputs; |
102 | 104 | inputs.push_back(BoxSignedDistanceField(true)); |
103 | 105 | inputs.push_back(BoxSignedDistanceField(false)); |
104 | 106 |
|
105 | | - auto info = algo.run(inputs); |
| 107 | + auto output = boost::dynamic_pointer_cast<Field>(algo.runImpl(inputs)[Variables::OutputField]); |
106 | 108 |
|
107 | | - std::cout << "Number of mesh elements: " << info->vmesh()->num_elems() << std::endl; |
108 | | - std::cout << "Number of mesh nodes: " << info->vmesh()->num_nodes() << std::endl; |
109 | | - std::cout << "Number of mesh values: " << info->vfield()->num_values() << std::endl; |
| 109 | + std::cout << "Number of mesh elements: " << output->vmesh()->num_elems() << std::endl; |
| 110 | + std::cout << "Number of mesh nodes: " << output->vmesh()->num_nodes() << std::endl; |
| 111 | + std::cout << "Number of mesh values: " << output->vfield()->num_values() << std::endl; |
110 | 112 |
|
111 | | - ASSERT_TRUE(info->vmesh()->num_elems() == 4326); |
112 | | - ASSERT_TRUE(info->vmesh()->num_nodes() == 908); |
113 | | - ASSERT_TRUE(info->vfield()->num_values() == 4326); |
| 113 | + ASSERT_TRUE(output->vmesh()->num_elems() == 4326); |
| 114 | + ASSERT_TRUE(output->vmesh()->num_nodes() == 908); |
| 115 | + ASSERT_TRUE(output->vfield()->num_values() == 4326); |
114 | 116 |
|
115 | 117 | } |
0 commit comments