Skip to content
Open
Show file tree
Hide file tree
Changes from 77 commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
7f08ddf
Save changes close to a green suite
mo-rickywong Apr 1, 2026
6c37a63
Updates
mo-rickywong Apr 3, 2026
6926333
Merge branch 'main' into AppsRmGlobalCfg_CoreDriver
mo-rickywong Apr 3, 2026
e42fd48
Merge branch 'main' into AppsRmGlobalCfg_CoreDriver
mo-rickywong Apr 21, 2026
279a2e9
Merge branch 'main' into AppsRmGlobalCfg_CoreDriver
mo-rickywong Apr 23, 2026
00dd755
Tidy and clean
mo-rickywong Apr 24, 2026
f774117
Merge branch 'main' into AppsRmGlobalCfg_CoreDriver
mo-rickywong Apr 24, 2026
fc008f0
Set default tile size
mo-rickywong Apr 29, 2026
21a1cad
force developer change in rose stem back to be same as main
mo-rickywong Apr 29, 2026
74b11a9
Merge branch 'main' into AppsRmGlobalCfg_CoreDriver
mo-rickywong Apr 29, 2026
fd63226
typo
mo-rickywong Apr 29, 2026
a0c9689
Update oversights
mo-rickywong Apr 29, 2026
af12f27
Missing declation
mo-rickywong Apr 30, 2026
35f16a0
Update lfric2lfric macros
mo-rickywong Apr 30, 2026
15d8565
Update lfric2lfric macro
mo-rickywong Apr 30, 2026
f85fcae
Merge branch 'main' into AppsRmGlobalCfg_CoreDriver
mo-rickywong May 1, 2026
129269d
Merge branch 'main' into AppsRmGlobalCfg_CoreDriver
mo-rickywong May 11, 2026
181256b
Merge branch 'main' into AppsRmGlobalCfg_CoreDriver
mo-rickywong May 11, 2026
d04befb
Modify to pass down config_type object due to code owner concerns
mo-rickywong May 28, 2026
2daa065
Merge branch 'main' into AppsRmGlobalCfg_CoreDriver
mo-rickywong Jun 4, 2026
802e3ea
Update doxygen comments
mo-rickywong Jun 5, 2026
033cd12
Merge branch 'main' into AppsRmGlobalCfg_CoreDriver
mo-rickywong Jun 8, 2026
0daee19
Green test suite state
mo-rickywong Jun 18, 2026
c6a3e11
Merge branch 'main' into AppsRmGlobalCfg_CoreDriver
mo-rickywong Jun 18, 2026
1e180a5
Merge branch 'main' into AppsRmGlobalCfg_CoreDriver
mo-rickywong Jun 19, 2026
3ac072a
Merge branch 'main' into AppsRmGlobalCfg_CoreDriver
mo-rickywong Jun 22, 2026
ad0c0e6
update to linear file
mo-rickywong Jun 23, 2026
9cf8c0a
Change requests for Mark Hedley
mo-rickywong Jun 25, 2026
888f398
Change requests from Charlotte Turner
mo-rickywong Jun 25, 2026
345882e
Changes requested by Matthew Hambley
mo-rickywong Jun 25, 2026
e574ca2
Changes requested by Mike Hobson
mo-rickywong Jun 25, 2026
4d7a4fd
Apply suggestions from code review
mo-rickywong Jun 25, 2026
df89d60
Changes requested by Allen T
mo-rickywong Jun 25, 2026
5ee352f
Changes requested by Tom Bendall
mo-rickywong Jun 25, 2026
01875a3
Change requested by Tom Bendall
mo-rickywong Jun 25, 2026
17ec27e
Change requested by tom bendall
mo-rickywong Jun 25, 2026
ff81107
Changes for Tom Bendall
mo-rickywong Jun 25, 2026
542de1f
Additional changes resulting from reviewer updates
mo-rickywong Jun 26, 2026
a7cf4de
Changes request by Iva Kavcic
mo-rickywong Jun 26, 2026
341c86b
Some more changes for SteveM and Pierre
mo-rickywong Jun 26, 2026
38bad42
Update science/gungho/source/algorithm/transport/control/theta_transp…
mo-rickywong Jun 26, 2026
de65c8f
Merge branch 'main' into AppsRmGlobalCfg_CoreDriver
mo-rickywong Jun 26, 2026
ccffe25
Merge branch 'main' into AppsRmGlobalCfg_CoreDriver
mo-rickywong Jun 29, 2026
026df39
Merge branch 'main' into AppsRmGlobalCfg_CoreDriver
mo-rickywong Jun 30, 2026
50ce693
Update the KGOs
mo-rickywong Jun 30, 2026
63c236c
Update comments
mo-rickywong Jun 30, 2026
5300fc6
Move config_mod use statements
mo-rickywong Jun 30, 2026
fba2f64
Remove debug directory
mo-rickywong Jun 30, 2026
d4feb60
Merge branch 'AppsRmGlobalCfg_CoreDriver' into AppsCleanFeigners_1
mo-rickywong Jul 1, 2026
6318391
Merge branch 'main' into AppsCleanFeigners_1
mo-rickywong Jul 1, 2026
ef989f4
Update to merging on main
mo-rickywong Jul 2, 2026
c79f834
Update apps to allow for changes to core
mo-rickywong Jul 22, 2026
c9db323
Merge branch 'main' into AppsCleanFeigners_1
mo-rickywong Jul 22, 2026
a84a56f
Merge branch 'main' into AppsCleanFeigners_1
mo-rickywong Aug 27, 2026
5e757db
Fix arguments in function
mo-rickywong Aug 27, 2026
098f9b0
tidy up doxygens
mo-rickywong Sep 1, 2026
849c9a6
1st set of changes
mo-rickywong Sep 1, 2026
24e7722
Remove pointer statements to get build working
mo-rickywong Sep 1, 2026
e7c99f0
Fix to get build working
mo-rickywong Sep 2, 2026
647a229
Merge branch 'main' into AppsDecoupleGeoTop
mo-rickywong Sep 3, 2026
49aab8d
Merge branch 'main' into AppsCleanFeigners_1
mo-rickywong Sep 3, 2026
aa25e23
update dependencies file
mo-rickywong Sep 3, 2026
4d8558b
Saving progress
mo-rickywong Sep 4, 2026
1b95f08
Move access of geometry and topology to mesh object where possible
mo-rickywong Sep 7, 2026
44dff0b
Merge branch 'main' into AppsDecoupleGeoTop
mo-rickywong Sep 7, 2026
4ef684e
Merge branch 'AppsDecoupleGeoTop' into AppsCleanFeigners_1
mo-rickywong Sep 7, 2026
1059a69
Merge branch 'AppsCleanFeigners_1' into AppsCleanFeigners_2
mo-rickywong Sep 7, 2026
e186e5d
Saving progress
mo-rickywong Sep 12, 2026
0e142e7
Merge branch 'main' into AppsCleanFeigners_1
mo-rickywong Sep 12, 2026
451936c
Merge branch 'AppsCleanFeigners_1' into AppsCleanFeigners_2
mo-rickywong Sep 12, 2026
bfdf651
Get apps repo running green with the last on infrastructure/component…
mo-rickywong Sep 14, 2026
8ed43cc
Merge branch 'main' into AppsCleanFeigners_1
mo-rickywong Sep 17, 2026
fafaa1c
Merge branch 'AppsCleanFeigners_1' into AppsCleanFeigners_2
mo-rickywong Sep 17, 2026
ad4a0eb
Save progress before continuing
mo-rickywong Sep 17, 2026
a230f50
reviewer requested changes
mo-rickywong Sep 17, 2026
d8f0b6a
Add missing import statements
mo-rickywong Sep 17, 2026
9174285
Update to jedi to get it to run green
mo-rickywong Sep 18, 2026
bff11e2
Merge branch 'main' into AppsCleanFeigners_2
mo-rickywong Sep 18, 2026
d6986cd
Merge branch 'main' into AppsCleanFeigners_1
mo-rickywong Sep 21, 2026
4e184c9
Merge branch 'main' into AppsCleanFeigners_1
mo-rickywong Oct 5, 2026
bd8dc24
Merge branch 'AppsCleanFeigners_1' of github.com:mo-rickywong/lfric_a…
mo-rickywong Oct 5, 2026
d7ca422
Merge branch 'AppsCleanFeigners_1' into AppsCleanFeigners_2
mo-rickywong Oct 5, 2026
2a3b2ab
Merge branch 'main' into AppsCleanFeigners_1
mo-rickywong Oct 5, 2026
e856893
Remove leftover comment
mo-rickywong Oct 6, 2026
c9091df
Merge branch 'AppsCleanFeigners_1' into AppsCleanFeigners_2
mo-rickywong Oct 6, 2026
e37e0d9
Merge branch 'main' into AppsCleanFeigners_1
mo-rickywong Oct 23, 2026
2f2a4f8
Merge branch 'main' into AppsCleanFeigners_1
mo-rickywong Oct 23, 2026
88d3a02
Fix failures on moving to head of trunk
mo-rickywong Oct 23, 2026
35cf5e0
Merge branch 'main' into AppsCleanFeigners_1
mo-rickywong Oct 23, 2026
cba0b82
Merge branch 'AppsCleanFeigners_1' into AppsCleanFeigners_2
mo-rickywong Oct 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ module adjt_compute_vorticity_alg_mod
use fs_continuity_mod, only : W1, W2
use function_space_collection_mod, only : function_space_collection

