45 character(len=20) :: LES_KNOWN_TYPES(6) = [character(len=20) :: &
48 "dymamic_smagorinsky", &
61 module subroutine les_model_factory(object, type_name, fluid, json)
62 class(les_model_t),
allocatable,
intent(inout) :: object
63 character(len=*),
intent(in) :: type_name
64 class(fluid_scheme_base_t),
intent(inout) :: fluid
65 type(json_file),
intent(inout) :: json
66 character(len=:),
allocatable :: type_string
68 call les_model_allocator(object, type_name)
69 call object%init(fluid, json)
70 end subroutine les_model_factory
75 module subroutine les_model_allocator(object, type_name)
76 class(les_model_t),
allocatable,
intent(inout) :: object
77 character(len=*),
intent(in) :: type_name
80 if (
allocated(object))
then
85 select case (trim(type_name))
90 case (
'dynamic_smagorinsky')
99 do i = 1, les_model_registry_size
100 if (trim(type_name) == trim(les_model_registry(i)%type_name))
then
101 call les_model_registry(i)%allocator(object)
109 end subroutine les_model_allocator
116 module subroutine register_les_model(type_name, allocator)
117 character(len=*),
intent(in) :: type_name
118 procedure(les_model_allocate),
pointer,
intent(in) :: allocator
119 type(allocator_entry),
allocatable :: temp(:)
122 do i = 1,
size(les_known_types)
123 if (trim(type_name) .eq. trim(les_known_types(i)))
then
128 do i = 1, les_model_registry_size
129 if (trim(type_name) .eq. trim(les_model_registry(i)%type_name))
then
135 if (les_model_registry_size == 0)
then
136 allocate(les_model_registry(1))
138 allocate(temp(les_model_registry_size + 1))
139 temp(1:les_model_registry_size) = les_model_registry
140 call move_alloc(temp, les_model_registry)
143 les_model_registry_size = les_model_registry_size + 1
144 les_model_registry(les_model_registry_size)%type_name = type_name
145 les_model_registry(les_model_registry_size)%allocator => allocator
146 end subroutine register_les_model
148end 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 deardorff LES model.
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.