Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
point_zone_template.f90
Go to the documentation of this file.
1
3 use json_module, only : json_file
5 use num_types, only : rp
7 register_point_zone
8 implicit none
9 private
10
12 contains
13 procedure :: init => point_zone_template_init
14 procedure :: free => point_zone_template_free
15 procedure :: criterion => point_zone_template_criterion
17
19
20contains
21
22 subroutine point_zone_template_init(this, json, size)
23 class(point_zone_template_t), intent(inout) :: this
24 type(json_file), intent(inout) :: json
25 integer, intent(in) :: size
26 character(len=:), allocatable :: name
27 logical :: invert, full_elements
28
29 call json_get(json, 'name', name)
30 call json_get_or_default(json, 'invert', invert, .false.)
31 call json_get_or_default(json, 'full_elements', full_elements, .false.)
32 call this%init_base(size, name, invert, full_elements)
33 ! TODO: Read criterion-specific parameters from json.
34 end subroutine point_zone_template_init
35
36 subroutine point_zone_template_free(this)
37 class(point_zone_template_t), intent(inout) :: this
38 ! TODO: Release fields owned by this derived type.
39 call this%free_base()
40 end subroutine point_zone_template_free
41
42 pure function point_zone_template_criterion(this, x, y, z, j, k, l, e) &
43 result(is_inside)
44 class(point_zone_template_t), intent(in) :: this
45 real(kind=rp), intent(in) :: x, y, z
46 integer, intent(in) :: j, k, l, e
47 logical :: is_inside
48 ! TODO: Replace with the point-selection criterion.
49 is_inside = .false.
51
53 procedure(point_zone_allocate), pointer :: allocator
55 call register_point_zone('point_zone_template', allocator)
57
59 class(point_zone_t), allocatable, intent(inout) :: obj
60 allocate(point_zone_template_t :: obj)
61 end subroutine point_zone_template_allocate
62end module point_zone_template
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.
Point zone factory. Constructs, initializes, and maps the point zone object.
Utilities for retrieving parameters from the case files.
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:14
Template for a user-defined point zone.
subroutine, public point_zone_template_register_types()
subroutine point_zone_template_free(this)
subroutine point_zone_template_init(this, json, size)
pure logical function point_zone_template_criterion(this, x, y, z, j, k, l, e)
subroutine point_zone_template_allocate(obj)
Base abstract type for point zones.