Class for getting the narrow band around the interface. More...
Class for getting the narrow band around the interface.
Places particle at those grid point positions, which lay inside a narrow band of user-defined width around the interface. The respective SDF or arbitrary other property value is then also copied from the grid node to that particle occupying the same position.
grid_in_type | Template type of input grid that stores the signed distance function Phi_SDF. |
Definition at line 42 of file NarrowBand.hpp.
#include <NarrowBand.hpp>
Public Types | |
typedef aggregate< phi_type, phi_type[grid_in_type::dims], int > | props_temp |
Aggregated properties for the temporary grid. | |
typedef grid_dist_id< grid_in_type::dims, typename grid_in_type::stype, props_temp > | g_temp_type |
Type definition for the temporary grid. | |
Public Member Functions | |
NarrowBand (const grid_in_type &grid_in, size_t thickness) | |
Constructor taking the thickness of the narrow band as grid points in order to initialize the lower and upper bound for the narrow band. Initializes the temporary internal grid. | |
NarrowBand (const grid_in_type &grid_in, double thickness) | |
Constructor taking the thickness of the narrow band as physical width in space in order to initialize the lower and upper bound for the narrow band. Initializes the temporary internal grid. | |
NarrowBand (const grid_in_type &grid_in, float thickness) | |
Constructor taking the thickness of the narrow band as physical width in space in order to initialize the lower and upper bound for the narrow band. Initializes the temporary internal grid. | |
template<typename width_type > | |
NarrowBand (const grid_in_type &grid_in, width_type width_outside, width_type width_inside) | |
Constructor taking the inside and outside physical width of the narrow band in order to initialize the lower and upper bound for the narrow band. Initializes the temporary internal grid. | |
template<size_t Phi_SDF_grid, size_t Phi_SDF_vd, typename vector_type , typename grid_type > | |
void | get_narrow_band (grid_type &grid, vector_type &vd) |
Places particles within a narrow band around the interface. Only the SDF is copied from the grid properties to the respective particles. | |
template<size_t Phi_SDF_grid, size_t Phi_SDF_vd, size_t Phi_grad, typename vector_type , typename grid_type > | |
void | get_narrow_band (grid_type &grid, vector_type &vd) |
Places particles within a narrow band around the interface. SDF and Phi_grad_temp are copied from the temp. grid to the respective particle. | |
template<size_t Phi_SDF_grid, size_t Phi_SDF_vd, size_t Phi_grad, size_t Phi_magnOfGrad, typename vector_type , typename grid_type > | |
void | get_narrow_band (grid_type &grid, vector_type &vd) |
Places particles within a narrow band around the interface. SDF and Phi_grad_temp are copied from the temp. grid to the respective particle. | |
template<size_t Phi_SDF_grid, size_t Prop1_grid, size_t Prop1_vd, typename vector_type , typename grid_type > | |
void | get_narrow_band_copy_specific_property (grid_type &grid, vector_type &vd) |
Places particles within a narrow band around the interface. An arbitrary property is copied from the grid to the respective particle. | |
template<size_t Phi_SDF_grid, size_t Index1Grid, size_t Index2Grid, size_t Index3Grid, size_t Index1Vd, size_t Index2Vd, size_t Index3Vd, typename grid_type , typename vector_type > | |
void | get_narrow_band_copy_three_scalar_properties (grid_type &grid, vector_type &vd) |
Places particles within a narrow band around the interface. An arbitrary property is copied from the grid to the respective particle. | |
Data Fields | |
g_temp_type | g_temp |
Create temporary grid, which is only used inside the class to get the gradients. | |
Private Member Functions | |
void | set_bounds (const size_t thickness, const grid_in_type &grid_in) |
Set the member variable NarrowBand::b_low and NarrowBand::b_up. | |
template<typename thickness_type > | |
void | set_bounds (const thickness_type thickness, const grid_in_type &grid_in) |
Set the member variable NarrowBand::b_low and NarrowBand::b_up. | |
template<typename width_type > | |
void | set_bounds (width_type lower_bound, width_type upper_bound, const grid_in_type &grid_in) |
Set the member variable NarrowBand::b_low and NarrowBand::b_up. | |
template<size_t Phi_SDF> | |
void | initialize_temporary_grid (const grid_in_type &grid_in) |
Initialize the internal temporary grid. | |
template<typename T > | |
bool | within_narrow_band (T Phi) |
Checks if a value for Phi_SDF lays within the narrow band. | |
Private Attributes | |
phi_type | b_low |
Narrow band extension towards the object outside. | |
phi_type | b_up |
Narrow band extension towards the object inside. | |
Static Private Attributes | |
static const size_t | Phi_SDF_temp = 0 |
Property index of Phi_SDF on the temporary grid. | |
static const size_t | Phi_grad_temp = 1 |
Property index of gradient of Phi on the temporary grid. | |
static const size_t | Phi_sign_temp = 2 |
Property index of sign of Phi on the temporary grid. | |
typedef grid_dist_id<grid_in_type::dims, typename grid_in_type::stype, props_temp> NarrowBand< grid_in_type, phi_type >::g_temp_type |
Type definition for the temporary grid.
Definition at line 103 of file NarrowBand.hpp.
typedef aggregate<phi_type, phi_type[grid_in_type::dims], int> NarrowBand< grid_in_type, phi_type >::props_temp |
Aggregated properties for the temporary grid.
The properties are Phi_SDF (result from redistancing), gradient of Phi, and sign of Phi_SDF (for the upwinding).
Definition at line 100 of file NarrowBand.hpp.
|
inline |
Constructor taking the thickness of the narrow band as grid points in order to initialize the lower and upper bound for the narrow band. Initializes the temporary internal grid.
grid_in | Input grid with min. 1 property: Phi_SDF. |
thickness | Width of narrow band in # grid points. |
Definition at line 51 of file NarrowBand.hpp.
|
inline |
Constructor taking the thickness of the narrow band as physical width in space in order to initialize the lower and upper bound for the narrow band. Initializes the temporary internal grid.
grid_in | Input grid with min. 1 property: Phi_SDF. |
thickness | Width of narrow band as physical width. |
Definition at line 63 of file NarrowBand.hpp.
|
inline |
Constructor taking the thickness of the narrow band as physical width in space in order to initialize the lower and upper bound for the narrow band. Initializes the temporary internal grid.
grid_in | Input grid with min. 1 property: Phi_SDF. |
thickness | Width of narrow band as physical width. |
Definition at line 75 of file NarrowBand.hpp.
|
inline |
Constructor taking the inside and outside physical width of the narrow band in order to initialize the lower and upper bound for the narrow band. Initializes the temporary internal grid.
grid_in | Input grid with min. 1 property: Phi_SDF. |
width_outside | Extension of narrow band as physical width inside of object (Phi > 0). |
width_inside | Extension of narrow band as physical width outside of object (Phi < 0). |
Definition at line 89 of file NarrowBand.hpp.
|
inline |
Places particles within a narrow band around the interface. Only the SDF is copied from the grid properties to the respective particles.
Phi_SDF_grid | Index of property storing the signed distance function in the input grid. |
Phi_SDF_vd | Index of property that should store the SDF in the narrow band particle vector. |
vector_type | Template type of the particle vector. |
grid_type | Template type of the grid storing the SDF. |
grid | Grid of arb. dims. storing the SDF (result of redistancing). |
vd | Empty vector with same spatial scaling (box) as the grid. |
Definition at line 125 of file NarrowBand.hpp.
|
inline |
Places particles within a narrow band around the interface. SDF and Phi_grad_temp are copied from the temp. grid to the respective particle.
Phi_SDF_grid | Index of property storing the signed distance function in the input grid. |
Phi_SDF_vd | Index of property that should store the SDF in the narrow band particle vector. |
Phi_grad | Index of property that should store the gradient of phi in the narrow band particle vector. |
vector_type | Template type of the particle vector. |
grid_type | Template type of the grid storing the SDF. |
grid | Grid of arb. dims. storing the SDF (result of redistancing). |
vd | Empty vector with same spatial scaling (box) as the grid. |
Definition at line 159 of file NarrowBand.hpp.
|
inline |
Places particles within a narrow band around the interface. SDF and Phi_grad_temp are copied from the temp. grid to the respective particle.
Phi_SDF_grid | Index of property storing the signed distance function in the input grid. |
Phi_SDF_vd | Index of property that should store the SDF in the narrow band particle vector. |
Phi_grad | Index of property that should store the gradient of phi in the narrow band particle vector. |
Phi_magnOfGrad | Index of property that should store the gradient magnitude of Phi. |
vector_type | Template type of the particle vector. |
grid_type | Template type of the grid storing the SDF. |
grid | Grid of arb. dims. storing the SDF (result of redistancing). |
vd | Empty vector with same spatial scaling (box) as the grid. |
Definition at line 197 of file NarrowBand.hpp.
|
inline |
Places particles within a narrow band around the interface. An arbitrary property is copied from the grid to the respective particle.
Phi_SDF_grid | Index of property storing the signed distance function in the input grid. |
Prop1_grid | Index of arbitrary grid property that should be copied to the particles (prop. value must be a scalar). |
Prop1_vd | Index of particle property, where grid property should be copied to (prop. value must be a scalar). |
vector_type | Template type of the particle vector. |
grid_type | Template type of the grid storing the SDF. |
grid | Grid of arb. dims. storing the SDF (result of redistancing) and any arbitrary other (scalar) property. |
vd | Empty vector with same spatial scaling (box) as the grid. |
Definition at line 236 of file NarrowBand.hpp.
|
inline |
Places particles within a narrow band around the interface. An arbitrary property is copied from the grid to the respective particle.
Phi_SDF_grid | Index of property storing the signed distance function in the input grid. |
Index1Grid | Index of 1st scalar grid property that should be copied from grid to particles. |
Index2Grid | Index of 2nd scalar grid property that should be copied from grid to particles. |
Index3Grid | Index of 3rd scalar grid property that should be copied from grid to particles. |
Index1Vd | Index of 1st scalar property on particle to which value from grid should be copied to. |
Index2Vd | Index of 2nd scalar property on particle to which value from grid should be copied to. |
Index3Vd | Index of 3rd scalar property on particle to which value from grid should be copied to. |
vector_type | Template type of the particle vector. |
grid_type | Template type of the grid storing the SDF. |
grid | Grid of arb. dims. storing the SDF (result of redistancing) and any arbitrary other (scalar) property. |
vd | Empty vector with same spatial scaling (box) as the grid. |
Definition at line 275 of file NarrowBand.hpp.
|
inlineprivate |
Initialize the internal temporary grid.
Copies Phi_SDF from the input grid to the temorary grid.
Phi_SDF | Index of property storing the signed distance function in the input grid. |
grid_in | Input grid storing the signed distance function Phi_SDF (redistancing output). |
Definition at line 354 of file NarrowBand.hpp.
|
inlineprivate |
Set the member variable NarrowBand::b_low and NarrowBand::b_up.
thickness | Thickness of narrow band in number of grid points. |
grid_in | Input grid storing the signed distance function Phi_SDF (redistancing output). |
Definition at line 314 of file NarrowBand.hpp.
|
inlineprivate |
Set the member variable NarrowBand::b_low and NarrowBand::b_up.
thickness | Thickness of narrow band as physical width. |
grid_in | Input grid storing the signed distance function Phi_SDF (redistancing output). |
Definition at line 326 of file NarrowBand.hpp.
|
inlineprivate |
Set the member variable NarrowBand::b_low and NarrowBand::b_up.
lower_bound | Extension of narrow band as physical width inside of object (Phi > 0). |
upper_bound | Extension of narrow band as physical width outside of object (Phi < 0). |
grid_in | Input grid storing the signed distance function Phi_SDF (redistancing output). |
Definition at line 339 of file NarrowBand.hpp.
|
inlineprivate |
Checks if a value for Phi_SDF lays within the narrow band.
T | Template type of parameter Phi. |
Phi | Value of the signed distance function Phi_SDF. |
Definition at line 368 of file NarrowBand.hpp.
|
private |
Narrow band extension towards the object outside.
Definition at line 306 of file NarrowBand.hpp.
|
private |
Narrow band extension towards the object inside.
Definition at line 307 of file NarrowBand.hpp.
g_temp_type NarrowBand< grid_in_type, phi_type >::g_temp |
Create temporary grid, which is only used inside the class to get the gradients.
The grid is needed, when the user wants a narrow band which also contains the upwind gradient of phi. It contains the following 4 properties: Phi_SDF (result from redistancing), gradient of Phi, and sign of Phi_SDF (for the upwinding).
Definition at line 111 of file NarrowBand.hpp.
|
staticprivate |
Property index of gradient of Phi on the temporary grid.
Definition at line 303 of file NarrowBand.hpp.
|
staticprivate |
Property index of Phi_SDF on the temporary grid.
Definition at line 302 of file NarrowBand.hpp.
|
staticprivate |
Property index of sign of Phi on the temporary grid.
Definition at line 304 of file NarrowBand.hpp.