Neko 1.99.3
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, Blag, Blaglag)
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(in) :: blag(n), blaglag(n)
123 real(kind=rp), intent(inout) :: bfx(n), bfy(n), bfz(n)
124 real(kind=rp), intent(in) :: b(n)
125 real(kind=rp), intent(in) :: dt, rho, bd(4)
126 end subroutine rhs_maker_bdf
127 end interface
128
129 abstract interface
130 subroutine scalar_rhs_maker_bdf(s_lag, fs, s, B, rho, dt, &
131 bd, nbd, n)
132 import field_series_t
133 import field_t
134 import rp
135 integer, intent(in) :: n, nbd
136 type(field_t), intent(in) :: s
137 type(field_series_t), intent(in) :: s_lag
138 real(kind=rp), intent(inout) :: fs(n)
139 real(kind=rp), intent(in) :: b(n)
140 real(kind=rp), intent(in) :: dt, rho, bd(4)
141 end subroutine scalar_rhs_maker_bdf
142 end interface
143
144 abstract interface
145 subroutine rhs_maker_oifs(phi_x, phi_y, phi_z, bf_x, bf_y, bf_z, &
146 rho, dt, n)
147 import rp
148 real(kind=rp), intent(in) :: rho, dt
149 integer, intent(in) :: n
150 real(kind=rp), intent(inout) :: bf_x(n), bf_y(n), bf_z(n)
151 real(kind=rp), intent(inout) :: phi_x(n), phi_y(n), phi_z(n)
152 end subroutine rhs_maker_oifs
153 end interface
154
155 abstract interface
156 subroutine scalar_rhs_maker_oifs(phi_s, bf_s, rho, dt, n)
157 import rp
158 real(kind=rp), intent(in) :: rho, dt
159 integer, intent(in) :: n
160 real(kind=rp), intent(inout) :: bf_s(n)
161 real(kind=rp), intent(inout) :: phi_s(n)
162 end subroutine scalar_rhs_maker_oifs
163 end interface
164
165 interface
166
170 module subroutine rhs_maker_sumab_fctry(object)
171 class(rhs_maker_sumab_t), allocatable, intent(inout) :: object
172 end subroutine rhs_maker_sumab_fctry
173
178 module subroutine rhs_maker_ext_fctry(object)
179 class(rhs_maker_ext_t), allocatable, intent(inout) :: object
180 end subroutine rhs_maker_ext_fctry
181
185 module subroutine rhs_maker_bdf_fctry(object)
186 class(rhs_maker_bdf_t), allocatable, intent(inout) :: object
187 end subroutine rhs_maker_bdf_fctry
188
193 module subroutine rhs_maker_oifs_fctry(object)
194 class(rhs_maker_oifs_t), allocatable, intent(inout) :: object
195 end subroutine rhs_maker_oifs_fctry
196
197 end interface
198
199 public :: rhs_maker_sumab_fctry, rhs_maker_ext_fctry, rhs_maker_bdf_fctry, &
200 rhs_maker_oifs_fctry
201
202end module rhs_maker
Contains the field_serties_t type.
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
Stores a series (sequence) of fields, logically connected to a base field, and arranged according to ...
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