Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
RBFShape< dim > Class Template Reference

#include <shape.h>

Inheritance diagram for RBFShape< dim >:
[legend]

Public Types

enum class  RBFBasisFunction : int {
  CUSTOM , WENDLANDC2 , LINEAR , GAUSS90 ,
  GAUSS95 , GAUSS99 , C1C0 , C2C0 ,
  C0C1 , C1C1 , C2C1 , C0C2 ,
  C1C2 , C2C2 , COS
}
Public Types inherited from Shape< dim >
enum class  ShapeType : std::int8_t {
  sphere , hyper_rectangle , ellipsoid , torus ,
  cone , cylinder , cylindrical_tube , cylindrical_helix ,
  cut_hollow_sphere , death_star , composite , rbf ,
  opencascade , superquadric , plane
}

Public Member Functions

 RBFShape (const std::string &shape_arguments_str, const Point< dim > &position, const Tensor< 1, 3 > &orientation)
void load_data_from_file ()
void remove_superfluous_data (DoFHandler< dim > &dof_handler, const bool mesh_based_precalculations)
double value (const Point< dim > &evaluation_point, const unsigned int component=0) const override
double value_with_cell_guess (const Point< dim > &evaluation_point, const typename DoFHandler< dim >::active_cell_iterator &cell, const unsigned int component=0) override
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) override
Tensor< 1, dim > gradient (const Point< dim > &evaluation_point, const unsigned int component=0) const override
std::shared_ptr< Shape< dim > > static_copy () const override
double displaced_volume () override
void initialize_bounding_box ()
double evaluate_basis_function (const RBFBasisFunction basis_function, const double distance) const
double evaluate_basis_function_derivative (const RBFBasisFunction basis_function, const double distance) const
void determine_likely_nodes_for_one_cell (const typename DoFHandler< dim >::cell_iterator &cell, const Point< dim > support_point)
void update_precalculations (DoFHandler< dim > &updated_dof_handler, const bool mesh_based_precalculations)
void rotate_nodes ()
void swap_iterable_nodes (const typename DoFHandler< dim >::active_cell_iterator &cell)
Public Member Functions inherited from Shape< dim >
 Shape (double radius, const Point< dim > &position, const Tensor< 1, 3 > &orientation)
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 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 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)

Static Public Member Functions

static double wendlandc2 (const double distance)
static double linear (const double distance)
static double gauss90 (const double distance)
static double gauss95 (const double distance)
static double gauss99 (const double distance)
static double c1c0 (const double distance)
static double c2c0 (const double distance)
static double c0c1 (const double distance)
static double c1c1 (const double distance)
static double c2c1 (const double distance)
static double c0c2 (const double distance)
static double c1c2 (const double distance)
static double c2c2 (const double distance)
static double cos (const double distance)
static double wendlandc2_derivative (const double distance)
static double linear_derivative (const double distance)
static double gauss90_derivative (const double distance)
static double gauss95_derivative (const double distance)
static double gauss99_derivative (const double distance)
static double c1c0_derivative (const double distance)
static double c2c0_derivative (const double distance)
static double c0c1_derivative (const double distance)
static double c1c1_derivative (const double distance)
static double c2c1_derivative (const double distance)
static double c0c2_derivative (const double distance)
static double c1c2_derivative (const double distance)
static double c2c2_derivative (const double distance)
static double cosinus_derivative (const double distance)
Static Public Member Functions inherited from Shape< dim >
static double smooth_max (const double a, const double b, const double smooth_factor=10)
static Tensor< 1, 3 > rotation_matrix_to_xyz_angles (Tensor< 2, 3 > &rotation_matrix_representation)

Public Attributes

std::vector< double > weights
std::vector< Point< dim > > nodes_positions
std::vector< Point< dim > > rotated_nodes_positions
std::vector< double > support_radii
std::vector< double > basis_functions
std::vector< bool > useful_rbf_nodes
Public Attributes inherited from Shape< dim >
enum Shape::ShapeType type
double effective_radius
std::string additional_info_on_shape
Tensor< 1, dim > bounding_box_half_length
Point< dim > bounding_box_center

Private Attributes

std::string filename
size_t number_of_nodes
std::shared_ptr< HyperRectangle< dim > > bounding_box
std::vector< std::tuple< Point< dim >, double, std::shared_ptr< std::vector< size_t > > > > iterable_nodes
std::map< const typename DoFHandler< dim >::cell_iterator, std::shared_ptr< std::vector< std::tuple< Point< dim >, double, std::shared_ptr< std::vector< size_t > > > > > > likely_nodes_map
size_t max_number_of_inside_nodes
DoFHandler< dim > * dof_handler
double maximal_support_radius