use config_mod, only: config_type

implicit none

public
Expand All @@ -31,15 +33,16 @@ module adjt_compute_vorticity_alg_mod
!> Determined by testing the equality of inner products <Mx, Mx> and <AMx, x>,
!> where M is the tangent linear and A is the adjoint.
!> @param[in] mesh The model mesh
subroutine adjt_compute_vorticity_alg( mesh )
subroutine adjt_compute_vorticity_alg(config, mesh)

use compute_vorticity_alg_mod, only : compute_vorticity_alg
use adj_compute_vorticity_alg_mod, only : adj_compute_vorticity_alg

implicit none

! Arguments
type(mesh_type), pointer, intent(in) :: mesh
type(config_type), intent(in) :: config
type(mesh_type), intent(in) :: mesh

! Arguments for tl and adj calls
type(field_type) :: xi
Expand Down Expand Up @@ -101,7 +104,7 @@ module adjt_compute_vorticity_alg_mod
setval_x( u_input, u ) )

! Tangent linear
call compute_vorticity_alg( xi, u, weak_form_u )
call compute_vorticity_alg(config, xi, u, weak_form_u)

! < Mx, Mx >
call invoke( x_innerproduct_x( xi_inner_prod, xi ), &
Expand Down Expand Up @@ -130,7 +133,7 @@ module adjt_compute_vorticity_alg_mod
u_u_input_inner_prod = 0.0_r_def

! Adjoint
call adj_compute_vorticity_alg( xi, u, weak_form_u )
call adj_compute_vorticity_alg(config, xi, u, weak_form_u)

! < AMx, x >
call invoke( x_innerproduct_y( xi_xi_input_inner_prod, &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
!> @brief Module containing adjoint test for atl_derive_exner_from_eos_alg
module atlt_derive_exner_from_eos_alg_mod

use config_mod, only : config_type
use field_mod, only : field_type
use function_space_mod, only : function_space_type
use constants_mod, only : r_def, i_def
Expand Down Expand Up @@ -33,16 +34,18 @@ module atlt_derive_exner_from_eos_alg_mod
!> @details Passes if adjoint is transpose of tangent linear.
!> Determined by testing the equality of inner products <Mx, Mx> and <AMx, x>,
!> where M is the tangent linear and A is the adjoint.
!> @param[in] config Application configuration object
!> @param[in] mesh The model mesh
subroutine atlt_derive_exner_from_eos_alg( mesh )
subroutine atlt_derive_exner_from_eos_alg(config, mesh)

use tl_derive_exner_from_eos_alg_mod, only : tl_derive_exner_from_eos
use atl_derive_exner_from_eos_alg_mod, only : atl_derive_exner_from_eos

implicit none

! Arguments
type(mesh_type), pointer, intent(in) :: mesh
type(config_type), intent(in) :: config
type(mesh_type), intent(in) :: mesh

! Arguments for tl and atl calls
! Form of state and rhs is [u,theta,rho,exner]
Expand Down Expand Up @@ -111,7 +114,7 @@ module atlt_derive_exner_from_eos_alg_mod
setval_random( ls_moist_dyn ) )

! Tangent linear
call tl_derive_exner_from_eos( state, moist_dyn, ls_state, ls_moist_dyn )
call tl_derive_exner_from_eos( config, state, moist_dyn, ls_state, ls_moist_dyn )

! < Mx, Mx >
call invoke( x_innerproduct_x( state_inner_prod(igh_t), state(igh_t) ), &
Expand Down Expand Up @@ -151,7 +154,7 @@ module atlt_derive_exner_from_eos_alg_mod
moist_dyn_moist_dyn_input_inner_prod = 0.0_r_def

! Adjoint
call atl_derive_exner_from_eos( state, moist_dyn, ls_state, ls_moist_dyn )
call atl_derive_exner_from_eos( config, state, moist_dyn, ls_state, ls_moist_dyn )

! < AMx, x >
call invoke( x_innerproduct_y( state_state_input_inner_prod(igh_t), &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
!> @brief Module containing adjoint test for atl_rhs_alg
module atlt_rhs_alg_mod

use config_mod, only : config_type
use sci_assign_field_random_range_alg_mod, &
only : assign_field_random_range
use field_mod, only : field_type
Expand Down Expand Up @@ -41,18 +42,20 @@ module atlt_rhs_alg_mod
!> @details Passes if adjoint is transpose of tangent linear.
!> Determined by testing the equality of inner products <Mx, Mx> and <AMx, x>,
!> where M is the tangent linear and A is the adjoint.
!> @param[in] config Application configuration object
!> @param[in] mesh The model mesh
!> @param[in] model_clock The model clock
subroutine atlt_rhs_alg( mesh, model_clock )
subroutine atlt_rhs_alg( config, mesh, model_clock )

use tl_rhs_alg_mod, only : tl_rhs_alg
use atl_rhs_alg_mod, only : atl_rhs_alg
use tl_rhs_alg_mod, only: tl_rhs_alg
use atl_rhs_alg_mod, only: atl_rhs_alg

implicit none

! Arguments
type(mesh_type), pointer, intent(in) :: mesh
type(model_clock_type), intent(in) :: model_clock
type(config_type), intent(in) :: config
type(mesh_type), intent(in) :: mesh
type(model_clock_type), intent(in) :: model_clock

! Arguments for tl and atl calls
! Form of state and rhs is [u,theta,rho,exner]
Expand Down Expand Up @@ -206,9 +209,9 @@ module atlt_rhs_alg_mod


! Tangent linear
call tl_rhs_alg( rhs, alpha_dt, base_state, state, moist_dyn, &
ls_state, ls_moist_dyn, compute_eos, &
dlayer_rhs, model_clock )
call tl_rhs_alg( config, rhs, alpha_dt, base_state, state, moist_dyn, &
ls_state, ls_moist_dyn, compute_eos, dlayer_rhs, &
model_clock )

! < Mx, Mx >
call invoke( x_innerproduct_x( base_state_inner_prod(igh_u), base_state(igh_u) ), &
Expand Down Expand Up @@ -310,9 +313,9 @@ module atlt_rhs_alg_mod
rhs_rhs_input_inner_prod(:) = 0.0_r_def

! Adjoint
call atl_rhs_alg( rhs, alpha_dt, base_state, state, moist_dyn, &
ls_state, ls_moist_dyn, compute_eos, &
dlayer_rhs, model_clock )
call atl_rhs_alg( config, rhs, alpha_dt, base_state, state, moist_dyn, &
ls_state, ls_moist_dyn, compute_eos, dlayer_rhs, &
model_clock )

! < AMx, x >
call invoke( x_innerproduct_y( base_state_base_state_input_inner_prod(igh_u), &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
!> @brief Module containing standard adjoint test for adj_convert_hdiv_field_kernel
module adjt_sci_convert_hdiv_field_alg_mod

use config_mod, only: config_type
use field_mod, only: field_type
use function_space_mod, only: function_space_type
use mesh_mod, only: mesh_type
Expand All @@ -30,18 +31,20 @@ module adjt_sci_convert_hdiv_field_alg_mod

!=============================================================================
!> @brief Adjoint test for adj_convert_hdiv_field_kernel
!> @param[in] config Application configuration object
!> @param[in] mesh A mesh object
!> @param[in] chi The coordinate field
!> @param[in] panel_id The panel id
subroutine adjt_sci_convert_hdiv_field_alg(mesh, chi, panel_id)
subroutine adjt_sci_convert_hdiv_field_alg(config, mesh, chi, panel_id)

use sci_convert_hdiv_field_kernel_mod, only: convert_hdiv_field_kernel_type
use invoke_adj_cvt_hdiv_field_kernel_mod, only: invoke_adj_convert_hdiv_field_kernel

implicit none

! Arguments
type(mesh_type), pointer, intent(in) :: mesh
type(config_type), intent(in) :: config
type(mesh_type), intent(in) :: mesh
type(field_type), dimension(3), intent(in) :: chi
type(field_type), intent(in) :: panel_id

Expand Down Expand Up @@ -74,6 +77,12 @@ module adjt_sci_convert_hdiv_field_alg_mod
real(kind=r_def), parameter :: overall_tolerance = 1500.0_r_def
real(kind=r_def), parameter :: eps = 1e-30_r_def

integer(i_def) :: coord_system
real(r_def) :: scaled_radius

coord_system = config%finite_element%coord_system()
scaled_radius = config%planet%scaled_radius()

! Initialise arguments
vector_space_w3_ptr => function_space_collection%get_fs(mesh, element_order_h, &
element_order_v, W3)
Expand All @@ -96,7 +105,10 @@ module adjt_sci_convert_hdiv_field_alg_mod
! Final initialisation and call TL kernel
call invoke( setval_random(computational_field), &
setval_X(computational_field_input, computational_field), &
convert_hdiv_field_kernel_type(physical_field3, computational_field, chi, panel_id) )
convert_hdiv_field_kernel_type(physical_field3, computational_field, &
chi, panel_id, mesh%geometry(), &
mesh%topology(), &
coord_system, scaled_radius) )

! Get dot product <M dx, M dx>
write(log_scratch_space, *) "adjt_sci_convert_hdiv_field inner products:"
Expand All @@ -118,7 +130,10 @@ module adjt_sci_convert_hdiv_field_alg_mod
call invoke(inc_a_times_X( computational_field_sf, computational_field ))

! Call adjoint
call invoke_adj_convert_hdiv_field_kernel(physical_field3, computational_field, chi, panel_id)
call invoke_adj_convert_hdiv_field_kernel(physical_field3, computational_field, &
chi, panel_id, mesh%geometry(), &
mesh%topology(), coord_system, &
scaled_radius)

! Calculate dot product <AM dx, dx>
inner2 = 0.0_r_def
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
!> @brief Module containing standard adjoint tests for the w3/wth to/from w2 interpolations
module adjt_interpolation_alg_mod

use base_mesh_config_mod, only : geometry, topology
use config_mod, only : config_type
use field_mod, only : field_type
use function_space_mod, only : function_space_type
use mesh_mod, only : mesh_type
Expand All @@ -32,16 +32,18 @@ module adjt_interpolation_alg_mod

!=============================================================================
!> @brief Adjoint test for w2 to w3/wth interpolations
!> @param[in] mesh A mesh object
subroutine adjt_interp_w2_to_w3wth_alg( mesh )
!> @param[in] config Application configuration object
!> @param[in] mesh A mesh object
subroutine adjt_interp_w2_to_w3wth_alg( config, mesh )

use interpolation_alg_mod, only : interp_w2_to_w3wth_alg
use adj_interpolation_alg_mod, only : adj_interp_w2_to_w3wth_alg

implicit none

! Arguments
type(mesh_type), pointer, intent(in) :: mesh
type(config_type), intent(in) :: config
type(mesh_type), intent(in) :: mesh

! Arguments for forward and adjoint calls
type(field_type) :: u_in_w2
Expand Down Expand Up @@ -108,7 +110,7 @@ module adjt_interpolation_alg_mod
setval_random(v_in_w3), setval_x(v_in_w3_inp, v_in_w3), &
setval_random(w_in_wth), setval_x(w_in_wth_inp, w_in_wth) )

call interp_w2_to_w3wth_alg( u_in_w2, u_in_w3, v_in_w3, w_in_wth )
call interp_w2_to_w3wth_alg( config, u_in_w2, u_in_w3, v_in_w3, w_in_wth )

call invoke( x_innerproduct_x(u2_inner_prod, u_in_w2), &
x_innerproduct_x(u3_inner_prod, u_in_w3), &
Expand Down Expand Up @@ -148,7 +150,7 @@ module adjt_interpolation_alg_mod
v3_v3_inp_inner_prod = 0.0_r_def
wt_wt_inp_inner_prod = 0.0_r_def

call adj_interp_w2_to_w3wth_alg( u_in_w2, u_in_w3, v_in_w3, w_in_wth )
call adj_interp_w2_to_w3wth_alg( config, u_in_w2, u_in_w3, v_in_w3, w_in_wth )

call invoke( x_innerproduct_y( u2_u2_inp_inner_prod, u_in_w2, u_in_w2_inp ), &
x_innerproduct_y( u3_u3_inp_inner_prod, u_in_w3, u_in_w3_inp ), &
Expand Down Expand Up @@ -178,16 +180,18 @@ module adjt_interpolation_alg_mod

!=============================================================================
!> @brief Adjoint test for w3/wth to w2 interpolations
!> @param[in] mesh A mesh object
subroutine adjt_interp_w3wth_to_w2_alg( mesh )
!> @param[in] config Application configuration object
!> @param[in] mesh A mesh object
subroutine adjt_interp_w3wth_to_w2_alg( config, mesh )

use interpolation_alg_mod, only : interp_w3wth_to_w2_alg
use adj_interpolation_alg_mod, only : adj_interp_w3wth_to_w2_alg

implicit none

! Arguments
type(mesh_type), pointer, intent(in) :: mesh
type(config_type), intent(in) :: config
type(mesh_type), intent(in) :: mesh

! Arguments for forward and adjoint calls
type(field_type) :: u_in_w2
Expand Down Expand Up @@ -254,8 +258,7 @@ module adjt_interpolation_alg_mod
setval_random(v_in_w3), setval_x(v_in_w3_inp, v_in_w3), &
setval_random(w_in_wth), setval_x(w_in_wth_inp, w_in_wth) )

call interp_w3wth_to_w2_alg( u_in_w2, u_in_w3, v_in_w3, w_in_wth, &
geometry, topology )
call interp_w3wth_to_w2_alg( config, u_in_w2, u_in_w3, v_in_w3, w_in_wth )

call invoke( x_innerproduct_x(u2_inner_prod, u_in_w2), &
x_innerproduct_x(u3_inner_prod, u_in_w3), &
Expand Down Expand Up @@ -295,8 +298,7 @@ module adjt_interpolation_alg_mod
v3_v3_inp_inner_prod = 0.0_r_def
wt_wt_inp_inner_prod = 0.0_r_def

call adj_interp_w3wth_to_w2_alg( u_in_w2, u_in_w3, v_in_w3, w_in_wth, &
geometry, topology )
call adj_interp_w3wth_to_w2_alg( config, u_in_w2, u_in_w3, v_in_w3, w_in_wth )

call invoke( x_innerproduct_y( u2_u2_inp_inner_prod, u_in_w2, u_in_w2_inp ), &
x_innerproduct_y( u3_u3_inp_inner_prod, u_in_w3, u_in_w3_inp ), &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
!> @brief Module containing adjoint test for adj_w3h_adv_upd_lookup_lookup_kernel
module adjt_w3h_adv_upd_lookup_alg_mod


use adj_trans_lookup_cache_mod, only : adj_trans_lookup_cache_type
use config_mod, only : config_type
use integer_field_mod, only : integer_field_type
use r_tran_field_mod, only : r_tran_field_type
use fs_continuity_mod, only : W3, W2
Expand Down Expand Up @@ -36,17 +38,19 @@ module adjt_w3h_adv_upd_lookup_alg_mod
!> @details Passes if adjoint is transpose of tangent linear.
!> Determined by testing the equality of inner products <Mx, Mx> and <AMx, x>,
!> where M is the tangent linear and A is the adjoint.
!> @param[in] config Application configuration object
!> @param[in] mesh The model mesh
!> @param[in] adj_lookup_table_cache The lookup table cache
subroutine adjt_w3h_adv_upd_lookup_alg( mesh, adj_lookup_table_cache )
subroutine adjt_w3h_adv_upd_lookup_alg( config, mesh, adj_lookup_table_cache )

use w3h_advective_update_kernel_mod, only : w3h_advective_update_kernel_type
use invoke_adj_w3h_adv_upd_lookup_mod, only : invoke_adj_w3h_adv_upd_lookup_kernel_type

implicit none

! Arguments
type(mesh_type), pointer, intent(in) :: mesh
type(config_type), intent(in) :: config
type(mesh_type), intent(in) :: mesh
type(adj_trans_lookup_cache_type), intent(in) :: adj_lookup_table_cache

! Internal arguments for kernels
Expand Down Expand Up @@ -84,8 +88,9 @@ module adjt_w3h_adv_upd_lookup_alg_mod
real(kind=r_tran) :: machine_tol
real(kind=r_tran) :: relative_diff

nullify(m3_inv, lookup_w3h_adv_upd, lookup_w3h_adv_upd_field, set_count_w3h_adv_upd_field, &
vector_space_w3_md_ptr, vector_space_w3_ptr, vector_space_w2_ptr)
nullify(m3_inv, lookup_w3h_adv_upd, lookup_w3h_adv_upd_field, &
set_count_w3h_adv_upd_field, vector_space_w3_md_ptr, &
vector_space_w3_ptr, vector_space_w2_ptr)

vector_space_w3_md_ptr => function_space_collection%get_fs( &
mesh, element_order_h, element_order_v, W3, ndata, ndata_first=.false. &
Expand All @@ -101,7 +106,7 @@ module adjt_w3h_adv_upd_lookup_alg_mod
call wind%initialise( vector_space=vector_space_w2_ptr, name='wind' )
call advective_increment_input%initialise( vector_space=vector_space_w3_ptr, name='advective_increment_input' )
call tracer_input%initialise( vector_space=vector_space_w3_md_ptr, name='tracer_input' )
m3_inv => get_inverse_mass_matrix_fe( W3, mesh%get_id() )
m3_inv => get_inverse_mass_matrix_fe( config, mesh, W3 )
advective_increment_inner_prod = 0.0_r_def
tracer_inner_prod = 0.0_r_def

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ contains

call vector_mx%set_scalar(0.0_r_def)
call vector_amx%set_scalar(0.0_r_def)
call mixed_op%apply( vector_x, vector_mx )
call mixed_op%apply( config, vector_x, vector_mx )

! --------------------------------------------------------------------------
! Compute <Mx,Mx>
Expand Down Expand Up @@ -186,7 +186,7 @@ contains

adj_mixed_op = adj_mixed_operator_type()

call adj_mixed_op%apply( vector_mx, vector_amx )
call adj_mixed_op%apply( config, vector_mx, vector_amx )

! --------------------------------------------------------------------------
! Compute <AMx,x>
Expand Down
Loading
Loading