43 character(len=20) :: LES_KNOWN_TYPES(5) = [character(len=20) :: &
46 "dymamic_smagorinsky", &
58 module subroutine les_model_factory(object, type_name, fluid, json)
59 class(les_model_t),
allocatable,
intent(inout) :: object
60 character(len=*),
intent(in) :: type_name
61 class(fluid_scheme_base_t),
intent(inout) :: fluid
62 type(json_file),
intent(inout) :: json
63 character(len=:),
allocatable :: type_string
65 call les_model_allocator(object, type_name)
66 call object%init(fluid, json)
67 end subroutine les_model_factory
72 module subroutine les_model_allocator(object, type_name)
73 class(les_model_t),
allocatable,
intent(inout) :: object
74 character(len=*),
intent(in) :: type_name
77 if (
allocated(object))
deallocate(object)
79 select case (trim(type_name))
84 case (
'dynamic_smagorinsky')
91 do i = 1, les_model_registry_size
92 if (trim(type_name) == trim(les_model_registry(i)%type_name))
then
93 call les_model_registry(i)%allocator(object)
98 call neko_type_error(
"LES model", type_name, les_known_types)
101 end subroutine les_model_allocator
107 module subroutine register_les_model(type_name, allocator)
108 character(len=*),
intent(in) :: type_name
109 procedure(les_model_allocate),
pointer,
intent(in) :: allocator
110 type(allocator_entry),
allocatable :: temp(:)
113 if (les_model_registry_size == 0)
then
114 allocate(les_model_registry(1))
116 allocate(temp(les_model_registry_size + 1))
117 temp(1:les_model_registry_size) = les_model_registry
118 call move_alloc(temp, les_model_registry)
121 les_model_registry_size = les_model_registry_size + 1
122 les_model_registry(les_model_registry_size)%type_name = type_name
123 les_model_registry(les_model_registry_size)%allocator => allocator
124 end subroutine register_les_model
126end submodule les_model_fctry
Implements dynamic_smagorinsky_t.
Implements smagorinsky_t.
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.