version 0.6.0
mod_lsm_band Module Reference

Level set band computation.

Functions/Subroutines

subroutine compute_levelset_band_interface (levelset_field, levelset_band_interface)
 Compute the band around the level set. More...
 
subroutine compute_levelset_band (levelset_field, levelset_band, width)
 Compute the (dist) band around the level set. More...
 
pure subroutine dist_band_to_mask (dist_band, mask, max_dist)
 Compute the mask associated to the dist band, up to a given distance. More...
 
pure subroutine grow_levelset_band (levelset_band, band_value)
 Grow the band by 1. More...
 
pure subroutine grow_levelset_mask (mask)
 Grow the mask by 1. More...
 
pure logical function contains_surface (phi, i, j, k)
 Return true if the cell (i,j,k) contains the surface. More...
 
pure logical function is_face_u_inside_band (band, i, j, k, max_band_distance)
 Return true if the face U(i,j,k) is inside [next) the band. More...
 
pure logical function is_face_v_inside_band (band, i, j, k, max_band_distance)
 Return true if the face V(i,j,k) is inside [next) the band. More...
 
pure logical function is_face_w_inside_band (band, i, j, k, max_band_distance)
 Return true if the face W(i,j,k) is inside [next) the band. More...
 
pure logical function is_face_inside_band (band, i, j, k, axis, max_band_distance)
 Return true if the face (i,j,k) along 'axis' is inside [next) the band. More...
 

Function/Subroutine Documentation

◆ 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_fieldThe input levelset field
[in,out]levelset_bandThe resulting levelset band
[in]widthThe 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_fieldThe input levelset field
[in,out]levelset_band_interfaceThe 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]phithe level set field
[in]i,j,kwhere 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_bandThe input distance band.
[in,out]maskThe resulting levelset mask
[in]max_distThe 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_bandThe levelset band to grow
[in]band_valueWhat 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]maskThe 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 
)
Parameters
[in]bandThe input band
[in]i,j,kThe index of the face
[in]axisThe axis along which query
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 
)
Parameters
[in]bandThe input band
[in]i,j,kThe index of the face

◆ 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 
)
Parameters
[in]bandThe input band
[in]i,j,kThe index of the face

◆ 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 
)
Parameters
[in]bandThe input band
[in]i,j,kThe index of the face