|
| | Shape (double radius, const Point< dim > &position, const Tensor< 1, 3 > &orientation) |
| virtual double | value (const Point< dim > &evaluation_point, const unsigned int component=0) const override=0 |
| virtual double | value_with_cell_guess (const Point< dim > &evaluation_point, const typename DoFHandler< dim >::active_cell_iterator &cell, const unsigned int component=0) |
| virtual std::tuple< double, Tensor< 1, dim >, Point< dim > > | distance_to_shape_with_cell_guess (Shape< dim > &shape, const typename DoFHandler< dim >::active_cell_iterator &cell, std::vector< Point< dim > > &candidate_points, double precision=1e-6, bool exact_distance_outside_of_contact=false) |
| virtual std::tuple< double, Tensor< 1, dim >, Point< dim > > | distance_to_shape (Shape< dim > &shape, std::vector< Point< dim > > &candidate_points, double precision=1e-6, bool exact_distance_outside_of_contact=false) |
| bool | bounding_box_contact (Shape< dim > &shape) |
| virtual Tensor< 1, dim > | gradient_with_cell_guess (const Point< dim > &evaluation_point, const typename DoFHandler< dim >::active_cell_iterator &cell, const unsigned int component=0) |
| virtual std::shared_ptr< Shape< dim > > | static_copy () const =0 |
| virtual void | closest_surface_point (const Point< dim > &p, Point< dim > &closest_point, const typename DoFHandler< dim >::active_cell_iterator &cell_guess) |
| virtual void | closest_surface_point (const Point< dim > &p, Point< dim > &closest_point) const |
| virtual double | displaced_volume () |
| virtual double | local_curvature_radius (Point< dim > p) |
| virtual double | local_curvature_radius_with_cell_guess (const Point< dim > &p, const typename DoFHandler< dim >::active_cell_iterator &cell) |
| virtual void | set_position (const Point< dim > &new_position) |
| virtual void | set_orientation (const Tensor< 1, 3 > &new_orientation) |
| virtual Point< dim > | get_position () |
| virtual Tensor< 1, 3 > | get_orientation () |
| virtual Tensor< 2, 3 > | get_rotation_matrix () |
| virtual Tensor< 1, dim > | get_bounding_box_half_length () |
| virtual Point< dim > | get_bounding_box_center () |
| virtual std::shared_ptr< Manifold< dim - 1, dim > > | get_shape_manifold () |
| virtual void | clear_cache () |
| Point< dim > | align_and_center (const Point< dim > &evaluation_point) const |
| Point< dim > | reverse_align_and_center (const Point< dim > &evaluation_point) const |
| std::string | point_to_string (const Point< dim > &evaluation_point) const |
| void | set_part_of_a_composite (const bool is_part_of_a_composite) |
| virtual void | set_layer_thickening (const double the_layer_thickening) |
template<int dim>
class Shape< dim >
A base class used to represent geometrical entities. Its main uses are to return signed distance and its gradient. It inherits AutoDerivativeFunction so that it can evaluate gradients even when they are not implemented analytically.
- Template Parameters
-
| dim | An integer that denotes the dimension of the space in which the flow is solved |
Definition at line 52 of file shape.h.
template<int dim>
| Point< dim > Shape< dim >::align_and_center |
( |
const Point< dim > & | evaluation_point | ) |
const |
Most value functions assume that the particle's position is at the origin and that the shape is aligned with one of the main axes. This function returns a point that is rotated and translated, in accordance with the current shape position and orientation, so that subsequent calculations for the value function are made more easily; it abstracts a step that is required in the value function for most shapes.
Returns the centered and aligned point used on the level set evaluation.
- Parameters
-
| evaluation_point | The point that will be recentered and realigned |
- Returns
- The aligned and centered point
Definition at line 44 of file shape.cc.
References effective_radius, orientation, and position.
template<int dim>
| bool Shape< dim >::bounding_box_contact |
( |
Shape< dim > & | shape | ) |
|
|
inline |
template<int dim>
| virtual std::tuple< double, Tensor< 1, dim >, Point< dim > > Shape< dim >::distance_to_shape |
( |
Shape< dim > & | shape, |
|
|
std::vector< Point< dim > > & | candidate_points, |
|
|
double | precision = 1e-6, |
|
|
bool | exact_distance_outside_of_contact = false ) |
|
inlinevirtual |
Return the distance, the center point, and the normal between the current shape and the shape given in the argument. The center point is the point where both shapes are at the same distance from each other. The normal is defined using the closest surface point on the two shapes. By default, the function does not calculate the distance between the two shapes if their bounding boxes are not in contact. This behavior can be modified using the appropriate parameter.
- Parameters
-
| shape | The shape with which the distance is evaluated |
| candidate_points | This is the initial guess points used in the calculation. |
| precision | This is the precision of the distance between the two shapes. |
| exact_distance_outside_of_contact | This is a boolean to force the exact distance evaluation if the shapes are not in contact. |
Reimplemented in Sphere< dim >.
Definition at line 450 of file shape.h.
References bounding_box_center, bounding_box_contact(), bounding_box_half_length, closest_surface_point(), effective_radius, point_nd_to_3d(), position, rotation_matrix, Shape(), smooth_max(), tensor_nd_to_2d(), and value().
template<int dim>
| virtual std::tuple< double, Tensor< 1, dim >, Point< dim > > Shape< dim >::distance_to_shape_with_cell_guess |
( |
Shape< dim > & | shape, |
|
|
const typename DoFHandler< dim >::active_cell_iterator & | cell, |
|
|
std::vector< Point< dim > > & | candidate_points, |
|
|
double | precision = 1e-6, |
|
|
bool | exact_distance_outside_of_contact = false ) |
|
inlinevirtual |
Return the distance, the center point, and the unit normal vector between the current shape and the shape given in the argument. The center point is the point where both shapes are at the same distance from each other. The unit normal vector is defined using the closest surface point of the two shapes. By default, the function does not calculate the distance between the two shapes if their bounding boxes are not in contact. This behavior can be modified by setting exact_distance_outside_of_contact to true.
- Parameters
-
| shape | The shape with which the distance is evaluated |
| cell | The cell that is likely to contain the evaluation point |
| candidate_points | This is the initial guess points used in the calculation. |
| precision | This is the precision of the distance between the two shapes. |
| exact_distance_outside_of_contact | This is a boolean to force the exact distance evaluation if the shapes are not in contact. |
Reimplemented in Sphere< dim >.
Definition at line 147 of file shape.h.
References bounding_box_center, bounding_box_contact(), bounding_box_half_length, closest_surface_point(), effective_radius, gradient_with_cell_guess(), point_nd_to_3d(), position, rotation_matrix, Shape(), smooth_max(), tensor_nd_to_2d(), and value_with_cell_guess().
template<int dim>
| Point< dim > Shape< dim >::reverse_align_and_center |
( |
const Point< dim > & | evaluation_point | ) |
const |
This function applies the inverse operation of align_and_center.
Returns the centered and aligned point used on the level set evaluation in the global reference frame.
- Parameters
-
| evaluation_point | The point that will be centered and aligned in the global reference frame. |
- Returns
- The aligned and centered point
Definition at line 122 of file shape.cc.
References effective_radius, orientation, and position.
template<int dim>
| virtual double Shape< dim >::value |
( |
const Point< dim > & | evaluation_point, |
|
|
const unsigned int | component = 0 ) const |
|
overridepure virtual |
Return the evaluation of the signed distance function of this solid at the given point evaluation point Most level set functions implemented come from Inigo Quilez: iquilezles.org/articles/distfunctions.
- Parameters
-
| evaluation_point | The point at which the function will be evaluated |
| component | This parameter is not used, but it is necessary because Shapes inherit from the Function class of deal.II. |
Implemented in CompositeShape< dim >, Cone< dim >, CutHollowSphere< dim >, Cylinder< dim >, CylindricalHelix< dim >, CylindricalTube< dim >, DeathStar< dim >, Ellipsoid< dim >, HyperRectangle< dim >, OpenCascadeShape< dim >, Plane< dim >, RBFShape< dim >, Sphere< dim >, Superquadric< dim >, and Torus< dim >.