Loading [MathJax]/jax/output/HTML-CSS/config.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
pnpn_res.f90
Go to the documentation of this file.
1! Copyright (c) 2022, 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!
35 use gather_scatter, only : gs_t
36 use ax_product, only : ax_t
37 use field, only : field_t
38 use coefs, only : coef_t
40 use space, only : space_t
41 use mesh, only : mesh_t
42 use num_types, only : rp
43 use, intrinsic :: iso_c_binding, only : c_ptr
44 implicit none
45 private
46
48 type, public, abstract :: pnpn_prs_res_t
49 contains
50 procedure(prs_res), nopass, deferred :: compute
51 end type pnpn_prs_res_t
52
54 type, public, abstract :: pnpn_vel_res_t
55 contains
56 procedure(vel_res), nopass, deferred :: compute
57 end type pnpn_vel_res_t
58
59 abstract interface
60 subroutine prs_res(p, p_res, u, v, w, u_e, v_e, w_e, f_x, f_y, f_z, c_xh,&
61 gs_Xh, bc_prs_surface, bc_sym_surface, Ax, bd, dt, mu, rho, event)
62 import field_t
63 import ax_t
64 import gs_t
65 import facet_normal_t
66 import coef_t
67 import rp
68 import c_ptr
69 type(field_t), intent(inout) :: p, u, v, w
70 type(field_t), intent(in) :: u_e, v_e, w_e
71 type(field_t), intent(inout) :: p_res
73 type(field_t), intent(in) :: f_x, f_y, f_z
74 type(coef_t), intent(inout) :: c_Xh
75 type(gs_t), intent(inout) :: gs_Xh
76 type(facet_normal_t), intent(in) :: bc_prs_surface
77 type(facet_normal_t), intent(in) :: bc_sym_surface
78 class(ax_t), intent(inout) :: Ax
79 real(kind=rp), intent(in) :: bd
80 real(kind=rp), intent(in) :: dt
81 type(field_t), intent(in) :: mu
82 type(field_t), intent(in) :: rho
83 type(c_ptr), intent(inout) :: event
84 end subroutine prs_res
85 end interface
86
87 abstract interface
88 subroutine vel_res(Ax, u, v, w, u_res, v_res, w_res, &
89 p, f_x, f_y, f_z, c_Xh, msh, Xh, mu, rho, bd, dt, n)
90 import field_t
91 import ax_t
92 import gs_t
93 import facet_normal_t
94 import space_t
95 import coef_t
96 import mesh_t
97 import rp
98 class(ax_t), intent(in) :: Ax
99 type(mesh_t), intent(inout) :: msh
100 type(space_t), intent(inout) :: Xh
101 type(field_t), intent(inout) :: p, u, v, w
102 type(field_t), intent(inout) :: u_res, v_res, w_res
103 type(field_t), intent(in) :: f_x, f_y, f_z
104 type(coef_t), intent(inout) :: c_Xh
105 type(field_t), intent(in) :: mu
106 type(field_t), intent(in) :: rho
107 real(kind=rp), intent(in) :: bd
108 real(kind=rp), intent(in) :: dt
109 integer, intent(in) :: n
110 end subroutine vel_res
111
112 end interface
113
114 interface
115
120 module subroutine pnpn_prs_res_factory(object)
121 class(pnpn_prs_res_t), allocatable, intent(inout) :: object
122 end subroutine pnpn_prs_res_factory
123
128 module subroutine pnpn_vel_res_factory(object)
129 class(pnpn_vel_res_t), allocatable, intent(inout) :: object
130 end subroutine pnpn_vel_res_factory
131
136 module subroutine pnpn_prs_res_stress_factory(object)
137 class(pnpn_prs_res_t), allocatable, intent(inout) :: object
138 end subroutine pnpn_prs_res_stress_factory
139
144 module subroutine pnpn_vel_res_stress_factory(object)
145 class(pnpn_vel_res_t), allocatable, intent(inout) :: object
146 end subroutine pnpn_vel_res_stress_factory
147
148 end interface
149
150 public :: pnpn_prs_res_factory, pnpn_vel_res_factory, &
151 pnpn_prs_res_stress_factory, pnpn_vel_res_stress_factory
152
153end module pnpn_residual
Defines a Matrix-vector product.
Definition ax.f90:34
Coefficients.
Definition coef.f90:34
Dirichlet condition applied in the facet normal direction.
Defines a field.
Definition field.f90:34
Gather-scatter.
Defines a mesh.
Definition mesh.f90:34
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:12
Defines Pressure and velocity residuals in the Pn-Pn formulation.
Definition pnpn_res.f90:34
Defines a function space.
Definition space.f90:34
Base type for a matrix-vector product providing .
Definition ax.f90:43
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Definition coef.f90:55
Dirichlet condition in facet normal direction.
Abstract type to compute pressure residual.
Definition pnpn_res.f90:48
Abstract type to compute velocity residual.
Definition pnpn_res.f90:54
The function space for the SEM solution fields.
Definition space.f90:62