Loading [MathJax]/extensions/tex2jax.js
Neko 0.9.99
A portable framework for high-order spectral element flow simulations
All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros Pages
les_model_fctry.f90
Go to the documentation of this file.
1! Copyright (c) 2021-2024, The Neko Authors
2! All rights reserved.
3!
4! Redistribution and use in source and binary forms, with or without
5! modification, are permitted provided that the following conditions
6! are met:
7!
8! * Redistributions of source code must retain the above copyright
9! notice, this list of conditions and the following disclaimer.
10!
11! * Redistributions in binary form must reproduce the above
12! copyright notice, this list of conditions and the following
13! disclaimer in the documentation and/or other materials provided
14! with the distribution.
15!
16! * Neither the name of the authors nor the names of its
17! contributors may be used to endorse or promote products derived
18! from this software without specific prior written permission.
19!
20! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23! FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24! COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25! INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26! BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27! LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30! ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31! POSSIBILITY OF SUCH DAMAGE.
32!
33submodule(les_model) les_model_fctry
34 use vreman, only : vreman_t
35 use smagorinsky, only : smagorinsky_t
37 use sigma, only : sigma_t
38 implicit none
39
40 ! List of all possible types created by the factory routine
41 character(len=20) :: LES_KNOWN_TYPES(4) = [character(len=20) :: &
42 "vreman", &
43 "smagorinsky", &
44 "dynamic_smagorinsky", &
45 "sigma"]
46
47contains
54 module subroutine les_model_factory(object, type_name, dofmap, coef, json)
55 class(les_model_t), allocatable, intent(inout) :: object
56 character(len=*), intent(in) :: type_name
57 type(dofmap_t), intent(in) :: dofmap
58 type(coef_t), intent(in) :: coef
59 type(json_file), intent(inout) :: json
60 character(len=:), allocatable :: type_string
61
62 if (allocated(object)) deallocate(object)
63
64 select case (trim(type_name))
65 case ('vreman')
66 allocate(vreman_t::object)
67 case ('smagorinsky')
68 allocate(smagorinsky_t::object)
69 case ('dynamic_smagorinsky')
70 allocate(dynamic_smagorinsky_t::object)
71 case ('sigma')
72 allocate(sigma_t::object)
73 case default
74 call neko_type_error("LES model", type_name, les_known_types)
75 end select
76
77 end subroutine les_model_factory
78
79end submodule les_model_fctry
Defines a mapping of the degrees of freedom.
Definition dofmap.f90:35
Implements dynamic_smagorinsky_t.
Implements les_model_t.
Definition les_model.f90:35
Implements sigma_t.
Definition sigma.f90:35
Implements smagorinsky_t.
Implements vreman_t.
Definition vreman.f90:35
Implements the dynamic Smagorinsky LES model.
Implements the Sigma LES model.
Definition sigma.f90:52
Implements the smagorinsky LES model.
Implements the Vreman LES model.
Definition vreman.f90:52