Additional Inherited Members

Protected Attributes inherited from Shape< dim >
Point< dim > position
Tensor< 1, 3 > orientation
std::unordered_map< std::string, double > value_cache
std::unordered_map< std::string, Tensor< 1, dim > > gradient_cache
std::unordered_map< std::string, Point< dim > > closest_point_cache
bool part_of_a_composite
Tensor< 2, 3 > rotation_matrix
double layer_thickening

Detailed Description

template<int dim>
class RBFShape< dim >

RBF Shapes express the signed distance function as a linear combination of Radial Basis Functions (RBF), which have a defined support radius and basis function. A collection of nodes and weights compose the object. Outside of the domain covered by the nodes, the distance is computed by using the distance to a bounding box instead.

Template Parameters
dimDimension of the shape

Definition at line 2623 of file shape.h.

Member Enumeration Documentation

◆ RBFBasisFunction

template<int dim>
enum class RBFShape::RBFBasisFunction : int
strong

Enum class defining types of RBF kernel functions that could be used in the class.

Class taken from Optimad Bitpit. https://github.com/optimad/bitpit

Enumerator
CUSTOM 
WENDLANDC2 
LINEAR 
GAUSS90 
GAUSS95 
GAUSS99 
C1C0 
C2C0 
C0C1 
C1C1 
C2C1 
C0C2 
C1C2 
C2C2 
COS 

Definition at line 2632 of file shape.h.

Constructor & Destructor Documentation

◆ RBFShape()

template<int dim>
RBFShape< dim >::RBFShape ( const std::string & shape_arguments_str,
const Point< dim > & position,
const Tensor< 1, 3 > & orientation )

An RBFShape represents a physical object by describing its signed distance field with a linear combination of radial basis functions. Each radial basis function has a location and properties that are used in the sum.

Parameters
shape_arguments_strthe name of the file used to load the data
positionthe location of the RBF shape
orientationthe orientation of the shape with respect to each main axis

Definition at line 1614 of file shape.cc.

References basis_functions, filename, iterable_nodes, likely_nodes_map, load_data_from_file(), max_number_of_inside_nodes, maximal_support_radius, nodes_positions, number_of_nodes, Shape< dim >::orientation, Shape< dim >::position, Shape< dim >::Shape(), support_radii, useful_rbf_nodes, and weights.

Member Function Documentation

◆ c0c1()

template<int dim>
double RBFShape< dim >::c0c1 ( const double distance)
inlinestatic

Compact polynomial function defined from 0 to 1. It preserves C0 continuity at distance=0, and C1 continuity at distance=1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 2893 of file shape.h.

◆ c0c1_derivative()

template<int dim>
double RBFShape< dim >::c0c1_derivative ( const double distance)
inlinestatic

Derivative of a compact polynomial function defined from 0 to 1. It preserves C0 continuity at distance=0, and C1 continuity at distance=1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 3071 of file shape.h.

◆ c0c2()

template<int dim>
double RBFShape< dim >::c0c2 ( const double distance)
inlinestatic

Compact polynomial function defined from 0 to 1. It preserves C0 continuity at distance=0, and C2 continuity at distance=1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 2934 of file shape.h.

◆ c0c2_derivative()

template<int dim>
double RBFShape< dim >::c0c2_derivative ( const double distance)
inlinestatic

Derivative of a compact polynomial function defined from 0 to 1. It preserves C0 continuity at distance=0, and C2 continuity at distance=1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 3108 of file shape.h.

◆ c1c0()

template<int dim>
double RBFShape< dim >::c1c0 ( const double distance)
inlinestatic

Compact polynomial function defined from 0 to 1. It preserves C1 continuity at distance=0, and C0 continuity at distance=1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 2869 of file shape.h.

◆ c1c0_derivative()

template<int dim>
double RBFShape< dim >::c1c0_derivative ( const double distance)
inlinestatic

Derivative of a compact polynomial function defined from 0 to 1. It preserves C1 continuity at distance=0, and C0 continuity at distance=1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 3047 of file shape.h.

◆ c1c1()

template<int dim>
double RBFShape< dim >::c1c1 ( const double distance)
inlinestatic

