1
1
module test_drive_poisson
2
2
use testdrive, only : new_unittest, unittest_type, error_type, check, skip_test
3
3
use mesh_generator, only : calculate_mesh
4
- use poisson, only : open_file, inp , mxp, mxe, mxb, mxc, pcg
4
+ use poisson, only : open_file, read_input_file , mxp, mxe, mxb, mxc, pcg, write_output_file
5
5
6
6
implicit none
7
7
@@ -17,12 +17,12 @@ module test_drive_poisson
17
17
real :: vb(3 ,mxc), vb1(mxc), vb2(mxc), coordinates(2 , mxp)
18
18
end type mesh_vectors_t
19
19
20
- ! > inp test inputs
20
+ ! > read_input_file test inputs
21
21
type :: inp_inputs_t
22
22
character (len= :), allocatable :: data_filename
23
23
end type inp_inputs_t
24
24
25
- ! > inp test expected outputs
25
+ ! > read_input_file test expected outputs
26
26
type :: inp_expected_outputs_t
27
27
type (mesh_scalars_t) :: mesh_scalars
28
28
type (mesh_vectors_t) :: mesh_vectors
@@ -40,12 +40,12 @@ module test_drive_poisson
40
40
real :: nodal_value_of_f(mxp)
41
41
end type pcg_expected_outputs_t
42
42
43
- ! > out test inputs
44
- type :: out_inputs_t
43
+ ! > write_output_file test inputs
44
+ type :: write_output_file_inputs_t
45
45
type (mesh_scalars_t) :: mesh_scalars
46
46
type (mesh_vectors_t) :: mesh_vectors
47
47
real :: nodal_value_of_f(mxp)
48
- end type out_inputs_t
48
+ end type write_output_file_inputs_t
49
49
50
50
contains
51
51
@@ -98,7 +98,7 @@ subroutine get_15_05_mesh_values(data_filename, mesh_scalars, mesh_vectors)
98
98
mesh_vectors% coordinates(2 ,1 :mesh_scalars% num_nodes) = [1.0 , 2.0 , 3.0 , 4.0 , 1.0 , 2.0 , 3.0 , 4.0 , 1.0 , 2.0 , 3.0 , 4.0 , 1.0 , 2.0 , 3.0 , 4.0 ]
99
99
end subroutine get_15_05_mesh_values
100
100
101
- ! > Verification code for the inp subroutine
101
+ ! > Verification code for the read_input_file subroutine
102
102
subroutine verify_inp (error , inputs , expected_outputs )
103
103
implicit none
104
104
type (error_type), allocatable , intent (out ) :: error
@@ -115,7 +115,7 @@ subroutine verify_inp(error, inputs, expected_outputs)
115
115
! Open the file ready to be read
116
116
call open_file(inputs% data_filename, ' old' , file_io)
117
117
118
- call inp ( &
118
+ call read_input_file ( &
119
119
actual_num_nodes, &
120
120
actual_num_elements, &
121
121
actual_num_boundary_points, &
@@ -193,7 +193,7 @@ subroutine verify_inp(error, inputs, expected_outputs)
193
193
if (allocated (error)) return
194
194
end do
195
195
end subroutine verify_inp
196
- ! > A test for the inp subroutine with box_size = 10 and edge_size = 5
196
+ ! > A test for the read_input_file subroutine with box_size = 10 and edge_size = 5
197
197
subroutine test_inp_15_05 (error )
198
198
implicit none
199
199
type (error_type), allocatable , intent (out ) :: error
@@ -258,15 +258,4 @@ subroutine test_pcg_15_05(error)
258
258
259
259
deallocate (inputs% data_filename)
260
260
end subroutine test_pcg_15_05
261
-
262
- subroutine verify_out (error , inputs , expected_outputs )
263
- implicit none
264
- type (error_type), allocatable , intent (out ) :: error
265
-
266
- type (inp_inputs_t), intent (in ) :: inputs
267
- type (inp_expected_outputs_t), intent (in ) :: expected_outputs
268
-
269
- ! Verification code for the out subroutine
270
- ! This is a placeholder for the actual verification code
271
- end subroutine verify_out
272
- end module
261
+ end module
0 commit comments