-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathio_functions.f95
66 lines (55 loc) · 1.98 KB
/
io_functions.f95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
module io_functions_m
use mesh_m
implicit none
contains
subroutine display_inputs(mesh)
type(mesh_t) :: mesh
! Boundary geometry
write (*,*) "Problem boundaries"
write (*,*) " x_min: ", mesh%x_min
write (*,*) " x_max: ", mesh%x_max
write (*,*) " y_min: ", mesh%y_min
write (*,*) " y_max: ", mesh%y_max
write (*,*)
! Grid params
write (*,*) "Grid is ", mesh%n_rows, " rows by ", mesh%n_cols, " columns."
write (*,*) " dx: ", mesh%dx
write (*,*) " dy: ", mesh%dy
write (*,*) " Total control points: ", mesh%N_cp
write (*,*)
! Boundary conditions
write (*,*) "Boundary conditions"
! West
write (*,*) " West type: ", mesh%W_bc%type
if (mesh%W_bc%type == "D") then
write (*,*) " phi=", mesh%W_bc%a, "+", mesh%W_bc%b, "x+", mesh%W_bc%c, "x^2"
else
write (*,*) " dp/dn=", mesh%W_bc%a, "+", mesh%W_bc%b, "x+", mesh%W_bc%c, "x^2"
end if
write (*,*)
! South
write (*,*) " South type: ", mesh%S_bc%type
if (mesh%S_bc%type == "D") then
write (*,*) " phi=", mesh%S_bc%a, "+", mesh%S_bc%b, "x+", mesh%S_bc%c, "x^2"
else
write (*,*) " dp/dn=", mesh%S_bc%a, "+", mesh%S_bc%b, "x+", mesh%S_bc%c, "x^2"
end if
write (*,*)
! East
write (*,*) " East type: ", mesh%E_bc%type
if (mesh%E_bc%type == "D") then
write (*,*) " phi=", mesh%E_bc%a, "+", mesh%E_bc%b, "x+", mesh%E_bc%c, "x^2"
else
write (*,*) " dp/dn=", mesh%E_bc%a, "+", mesh%E_bc%b, "x+", mesh%E_bc%c, "x^2"
end if
write (*,*)
! North
write (*,*) " North type: ", mesh%N_bc%type
if (mesh%N_bc%type == "D") then
write (*,*) " phi=", mesh%N_bc%a, "+", mesh%N_bc%b, "x+", mesh%N_bc%c, "x^2"
else
write (*,*) " dp/dn=", mesh%N_bc%a, "+", mesh%N_bc%b, "x+", mesh%N_bc%c, "x^2"
end if
write (*,*)
end subroutine display_inputs
end module io_functions_m