MPI-AMRVAC  2.2
The MPI - Adaptive Mesh Refinement - Versatile Advection Code
mod_particles.t
Go to the documentation of this file.
1 !> Module containing all the particle routines
10 
11  implicit none
12 
13 contains
14 
15  !> Initialize particle data and parameters
16  subroutine particles_init()
18 
19  call particle_base_init()
20  call init_particles_com()
21 
22  select case(physics_type_particles)
23  case('advect')
24  call advect_init()
25  case('Lorentz')
26  call lorentz_init()
27  case('gca')
28  call gca_init()
29  case('lfimp')
30  call lfimp_init()
31  case('Vay')
32  call vay_init()
33  case('HC')
34  call hc_init()
35  case default
36  if (mype == 0) then
37  print *, "Unknown physics_type_particles", &
39  print *, "Options are: advect, gca, Lorentz, lfimp, Vay, HC"
40  call mpistop("Unknown physics_type_particles")
41  end if
42  end select
43 
44  end subroutine particles_init
45 
46  !> Create initial particles
47  subroutine particles_create()
49  use mod_timing
50 
51  ! Allocate grid variables
52  tpartc_grid_0=mpi_wtime()
53  call init_gridvars()
54  tpartc_grid = tpartc_grid + (mpi_wtime()-tpartc_grid_0)
55 
56  select case(physics_type_particles)
57  case('advect')
59  case('Lorentz', 'Vay', 'HC')
60  ! The Vay mover can use the same routine
62  case('gca')
64  case('lfimp')
66  case default
67  if (mype == 0) then
68  print *, "Unknown physics_type_particles", &
70  print *, "Options are: advect, gca, Lorentz, lfimp, Vay"
71  call mpistop("Unknown physics_type_particles")
72  end if
73  end select
74 
75  ! Remove grid variables again
76  call finish_gridvars()
77 
78  end subroutine particles_create
79 
80 end module mod_particles
character(len=name_len) physics_type_particles
String describing the particle physics type.
This module contains definitions of global parameters and variables and some generic functions/subrou...
subroutine, public advect_create_particles()
subroutine init_gridvars()
Initialize grid variables for particles.
subroutine, public lfimp_init()
Vay particle mover (improvement of Boris method)
subroutine finish_gridvars()
Deallocate grid variables for particles.
subroutine, public vay_init()
subroutine, public lorentz_create_particles()
subroutine particles_init()
Initialize particle data and parameters.
Definition: mod_particles.t:17
subroutine, public lfimp_create_particles()
subroutine, public gca_init()
Higuera-Cary particle mover (improvement of Boris method)
subroutine particle_base_init()
Give initial values to parameters.
integer mype
The rank of the current MPI task.
subroutine particles_create()
Create initial particles.
Definition: mod_particles.t:48
subroutine, public lorentz_init()
Module containing all the particle routines.
Definition: mod_particles.t:2
subroutine mpistop(message)
Exit MPI-AMRVAC with an error message.
Definition: comm_lib.t:198
subroutine, public hc_init()
Leap-frog fully implicit particle mover (implemented by Fabio Bacchini)
Relativistic Boris scheme.
Module with shared functionality for all the particle movers.
subroutine, public advect_init()
double precision tpartc_grid_0
Definition: mod_timing.t:13
subroutine init_particles_com()
Initialise communicators for particles.
Particle moder with relativistic guiding center approximation.
subroutine, public gca_create_particles()
tracer particles moving with fluid flows
double precision tpartc_grid
Definition: mod_timing.t:12