20 using Eigen::Vector3d;
21 Vector3d coords1(0.0, 0.0, 0.0);
22 Vector3d coords2(1.0, 0.0, 0.0);
23 Vector3d coords3(0.0, 1.0, 0.0);
24 Vector3d coords4(0.0, 0.0, 1.0);
46 BOOST_TEST(
testing::equals(center, (coords1 + coords2 + coords3 + coords4) / 4));
49 constexpr double expectedRadius = 0.82915619758;
52 constexpr double expectedVolume = 1.0 / 6.0;
53 BOOST_TEST(tetra.
getVolume() == expectedVolume);
63 using Eigen::Vector3d;
64 Vector3d coords1(0.0, 0.0, 0.0);
65 Vector3d coords2(1.0, 0.0, 0.0);
66 Vector3d coords3(0.0, 1.0, 0.0);
67 Vector3d coords4(-5.0, 10.0, -1.0);
89 BOOST_TEST(
testing::equals(center, (coords1 + coords2 + coords3 + coords4) / 4));
92 constexpr double expectedRadius = 8.314144574157945;
95 constexpr double expectedVolume = 1.0 / 6.0;
96 BOOST_TEST(tetra.
getVolume() == expectedVolume);
103 using Eigen::Vector3d;
104 Vector3d coords1(0.0, 0.0, 0.0);
105 Vector3d coords2(1.0, 0.0, 0.0);
106 Vector3d coords3(0.0, 1.0, 0.0);
107 Vector3d coords4(0.0, 0.0, 1.0);
108 Vector3d coords5(0.0, 0.0, -1.0);
120 BOOST_TEST(tetra1 == tetra2);
121 BOOST_TEST(tetra1 != tetra3);
122 BOOST_TEST(tetra2 != tetra3);
129 Vertex v1(Eigen::Vector3d(0., 0., 0.), 0);
130 Vertex v2(Eigen::Vector3d(1., 0., 0.), 1);
131 Vertex v3(Eigen::Vector3d(0., 1., 0.), 2);
132 Vertex v4(Eigen::Vector3d(0., 0., 1.), 3);
137 std::string t1string(
"MULTILINESTRING ((0 0 0, 1 0 0), (0 0 0, 0 1 0), (0 0 0, 0 0 1), (1 0 0, 0 1 0), (1 0 0, 0 0 1), (0 1 0, 0 0 1))");
138 BOOST_TEST(t1string == stream.
str());
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
#define PRECICE_TEST_SETUP(...)
Creates and attaches a TestSetup to a Boost test case.
BOOST_AUTO_TEST_CASE(BasicTetra)
Tetrahedron of a mesh, defined by 4 vertices.
Vertex & vertex(int i)
Returns tetrahedron vertex with index 0, 1, 2 or 3.
const Eigen::VectorXd getCenter() const
Returns the barycenter of the tetrahedron.
double getEnclosingRadius() const
Returns the radius of the sphere enclosing the tetrahedron.
double getVolume() const
Returns the unsigned volume of the tetrahedron.
VertexID getID() const
Returns the unique (among vertices of one mesh on one processor) ID of the vertex.
provides Mesh, Data and primitives.
boost::test_tools::predicate_result equals(const std::vector< float > &VectorA, const std::vector< float > &VectorB, float tolerance)
equals to be used in tests. Compares two std::vectors using a given tolerance. Prints both operands o...
Main namespace of the precice library.