Go to the source code of this file.
◆ TEST_F() [1/6]
Definition at line 79 of file SBMDistanceFunctionTest.C.
80{
81 const Function & near = parsed(
"near",
"x");
82 const Function & far = parsed(
"far",
"x - 10");
83 const std::vector<const Function *> funcs{&near, &far};
84 const Point pt(2, 0, 0);
85
87 EXPECT_NEAR(
d(0), -2.0, 1e-6);
88
90 EXPECT_NEAR(n(0), 1.0, 1e-6);
91}
RealVectorValue closestTrueNormalVector(const std::vector< const Function * > &funcs, const libMesh::Point &pt, Real t)
Scan all distance functions and return the corresponding normal vector.
RealVectorValue closestDistanceVector(const std::vector< const Function * > &funcs, const libMesh::Point &pt, Real t)
Scan all distance functions and return the closest distance vector.
VectorValue< Real > RealVectorValue
◆ TEST_F() [2/6]
Definition at line 48 of file SBMDistanceFunctionTest.C.
49{
50 const Function & phi = parsed(
"phi_x",
"x");
52 EXPECT_NEAR(
d(0), -2.0, 1e-6);
53 EXPECT_NEAR(
d(1), 0.0, 1e-6);
54 EXPECT_NEAR(
d(2), 0.0, 1e-6);
55}
RealVectorValue distanceVectorFromFunction(const Function *func, const libMesh::Point &pt, Real t)
Compute the distance vector induced by a distance function.
◆ TEST_F() [3/6]
◆ TEST_F() [4/6]
Definition at line 68 of file SBMDistanceFunctionTest.C.
69{
70 const Function & phi = parsed(
"phi_x2",
"x");
72 EXPECT_NEAR(n(0), 1.0, 1e-6);
73 EXPECT_NEAR(n(1), 0.0, 1e-6);
74 EXPECT_NEAR(n(2), 0.0, 1e-6);
75}
RealVectorValue trueNormalFromFunction(const Function *func, const libMesh::Point &pt, Real t)
Compute the true boundary surface normal at the point on the boundary closest to pt.
◆ TEST_F() [5/6]
Definition at line 104 of file SBMDistanceFunctionTest.C.
105{
108 const std::vector<const Function *> funcs{&
c};
110}
Real unionSignedDistance(const std::vector< const Function * > &funcs, Real t, const Point &p)
Computes the union signed distance by taking the minimum of all signed distance functions.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
◆ TEST_F() [6/6]