38  use json_module, 
only: json_file
 
   51     real(kind=
rp) :: radius
 
 
   69    type(json_file), 
intent(inout) :: json
 
   70    integer, 
intent(in) :: size
 
   72    character(len=:), 
allocatable :: str_read
 
   73    real(kind=
rp), 
allocatable :: values(:)
 
   74    real(kind=
rp) :: 
value 
   75    real(kind=
rp) :: x0, y0, z0, radius
 
   78    call json_get(json, 
"center", values)
 
   84    call json_get(json, 
"name", str_read)
 
 
  103    integer, 
intent(in), 
optional :: size
 
  104    character(len=*), 
intent(in) :: name
 
  105    logical, 
intent(in) :: invert
 
  106    real(kind=
rp), 
intent(in) :: x0
 
  107    real(kind=
rp), 
intent(in) :: y0
 
  108    real(kind=
rp), 
intent(in) :: z0
 
  109    real(kind=
rp), 
intent(in) :: radius
 
  111    call this%init_base(
size, name, invert)
 
 
  124    call this%free_base()
 
 
  152    real(kind=
rp), 
intent(in) :: x
 
  153    real(kind=
rp), 
intent(in) :: y
 
  154    real(kind=
rp), 
intent(in) :: z
 
  155    integer, 
intent(in) :: j
 
  156    integer, 
intent(in) :: k
 
  157    integer, 
intent(in) :: l
 
  158    integer, 
intent(in) :: e
 
  161    real(kind=
rp) :: dist_from_center
 
  163    dist_from_center = sqrt( &
 
  164         (x - this%x0)**2 + (y - this%y0)**2 + (z - this%z0)**2)
 
  167    is_inside = (dist_from_center .lt. this%radius .or. &
 
  168                 abscmp(dist_from_center, this%radius))
 
 
Retrieves a parameter by name or assigns a provided default value. In the latter case also adds the m...
 
Retrieves a parameter by name or throws an error.
 
Utilities for retrieving parameters from the case files.
 
integer, parameter, public rp
Global precision used in computations.
 
subroutine sphere_point_zone_free(this)
Destructor.
 
subroutine sphere_point_zone_init_from_json(this, json, size)
Constructor from json object file.
 
subroutine sphere_point_zone_init_common(this, size, name, invert, x0, y0, z0, radius)
Initializes a sphere point zone from its center coordinates and radius.
 
pure logical function sphere_point_zone_criterion(this, x, y, z, j, k, l, e)
Defines the criterion of selection of a GLL point in the sphere point zone. A GLL point of coordinate...
 
Base abstract type for point zones.
 
A sphere-shaped point zone.