44 character(len=20) :: LES_KNOWN_TYPES(5) = [character(len=20) :: &
47 "dymamic_smagorinsky", &
59 module subroutine les_model_factory(object, type_name, fluid, json)
60 class(les_model_t),
allocatable,
intent(inout) :: object
61 character(len=*),
intent(in) :: type_name
62 class(fluid_scheme_base_t),
intent(inout) :: fluid
63 type(json_file),
intent(inout) :: json
64 character(len=:),
allocatable :: type_string
66 call les_model_allocator(object, type_name)
67 call object%init(fluid, json)
68 end subroutine les_model_factory
73 module subroutine les_model_allocator(object, type_name)
74 class(les_model_t),
allocatable,
intent(inout) :: object
75 character(len=*),
intent(in) :: type_name
78 if (
allocated(object))
deallocate(object)
80 select case (trim(type_name))
85 case (
'dynamic_smagorinsky')
92 do i = 1, les_model_registry_size
93 if (trim(type_name) == trim(les_model_registry(i)%type_name))
then
94 call les_model_registry(i)%allocator(object)
102 end subroutine les_model_allocator
109 module subroutine register_les_model(type_name, allocator)
110 character(len=*),
intent(in) :: type_name
111 procedure(les_model_allocate),
pointer,
intent(in) :: allocator
112 type(allocator_entry),
allocatable :: temp(:)
115 do i = 1,
size(les_known_types)
116 if (trim(type_name) .eq. trim(les_known_types(i)))
then
121 do i = 1, les_model_registry_size
122 if (trim(type_name) .eq. trim(les_model_registry(i)%type_name))
then
128 if (les_model_registry_size == 0)
then
129 allocate(les_model_registry(1))
131 allocate(temp(les_model_registry_size + 1))
132 temp(1:les_model_registry_size) = les_model_registry
133 call move_alloc(temp, les_model_registry)
136 les_model_registry_size = les_model_registry_size + 1
137 les_model_registry(les_model_registry_size)%type_name = type_name
138 les_model_registry(les_model_registry_size)%allocator => allocator
139 end subroutine register_les_model
141end submodule les_model_fctry
Implements dynamic_smagorinsky_t.
Implements smagorinsky_t.
subroutine, public neko_type_registration_error(base_type, wrong_type, known)
subroutine, public neko_type_error(base_type, wrong_type, known_types)
Reports an error allocating a type for a particular base pointer class.
Implements the dynamic Smagorinsky LES model.
Base type of all fluid formulations.
Implements the Sigma LES model.
Implements the smagorinsky LES model.
Implements the Vreman LES model.
Implements the Wale LES model.