Neko  0.8.1
A portable framework for high-order spectral element flow simulations
les_model_fctry.f90
Go to the documentation of this file.
1 
2 ! Copyright (c) 2021-2022, The Neko Authors
3 ! All rights reserved.
4 !
5 ! Redistribution and use in source and binary forms, with or without
6 ! modification, are permitted provided that the following conditions
7 ! are met:
8 !
9 ! * Redistributions of source code must retain the above copyright
10 ! notice, this list of conditions and the following disclaimer.
11 !
12 ! * Redistributions in binary form must reproduce the above
13 ! copyright notice, this list of conditions and the following
14 ! disclaimer in the documentation and/or other materials provided
15 ! with the distribution.
16 !
17 ! * Neither the name of the authors nor the names of its
18 ! contributors may be used to endorse or promote products derived
19 ! from this software without specific prior written permission.
20 !
21 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 ! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 ! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 ! FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 ! COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 ! INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 ! BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 ! LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29 ! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 ! ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 ! POSSIBILITY OF SUCH DAMAGE.
33 !
35  use les_model, only : les_model_t
36  use vreman, only : vreman_t
37  use dofmap, only : dofmap_t
38  use coefs, only : coef_t
39  use json_module, only : json_file
40  implicit none
41  private
42 
43  public :: les_model_factory
44 
45 contains
52  subroutine les_model_factory(les_model, name, dofmap, coef, json)
53  class(les_model_t), allocatable, target, intent(inout) :: les_model
54  character(len=*), intent(in) :: name
55  type(dofmap_t), intent(in) :: dofmap
56  type(coef_t), intent(in) :: coef
57  type(json_file), intent(inout) :: json
58 
59  if (allocated(les_model)) then
60  deallocate(les_model)
61  end if
62 
63  if (trim(name) .eq. 'vreman') then
64  allocate(vreman_t::les_model)
65  end if
66 
67  call les_model%init(dofmap, coef, json)
68 
69  end subroutine les_model_factory
70 
71 end module les_model_fctry
Coefficients.
Definition: coef.f90:34
Defines a mapping of the degrees of freedom.
Definition: dofmap.f90:35
subroutine, public les_model_factory(les_model, name, dofmap, coef, json)
LES model factory. Both constructs and initializes the object.
Implements les_model_t.
Definition: les_model.f90:35
Implements vreman_t.
Definition: vreman.f90:35
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Definition: coef.f90:54
Base abstract type for LES models based on the Boussinesq approximation.
Definition: les_model.f90:49
Implements the Vreman LES model.
Definition: vreman.f90:51