44 character(len=20) :: POINTZ_KNOWN_TYPES(3) = [character(len=20) :: &
56 module subroutine point_zone_factory(object, json, dof)
57 class(point_zone_t),
allocatable,
intent(inout) :: object
58 type(json_file),
intent(inout) :: json
59 type(dofmap_t),
intent(inout),
optional :: dof
60 character(len=:),
allocatable :: type_name
62 call json_get(json,
"geometry", type_name)
64 call point_zone_allocator(object, type_name)
66 if (
present(dof))
then
67 call object%init(json, dof%size())
69 call object%finalize()
73 call object%init(json, 1)
74 call object%finalize()
76 end subroutine point_zone_factory
78 module subroutine point_zone_allocator(object, type_name)
79 class(point_zone_t),
allocatable,
intent(inout) :: object
80 character(len=:),
allocatable,
intent(in) :: type_name
83 if (
allocated(object))
then
88 select case (trim(type_name))
96 do i = 1, point_zone_registry_size
102 call neko_error(
"Unknown point zone type: " // trim(type_name))
104 end subroutine point_zone_allocator
111 module subroutine register_point_zone(type_name, allocator)
112 character(len=*),
intent(in) :: type_name
113 procedure(point_zone_allocate),
pointer,
intent(in) :: allocator
114 type(allocator_entry),
allocatable :: temp(:)
117 do i = 1,
size(pointz_known_types)
118 if (trim(type_name) .eq. trim(pointz_known_types(i)))
then
123 do i = 1, point_zone_registry_size
130 if (point_zone_registry_size .eq. 0)
then
133 allocate(temp(point_zone_registry_size + 1))
138 point_zone_registry_size = point_zone_registry_size + 1
142 end subroutine register_point_zone
144end submodule point_zone_fctry
Retrieves a parameter by name or throws an error.
Implements a cylinder geometry subset.
Utilities for retrieving parameters from the case files.
subroutine, public neko_type_registration_error(base_type, wrong_type, known)
A cylindrical point zone.
A sphere-shaped point zone.