Compact polynomial function defined from 0 to 1. It preserves C1 continuity at distance=0, and C1 continuity at distance=1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 2906 of file shape.h.

◆ c1c1_derivative()

template<int dim>
double RBFShape< dim >::c1c1_derivative ( const double distance)
inlinestatic

Derivative of a compact polynomial function defined from 0 to 1. It preserves C1 continuity at distance=0, and C1 continuity at distance=1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 3083 of file shape.h.

◆ c1c2()

template<int dim>
double RBFShape< dim >::c1c2 ( const double distance)
inlinestatic

Compact polynomial function defined from 0 to 1. It preserves C1 continuity at distance=0, and C2 continuity at distance=1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 2949 of file shape.h.

◆ c1c2_derivative()

template<int dim>
double RBFShape< dim >::c1c2_derivative ( const double distance)
inlinestatic

Derivative of a compact polynomial function defined from 0 to 1. It preserves C1 continuity at distance=0, and C2 continuity at distance=1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 3120 of file shape.h.

◆ c2c0()

template<int dim>
double RBFShape< dim >::c2c0 ( const double distance)
inlinestatic

Compact polynomial function defined from 0 to 1. It preserves C2 continuity at distance=0, and C0 continuity at distance=1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 2881 of file shape.h.

◆ c2c0_derivative()

template<int dim>
double RBFShape< dim >::c2c0_derivative ( const double distance)
inlinestatic

Derivative of a compact polynomial function defined from 0 to 1. It preserves C2 continuity at distance=0, and C0 continuity at distance=1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 3059 of file shape.h.

◆ c2c1()

template<int dim>
double RBFShape< dim >::c2c1 ( const double distance)
inlinestatic

Compact polynomial function defined from 0 to 1. It preserves C2 continuity at distance=0, and C1 continuity at distance=1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 2920 of file shape.h.

◆ c2c1_derivative()

template<int dim>
double RBFShape< dim >::c2c1_derivative ( const double distance)
inlinestatic

Derivative of a compact polynomial function defined from 0 to 1. It preserves C2 continuity at distance=0, and C1 continuity at distance=1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 3095 of file shape.h.

◆ c2c2()

template<int dim>
double RBFShape< dim >::c2c2 ( const double distance)
inlinestatic

Compact polynomial function defined from 0 to 1. It preserves C2 continuity at distance=0, and C2 continuity at distance=1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 2964 of file shape.h.

◆ c2c2_derivative()

template<int dim>
double RBFShape< dim >::c2c2_derivative ( const double distance)
inlinestatic

Derivative of a compact polynomial function defined from 0 to 1. It preserves C2 continuity at distance=0, and C2 continuity at distance=1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 3135 of file shape.h.

◆ cos()

template<int dim>
double RBFShape< dim >::cos ( const double distance)
inlinestatic

Compact cosinusoidal basis function. It is null when r>1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 2977 of file shape.h.

◆ cosinus_derivative()

template<int dim>
double RBFShape< dim >::cosinus_derivative ( const double distance)
inlinestatic

Derivative of a compact cosinusoidal basis function. It preserves continuity at every point.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 3148 of file shape.h.

◆ determine_likely_nodes_for_one_cell()

template<int dim>
void RBFShape< dim >::determine_likely_nodes_for_one_cell ( const typename DoFHandler< dim >::cell_iterator & cell,
const Point< dim > support_point )

Establishes which nodes bring a non null contribution to the RBF.

Parameters
cellthe cell for which the likely nodes are to be found
support_pointone point that is located inside the cell

Definition at line 2035 of file shape.cc.

References iterable_nodes, likely_nodes_map, and maximal_support_radius.

◆ displaced_volume()

template<int dim>
double RBFShape< dim >::displaced_volume ( )
overridevirtual

Return the volume displaced by the solid.

Reimplemented from Shape< dim >.

Definition at line 1820 of file shape.cc.

References bounding_box.

◆ evaluate_basis_function()

template<int dim>
double RBFShape< dim >::evaluate_basis_function ( const RBFBasisFunction basis_function,
const double distance ) const
inline

Returns the value of the basis function for a given distance. Inspired by Optimad Bitpit. https://github.com/optimad/bitpit.

Parameters
basis_functionbasis function to be used for calculation
distancedistance to the node normalized by the support radius

Definition at line 2257 of file shape.cc.

