Adjusts the filter half size. Note that the block needs to contain enough ghost cells to be able to represent a filter kernel centered on the edge of the domain. Otherwise, an error will be returnned. The larger the filter size, the more ghost cells are required.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(lagrangian_set), | intent(inout) | :: | this |
Set of Lagrangian objects |
||
| real(kind=wp), | intent(in) | :: | l_filter |
Filter size |
impure subroutine lagrangian_set_SetFilterSize(this,l_filter) !> Adjusts the filter half size. ! Note that the block needs to contain enough ghost cells ! to be able to represent a filter kernel centered on the ! edge of the domain. Otherwise, an error will be returnned. ! The larger the filter size, the more ghost cells are required. implicit none class(lagrangian_set), intent(inout) :: this !! Set of Lagrangian objects real(wp), intent(in) :: l_filter !! Filter size ! Work variables real(wp) :: min_grid_spacing this%l_filter=l_filter ! Get minimum grid_spacing min_grid_spacing=minval(this%block%dx) ! Adjust stencil size this%stib = 1 + 2*ceiling(l_filter/min_grid_spacing) ! Check there are enough ghost cells if (this%block%ngc.lt.this%stib/2) call this%parallel%Stop('Insufficient number of ghost cells for filtering.') return end subroutine lagrangian_set_SetFilterSize