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
61 character(len=:),
allocatable :: type_string
63 call json_get(json,
"geometry", type_name)
65 call point_zone_allocator(object, type_name)
67 if (
present(dof))
then
68 call object%init(json, dof%size())
70 call object%finalize()
74 call object%init(json, 1)
75 call object%finalize()
77 end subroutine point_zone_factory
79 module subroutine point_zone_allocator(object, type_name)
80 class(point_zone_t),
allocatable,
intent(inout) :: object
81 character(len=:),
allocatable,
intent(in) :: type_name
84 if (
allocated(object))
then
89 select case (trim(type_name))
97 do i = 1, point_zone_registry_size
103 call neko_error(
"Unknown point zone type: " // trim(type_name))
105 end subroutine point_zone_allocator
112 module subroutine register_point_zone(type_name, allocator)
113 character(len=*),
intent(in) :: type_name
114 procedure(point_zone_allocate),
pointer,
intent(in) :: allocator
115 type(allocator_entry),
allocatable :: temp(:)
118 do i = 1,
size(pointz_known_types)
119 if (trim(type_name) .eq. trim(pointz_known_types(i)))
then
124 do i = 1, point_zone_registry_size
131 if (point_zone_registry_size .eq. 0)
then
134 allocate(temp(point_zone_registry_size + 1))
139 point_zone_registry_size = point_zone_registry_size + 1
143 end subroutine register_point_zone
145end 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.