References C0C1, c0c1(), C0C2, c0c2(), C1C0, c1c0(), C1C1, c1c1(), C1C2, c1c2(), C2C0, c2c0(), C2C1, c2c1(), C2C2, c2c2(), COS, cos(), GAUSS90, gauss90(), GAUSS95, gauss95(), GAUSS99, gauss99(), LINEAR, linear(), WENDLANDC2, and wendlandc2().

◆ evaluate_basis_function_derivative()

template<int dim>
double RBFShape< dim >::evaluate_basis_function_derivative ( const RBFBasisFunction basis_function,
const double distance ) const
inline

Returns the derivative of the basis function for a given distance. Inspired by Optimad Bitpit. https://github.com/optimad/bitpit.

Parameters
basis_functionbasis function to be used for calculation
distancedistance to the node normalized by the support radius

Definition at line 2297 of file shape.cc.

References C0C1, c0c1_derivative(), C0C2, c0c2_derivative(), C1C0, c1c0_derivative(), C1C1, c1c1_derivative(), C1C2, c1c2_derivative(), C2C0, c2c0_derivative(), C2C1, c2c1_derivative(), C2C2, c2c2_derivative(), COS, cosinus_derivative(), GAUSS90, gauss90_derivative(), GAUSS95, gauss95_derivative(), GAUSS99, gauss99_derivative(), LINEAR, linear_derivative(), WENDLANDC2, and wendlandc2_derivative().

◆ gauss90()

template<int dim>
double RBFShape< dim >::gauss90 ( const double distance)
inlinestatic

Non-compact Gaussian function with 0.1 value at distance equal to 1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 2834 of file shape.h.

◆ gauss90_derivative()

template<int dim>
double RBFShape< dim >::gauss90_derivative ( const double distance)
inlinestatic

Derivative of a non-compact Gaussian function with 0.1 value at distance equal to 1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 3009 of file shape.h.

◆ gauss95()

template<int dim>
double RBFShape< dim >::gauss95 ( const double distance)
inlinestatic

Non-compact Gaussian function with 0.05 value at distance equal to 1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 2845 of file shape.h.

◆ gauss95_derivative()

template<int dim>
double RBFShape< dim >::gauss95_derivative ( const double distance)
inlinestatic

Derivative of a non-compact Gaussian function with 0.05 value at distance equal to 1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 3021 of file shape.h.

◆ gauss99()

template<int dim>
double RBFShape< dim >::gauss99 ( const double distance)
inlinestatic

Non-compact Gaussian function with 0.01 value at distance equal to 1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 2856 of file shape.h.

◆ gauss99_derivative()

template<int dim>
double RBFShape< dim >::gauss99_derivative ( const double distance)
inlinestatic

Derivative of a non-compact Gaussian function with 0.01 value at distance equal to 1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 3033 of file shape.h.

◆ gradient()

template<int dim>
Tensor< 1, dim > RBFShape< dim >::gradient ( const Point< dim > & evaluation_point,
const unsigned int component = 0 ) const
override

Return the analytical gradient of the distance for the current RBF.

Parameters
evaluation_pointThe point at which the function will be evaluated
componentThis parameter is not used, but it is necessary because Shapes inherit from the Function class of deal.II.

Definition at line 1736 of file shape.cc.

References basis_functions, bounding_box, Shape< dim >::effective_radius, evaluate_basis_function_derivative(), gradient(), iterable_nodes, rotated_nodes_positions, support_radii, and weights.

◆ gradient_with_cell_guess()

template<int dim>
Tensor< 1, dim > RBFShape< dim >::gradient_with_cell_guess ( const Point< dim > & evaluation_point,
const typename DoFHandler< dim >::active_cell_iterator & cell,
const unsigned int component = 0 )
overridevirtual

Return the analytical gradient of the distance.

Parameters
evaluation_pointThe point at which the function will be evaluated
cellThe cell that is likely to contain the evaluation point
componentThis parameter is not used, but it is necessary because Shapes inherit from the Function class of deal.II.

Reimplemented from Shape< dim >.

Definition at line 1665 of file shape.cc.

References bounding_box, gradient(), Shape< dim >::gradient_cache, Shape< dim >::part_of_a_composite, Shape< dim >::point_to_string(), and swap_iterable_nodes().

◆ initialize_bounding_box()

template<int dim>
void RBFShape< dim >::initialize_bounding_box ( )

Initializes the bounding box around the nodes which enables distance calculation even if the RBF nodes don't cover the whole domain.

