LSM band related functions.
More...
|
subroutine | mod_lsm_band::compute_levelset_band (levelset_field, levelset_band, width) |
| Compute the (dist) band around the level set.
|
|
subroutine | mod_lsm_band::compute_levelset_band_interface (levelset_field, levelset_band_interface) |
| Compute the interface band around the level set (i.e. "cut cells").
|
|
pure subroutine | mod_lsm_band::dist_band_to_mask (dist_band, mask, max_dist) |
| Compute the mask associated to the dist band, up to a given distance.
|
|
pure subroutine | mod_lsm_band::grow_levelset_band (levelset_band, band_value) |
| Grow the band by 1.
|
|
pure subroutine | mod_lsm_band::grow_levelset_mask (mask) |
| Grow the mask by 1.
|
|
pure logical function | mod_lsm_band::contains_surface (phi, i, j, k) |
| Return true if the cell (i,j,k) contains the surface.
|
|
pure logical function | mod_lsm_band::is_face_u_inside_band (band, i, j, k, max_band_distance) |
| Return true if the face U(i,j,k) is inside the band.
|
|
pure logical function | mod_lsm_band::is_face_v_inside_band (band, i, j, k, max_band_distance) |
| Return true if the face V(i,j,k) is inside the band.
|
|
pure logical function | mod_lsm_band::is_face_w_inside_band (band, i, j, k, max_band_distance) |
| Return true if the face W(i,j,k) is inside the dist band.
|
|
pure logical function | mod_lsm_band::is_face_inside_band (band, i, j, k, axis, max_band_distance) |
| Return true if the face (i,j,k) along 'axis' is inside he band.
|
|
The LS' band is a region surrounding the interface, on both sides. It can be defined the set of cells that are at a distance to the interface below a certain threshold. In order to obtain more information, we define the dist band as the integer cell distance to the interface, i.e.:
band(i,j,k) = 0
for cells containing the interface,
band(i,j,k) = N+1
for cells neighbouring at least one cell of level N
,
band(i,j,k) = levelset_dist_band_outside
for cells farther than a certain integer threshold. The idea of the algorithm behind it is pretty simple:
- Detect all cells containing the interface and assign them the value
0
◆ compute_levelset_band()
subroutine mod_lsm_band::compute_levelset_band |
( |
double precision, dimension(:,:,:), intent(in) | levelset_field, |
|
|
integer, dimension(:,:,:), intent(inout) | levelset_band, |
|
|
integer, intent(in) | width ) |
- Parameters
-
[in] | levelset_field | The input levelset field |
[in,out] | levelset_band | The resulting levelset band |
[in] | width | The width (>=0) of the band |
- Note
- The distance band is defined as increasing integer values starting from the close cells (where the value is 'levelset_dist_band_close=0') towards the exterior, up to 'width'.
- Todo
- Could be optimized by precomputing the corners values
◆ compute_levelset_band_interface()
subroutine mod_lsm_band::compute_levelset_band_interface |
( |
double precision, dimension(:,:,:), intent(in) | levelset_field, |
|
|
integer, dimension(:,:,:), intent(inout) | levelset_band_interface ) |
- Parameters
-
[in] | levelset_field | The input levelset field |
[in,out] | levelset_band_interface | The resulting levelset band |
- Note
- The levelset band is defined as a distance band. Its values are 'levelset_dist_band_close' (i.e. \(0\)) for cells close to the interface and 'levelset_dist_band_outside' anywhere else. The term close stands for cells at a distance \( d < \delta_x \), i.e. when there is a change of sign between to consecutive cells (it's an approximation).
◆ contains_surface()
pure logical function mod_lsm_band::contains_surface |
( |
double precision, dimension(:,:,:), intent(in) | phi, |
|
|
integer, intent(in) | i, |
|
|
integer, intent(in) | j, |
|
|
integer, intent(in) | k ) |
- Parameters
-
[in] | phi | the level set field |
[in] | i,j,k | where to query |
◆ dist_band_to_mask()
pure subroutine mod_lsm_band::dist_band_to_mask |
( |
integer, dimension(:,:,:), intent(in) | dist_band, |
|
|
integer, dimension(:,:,:), intent(inout) | mask, |
|
|
integer, intent(in) | max_dist ) |
- Parameters
-
[in] | dist_band | The input distance band. |
[in,out] | mask | The resulting levelset mask |
[in] | max_dist | The maximum (absolute, >=0) distance over which the mask is considered |
- Note
- All cells of \( dist_band <= max_dist \) will be put to 1, 0 otherwise.
◆ grow_levelset_band()
pure subroutine mod_lsm_band::grow_levelset_band |
( |
integer, dimension(:,:,:), intent(inout) | levelset_band, |
|
|
integer, intent(in) | band_value ) |
- Parameters
-
[in,out] | levelset_band | The levelset band to grow |
[in] | band_value | What integer value to put in the grown cells |
- Note
- The given band is updated.
-
The algorithm is: given an existing band, find all unmarked cells neighbouring cells of value 'band_value - 1' and mark them with 'band_value'.
◆ grow_levelset_mask()
pure subroutine mod_lsm_band::grow_levelset_mask |
( |
integer, dimension(:,:,:), intent(inout) | mask | ) |
|
- Parameters
-
[in,out] | mask | The mask to grow |
- Note
- The given mask is updated.
-
The algorithm is: given an existing mask, mark all cells that are at least neighbouring 1 marked cell.
◆ is_face_inside_band()
pure logical function mod_lsm_band::is_face_inside_band |
( |
integer, dimension(:,:,:), intent(in) | band, |
|
|
integer, intent(in) | i, |
|
|
integer, intent(in) | j, |
|
|
integer, intent(in) | k, |
|
|
integer, intent(in) | axis, |
|
|
integer, intent(in) | max_band_distance ) |
A cell/face is considered inside the dist band if it is below the requested max_band_distance
.
- Parameters
-
[in] | band | The input band |
[in] | i,j,k | The index of the face |
[in] | axis | The axis along which query |
[in] | max_band_distance | The maximum requested distance |
- Precondition
- axis \( \in [1:3]\)
◆ is_face_u_inside_band()
pure logical function mod_lsm_band::is_face_u_inside_band |
( |
integer, dimension(:,:,:), intent(in) | band, |
|
|
integer, intent(in) | i, |
|
|
integer, intent(in) | j, |
|
|
integer, intent(in) | k, |
|
|
integer, intent(in) | max_band_distance ) |
A cell/face is considered inside the dist band if it is below the requested max_band_distance
.
- Parameters
-
[in] | band | The input band |
[in] | i,j,k | The index of the face |
[in] | max_band_distance | The maximum requested distance |
◆ is_face_v_inside_band()
pure logical function mod_lsm_band::is_face_v_inside_band |
( |
integer, dimension(:,:,:), intent(in) | band, |
|
|
integer, intent(in) | i, |
|
|
integer, intent(in) | j, |
|
|
integer, intent(in) | k, |
|
|
integer, intent(in) | max_band_distance ) |
A cell/face is considered inside the dist band if it is below the requested max_band_distance
.
- Parameters
-
[in] | band | The input band |
[in] | i,j,k | The index of the face |
[in] | max_band_distance | The maximum requested distance |
◆ is_face_w_inside_band()
pure logical function mod_lsm_band::is_face_w_inside_band |
( |
integer, dimension(:,:,:), intent(in) | band, |
|
|
integer, intent(in) | i, |
|
|
integer, intent(in) | j, |
|
|
integer, intent(in) | k, |
|
|
integer, intent(in) | max_band_distance ) |
A cell/face is considered inside the dist band if it is below the requested max_band_distance
.
- Parameters
-
[in] | band | The input band |
[in] | i,j,k | The index of the face |
[in] | max_band_distance | The maximum requested distance |