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))
then
83 select case (trim(type_name))
88 case (
'dynamic_smagorinsky')
95 do i = 1, les_model_registry_size
96 if (trim(type_name) == trim(les_model_registry(i)%type_name))
then
97 call les_model_registry(i)%allocator(object)
105 end subroutine les_model_allocator
112 module subroutine register_les_model(type_name, allocator)
113 character(len=*),
intent(in) :: type_name
114 procedure(les_model_allocate),
pointer,
intent(in) :: allocator
115 type(allocator_entry),
allocatable :: temp(:)
118 do i = 1,
size(les_known_types)
119 if (trim(type_name) .eq. trim(les_known_types(i)))
then
124 do i = 1, les_model_registry_size
125 if (trim(type_name) .eq. trim(les_model_registry(i)%type_name))
then
131 if (les_model_registry_size == 0)
then
132 allocate(les_model_registry(1))
134 allocate(temp(les_model_registry_size + 1))
135 temp(1:les_model_registry_size) = les_model_registry
136 call move_alloc(temp, les_model_registry)
139 les_model_registry_size = les_model_registry_size + 1
140 les_model_registry(les_model_registry_size)%type_name = type_name
141 les_model_registry(les_model_registry_size)%allocator => allocator
142 end subroutine register_les_model
144end 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.