A bounding box is constructed around the collection of nodes defining the RBF. It solves an issue where the collection of nodes is located only around the object itself, which would result in an undefined distance when the value is evaluated outside of all support radii. The hyper rectangle shape doesn't have this limitation, as its distance can be evaluated anywhere. The distance computed by an RBF object will therefore use an approximated distance when the evaluation point is too far.

Definition at line 1827 of file shape.cc.

References bounding_box, Shape< dim >::bounding_box_center, Shape< dim >::bounding_box_half_length, nodes_positions, number_of_nodes, Shape< dim >::orientation, and Shape< dim >::reverse_align_and_center().

◆ linear()

template<int dim>
double RBFShape< dim >::linear ( const double distance)
inlinestatic

Compact linear function defined from 0 to 1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 2824 of file shape.h.

◆ linear_derivative()

template<int dim>
double RBFShape< dim >::linear_derivative ( const double distance)
inlinestatic

Derivative of a compact linear function defined from 0 to 1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 2999 of file shape.h.

◆ load_data_from_file()

template<int dim>
void RBFShape< dim >::load_data_from_file ( )

Load RBF data from file. To be called at initialization, after repartitioning or when shape has moved. This function is used only for RBF shapes and its composites at the moment.

Definition at line 2100 of file shape.cc.

References basis_functions, bounding_box, Shape< dim >::effective_radius, filename, fill_vectors_from_file(), initialize_bounding_box(), iterable_nodes, maximal_support_radius, nodes_positions, number_of_nodes, rotate_nodes(), rotated_nodes_positions, support_radii, useful_rbf_nodes, and weights.

◆ remove_superfluous_data()

template<int dim>
void RBFShape< dim >::remove_superfluous_data ( DoFHandler< dim > & dof_handler,
const bool mesh_based_precalculations )

Remove data that affects only artificial cells (not locally owned and not ghost). The data is removed if it would never be accessed by the local process.

Parameters
dof_handlerthe reference to the new dof_handler
mesh_based_precalculationsmesh-based precalculations that can lead to slight shape misrepresentation (if RBF typed)

Definition at line 2148 of file shape.cc.

References basis_functions, iterable_nodes, likely_nodes_map, number_of_nodes, rotated_nodes_positions, support_radii, update_precalculations(), useful_rbf_nodes, and weights.

◆ rotate_nodes()

template<int dim>
void RBFShape< dim >::rotate_nodes ( )

Rotate RBF nodes in the global reference frame (the reference frame of the triangulation).

Definition at line 2244 of file shape.cc.

References nodes_positions, Shape< dim >::reverse_align_and_center(), rotated_nodes_positions, and weights.

◆ static_copy()

template<int dim>
std::shared_ptr< Shape< dim > > RBFShape< dim >::static_copy ( ) const
overridevirtual

Return a pointer to a copy of the Shape.

Implements Shape< dim >.

Definition at line 1809 of file shape.cc.

References filename, Shape< dim >::orientation, and Shape< dim >::position.

◆ swap_iterable_nodes()

template<int dim>
void RBFShape< dim >::swap_iterable_nodes ( const typename DoFHandler< dim >::active_cell_iterator & cell)

Swap the vector of all nodes with a likely node vector.

Parameters
cellA likely one where the evaluation point is located

Definition at line 2338 of file shape.cc.

References iterable_nodes, and likely_nodes_map.

◆ update_precalculations()

template<int dim>
void RBFShape< dim >::update_precalculations ( DoFHandler< dim > & updated_dof_handler,
const bool mesh_based_precalculations )

Sets the proper dof handler, then computes/updates the map of cells and their likely non-null nodes.

Parameters
updated_dof_handlerthe reference to the new dof_handler
mesh_based_precalculationsmesh-based precalculations that can lead to slight shape misrepresentation (if RBF typed)

Definition at line 1860 of file shape.cc.

References determine_likely_nodes_for_one_cell(), dof_handler, iterable_nodes, likely_nodes_map, max_number_of_inside_nodes, maximal_support_radius, number_of_nodes, rotated_nodes_positions, useful_rbf_nodes, and weights.

◆ value()

template<int dim>
double RBFShape< dim >::value ( const Point< dim > & evaluation_point,
const unsigned int component = 0 ) const
overridevirtual

Return the evaluation of the signed distance function of this solid at the given point evaluation point. The computation and addition of the bounding box distance are necessary since the RBF nodes may not cover the whole simulation domain. In that case, it is assumed that the distance from the RBF object is approximately the same as the distance from the corresponding bounding box.

