OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
closest_point.hpp File Reference

Functions for level set reinitialization and extension on OpenFPM grids based on closest point method. More...

#include "algoim_hocp.hpp"

Go to the source code of this file.

Data Structures

struct  AlgoimWrapper< grid_type, grid_key_type, dim, wrapping_field >
 

Functions

template<typename grid_type , typename grid_key_type , unsigned int poly_order, size_t phi_field, size_t cp_field>
void estimateClosestPoint (grid_type &gd, const double nb_gamma)
 Computes the closest point coordinate for each grid point within nb_gamma from interface. More...
 
template<typename grid_type , typename grid_key_type , unsigned int poly_order, size_t phi_field, size_t cp_field, size_t extend_field, size_t extend_field_temp>
void extendLSField (grid_type &gd, const double nb_gamma)
 Extends a (scalar) field to within nb_gamma from interface. The grid should have level set SDF and closest point field. More...
 
template<typename grid_type , typename grid_key_type , unsigned int poly_order, size_t phi_field, size_t cp_field>
void reinitializeLS (grid_type &gd, const double nb_gamma)
 Reinitializes the level set Phi field on a grid. The grid should have level set SDF and closest point field. More...
 

Variables

constexpr int algoim_padding = 4
 

Detailed Description

Functions for level set reinitialization and extension on OpenFPM grids based on closest point method.

Wrapping container to pass OpenFPM grid property values to Algoim library.

Depends on Algoim library for higher order closest point calculations and constructing stencil interpolating polynomials.

Author
Sachin Krishnan T V
Date
May 2021

Definition in file closest_point.hpp.

Function Documentation

◆ estimateClosestPoint()

template<typename grid_type , typename grid_key_type , unsigned int poly_order, size_t phi_field, size_t cp_field>
void estimateClosestPoint ( grid_type gd,
const double  nb_gamma 
)

Computes the closest point coordinate for each grid point within nb_gamma from interface.

Template Parameters
grid_typeType of the grid container
grid_key_typeType of the key for the grid container
dimDimension of the space
poly_orderOrder of the polynomial for stencil interpolation (orders between 2 to 5 is supported)
phi_fieldProperty id on grid for the level set SDF
cp_fieldProperty id on grid for storing closest point coordinates
Parameters
gdThe distributed grid containing at least level set SDF field and placeholder for closest point coordinates
nb_gammaThe width of the narrow band within which closest point estimation is to be done

Definition at line 72 of file closest_point.hpp.

◆ extendLSField()

template<typename grid_type , typename grid_key_type , unsigned int poly_order, size_t phi_field, size_t cp_field, size_t extend_field, size_t extend_field_temp>
void extendLSField ( grid_type gd,
const double  nb_gamma 
)

Extends a (scalar) field to within nb_gamma from interface. The grid should have level set SDF and closest point field.

Template Parameters
grid_typeType of the grid container
grid_key_typeType of the key for the grid container
dimDimension of the space
poly_orderOrder of the polynomial for stencil interpolation
phi_fieldProperty id on grid for the level set SDF
cp_fieldProperty id on grid for storing closest point coordinates
extend_fieldProperty id on grid where the field to be extended resides
extend_field_tempProperty id on grid for storing temporary intermediate values
Parameters
gdThe distributed grid containing atleast level set SDF field and closest point coordinates
nb_gammaThe width of the narrow band within which extension is required

Definition at line 164 of file closest_point.hpp.

◆ reinitializeLS()

template<typename grid_type , typename grid_key_type , unsigned int poly_order, size_t phi_field, size_t cp_field>
void reinitializeLS ( grid_type gd,
const double  nb_gamma 
)

Reinitializes the level set Phi field on a grid. The grid should have level set SDF and closest point field.

Template Parameters
grid_typeType of the grid container
grid_key_typeType of the key for the grid container
dimDimension of the space
poly_orderOrder of the polynomial for stencil interpolation
phi_fieldProperty id on grid for the level set SDF
cp_fieldProperty id on grid for storing closest point coordinates
Parameters
gdThe distributed grid containing atleast level set SDF field and closest point coordinates
nb_gammaThe width of the narrow band for reinitialization

Definition at line 235 of file closest_point.hpp.