OpenFPM  5.2.0
Project that contain the implementation of distributed structures
particle_cp_redistancing< particles_in_type, phi_field, closest_point_field, normal_field, curvature_field, num_minter_coeffs > Class Template Reference

Class for reinitializing a level-set function into a signed distance function using the Closest-Point method on particles. More...

#include <particle_cp.hpp>

Public Member Functions

 particle_cp_redistancing (particles_in_type &vd, Redist_options &redistOptions)
 
void run_redistancing ()
 
void redistance_separate_particle_set (particles_in_type &vd_generic)
 
particles_in_type initialize_surface_discretization ()
 
template<size_t prp_id, size_t prp_id_to>
void regress_field (particles_in_type &vd_generic)
 

Private Member Functions

int return_sign (double phi)
 
void detect_surface_particles ()
 
void interpolate_sdf_field ()
 
void find_closest_point (particles_in_type &vd_generic)
 
template<typename NNlist_type >
vect_dist_key_dx get_closest_neighbor (Point< dim, double > &xa, NNlist_type &NN_s)
 
particles_in_type format_vd_s ()
 
template<size_t prp_id, size_t prp_id_to>
void regress_field_to_particles (particles_in_type &vd_generic)
 
template<typename PolyType >
double get_p_minter (EMatrix< double, Eigen::Dynamic, 1 > xvector, PolyType model)
 
template<typename PolyType >
EMatrix< double, Eigen::Dynamic, 1 > get_grad_p_minter (EMatrix< double, Eigen::Dynamic, 1 > xvector, PolyType model)
 
template<typename PolyType >
EMatrix< double, Eigen::Dynamic, Eigen::Dynamic > get_H_p_minter (EMatrix< double, Eigen::Dynamic, 1 > xvector, PolyType model)
 
EMatrix< double, Eigen::Dynamic, 1 > get_normal (EMatrix< double, Eigen::Dynamic, 1 > grad_p, float direction)
 
double get_curvature (EMatrix< double, Eigen::Dynamic, 1 > grad_p, EMatrix< double, Eigen::Dynamic, Eigen::Dynamic > H_p)
 

Private Attributes

Redist_options redistOptions
 
particles_in_type & vd_in
 
int dim_r = dim
 
int n_c_r = n_c
 
particles_surface< dim, n_c > vd_s
 
double r_cutoff2
 
RegressionModel< dim, vd_s_sdf > minterModelpcp
 

Static Private Attributes

static constexpr size_t num_neibs = 0
 
static constexpr size_t vd_s_close_part = 1
 
static constexpr size_t vd_s_sdf = 2
 
static constexpr size_t vd_s_sample = 3
 
static constexpr size_t minter_coeff = 4
 
static constexpr size_t vd_in_sdf = phi_field
 
static constexpr size_t vd_in_close_part = 4
 
static constexpr size_t vd_in_normal = normal_field
 
static constexpr size_t vd_in_curvature = curvature_field
 
static constexpr size_t vd_in_cp = closest_point_field
 
static constexpr unsigned int dim = particles_in_type::dims
 
static constexpr unsigned int n_c = num_minter_coeffs
 

Detailed Description

template<typename particles_in_type, size_t phi_field, size_t closest_point_field, size_t normal_field, size_t curvature_field, unsigned int num_minter_coeffs>
class particle_cp_redistancing< particles_in_type, phi_field, closest_point_field, normal_field, curvature_field, num_minter_coeffs >

Class for reinitializing a level-set function into a signed distance function using the Closest-Point method on particles.

The redistancing scheme here is based on Saye, Robert. "High-order methods for computing distances to implicitly defined surfaces." Communications in Applied Mathematics and Computational Science 9.1 (2014): 107-141. Within this file, it has been extended so that it also works on arbitrarily distributed particles. It mainly consists of these steps: Firstly, the particle distribution is assessed and a subset is determined, which will provide a set of sample points. For these, an interpolation of the old signed-distance function values in their support yields a polynomial whose zero level-set reconstructs the surface. The interpolation polynomials are then used to create a collection of sample points on the interface. Finally, a Newton-optimisation is performed in order to determine the closest point on the surface to a given query point, allowing for an update of the signed distance function.

Author
Lennart J. Schulze
Date
October 2021

Definition at line 63 of file particle_cp.hpp.


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