40 const unsigned int component)
const
53 const unsigned int component)
const
68 const unsigned int component)
const
74 const double distance = center_to_point.
norm();
99 const unsigned int component)
const
135 const std::array<double, dim> &
radii,
143 for (
unsigned int d = 0; d < dim; ++d)
152 const unsigned int component)
const
172 const unsigned int component)
const
182 const Point<dim> point_in_centered_coordinate_system =
185 point_in_centered_coordinate_system);
190 if (grad.
norm() > 1e-12)
191 return grad / grad.
norm();
203 for (
unsigned int d = 0; d < dim; ++d)
233 const double sign_px = std::copysign(1.0, point[0] -
center[0]);
234 const double sign_py = std::copysign(1.0, point[1] -
center[1]);
236 const double &a =
radii[0];
237 const double &b =
radii[1];
243 unsigned int iter = 0;
253 const double rx = x - ex;
254 const double ry = y - ey;
256 const double qx = px - ex;
257 const double qy = py - ey;
259 const double r = std::hypot(rx, ry);
261 const double q = std::hypot(qx, qy);
263 const double delta_c = r *
std::asin((rx * qy - ry * qx) / (r * q));
265 delta_t = delta_c /
std::sqrt(a * a + b * b - x * x - y * y);
300 const auto &a =
radii[0];
301 const auto &b =
radii[1];
302 const auto &x = point[0];
303 const auto &y = point[1];
325 return *std::min_element(
radii.begin(),
radii.end()) * -1.;
329 const double distance =
330 std::hypot(closest_point[0] - point[0], closest_point[1] - point[1]);
355 const unsigned int component)
const
368 const double notch_width,
369 const double notch_height)
373 Point<dim>(center[0] - 0.5 * notch_width) :
375 Point<dim>(center[0] - 0.5 * notch_width,
376 std::numeric_limits<double>::lowest()) :
377 Point<dim>(center[0] - 0.5 * notch_width,
380 std::numeric_limits<double>::lowest()),
383 Point<dim>(center[0] + 0.5 * notch_width) :
385 Point<dim>(center[0] + 0.5 * notch_width,
386 center[1] + notch_height - radius) :
387 Point<dim>(center[0] + 0.5 * notch_width,
390 center[2] + notch_height - radius))
393 notch_width <= 2 * radius,
395 "The width of the notch must be less than the circle diameter."));
397 notch_height <= 2 * radius,
399 "The height of the notch must be less than the circle diameter."));
407 const unsigned int component)
const
419#include "function_signed_distance.inst"
const unsigned int n_components
double value(const Point< dim > &point, const unsigned int component=0) const override
Tensor< 1, dim > gradient(const Point< dim > &, const unsigned int component=0) const override
double compute_signed_distance_ellipse(const Point< dim > &point) const
Point< dim > compute_closest_point_ellipse(const Point< dim > &point) const
Ellipsoid(const Point< dim > ¢er, const std::array< double, dim > &radii, const double tolerance=1e-14, const unsigned int max_iter=10)
double evaluate_ellipsoid(const Point< dim > &point) const
const unsigned int max_iter
const std::array< double, dim > radii
const Point< dim > center
Tensor< 1, dim, double > compute_analyical_normal_vector_on_ellipse(const Point< dim > &point) const
const Point< dim > point_in_plane
Plane(const Point< dim > &point, const Tensor< 1, dim > &normal)
double value(const Point< dim > &point, const unsigned int component=0) const override
SymmetricTensor< 2, dim > hessian(const Point< dim > &, const unsigned int component=0) const override
Tensor< 1, dim > gradient(const Point< dim > &, const unsigned int component=0) const override
const Tensor< 1, dim > normal
double value(const Point< dim > &p, const unsigned int component=0) const override
Rectangle(const Point< dim > &bottom_left, const Point< dim > &top_right)
const BoundingBox< dim > bounding_box
Sphere(const Point< dim > ¢er=Point< dim >(), const double radius=1)
SymmetricTensor< 2, dim > hessian(const Point< dim > &point, const unsigned int component=0) const override
double value(const Point< dim > &point, const unsigned int component=0) const override
Tensor< 1, dim > gradient(const Point< dim > &point, const unsigned int component=0) const override
const Point< dim > center
ZalesakDisk(const Point< dim > ¢er, const double radius, const double notch_width, const double notch_height)
const Functions::SignedDistance::Sphere< dim > sphere
double value(const Point< dim > &p, const unsigned int component=0) const override
const Functions::SignedDistance::Rectangle< dim > notch
numbers::NumberTraits< Number >::real_type distance(const Point< dim, Number > &p) const
numbers::NumberTraits< Number >::real_type norm() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
#define AssertIsFinite(number)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
#define DEAL_II_NOT_IMPLEMENTED()
constexpr T fixed_power(const T t)
static constexpr double PI_2
static constexpr double PI_4
::VectorizedArray< Number, width > min(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > cos(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > sin(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > sqrt(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)
inline ::VectorizedArray< Number, width > asin(const ::VectorizedArray< Number, width > &x)
DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > symmetrize(const Tensor< 2, dim, Number > &t)
DEAL_II_HOST constexpr SymmetricTensor< 4, dim, Number > outer_product(const SymmetricTensor< 2, dim, Number > &t1, const SymmetricTensor< 2, dim, Number > &t2)
DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > unit_symmetric_tensor()