19 using Eigen::Vector3d;
20 Vector3d coords1(0.0, 0.0, 0.0);
21 Vector3d coords2(1.0, 0.0, 0.0);
22 Vector3d coords3(0.0, 1.0, 0.0);
23 Vector3d coords4(0.0, 0.0, 1.0);
45 BOOST_TEST(
testing::equals(center, (coords1 + coords2 + coords3 + coords4) / 4));
48 constexpr double expectedRadius = 0.82915619758;
51 constexpr double expectedVolume = 1.0 / 6.0;
52 BOOST_TEST(tetra.
getVolume() == expectedVolume);
62 using Eigen::Vector3d;
63 Vector3d coords1(0.0, 0.0, 0.0);
64 Vector3d coords2(1.0, 0.0, 0.0);
65 Vector3d coords3(0.0, 1.0, 0.0);
66 Vector3d coords4(-5.0, 10.0, -1.0);
88 BOOST_TEST(
testing::equals(center, (coords1 + coords2 + coords3 + coords4) / 4));
91 constexpr double expectedRadius = 8.314144574157945;
94 constexpr double expectedVolume = 1.0 / 6.0;
95 BOOST_TEST(tetra.
getVolume() == expectedVolume);
101 using Eigen::Vector3d;
102 Vector3d coords1(0.0, 0.0, 0.0);
103 Vector3d coords2(1.0, 0.0, 0.0);
104 Vector3d coords3(0.0, 1.0, 0.0);
105 Vector3d coords4(0.0, 0.0, 1.0);
106 Vector3d coords5(0.0, 0.0, -1.0);
118 BOOST_TEST(tetra1 == tetra2);
119 BOOST_TEST(tetra1 != tetra3);
120 BOOST_TEST(tetra2 != tetra3);
126 Vertex v1(Eigen::Vector3d(0., 0., 0.), 0);
127 Vertex v2(Eigen::Vector3d(1., 0., 0.), 1);
128 Vertex v3(Eigen::Vector3d(0., 1., 0.), 2);
129 Vertex v4(Eigen::Vector3d(0., 0., 1.), 3);
134 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))");
135 BOOST_TEST(t1string == stream.
str());
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
#define PRECICE_TEST(...)
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.