Prepares for use with solvers.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_set), | intent(inout) | :: | this |
Set of particles |
||
| type(timer_obj), | intent(in), | target | :: | timer |
Timer utility |
|
| type(parser_obj), | intent(in), | target | :: | parser |
Parser for input file |
|
| type(op_obj), | intent(in), | target | :: | operators |
Operators object |
|
| type(monitor_set), | intent(in), | target | :: | monitors |
Monitors to print to stdout and files |
|
| logical, | intent(in), | optional | :: | update_time |
impure subroutine particle_set_Prepare(this,timer,parser,operators,monitors,update_time) !> Prepares for use with solvers. implicit none class(particle_set), intent(inout) :: this !! Set of particles type(timer_obj), intent(in), & target :: timer !! Timer utility type(parser_obj), intent(in), & target :: parser !! Parser for input file type(op_obj), intent(in), & target :: operators !! Operators object type(monitor_set), intent(in), & target :: monitors !! Monitors to print to stdout and files logical, intent(in), & optional :: update_time ! Work variables real(wp), parameter :: zero(3) = [0.0_wp, 0.0_wp, 0.0_wp] !! Zero vector real(wp) :: dl !! Half filter width integer :: kernel_interp !! Interpolation kernel integer :: kernel_extrap !! Extrapolation kernel character(len=str64):: filename !! String to store filenames real(wp) :: time integer :: iter character(len=str64):: part_type ! Associate pointers this%timer => timer this%parser => parser this%op => operators this%monitors => monitors ! Determine particle type and change it if neeeded call this%parser%Get("Particle type", part_type) call this%ChangePartType(part_type) call this%parser%Get('PP read file', filename ) call this%SetReadFileName(filename) call this%parser%Get('PP write file', filename ) call this%SetWriteFileName(filename) call this%parser%Get('PP overwrite', this%overwrite, default= .true. ) ! Filtering parameters dl = (2.0_wp - 1.0e3_wp*epsilon(1.0_wp))*minval(this%block%dx) call this%parser%Get('PP filter half width', this%l_filter, default = dl ) call this%parser%Get('PP interp kernel', kernel_interp, default = 1 ) call this%parser%Get('PP extrap kernel', kernel_extrap, default = 1 ) call this%SetFilterKernel(kernel_interp,kernel_extrap) call this%SetFilterSize(this%l_filter) ! Other physical parameters call this%parser%Get("Gravity", this%gravity, default = zero ) call this%parser%Get("Fluid density", this%rhof, default = 0.0_wp ) call this%parser%Get("Bodyforce CPG", this%CPG, default = zero ) ! Read resolved particle data call this%Read(iter,time) if (present(update_time)) then if (update_time) then this%timer%iter = iter this%timer%time = time end if end if return end subroutine particle_set_Prepare