Neko 0.9.99
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
rhs_maker.f90
Go to the documentation of this file.
1! Copyright (c) 2018-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!
39 use num_types, only : rp
41 use field, only : field_t
42 implicit none
43 private
44
46 type, public, abstract :: rhs_maker_sumab_t
47 contains
48 procedure(rhs_maker_sumab), nopass, deferred :: compute_fluid
49 end type rhs_maker_sumab_t
50
52 type, public, abstract :: rhs_maker_ext_t
53 contains
54 procedure(rhs_maker_ext), nopass, deferred :: compute_fluid
55 procedure(scalar_rhs_maker_ext), nopass, deferred :: compute_scalar
56 end type rhs_maker_ext_t
57
59 type, public, abstract :: rhs_maker_bdf_t
60 contains
61 procedure(rhs_maker_bdf), nopass, deferred :: compute_fluid
62 procedure(scalar_rhs_maker_bdf), nopass, deferred :: compute_scalar
63 end type rhs_maker_bdf_t
64
66 type, public, abstract :: rhs_maker_oifs_t
67 contains
68 procedure(rhs_maker_oifs), nopass, deferred :: compute_fluid
69 procedure(scalar_rhs_maker_oifs), nopass, deferred :: compute_scalar
70 end type rhs_maker_oifs_t
71
72 abstract interface
73 subroutine rhs_maker_sumab(u, v, w, uu, vv, ww, &
74 uulag, vvlag, wwlag, ab, nab)
75 import field_t
76 import field_series_t
77 import rp
78 type(field_t), intent(inout) :: u, v, w
79 type(field_t), intent(inout) :: uu, vv, ww
80 type(field_series_t), intent(inout) :: uulag, vvlag, wwlag
81 real(kind=rp), dimension(3), intent(in) :: ab
82 integer, intent(in) :: nab
83 end subroutine rhs_maker_sumab
84 end interface
85
86 abstract interface
87 subroutine rhs_maker_ext(fx_lag, fy_lag, fz_lag, &
88 fx_laglag, fy_laglag, fz_laglag, fx, fy, fz, &
89 rho, ext_coeffs, n)
90 import field_t
91 import rp
92 type(field_t), intent(inout) :: fx_lag, fy_lag, fz_lag
93 type(field_t), intent(inout) :: fx_laglag, fy_laglag, fz_laglag
94 real(kind=rp), intent(in) :: rho, ext_coeffs(4)
95 integer, intent(in) :: n
96 real(kind=rp), intent(inout) :: fx(n), fy(n), fz(n)
97 end subroutine rhs_maker_ext
98 end interface
99
100 abstract interface
101 subroutine scalar_rhs_maker_ext(fs_lag, fs_laglag, fs, rho, &
102 ext_coeffs, n)
103 import field_t
104 import rp
105 type(field_t), intent(inout) :: fs_lag
106 type(field_t), intent(inout) :: fs_laglag
107 real(kind=rp), intent(in) :: rho, ext_coeffs(4)
108 integer, intent(in) :: n
109 real(kind=rp), intent(inout) :: fs(n)
110 end subroutine scalar_rhs_maker_ext
111 end interface
112
113 abstract interface
114 subroutine rhs_maker_bdf(ulag, vlag, wlag, bfx, bfy, bfz, &
115 u, v, w, B, rho, dt, bd, nbd, n)
116 import field_series_t
117 import field_t
118 import rp
119 integer, intent(in) :: n, nbd
120 type(field_t), intent(in) :: u, v, w
121 type(field_series_t), intent(in) :: ulag, vlag, wlag
122 real(kind=rp), intent(inout) :: bfx(n), bfy(n), bfz(n)
123 real(kind=rp), intent(in) :: b(n)
124 real(kind=rp), intent(in) :: dt, rho, bd(4)
125 end subroutine rhs_maker_bdf
126 end interface
127
128 abstract interface
129 subroutine scalar_rhs_maker_bdf(s_lag, fs, s, B, rho, dt, &
130 bd, nbd, n)
131 import field_series_t
132 import field_t
133 import rp
134 integer, intent(in) :: n, nbd
135 type(field_t), intent(in) :: s
136 type(field_series_t), intent(in) :: s_lag
137 real(kind=rp), intent(inout) :: fs(n)
138 real(kind=rp), intent(in) :: b(n)
139 real(kind=rp), intent(in) :: dt, rho, bd(4)
140 end subroutine scalar_rhs_maker_bdf
141 end interface
142
143 abstract interface
144 subroutine rhs_maker_oifs(phi_x, phi_y, phi_z, bf_x, bf_y, bf_z, &
145 rho, dt, n)
146 import rp
147 real(kind=rp), intent(in) :: rho, dt
148 integer, intent(in) :: n
149 real(kind=rp), intent(inout) :: bf_x(n), bf_y(n), bf_z(n)
150 real(kind=rp), intent(inout) :: phi_x(n), phi_y(n), phi_z(n)
151 end subroutine rhs_maker_oifs
152 end interface
153
154 abstract interface
155 subroutine scalar_rhs_maker_oifs(phi_s, bf_s, rho, dt, n)
156 import rp
157 real(kind=rp), intent(in) :: rho, dt
158 integer, intent(in) :: n
159 real(kind=rp), intent(inout) :: bf_s(n)
160 real(kind=rp), intent(inout) :: phi_s(n)
161 end subroutine scalar_rhs_maker_oifs
162 end interface
163
164 interface
165
169 module subroutine rhs_maker_sumab_fctry(object)
170 class(rhs_maker_sumab_t), allocatable, intent(inout) :: object
171 end subroutine rhs_maker_sumab_fctry
172
177 module subroutine rhs_maker_ext_fctry(object)
178 class(rhs_maker_ext_t), allocatable, intent(inout) :: object
179 end subroutine rhs_maker_ext_fctry
180
184 module subroutine rhs_maker_bdf_fctry(object)
185 class(rhs_maker_bdf_t), allocatable, intent(inout) :: object
186 end subroutine rhs_maker_bdf_fctry
187
192 module subroutine rhs_maker_oifs_fctry(object)
193 class(rhs_maker_oifs_t), allocatable, intent(inout) :: object
194 end subroutine rhs_maker_oifs_fctry
195
196 end interface
197
198 public :: rhs_maker_sumab_fctry, rhs_maker_ext_fctry, rhs_maker_bdf_fctry, &
199 rhs_maker_oifs_fctry
200
201end module rhs_maker
Stores a series fields.
Defines a field.
Definition field.f90:34
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:12
Routines to generate the right-hand sides for the convection-diffusion equation. Employs the EXT/BDF ...
Definition rhs_maker.f90:38
Abstract type to add contributions to F from lagged BD terms.
Definition rhs_maker.f90:59
Abstract type to sum up contributions to kth order extrapolation scheme.
Definition rhs_maker.f90:52
Abstract type to add contributions of kth order OIFS scheme.
Definition rhs_maker.f90:66
Abstract type to compute extrapolated velocity field for the pressure equation.
Definition rhs_maker.f90:46