@@ -8,14 +8,15 @@ module foodie_test_integrand_ladvection
88use , intrinsic :: iso_fortran_env, only : stderr= >error_unit
99use flap, only : command_line_interface
1010use foodie, only : integrand_object
11+ use foodie_test_integrand_tester_object, only : integrand_tester_object
1112use penf, only : FR_P, I_P, R_P, str
1213use wenoof, only : interpolator_object, wenoof_create
1314
1415implicit none
1516private
1617public :: integrand_ladvection
1718
18- type, extends(integrand_object ) :: integrand_ladvection
19+ type, extends(integrand_tester_object ) :: integrand_ladvection
1920 ! < 1D linear advection field.
2021 ! <
2122 ! < It is a FOODIE integrand class concrete extension.
@@ -56,15 +57,15 @@ module foodie_test_integrand_ladvection
5657 class(interpolator_object), allocatable :: interpolator ! < WENO interpolator.
5758 contains
5859 ! auxiliary methods
59- procedure , pass(self), public :: destroy ! < Destroy field.
60- procedure , pass(self), public :: dt = > compute_dt ! < Compute the current time step, by means of CFL condition.
61- procedure , pass(self), public :: exact_solution ! < Return exact solution.
62- procedure , pass(self), public :: export_tecplot ! < Export integrand to Tecplot file .
63- procedure , pass(self), public :: output ! < Extract integrand state field.
64- procedure , pass(self), public :: parse_cli ! < Initialize from command line interface .
65- procedure , nopass, public :: set_cli ! < Set command line interface.
66- procedure , pass(self), public :: set_square_wave_initial_state ! < Set initial state as a square wave .
67- ! public deferred methods
60+ procedure , pass(self), public :: destroy ! < Destroy field.
61+ procedure , pass(self), public :: dt = > compute_dt ! < Compute the current time step, by means of CFL condition.
62+ procedure , pass(self), public :: exact_solution ! < Return exact solution.
63+ procedure , pass(self), public :: output ! < Extract integrand state field .
64+ ! integrand_tester_object deferred methods
65+ procedure , pass(self), public :: export_tecplot ! < Export integrand to Tecplot file .
66+ procedure , pass(self), public :: parse_cli ! < Initialize from command line interface.
67+ procedure , nopass, public :: set_cli ! < Set command line interface .
68+ ! integrand_object deferred methods
6869 procedure , pass(self), public :: integrand_dimension ! < Return integrand dimension.
6970 procedure , pass(self), public :: t = > dU_dt ! < Time derivative, residuals.
7071 ! operators
@@ -93,8 +94,9 @@ module foodie_test_integrand_ladvection
9394 ! procedure, pass(opr), public :: integrand_multiply_real_scalar_fast !< `* real_scalar` fast operator.
9495 ! procedure, pass(opr), public :: integrand_subtract_integrand_fast !< `-` fast operator.
9596 ! private methods
96- procedure , pass(self), private :: impose_boundary_conditions ! < Impose boundary conditions.
97- procedure , pass(self), private :: reconstruct_interfaces ! < Reconstruct interface states.
97+ procedure , pass(self), private :: impose_boundary_conditions ! < Impose boundary conditions.
98+ procedure , pass(self), private :: reconstruct_interfaces ! < Reconstruct interface states.
99+ procedure , pass(self), private :: set_square_wave_initial_state ! < Set initial state as a square wave.
98100endtype integrand_ladvection
99101
100102contains
@@ -131,6 +133,15 @@ pure function exact_solution(self, u0, t) result(exact)
131133
132134 end function exact_solution
133135
136+ pure function output (self ) result(state)
137+ ! < Output the advection field state.
138+ class(integrand_ladvection), intent (in ) :: self ! < Advection field.
139+ real (R_P), allocatable :: state(:) ! < Advection state
140+
141+ state = self% u(1 :self% Ni)
142+ end function output
143+
144+ ! integrand_tester_object deferred methods
134145 subroutine export_tecplot (self , file_name , t , scheme , close_file )
135146 ! < Export integrand to Tecplot file.
136147 class(integrand_ladvection), intent (in ) :: self ! < Advection field.
@@ -163,14 +174,6 @@ subroutine export_tecplot(self, file_name, t, scheme, close_file)
163174 endif
164175 end subroutine export_tecplot
165176
166- pure function output (self ) result(state)
167- ! < Output the advection field state.
168- class(integrand_ladvection), intent (in ) :: self ! < Advection field.
169- real (R_P), allocatable :: state(:) ! < Advection state
170-
171- state = self% u(1 :self% Ni)
172- end function output
173-
174177 subroutine parse_cli (self , cli )
175178 ! < Initialize from command line interface.
176179 class(integrand_ladvection), intent (inout ) :: self ! < Advection field.
@@ -218,7 +221,7 @@ subroutine set_cli(cli)
218221 def= ' square_wave' , choices= ' square_wave' )
219222 end subroutine set_cli
220223
221- ! ADT integrand deferred methods
224+ ! integrand_object deferred methods
222225 function dU_dt (self , t ) result(dState_dt)
223226 ! < Time derivative of advection field, the residuals function.
224227 class(integrand_ladvection), intent (in ) :: self ! < Advection field.
0 commit comments