Parameters
evaluation_pointThe point at which the function will be evaluated
componentThis parameter is not used, but it is necessary because Shapes inherit from the Function class of deal.II.

Implements Shape< dim >.

Definition at line 1697 of file shape.cc.

References basis_functions, bounding_box, Shape< dim >::effective_radius, evaluate_basis_function(), iterable_nodes, Shape< dim >::layer_thickening, Shape< dim >::point_to_string(), rotated_nodes_positions, support_radii, value(), Shape< dim >::value_cache, and weights.

◆ value_with_cell_guess()

template<int dim>
double RBFShape< dim >::value_with_cell_guess ( const Point< dim > & evaluation_point,
const typename DoFHandler< dim >::active_cell_iterator & cell,
const unsigned int component = 0 )
overridevirtual

Return the evaluation of the signed distance function of this solid at the given point evaluation point with a guess for the cell containing the evaluation point.

Parameters
evaluation_pointThe point at which the function will be evaluated
cellThe cell that is likely to contain the evaluation point
componentThis parameter is not used, but it is necessary because Shapes inherit from the Function class of deal.II.

Reimplemented from Shape< dim >.

Definition at line 1635 of file shape.cc.

References bounding_box, Shape< dim >::effective_radius, Shape< dim >::part_of_a_composite, Shape< dim >::point_to_string(), swap_iterable_nodes(), value(), and Shape< dim >::value_cache.

◆ wendlandc2()

template<int dim>
double RBFShape< dim >::wendlandc2 ( const double distance)
inlinestatic

Compact Wendland C2 function defined from 0 to 1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 2812 of file shape.h.

◆ wendlandc2_derivative()

template<int dim>
double RBFShape< dim >::wendlandc2_derivative ( const double distance)
inlinestatic

Derivative of a compact Wendland C2 function defined from 0 to 1.

Parameters
distancedistance to the node normalized by the support radius

Definition at line 2988 of file shape.h.

Member Data Documentation

◆ basis_functions

template<int dim>
std::vector<double> RBFShape< dim >::basis_functions

Definition at line 3196 of file shape.h.

◆ bounding_box

template<int dim>
std::shared_ptr<HyperRectangle<dim> > RBFShape< dim >::bounding_box
private

Definition at line 3164 of file shape.h.

◆ dof_handler

template<int dim>
DoFHandler<dim>* RBFShape< dim >::dof_handler
private

Definition at line 3187 of file shape.h.

◆ filename

template<int dim>
std::string RBFShape< dim >::filename
private

Definition at line 3162 of file shape.h.

◆ iterable_nodes

template<int dim>
std::vector< std::tuple<Point<dim>, double, std::shared_ptr<std::vector<size_t> > > > RBFShape< dim >::iterable_nodes
private

Definition at line 3170 of file shape.h.

◆ likely_nodes_map

template<int dim>
std::map< const typename DoFHandler<dim>::cell_iterator, std::shared_ptr<std::vector< std::tuple<Point<dim>, double, std::shared_ptr<std::vector<size_t> > > > > > RBFShape< dim >::likely_nodes_map
private

Definition at line 3185 of file shape.h.

◆ max_number_of_inside_nodes

template<int dim>
size_t RBFShape< dim >::max_number_of_inside_nodes
private

Definition at line 3186 of file shape.h.

◆ maximal_support_radius

template<int dim>
double RBFShape< dim >::maximal_support_radius
private

Definition at line 3189 of file shape.h.

◆ nodes_positions

template<int dim>
std::vector<Point<dim> > RBFShape< dim >::nodes_positions

Definition at line 3193 of file shape.h.

◆ number_of_nodes

template<int dim>
size_t RBFShape< dim >::number_of_nodes
private

Definition at line 3163 of file shape.h.

◆ rotated_nodes_positions

template<int dim>
std::vector<Point<dim> > RBFShape< dim >::rotated_nodes_positions

Definition at line 3194 of file shape.h.

◆ support_radii

template<int dim>
std::vector<double> RBFShape< dim >::support_radii

Definition at line 3195 of file shape.h.

◆ useful_rbf_nodes

template<int dim>
std::vector<bool> RBFShape< dim >::useful_rbf_nodes

Definition at line 3197 of file shape.h.

◆ weights

template<int dim>
std::vector<double> RBFShape< dim >::weights

Definition at line 3192 of file shape.h.


The documentation for this class was generated from the following files: