diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 330c865c6..164bd3e6d 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -6,6 +6,7 @@ | jedbakerMO | Jed Baker | Met Office | 2025-12-29 | | jennyhickson | Jenny Hickson | Met Office | 2025-12-10 | | mo-marqh | Mark Hedley | Met Office | 2025-12-11 | +| mo-rickywong | Ricky Wong | Met Office | 2026-01-27 | | mike-hobson | Mike Hobson | Met Office | 2025-12-17 | | MatthewHambley | Matthew Hambley | Met Office | 2025-12-15 | | tommbendall | Thomas Bendall | Met Office | 2026-01-23 | diff --git a/components/driver/source/driver_fem_mod.f90 b/components/driver/source/driver_fem_mod.f90 index 715786011..7ba02690e 100644 --- a/components/driver/source/driver_fem_mod.f90 +++ b/components/driver/source/driver_fem_mod.f90 @@ -37,6 +37,8 @@ module driver_fem_mod use mesh_mod, only: mesh_type use mesh_collection_mod, only: mesh_collection_type + use base_mesh_config_mod, only: geometry, topology + implicit none private @@ -78,7 +80,8 @@ subroutine init_fem( mesh_collection, chi_inventory, panel_id_inventory ) ! ======================================================================== ! ! Initialise coordinate transformations - call init_chi_transforms(mesh_collection) + call init_chi_transforms( geometry, topology, & + mesh_collection=mesh_collection ) ! To loop through mesh collection, get all mesh names ! Then get mesh from collection using these names diff --git a/components/science/source/kernel/fem/sci_compute_broken_div_operator_kernel_mod.F90 b/components/science/source/kernel/fem/sci_compute_broken_div_operator_kernel_mod.F90 index 65f29eacf..3d00ff143 100644 --- a/components/science/source/kernel/fem/sci_compute_broken_div_operator_kernel_mod.F90 +++ b/components/science/source/kernel/fem/sci_compute_broken_div_operator_kernel_mod.F90 @@ -16,9 +16,12 @@ module sci_compute_broken_div_operator_kernel_mod use constants_mod, only: r_def, i_def use sci_coordinate_jacobian_mod, only: coordinate_jacobian use fs_continuity_mod, only: W2broken, W3 - use finite_element_config_mod, only: rehabilitate use kernel_mod, only: kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system, rehabilitate + use planet_config_mod, only: scaled_radius + implicit none private @@ -141,7 +144,8 @@ subroutine compute_broken_div_operator_code(cell, nlayers, ncell_3d, & end do ! Compute Jacobian - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, diff_basis_chi, jac, dj) ! Run over dof extent of W2Broken diff --git a/components/science/source/kernel/fem/sci_compute_curl_operator_kernel_mod.F90 b/components/science/source/kernel/fem/sci_compute_curl_operator_kernel_mod.F90 index 15da848d3..ddcb67d05 100644 --- a/components/science/source/kernel/fem/sci_compute_curl_operator_kernel_mod.F90 +++ b/components/science/source/kernel/fem/sci_compute_curl_operator_kernel_mod.F90 @@ -17,6 +17,10 @@ module sci_compute_curl_operator_kernel_mod use fs_continuity_mod, only: W1, W2 use kernel_mod, only: kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -129,7 +133,8 @@ subroutine compute_curl_operator_code(cell, nlayers, ncell_3d, & chi2_e(df) = chi2(map_chi(df) + k) chi3_e(df) = chi3(map_chi(df) + k) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, diff_basis_chi, jac, dj) do df1 = 1, ndf_w1 do df2 = 1, ndf_w2 diff --git a/components/science/source/kernel/fem/sci_compute_derham_matrices_kernel_mod.F90 b/components/science/source/kernel/fem/sci_compute_derham_matrices_kernel_mod.F90 index d6af12148..dcbf2607b 100644 --- a/components/science/source/kernel/fem/sci_compute_derham_matrices_kernel_mod.F90 +++ b/components/science/source/kernel/fem/sci_compute_derham_matrices_kernel_mod.F90 @@ -28,6 +28,10 @@ module sci_compute_derham_matrices_kernel_mod use fs_continuity_mod, only: W0, W1, W2, W2broken, W3, Wtheta use kernel_mod, only: kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -241,7 +245,9 @@ subroutine compute_derham_matrices_code(cell, nlayers, & do qp2 = 1, nqp_v do qp1 = 1, nqp_h ! Precompute some frequently used terms - call pointwise_coordinate_jacobian(ndf_chi, chi1_e, chi2_e, chi3_e, & + call pointwise_coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi(:,:,qp1,qp2), & diff_basis_chi(:,:,qp1,qp2), & jac, dj) diff --git a/components/science/source/kernel/fem/sci_compute_div_operator_kernel_mod.F90 b/components/science/source/kernel/fem/sci_compute_div_operator_kernel_mod.F90 index b0e8c4630..05b84b344 100644 --- a/components/science/source/kernel/fem/sci_compute_div_operator_kernel_mod.F90 +++ b/components/science/source/kernel/fem/sci_compute_div_operator_kernel_mod.F90 @@ -15,9 +15,12 @@ module sci_compute_div_operator_kernel_mod use constants_mod, only: r_def, i_def use sci_coordinate_jacobian_mod, only: coordinate_jacobian use fs_continuity_mod, only: W2, W3 - use finite_element_config_mod, only: rehabilitate use kernel_mod, only: kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system, rehabilitate + use planet_config_mod, only: scaled_radius + implicit none private @@ -138,7 +141,8 @@ subroutine compute_div_operator_code(cell, nlayers, ncell_3d, & chi2_e(df) = chi2(map_chi(df) + k) chi3_e(df) = chi3(map_chi(df) + k) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, diff_basis_chi, jac, dj) do df2 = 1, ndf_w2 diff --git a/components/science/source/kernel/fem/sci_compute_grad_operator_kernel_mod.F90 b/components/science/source/kernel/fem/sci_compute_grad_operator_kernel_mod.F90 index f221e2996..9c06d929f 100644 --- a/components/science/source/kernel/fem/sci_compute_grad_operator_kernel_mod.F90 +++ b/components/science/source/kernel/fem/sci_compute_grad_operator_kernel_mod.F90 @@ -19,6 +19,10 @@ module sci_compute_grad_operator_kernel_mod use fs_continuity_mod, only: W0, W1 use kernel_mod, only: kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -134,7 +138,8 @@ subroutine compute_grad_operator_code(cell, nlayers, ncell_3d, & chi2_e(df) = chi2(map_chi(df) + k) chi3_e(df) = chi3(map_chi(df) + k) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, diff_basis_chi, jac, dj) call coordinate_jacobian_inverse(nqp_h, nqp_v, jac, dj, jac_inv) do qp2 = 1, nqp_v diff --git a/components/science/source/kernel/fem/sci_compute_mass_matrix_kernel_w1_mod.F90 b/components/science/source/kernel/fem/sci_compute_mass_matrix_kernel_w1_mod.F90 index f9dc0ff44..b0beabbbb 100644 --- a/components/science/source/kernel/fem/sci_compute_mass_matrix_kernel_w1_mod.F90 +++ b/components/science/source/kernel/fem/sci_compute_mass_matrix_kernel_w1_mod.F90 @@ -23,6 +23,10 @@ module sci_compute_mass_matrix_kernel_w1_mod use fs_continuity_mod, only: W1 use kernel_mod, only: kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -134,7 +138,8 @@ subroutine compute_mass_matrix_w1_code(cell, nlayers, ncell_3d, & chi3_e(df) = chi3(map_chi(df) + k - 1) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, diff_basis_chi, jac, dj) call coordinate_jacobian_inverse(nqp_h, nqp_v, jac, dj, jac_inv) do df2 = 1, ndf_w1 diff --git a/components/science/source/kernel/fem/sci_compute_mass_matrix_kernel_w2_mod.F90 b/components/science/source/kernel/fem/sci_compute_mass_matrix_kernel_w2_mod.F90 index 351086a38..6c91b47f6 100644 --- a/components/science/source/kernel/fem/sci_compute_mass_matrix_kernel_w2_mod.F90 +++ b/components/science/source/kernel/fem/sci_compute_mass_matrix_kernel_w2_mod.F90 @@ -22,6 +22,10 @@ module sci_compute_mass_matrix_kernel_w2_mod use fs_continuity_mod, only: Wchi use kernel_mod, only: kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -138,7 +142,8 @@ subroutine compute_mass_matrix_w2_code(cell, nlayers, ncell_3d, & chi3_e(df) = chi3(map_chi(df) + k - 1) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, diff_basis_chi, jac, dj) do df2 = 1, ndf_w2 diff --git a/components/science/source/kernel/fem/sci_compute_mass_matrix_kernel_w3_mod.F90 b/components/science/source/kernel/fem/sci_compute_mass_matrix_kernel_w3_mod.F90 index dfbf5b0e5..ac030d6be 100644 --- a/components/science/source/kernel/fem/sci_compute_mass_matrix_kernel_w3_mod.F90 +++ b/components/science/source/kernel/fem/sci_compute_mass_matrix_kernel_w3_mod.F90 @@ -18,10 +18,13 @@ module sci_compute_mass_matrix_kernel_w3_mod CELL_COLUMN, GH_QUADRATURE_XYoZ use sci_coordinate_jacobian_mod, only: coordinate_jacobian use constants_mod, only: i_def, r_single, r_double - use finite_element_config_mod, only: rehabilitate use fs_continuity_mod, only: W3 use kernel_mod, only: kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system, rehabilitate + use planet_config_mod, only: scaled_radius + implicit none private @@ -138,7 +141,9 @@ subroutine compute_mass_matrix_w3_code_r_single( & chi3_e(df) = chi3(map_chi(df) + k - 1) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, & diff_basis_chi, jac, dj) @@ -229,7 +234,9 @@ subroutine compute_mass_matrix_w3_code_mixed_precision( & chi3_e(df) = chi3(map_chi(df) + k - 1) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, & diff_basis_chi, jac, dj) @@ -320,7 +327,9 @@ subroutine compute_mass_matrix_w3_code_r_double( & chi3_e(df) = chi3(map_chi(df) + k - 1) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, & diff_basis_chi, jac, dj) diff --git a/components/science/source/kernel/fem/sci_compute_mass_matrix_kernel_w_scalar_mod.F90 b/components/science/source/kernel/fem/sci_compute_mass_matrix_kernel_w_scalar_mod.F90 index f63540f33..a5b0054b1 100644 --- a/components/science/source/kernel/fem/sci_compute_mass_matrix_kernel_w_scalar_mod.F90 +++ b/components/science/source/kernel/fem/sci_compute_mass_matrix_kernel_w_scalar_mod.F90 @@ -24,6 +24,10 @@ module sci_compute_mass_matrix_kernel_w_scalar_mod use fs_continuity_mod, only: W0, Wtheta, Wchi use kernel_mod, only: kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -161,7 +165,9 @@ subroutine compute_mass_matrix_w_scalar_code_r32( & chi3_e(df) = chi3(map_chi(df) + k - 1) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & chi1_e, chi2_e, chi3_e, ipanel, & basis_chi, diff_basis_chi, & jac, dj) @@ -257,7 +263,9 @@ subroutine compute_mass_matrix_w_scalar_code_r32r64( & chi3_e(df) = chi3(map_chi(df) + k - 1) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & chi1_e, chi2_e, chi3_e, ipanel, & basis_chi, diff_basis_chi, & jac, dj) @@ -356,7 +364,9 @@ subroutine compute_mass_matrix_w_scalar_code_r64( & chi3_e(df) = chi3(map_chi(df) + k - 1) end do - call coordinate_jacobian(ndf_chi, nqp_h, nqp_v, & + call coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, nqp_h, nqp_v, & chi1_e, chi2_e, chi3_e, ipanel, & basis_chi, diff_basis_chi, & jac, dj) diff --git a/components/science/source/kernel/fem/sci_gp_rhs_kernel_mod.F90 b/components/science/source/kernel/fem/sci_gp_rhs_kernel_mod.F90 index c2a874845..ca6d73d1e 100644 --- a/components/science/source/kernel/fem/sci_gp_rhs_kernel_mod.F90 +++ b/components/science/source/kernel/fem/sci_gp_rhs_kernel_mod.F90 @@ -96,6 +96,10 @@ subroutine gp_rhs_code(nlayers, & use sci_coordinate_jacobian_mod, only: coordinate_jacobian + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none ! Arguments @@ -135,7 +139,11 @@ subroutine gp_rhs_code(nlayers, & chi_2_cell(df) = chi_2( map_chi(df) + k ) chi_3_cell(df) = chi_3( map_chi(df) + k ) end do - call coordinate_jacobian(ndf_chi, & + call coordinate_jacobian(coord_system, & + geometry, & + topology, & + scaled_radius, & + ndf_chi, & nqp_h, & nqp_v, & chi_1_cell, & diff --git a/components/science/source/kernel/fem/sci_gp_vector_rhs_kernel_mod.F90 b/components/science/source/kernel/fem/sci_gp_vector_rhs_kernel_mod.F90 index 114b58b6f..0db2fbe49 100644 --- a/components/science/source/kernel/fem/sci_gp_vector_rhs_kernel_mod.F90 +++ b/components/science/source/kernel/fem/sci_gp_vector_rhs_kernel_mod.F90 @@ -14,8 +14,6 @@ module sci_gp_vector_rhs_kernel_mod ANY_DISCONTINUOUS_SPACE_3, & GH_BASIS, GH_DIFF_BASIS, & CELL_COLUMN, GH_QUADRATURE_XYoZ - use base_mesh_config_mod, only : geometry, & - geometry_spherical use sci_chi_transform_mod, only : chi2xyz use constants_mod, only : r_def, i_def use sci_coordinate_jacobian_mod, only : coordinate_jacobian, & @@ -24,6 +22,11 @@ module sci_gp_vector_rhs_kernel_mod use fs_continuity_mod, only : W0, W2 use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -171,7 +174,11 @@ subroutine gp_vector_rhs_code(nlayers, & chi_2_cell(df) = chi_2( map_chi(df) + k ) chi_3_cell(df) = chi_3( map_chi(df) + k ) end do - call coordinate_jacobian(ndf_chi, & + call coordinate_jacobian(coord_system, & + geometry, & + topology, & + scaled_radius, & + ndf_chi, & nqp_h, & nqp_v, & chi_1_cell, & diff --git a/components/science/source/kernel/fem/sci_mg_derham_mat_kernel_mod.F90 b/components/science/source/kernel/fem/sci_mg_derham_mat_kernel_mod.F90 index e40bb543f..04329bd5b 100644 --- a/components/science/source/kernel/fem/sci_mg_derham_mat_kernel_mod.F90 +++ b/components/science/source/kernel/fem/sci_mg_derham_mat_kernel_mod.F90 @@ -27,6 +27,10 @@ module sci_mg_derham_mat_kernel_mod use fs_continuity_mod, only: W2, W3, wtheta use kernel_mod, only: kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -178,7 +182,9 @@ subroutine mg_derham_mat_code(cell, nlayers, & do qp2 = 1, nqp_v do qp1 = 1, nqp_h ! Precompute some frequently used terms - call pointwise_coordinate_jacobian(ndf_chi, chi1_e, chi2_e, chi3_e, & + call pointwise_coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi(:,:,qp1,qp2), & diff_basis_chi(:,:,qp1,qp2), & jac, dj) diff --git a/components/science/source/kernel/geometry/sci_calc_da_at_w2_kernel_mod.F90 b/components/science/source/kernel/geometry/sci_calc_da_at_w2_kernel_mod.F90 index d69363c65..e351c679d 100644 --- a/components/science/source/kernel/geometry/sci_calc_da_at_w2_kernel_mod.F90 +++ b/components/science/source/kernel/geometry/sci_calc_da_at_w2_kernel_mod.F90 @@ -80,6 +80,10 @@ subroutine calc_dA_at_w2_code( nlayers, & use sci_coordinate_jacobian_mod, only: coordinate_jacobian, coordinate_jacobian_inverse + use finite_element_config_mod, only: coord_system + use base_mesh_config_mod, only: geometry, topology + use planet_config_mod, only: scaled_radius + implicit none ! Arguments @@ -120,8 +124,9 @@ subroutine calc_dA_at_w2_code( nlayers, & chi2_e(df) = chi2(map_chi(df) + k) chi3_e(df) = chi3(map_chi(df) + k) end do - call coordinate_jacobian(ndf_chi, ndf_w2, chi1_e, chi2_e, chi3_e, & - ipanel, basis_chi, diff_basis_chi, jacobian, dj) + call coordinate_jacobian( coord_system, geometry, topology, scaled_radius, & + ndf_chi, ndf_w2, chi1_e, chi2_e, chi3_e, & + ipanel, basis_chi, diff_basis_chi, jacobian, dj) call coordinate_jacobian_inverse(ndf_w2, jacobian, dj, jac_inv) diff --git a/components/science/source/kernel/geometry/sci_calc_detj_at_w2_kernel_mod.F90 b/components/science/source/kernel/geometry/sci_calc_detj_at_w2_kernel_mod.F90 index d1447a72f..de29f199a 100644 --- a/components/science/source/kernel/geometry/sci_calc_detj_at_w2_kernel_mod.F90 +++ b/components/science/source/kernel/geometry/sci_calc_detj_at_w2_kernel_mod.F90 @@ -82,6 +82,10 @@ subroutine calc_detj_at_w2_code( nlayers, & use sci_coordinate_jacobian_mod, only: pointwise_coordinate_jacobian + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none ! Arguments @@ -119,7 +123,9 @@ subroutine calc_detj_at_w2_code( nlayers, & end do do df = 1,ndf_w2 - call pointwise_coordinate_jacobian(ndf_chi, chi1_e, chi2_e, chi3_e, & + call pointwise_coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi(:,:,df), & diff_basis_chi(:,:,df), & jacobian, detj) diff --git a/components/science/source/kernel/geometry/sci_calc_detj_at_w3_kernel_mod.F90 b/components/science/source/kernel/geometry/sci_calc_detj_at_w3_kernel_mod.F90 index ba6a1cfca..a9aef1b6d 100644 --- a/components/science/source/kernel/geometry/sci_calc_detj_at_w3_kernel_mod.F90 +++ b/components/science/source/kernel/geometry/sci_calc_detj_at_w3_kernel_mod.F90 @@ -20,6 +20,10 @@ module sci_calc_detj_at_w3_kernel_mod use fs_continuity_mod, only : W3 use kernel_mod, only : kernel_type + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none private @@ -128,7 +132,9 @@ subroutine calc_detj_at_w3_code_r_single( nlayers, & end do do df = 1,ndf_w3 - call pointwise_coordinate_jacobian(ndf_chi, chi1_e, chi2_e, chi3_e, & + call pointwise_coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi(:,:,df), & diff_basis_chi(:,:,df), & jacobian, detj) @@ -190,7 +196,9 @@ subroutine calc_detj_at_w3_code_r_double( nlayers, & end do do df = 1,ndf_w3 - call pointwise_coordinate_jacobian(ndf_chi, chi1_e, chi2_e, chi3_e, & + call pointwise_coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi(:,:,df), & diff_basis_chi(:,:,df), & jacobian, detj) diff --git a/components/science/source/kernel/geometry/sci_calc_directional_detj_at_w2_kernel_mod.F90 b/components/science/source/kernel/geometry/sci_calc_directional_detj_at_w2_kernel_mod.F90 index 80093d8a9..f9bd1ee16 100644 --- a/components/science/source/kernel/geometry/sci_calc_directional_detj_at_w2_kernel_mod.F90 +++ b/components/science/source/kernel/geometry/sci_calc_directional_detj_at_w2_kernel_mod.F90 @@ -96,6 +96,10 @@ subroutine calc_directional_detj_at_w2_code( nlayers, & use sci_coordinate_jacobian_mod, only: pointwise_coordinate_jacobian + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none ! Arguments @@ -142,7 +146,9 @@ subroutine calc_directional_detj_at_w2_code( nlayers, & chi3_e(cdf) = chi3(map_chi(cdf) + k) end do - call pointwise_coordinate_jacobian(ndf_chi, chi1_e, chi2_e, chi3_e, & + call pointwise_coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi(:,:,df), & diff_basis_chi(:,:,df), & jacobian, detj) diff --git a/components/science/source/kernel/geometry/sci_chi_transform_mod.F90 b/components/science/source/kernel/geometry/sci_chi_transform_mod.F90 index 4192c8791..39ccfe0fb 100644 --- a/components/science/source/kernel/geometry/sci_chi_transform_mod.F90 +++ b/components/science/source/kernel/geometry/sci_chi_transform_mod.F90 @@ -13,11 +13,6 @@ !------------------------------------------------------------------------------ module sci_chi_transform_mod -use base_mesh_config_mod, only : geometry, & - geometry_spherical, & - geometry_planar, & - topology, & - topology_fully_periodic use constants_mod, only : r_def, i_def, l_def, & str_def, EPS, PI, rmdi use coord_transform_mod, only : alphabetar2xyz, & @@ -28,15 +23,21 @@ module sci_chi_transform_mod mesh_rotation_matrix, & schmidt_transform_xyz, & inverse_schmidt_transform_xyz -use finite_element_config_mod, only : coord_system, & - coord_system_xyz, & - coord_system_native use log_mod, only : log_event, & log_scratch_space, & LOG_LEVEL_ERROR, & LOG_LEVEL_DEBUG, & LOG_LEVEL_WARNING use matrix_invert_mod, only : matrix_invert_3x3 + +use base_mesh_config_mod, only : geometry, & + geometry_spherical, & + geometry_planar, & + topology, & + topology_fully_periodic +use finite_element_config_mod, only : coord_system, & + coord_system_xyz, & + coord_system_native use planet_config_mod, only : scaled_radius implicit none @@ -89,7 +90,9 @@ module sci_chi_transform_mod !! argument, and ideally should only be used for !! unit-testing. !------------------------------------------------------------------------------ -subroutine init_chi_transforms(mesh_collection, north_pole_arg, equator_lat_arg) +subroutine init_chi_transforms( geometry, topology, & + mesh_collection, & + north_pole_arg, equator_lat_arg ) use local_mesh_mod, only : local_mesh_type use mesh_collection_mod, only : mesh_collection_type @@ -97,6 +100,9 @@ subroutine init_chi_transforms(mesh_collection, north_pole_arg, equator_lat_arg) implicit none + integer(i_def), intent(in) :: geometry + integer(i_def), intent(in) :: topology + type(mesh_collection_type), optional, intent(in) :: mesh_collection real(kind=r_def), optional, intent(in) :: north_pole_arg(2) real(kind=r_def), optional, intent(in) :: equator_lat_arg diff --git a/components/science/source/kernel/geometry/sci_coordinate_jacobian_mod.F90 b/components/science/source/kernel/geometry/sci_coordinate_jacobian_mod.F90 index df0a05e4d..e92884d14 100644 --- a/components/science/source/kernel/geometry/sci_coordinate_jacobian_mod.F90 +++ b/components/science/source/kernel/geometry/sci_coordinate_jacobian_mod.F90 @@ -10,14 +10,7 @@ !> per panel for certain meshes such as cubed sphere. module sci_coordinate_jacobian_mod - use base_mesh_config_mod, only: geometry, & - geometry_planar, & - topology, & - topology_fully_periodic - use constants_mod, only: l_def, i_def, r_double, r_single - use finite_element_config_mod, only: coord_system, & - coord_system_xyz, & - coord_system_native + use constants_mod, only: l_def, i_def, r_def, r_double, r_single use coord_transform_mod, only: PANEL_ROT_MATRIX, & alphabetar2xyz, & xyz2llr, & @@ -25,12 +18,18 @@ module sci_coordinate_jacobian_mod llr2xyz, & schmidt_transform_lat - use planet_config_mod, only: scaled_radius use sci_chi_transform_mod, only: get_mesh_rotation_matrix, & get_to_stretch, & get_to_rotate, & get_stretch_factor + ! Configuration modules + use base_mesh_config_mod, only: geometry_planar, & + topology_fully_periodic + use finite_element_config_mod, only: coord_system_xyz, & + coord_system_native +! use planet_config_mod, only: scaled_radius + implicit none private @@ -39,6 +38,7 @@ module sci_coordinate_jacobian_mod public :: coordinate_jacobian_inverse public :: pointwise_coordinate_jacobian public :: pointwise_coordinate_jacobian_inverse + ! Public for unit-testing public :: jacobian_stretched @@ -120,19 +120,27 @@ module sci_coordinate_jacobian_mod !> J^{i,j} = \frac{\partial \chi_i} / {\partial \hat{\chi_j}} !> \f} !> - !! @param[in] ndf Size of the chi arrays - !! @param[in] ngp_h Number of quadrature points in horizontal direction - !! @param[in] ngp_v Number of quadrature points in vertical direction - !! @param[in] chi_1 1st component of the coordinate field - !! @param[in] chi_2 2nd component of the coordinate field - !! @param[in] chi_3 3rd component of the coordinate field - !! @param[in] panel_id An integer identifying the mesh panel - !! @param[in] basis Wchi basis functions - !! @param[in] diff_basis Grad of Wchi basis functions - !! @param[out] jac Jacobian on quadrature points - !! @param[out] dj Determinant of the Jacobian on quadrature points + !! @param[in] coord_system Finite-element coordiante system enumeration. + !! @param[in] geometry Mesh geometry enumeration. + !! @param[in] topology Mesh topology enumeration. + !! @param[in] scaled_radius Scaled planetary radius. + !! @param[in] ndf Size of the chi arrays + !! @param[in] ngp_h Number of quadrature points in horizontal direction + !! @param[in] ngp_v Number of quadrature points in vertical direction + !! @param[in] chi_1 1st component of the coordinate field + !! @param[in] chi_2 2nd component of the coordinate field + !! @param[in] chi_3 3rd component of the coordinate field + !! @param[in] panel_id An integer identifying the mesh panel + !! @param[in] basis Wchi basis functions + !! @param[in] diff_basis Grad of Wchi basis functions + !! @param[out] jac Jacobian on quadrature points + !! @param[out] dj Determinant of the Jacobian on quadrature points !! - subroutine coordinate_jacobian_quadrature_r_single( & + subroutine coordinate_jacobian_quadrature_r_single( & + coord_system, & + geometry, & + topology, & + scaled_radius, & ndf, ngp_h, ngp_v, & chi_1, chi_2, chi_3, & panel_id, basis, & @@ -143,6 +151,11 @@ subroutine coordinate_jacobian_quadrature_r_single( & !----------------------------------------------------------------------------- implicit none + integer(kind=i_def), intent(in) :: coord_system + integer(kind=i_def), intent(in) :: geometry + integer(kind=i_def), intent(in) :: topology + real(kind=r_def), intent(in) :: scaled_radius + integer(kind=i_def), intent(in) :: ndf, ngp_h, ngp_v integer(kind=i_def), intent(in) :: panel_id @@ -228,9 +241,9 @@ subroutine coordinate_jacobian_quadrature_r_single( & ! Apply stretching --------------------------------------------------- if (to_stretch) then ! Convert chi to spherical polar (un-stretched) coordinates - call alphabetar2xyz(alpha_vec(k), beta_vec(k), radius_vec(k), panel_id, & + call alphabetar2xyz(alpha_vec(k), beta_vec(k), radius_vec(k), panel_id, & native_x, native_y, native_z) - call xyz2ll(native_x, native_y, native_z, & + call xyz2ll(native_x, native_y, native_z, & native_lon, native_lat) stretch_factor = real(get_stretch_factor(), r_single) jac_S = jacobian_stretched(native_lon, native_lat, radius_vec(k), stretch_factor) @@ -286,7 +299,11 @@ subroutine coordinate_jacobian_quadrature_r_single( & end subroutine coordinate_jacobian_quadrature_r_single - subroutine coordinate_jacobian_quadrature_r_double( & + subroutine coordinate_jacobian_quadrature_r_double( & + coord_system, & + geometry, & + topology, & + scaled_radius, & ndf, ngp_h, ngp_v, & chi_1, chi_2, chi_3, & panel_id, basis, & @@ -297,6 +314,11 @@ subroutine coordinate_jacobian_quadrature_r_double( & !----------------------------------------------------------------------------- implicit none + integer(kind=i_def), intent(in) :: coord_system + integer(kind=i_def), intent(in) :: geometry + integer(kind=i_def), intent(in) :: topology + real(kind=r_def), intent(in) :: scaled_radius + integer(kind=i_def), intent(in) :: ndf, ngp_h, ngp_v integer(kind=i_def), intent(in) :: panel_id @@ -382,9 +404,9 @@ subroutine coordinate_jacobian_quadrature_r_double( & ! Apply stretching --------------------------------------------------- if (to_stretch) then ! Convert chi to spherical polar (un-stretched) coordinates - call alphabetar2xyz(alpha_vec(k), beta_vec(k), radius_vec(k), panel_id, & + call alphabetar2xyz(alpha_vec(k), beta_vec(k), radius_vec(k), panel_id, & native_x, native_y, native_z) - call xyz2ll(native_x, native_y, native_z, & + call xyz2ll(native_x, native_y, native_z, & native_lon, native_lat) stretch_factor = real(get_stretch_factor(), r_double) jac_S = jacobian_stretched(native_lon, native_lat, radius_vec(k), stretch_factor) @@ -450,17 +472,25 @@ end subroutine coordinate_jacobian_quadrature_r_double !> reference space \f[ \hat{\chi} \f] to physical space \f[ \chi \f] !> \f[ J^{i,j} = \frac{\partial \chi_i} / {\partial \hat{\chi_j}} \f] !> and the determinant det(J) - !! @param[in] ndf Size of the chi arrays - !! @param[in] neval_points Number of points basis functions are evaluated on - !! @param[in] chi_1 1st component of the coordinate field - !! @param[in] chi_2 2nd component of the coordinate field - !! @param[in] chi_3 3rd component of the coordinate field - !! @param[in] panel_id An integer identifying the mesh panel - !! @param[in] basis Wchi basis functions - !! @param[in] diff_basis Grad of Wchi basis functions - !! @param[out] jac Jacobian on quadrature points - !! @param[out] dj Determinant of the Jacobian on quadrature points - subroutine coordinate_jacobian_evaluator_r_single( & + !! @param[in] coord_system Finite-element coordiante system enumeration. + !! @param[in] geometry Mesh geometry enumeration. + !! @param[in] topology Mesh topology enumeration. + !! @param[in] scaled_radius Scaled planetary radius. + !! @param[in] ndf Size of the chi arrays + !! @param[in] neval_points Number of points basis functions are evaluated on + !! @param[in] chi_1 1st component of the coordinate field + !! @param[in] chi_2 2nd component of the coordinate field + !! @param[in] chi_3 3rd component of the coordinate field + !! @param[in] panel_id An integer identifying the mesh panel + !! @param[in] basis Wchi basis functions + !! @param[in] diff_basis Grad of Wchi basis functions + !! @param[out] jac Jacobian on quadrature points + !! @param[out] dj Determinant of the Jacobian on quadrature points + subroutine coordinate_jacobian_evaluator_r_single( & + coord_system, & + geometry, & + topology, & + scaled_radius, & ndf, neval_points, & chi_1, chi_2, chi_3, & panel_id, basis, & @@ -471,6 +501,11 @@ subroutine coordinate_jacobian_evaluator_r_single( & !----------------------------------------------------------------------------- implicit none + integer(kind=i_def), intent(in) :: coord_system + integer(kind=i_def), intent(in) :: geometry + integer(kind=i_def), intent(in) :: topology + real(kind=r_def), intent(in) :: scaled_radius + integer(kind=i_def), intent(in) :: ndf, neval_points integer(kind=i_def), intent(in) :: panel_id @@ -590,7 +625,11 @@ subroutine coordinate_jacobian_evaluator_r_single( & end subroutine coordinate_jacobian_evaluator_r_single - subroutine coordinate_jacobian_evaluator_r_double( & + subroutine coordinate_jacobian_evaluator_r_double( & + coord_system, & + geometry, & + topology, & + scaled_radius, & ndf, neval_points, & chi_1, chi_2, chi_3, & panel_id, basis, & @@ -601,6 +640,11 @@ subroutine coordinate_jacobian_evaluator_r_double( & !----------------------------------------------------------------------------- implicit none + integer(kind=i_def), intent(in) :: coord_system + integer(kind=i_def), intent(in) :: geometry + integer(kind=i_def), intent(in) :: topology + real(kind=r_def), intent(in) :: scaled_radius + integer(kind=i_def), intent(in) :: ndf, neval_points integer(kind=i_def), intent(in) :: panel_id @@ -869,21 +913,32 @@ end subroutine coordinate_jacobian_inverse_evaluator_r_double !> reference space \f[ \hat{\chi} \f] to physical space \f[ \chi \f] !> \f[ J^{i,j} = \frac{\partial \chi_i} / {\partial \hat{\chi_j}} \f] !> and the determinant det(J) for a single point - !! @param[in] ndf Size of the chi arrays - !! @param[in] chi_1 Coordinate field - !! @param[in] chi_2 Coordinate field - !! @param[in] chi_3 Coordinate field - !! @param[in] panel_id panel_id - !! @param[in] basis Wchi basis functions - !! @param[in] diff_basis Grad of Wchi basis functions - !! @param[out] jac Jacobian on quadrature points - !! @param[out] dj Determinant of the Jacobian on quadrature points - subroutine pointwise_coordinate_jacobian_r_single( & - ndf, chi_1, chi_2, chi_3, & - panel_id, basis, diff_basis, & - jac, dj ) + !! @param[in] coord_system Finite-element coordiante system enumeration. + !! @param[in] geometry Mesh geometry enumeration. + !! @param[in] topology Mesh topology enumeration. + !! @param[in] scaled_radius Scaled planetary radius. + !! @param[in] ndf Size of the chi arrays + !! @param[in] chi_1 Coordinate field + !! @param[in] chi_2 Coordinate field + !! @param[in] chi_3 Coordinate field + !! @param[in] panel_id panel_id + !! @param[in] basis Wchi basis functions + !! @param[in] diff_basis Grad of Wchi basis functions + !! @param[out] jac Jacobian on quadrature points + !! @param[out] dj Determinant of the Jacobian on quadrature points + subroutine pointwise_coordinate_jacobian_r_single( & + coord_system, geometry, & + topology, scaled_radius, & + ndf, chi_1, chi_2, chi_3, & + panel_id, basis, diff_basis, & + jac, dj ) implicit none + integer(kind=i_def), intent(in) :: coord_system + integer(kind=i_def), intent(in) :: geometry + integer(kind=i_def), intent(in) :: topology + real(kind=r_def), intent(in) :: scaled_radius + integer(kind=i_def), intent(in) :: ndf integer(kind=i_def), intent(in) :: panel_id @@ -990,12 +1045,19 @@ subroutine pointwise_coordinate_jacobian_r_single( & end subroutine pointwise_coordinate_jacobian_r_single - subroutine pointwise_coordinate_jacobian_r_double( & - ndf, chi_1, chi_2, chi_3, & - panel_id, basis, diff_basis, & - jac, dj ) + subroutine pointwise_coordinate_jacobian_r_double( & + coord_system, geometry, & + topology, scaled_radius, & + ndf, chi_1, chi_2, chi_3, & + panel_id, basis, diff_basis, & + jac, dj ) implicit none + integer(kind=i_def), intent(in) :: coord_system + integer(kind=i_def), intent(in) :: geometry + integer(kind=i_def), intent(in) :: topology + real(kind=r_def), intent(in) :: scaled_radius + integer(kind=i_def), intent(in) :: ndf integer(kind=i_def), intent(in) :: panel_id diff --git a/components/science/source/kernel/geometry/sci_native_jacobian_mod.F90 b/components/science/source/kernel/geometry/sci_native_jacobian_mod.F90 index 53a375d7b..9898833a7 100644 --- a/components/science/source/kernel/geometry/sci_native_jacobian_mod.F90 +++ b/components/science/source/kernel/geometry/sci_native_jacobian_mod.F90 @@ -13,27 +13,23 @@ !! This gives a data access optimisation. module sci_native_jacobian_mod - use base_mesh_config_mod, only: geometry, & - geometry_planar, & - topology, & - topology_fully_periodic use constants_mod, only: l_def, i_def, r_def, r_single - use finite_element_config_mod, only: coord_system, & - coord_system_xyz, & - coord_system_native use coord_transform_mod, only: PANEL_ROT_MATRIX, & alphabetar2xyz, & xyz2llr, & xyz2ll, & llr2xyz, & schmidt_transform_lat - - use planet_config_mod, only: scaled_radius use sci_chi_transform_mod, only: get_mesh_rotation_matrix, & get_to_stretch, & get_to_rotate, & get_stretch_factor + use finite_element_config_mod, only: coord_system_xyz, & + coord_system_native + use base_mesh_config_mod, only: geometry_planar, & + topology_fully_periodic + implicit none private @@ -53,22 +49,32 @@ module sci_native_jacobian_mod !> @brief Compute the Jacobian matrices at a 1D array of points (e.g. DoFs) !! for a whole column, using the native coordinates of the mesh - !> @param[in] ndf_chi Num DoFs per cell for coordinate fields - !> @param[in] nlayers Number of layers in the mesh - !> @param[in] chi_1 First native coord field, for a single cell - !> @param[in] chi_2 Second native coord field, for a single cell - !> @param[in] chi_3 Third native coord field, for the whole column - !> @param[in] panel_id Mesh panel ID value for the column - !> @param[in] basis Wchi basis, evaluated at a 1D array of points - !> @param[in] diff_basis Derivatives of Wchi basis functions, evaluated at + !! @param[in] coord_system Finite-element coordiante system enumeration. + !! @param[in] geometry Mesh geometry enumeration. + !! @param[in] topology Mesh topology enumeration. + !! @param[in] scaled_radius Scaled planetary radius. + !> @param[in] ndf_chi Num DoFs per cell for coordinate fields + !> @param[in] nlayers Number of layers in the mesh + !> @param[in] chi_1 First native coord field, for a single cell + !> @param[in] chi_2 Second native coord field, for a single cell + !> @param[in] chi_3 Third native coord field, for the whole column + !> @param[in] panel_id Mesh panel ID value for the column + !> @param[in] basis Wchi basis, evaluated at a 1D array of points + !> @param[in] diff_basis Derivatives of Wchi basis functions, evaluated at !! a 1D array of points !> @param[in,out] jac Array of Jacobian matrices to be calculated for !! a whole column !> @param[in,out] dj Jacobian determinants for the whole column - subroutine native_jacobian(ndf_chi, nlayers, chi_1, chi_2, chi_3, panel_id, & + subroutine native_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, nlayers, chi_1, chi_2, chi_3, panel_id, & basis, diff_basis, jac, dj) implicit none + integer(kind=i_def), intent(in) :: coord_system + integer(kind=i_def), intent(in) :: geometry + integer(kind=i_def), intent(in) :: topology + real(kind=r_def), intent(in) :: scaled_radius + integer(kind=i_def), intent(in) :: ndf_chi integer(kind=i_def), intent(in) :: nlayers integer(kind=i_def), intent(in) :: panel_id diff --git a/components/science/source/kernel/geometry/sci_scale_by_detj_kernel_mod.F90 b/components/science/source/kernel/geometry/sci_scale_by_detj_kernel_mod.F90 index a4acdd020..04c411675 100644 --- a/components/science/source/kernel/geometry/sci_scale_by_detj_kernel_mod.F90 +++ b/components/science/source/kernel/geometry/sci_scale_by_detj_kernel_mod.F90 @@ -86,6 +86,10 @@ subroutine scale_by_detj_code(nlayers, & use sci_coordinate_jacobian_mod, only: pointwise_coordinate_jacobian + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none ! Arguments @@ -124,7 +128,9 @@ subroutine scale_by_detj_code(nlayers, & do df = 1,ndf_ws ! Compute detj at dof points - call pointwise_coordinate_jacobian(ndf_wx, chi1_e, chi2_e, chi3_e, & + call pointwise_coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_wx, chi1_e, chi2_e, chi3_e, & ipanel, basis_wx(:,:,df), & diff_basis_wx(:,:,df), & jac, detj) diff --git a/components/science/source/kernel/inter_function_space/sci_compute_map_u_operators_kernel_mod.F90 b/components/science/source/kernel/inter_function_space/sci_compute_map_u_operators_kernel_mod.F90 index 722a5f256..a78f203d4 100644 --- a/components/science/source/kernel/inter_function_space/sci_compute_map_u_operators_kernel_mod.F90 +++ b/components/science/source/kernel/inter_function_space/sci_compute_map_u_operators_kernel_mod.F90 @@ -113,12 +113,15 @@ subroutine compute_map_u_operators_code(cell, nlayers, ncell_3d_1, & nqp_h, nqp_v, wqp_h, wqp_v & ) - use base_mesh_config_mod, only : geometry, & - geometry_spherical, & - geometry_planar - use sci_chi_transform_mod, only : chi2llr + use sci_chi_transform_mod, only : chi2llr use sci_coordinate_jacobian_mod, only : coordinate_jacobian - use coord_transform_mod, only : sphere2cart_vector + use coord_transform_mod, only : sphere2cart_vector + + use finite_element_config_mod, only: coord_system + use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical, & + geometry_planar + use planet_config_mod, only: scaled_radius implicit none @@ -173,7 +176,11 @@ subroutine compute_map_u_operators_code(cell, nlayers, ncell_3d_1, & chi_sph_3_cell(df) = chi_sph_3( map_chi_sph(df) + k ) end do - call coordinate_jacobian(ndf_chi_sph, & + call coordinate_jacobian(coord_system, & + geometry, & + topology, & + scaled_radius, & + ndf_chi_sph, & nqp_h, & nqp_v, & chi_sph_1_cell, & diff --git a/components/science/source/kernel/inter_function_space/sci_compute_sample_u_ops_kernel_mod.F90 b/components/science/source/kernel/inter_function_space/sci_compute_sample_u_ops_kernel_mod.F90 index c6426b267..4bfbb79e1 100644 --- a/components/science/source/kernel/inter_function_space/sci_compute_sample_u_ops_kernel_mod.F90 +++ b/components/science/source/kernel/inter_function_space/sci_compute_sample_u_ops_kernel_mod.F90 @@ -26,14 +26,18 @@ module sci_compute_sample_u_ops_kernel_mod use constants_mod, only : r_def, i_def use fs_continuity_mod, only : W2broken, W3, Wtheta, Wchi use kernel_mod, only : kernel_type - use base_mesh_config_mod, only : geometry, geometry_spherical, & - geometry_planar use sci_chi_transform_mod, only : chi2llr use sci_coordinate_jacobian_mod, only : coordinate_jacobian, & coordinate_jacobian_inverse use coord_transform_mod, only : sphere2cart_vector use reference_element_mod, only : W, S, N, E, T, B + use finite_element_config_mod, only: coord_system + use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical, & + geometry_planar + use planet_config_mod, only: scaled_radius + implicit none private @@ -176,8 +180,9 @@ subroutine compute_sample_u_ops_code( col, nlayers, & chi3_e(df_chi) = chi3(map_chi(df_chi) + k) end do - call coordinate_jacobian(ndf_chi, ndf_w2b, chi1_e, chi2_e, chi3_e, & - ipanel, chi_basis, chi_diff_basis, jacobian, dj) + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, ndf_w2b, chi1_e, chi2_e, chi3_e, & + ipanel, chi_basis, chi_diff_basis, jacobian, dj) call coordinate_jacobian_inverse(ndf_w2b, jacobian, dj, jac_inv) ! X and Y components contribute equally to all W2 DoFs @@ -225,7 +230,8 @@ subroutine compute_sample_u_ops_code( col, nlayers, & chi3_e(df_chi) = chi3(map_chi(df_chi) + k) end do - call coordinate_jacobian(ndf_chi, ndf_w2b, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, ndf_w2b, chi1_e, chi2_e, chi3_e, & ipanel, chi_basis, chi_diff_basis, jacobian, dj) call coordinate_jacobian_inverse(ndf_w2b, jacobian, dj, jac_inv) diff --git a/components/science/source/kernel/inter_function_space/sci_convert_hcurl_field_kernel_mod.F90 b/components/science/source/kernel/inter_function_space/sci_convert_hcurl_field_kernel_mod.F90 index 8cbc37847..a075503ae 100644 --- a/components/science/source/kernel/inter_function_space/sci_convert_hcurl_field_kernel_mod.F90 +++ b/components/science/source/kernel/inter_function_space/sci_convert_hcurl_field_kernel_mod.F90 @@ -89,7 +89,13 @@ subroutine convert_hcurl_field_code(nlayers, & ndf_pid, undf_pid, map_pid & ) - use sci_coordinate_jacobian_mod, only: coordinate_jacobian, coordinate_jacobian_inverse + use sci_coordinate_jacobian_mod, only: coordinate_jacobian, & + coordinate_jacobian_inverse + + use finite_element_config_mod, only: coord_system + use base_mesh_config_mod, only: geometry, topology + use planet_config_mod, only: scaled_radius + implicit none ! Arguments @@ -124,7 +130,8 @@ subroutine convert_hcurl_field_code(nlayers, & chi2_e(df) = chi2(map_chi(df) + k) chi3_e(df) = chi3(map_chi(df) + k) end do - call coordinate_jacobian(ndf_chi, ndf,chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, ndf,chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, diff_basis_chi, jacobian, dj) call coordinate_jacobian_inverse(ndf, jacobian, dj, jacobian_inv) do df = 1,ndf diff --git a/components/science/source/kernel/inter_function_space/sci_convert_hdiv_field_kernel_mod.F90 b/components/science/source/kernel/inter_function_space/sci_convert_hdiv_field_kernel_mod.F90 index bc56cbe84..a9b5d98c1 100644 --- a/components/science/source/kernel/inter_function_space/sci_convert_hdiv_field_kernel_mod.F90 +++ b/components/science/source/kernel/inter_function_space/sci_convert_hdiv_field_kernel_mod.F90 @@ -99,6 +99,11 @@ subroutine convert_hdiv_field_code(nlayers, & ndf_pid, undf_pid, map_pid & ) use sci_coordinate_jacobian_mod, only: coordinate_jacobian + + use finite_element_config_mod, only: coord_system + use base_mesh_config_mod, only: geometry, topology + use planet_config_mod, only: scaled_radius + implicit none ! Arguments @@ -141,7 +146,8 @@ subroutine convert_hdiv_field_code(nlayers, & chi2_e(df) = chi2(map_chi(df) + k) chi3_e(df) = chi3(map_chi(df) + k) end do - call coordinate_jacobian(ndf_chi, ndf1, chi1_e, chi2_e, chi3_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi, ndf1, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi, diff_basis_chi, jacobian, dj) do df = 1,ndf1 diff --git a/components/science/source/kernel/inter_function_space/sci_convert_hdiv_native_kernel_mod.F90 b/components/science/source/kernel/inter_function_space/sci_convert_hdiv_native_kernel_mod.F90 index 24b789b88..b5e4782d6 100644 --- a/components/science/source/kernel/inter_function_space/sci_convert_hdiv_native_kernel_mod.F90 +++ b/components/science/source/kernel/inter_function_space/sci_convert_hdiv_native_kernel_mod.F90 @@ -100,6 +100,10 @@ subroutine convert_hdiv_native_code(nlayers, & use sci_native_jacobian_mod, only: native_jacobian + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none ! Arguments @@ -149,10 +153,11 @@ subroutine convert_hdiv_native_code(nlayers, & do df_w2 = 1, ndf_w2 ! Compute Jacobian for whole column at this DoF - call native_jacobian( & - ndf_chi, nlayers, chi_1_e, chi_2_e, chi_3_e, ipanel, & - basis_chi(:,:,df_w2), diff_basis_chi(:,:,df_w2), jacobian, dj & - ) + call native_jacobian( & + coord_system, geometry, topology, scaled_radius, & + ndf_chi, nlayers, chi_1_e, chi_2_e, chi_3_e, ipanel, & + basis_chi(:,:,df_w2), diff_basis_chi(:,:,df_w2), & + jacobian, dj ) ! Create vector of HDiv values at this point vector_in(:,:) = 0.0_r_def diff --git a/components/science/source/kernel/inter_function_space/sci_convert_phys_to_hdiv_kernel_mod.F90 b/components/science/source/kernel/inter_function_space/sci_convert_phys_to_hdiv_kernel_mod.F90 index 9a6d2960e..fece67189 100644 --- a/components/science/source/kernel/inter_function_space/sci_convert_phys_to_hdiv_kernel_mod.F90 +++ b/components/science/source/kernel/inter_function_space/sci_convert_phys_to_hdiv_kernel_mod.F90 @@ -106,12 +106,16 @@ subroutine convert_phys_to_hdiv_code( nlayers, & undf_pid, & map_pid ) - use base_mesh_config_mod, only : geometry_spherical use sci_chi_transform_mod, only : chi2llr use sci_coordinate_jacobian_mod, only : pointwise_coordinate_jacobian, & pointwise_coordinate_jacobian_inverse use coord_transform_mod, only : sphere2cart_vector + use base_mesh_config_mod, only: topology, & + geometry_spherical + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none ! Arguments @@ -163,7 +167,8 @@ subroutine convert_phys_to_hdiv_code( nlayers, & end do ! Compute Jacobian at this W2 point - call pointwise_coordinate_jacobian(ndf_chi, & + call pointwise_coordinate_jacobian(coord_system, geometry, topology, & + scaled_radius, ndf_chi, & chi_1_cell, chi_2_cell, chi_3_cell, & ipanel, & basis_chi(:,:,df_w2), & diff --git a/components/science/source/kernel/inter_function_space/sci_dg_convert_hdiv_field_kernel_mod.F90 b/components/science/source/kernel/inter_function_space/sci_dg_convert_hdiv_field_kernel_mod.F90 index 71c0acd92..a5f125b6f 100644 --- a/components/science/source/kernel/inter_function_space/sci_dg_convert_hdiv_field_kernel_mod.F90 +++ b/components/science/source/kernel/inter_function_space/sci_dg_convert_hdiv_field_kernel_mod.F90 @@ -100,6 +100,11 @@ subroutine dg_convert_hdiv_field_code(nlayers, & ndf_pid, undf_pid, map_pid & ) use sci_coordinate_jacobian_mod, only: pointwise_coordinate_jacobian + + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none ! Arguments @@ -152,7 +157,9 @@ subroutine dg_convert_hdiv_field_code(nlayers, & chi2_e(dfx) = chi2(map_chi(dfx) + k) chi3_e(dfx) = chi3(map_chi(dfx) + k) end do - call pointwise_coordinate_jacobian(ndf_chi, chi1_e, chi2_e, chi3_e, & + call pointwise_coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_chi, chi1_e, chi2_e, chi3_e, & ipanel, basis_chi(:,:,df), & diff_basis_chi(:,:,df), jacobian, dj) vector_in(:) = 0.0_r_def diff --git a/components/science/source/kernel/inter_function_space/sci_dg_convert_hdiv_native_kernel_mod.F90 b/components/science/source/kernel/inter_function_space/sci_dg_convert_hdiv_native_kernel_mod.F90 index 4d89fa4c8..1b93a5772 100644 --- a/components/science/source/kernel/inter_function_space/sci_dg_convert_hdiv_native_kernel_mod.F90 +++ b/components/science/source/kernel/inter_function_space/sci_dg_convert_hdiv_native_kernel_mod.F90 @@ -104,6 +104,10 @@ subroutine dg_convert_hdiv_native_code(nlayers, & use sci_native_jacobian_mod, only: native_jacobian + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none ! Arguments @@ -137,7 +141,9 @@ subroutine dg_convert_hdiv_native_code(nlayers, & integer(kind=i_def) :: w2_idx, w3_idx, chi_idx real(kind=r_def) :: jacobian(nlayers,3,3), dj(nlayers) real(kind=r_def) :: vector_in(nlayers,3), vector_out(nlayers,3) - real(kind=r_def) :: chi_1_e(ndf_chi), chi_2_e(ndf_chi), chi_3_e(nlayers,ndf_chi) + real(kind=r_def) :: chi_1_e(ndf_chi) + real(kind=r_def) :: chi_2_e(ndf_chi) + real(kind=r_def) :: chi_3_e(nlayers,ndf_chi) integer(kind=i_def) :: ipanel @@ -154,17 +160,18 @@ subroutine dg_convert_hdiv_native_code(nlayers, & end do ! Compute Jacobian for whole column - call native_jacobian( & - ndf_chi, nlayers, chi_1_e, chi_2_e, chi_3_e, ipanel, & - basis_chi(:,:,df_w3), diff_basis_chi(:,:,df_w3), jacobian, dj & - ) + call native_jacobian( & + coord_system, geometry, topology, scaled_radius, & + ndf_chi, nlayers, chi_1_e, chi_2_e, chi_3_e, ipanel, & + basis_chi(:,:,df_w3), diff_basis_chi(:,:,df_w3), & + jacobian, dj ) ! Create vector of W2 values vector_in(:,:) = 0.0_r_def do df_w2 = 1, ndf_w2 w2_idx = map_w2(df_w2) do i = 1, 3 - vector_in(:,i) = vector_in(:,i) & + vector_in(:,i) = vector_in(:,i) & + hdiv_field(w2_idx : w2_idx+nlayers-1)*basis_w2(i,df_w2,1) end do end do diff --git a/components/science/source/kernel/inter_function_space/sci_project_w3_to_w2b_operator_kernel_mod.F90 b/components/science/source/kernel/inter_function_space/sci_project_w3_to_w2b_operator_kernel_mod.F90 index 426037eff..5fbf011d8 100644 --- a/components/science/source/kernel/inter_function_space/sci_project_w3_to_w2b_operator_kernel_mod.F90 +++ b/components/science/source/kernel/inter_function_space/sci_project_w3_to_w2b_operator_kernel_mod.F90 @@ -100,6 +100,10 @@ subroutine project_w3_to_w2b_operator_code( cell, nlayers, & use sci_coordinate_jacobian_mod, only: pointwise_coordinate_jacobian + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none ! Arguments @@ -145,7 +149,9 @@ subroutine project_w3_to_w2b_operator_code( cell, nlayers, & projection_operator(ik,:,:) = 0.0_r_def do qp_v = 1,nqp_v do qp_h = 1,nqp_h - call pointwise_coordinate_jacobian(ndf_wx, chi1_e, chi2_e, chi3_e, & + call pointwise_coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_wx, chi1_e, chi2_e, chi3_e, & ipanel, basis_wx(:,:,qp_h,qp_v), & diff_basis_wx(:,:,qp_h,qp_v), & jac, detj) diff --git a/components/science/source/kernel/inter_function_space/sci_project_ws_to_w1_operator_kernel_mod.F90 b/components/science/source/kernel/inter_function_space/sci_project_ws_to_w1_operator_kernel_mod.F90 index c8d849f7e..607c2782b 100644 --- a/components/science/source/kernel/inter_function_space/sci_project_ws_to_w1_operator_kernel_mod.F90 +++ b/components/science/source/kernel/inter_function_space/sci_project_ws_to_w1_operator_kernel_mod.F90 @@ -106,9 +106,12 @@ subroutine project_ws_to_w1_operator_code( cell, nlayers, & pointwise_coordinate_jacobian_inverse use sci_chi_transform_mod, only: chi2llr use coord_transform_mod, only: sphere2cart_vector - use base_mesh_config_mod, only: geometry, & - geometry_spherical, & - geometry_planar + + use base_mesh_config_mod, only: geometry, topology, & + geometry_spherical, & + geometry_planar + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius implicit none @@ -173,7 +176,9 @@ subroutine project_ws_to_w1_operator_code( cell, nlayers, & ipanel, llr(1), llr(2), llr(3)) end if - call pointwise_coordinate_jacobian(ndf_wx, chi1_e, chi2_e, chi3_e, & + call pointwise_coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_wx, chi1_e, chi2_e, chi3_e, & ipanel, basis_wx(:,:,qp_h,qp_v), & diff_basis_wx(:,:,qp_h,qp_v), & jac, detj) diff --git a/components/science/source/kernel/inter_function_space/sci_project_ws_to_w2_operator_kernel_mod.F90 b/components/science/source/kernel/inter_function_space/sci_project_ws_to_w2_operator_kernel_mod.F90 index 0d1f4ff08..a42d10188 100644 --- a/components/science/source/kernel/inter_function_space/sci_project_ws_to_w2_operator_kernel_mod.F90 +++ b/components/science/source/kernel/inter_function_space/sci_project_ws_to_w2_operator_kernel_mod.F90 @@ -101,6 +101,10 @@ subroutine project_ws_to_w2_operator_code( cell, nlayers, & use sci_coordinate_jacobian_mod, only: pointwise_coordinate_jacobian + use base_mesh_config_mod, only: geometry, topology + use finite_element_config_mod, only: coord_system + use planet_config_mod, only: scaled_radius + implicit none ! Arguments @@ -146,7 +150,9 @@ subroutine project_ws_to_w2_operator_code( cell, nlayers, & projection_operator(ik,:,:) = 0.0_r_def do qp_v = 1,nqp_v do qp_h = 1,nqp_h - call pointwise_coordinate_jacobian(ndf_wx, chi1_e, chi2_e, chi3_e, & + call pointwise_coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf_wx, chi1_e, chi2_e, chi3_e, & ipanel, basis_wx(:,:,qp_h,qp_v), & diff_basis_wx(:,:,qp_h,qp_v), & jac, detj) diff --git a/components/science/source/kernel/inter_mesh/sci_proj_mr_to_sh_rho_rhs_op_kernel_mod.F90 b/components/science/source/kernel/inter_mesh/sci_proj_mr_to_sh_rho_rhs_op_kernel_mod.F90 index 76511ae26..bbdee962a 100644 --- a/components/science/source/kernel/inter_mesh/sci_proj_mr_to_sh_rho_rhs_op_kernel_mod.F90 +++ b/components/science/source/kernel/inter_mesh/sci_proj_mr_to_sh_rho_rhs_op_kernel_mod.F90 @@ -125,6 +125,10 @@ subroutine proj_mr_to_sh_rho_rhs_op_code( & use sci_coordinate_jacobian_mod, only: coordinate_jacobian + use finite_element_config_mod, only: coord_system + use base_mesh_config_mod, only: geometry, topology + use planet_config_mod, only: scaled_radius + implicit none ! Arguments @@ -184,10 +188,12 @@ subroutine proj_mr_to_sh_rho_rhs_op_code( & end do ! Get detj for lower and upper half cells - call coordinate_jacobian(ndf_chi_dl, nqp_h, nqp_v, lower_chi_1_e, lower_chi_2_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi_dl, nqp_h, nqp_v, lower_chi_1_e, lower_chi_2_e, & lower_chi_3_e, ipanel, chi_dl_basis, chi_dl_diff_basis, & lower_jac, lower_dj) - call coordinate_jacobian(ndf_chi_dl, nqp_h, nqp_v, upper_chi_1_e, upper_chi_2_e, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf_chi_dl, nqp_h, nqp_v, upper_chi_1_e, upper_chi_2_e, & upper_chi_3_e, ipanel, chi_dl_basis, chi_dl_diff_basis, & upper_jac, upper_dj) diff --git a/components/science/unit-test/algorithm/solver/sci_field_vector_mod_test.pf b/components/science/unit-test/algorithm/solver/sci_field_vector_mod_test.pf index 9eb563920..c5ab6cc8d 100644 --- a/components/science/unit-test/algorithm/solver/sci_field_vector_mod_test.pf +++ b/components/science/unit-test/algorithm/solver/sci_field_vector_mod_test.pf @@ -56,10 +56,8 @@ contains integer(i_def) :: mesh_id type(function_space_type), pointer :: w2_fs => null() - type(mesh_type), pointer :: mesh_out => null() type(mesh_type), pointer :: mesh_ptr => null() - integer(i_def) :: err integer :: i, undf real(r_def) :: sum1, min1, max1, sum2, min2, max2, scalar real(r_def) :: test, answer diff --git a/components/science/unit-test/kernel/fem/compute_broken_div_operator_kernel_mod_test.pf b/components/science/unit-test/kernel/fem/compute_broken_div_operator_kernel_mod_test.pf index 65f37e6fc..adb4a2675 100644 --- a/components/science/unit-test/kernel/fem/compute_broken_div_operator_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/fem/compute_broken_div_operator_kernel_mod_test.pf @@ -7,7 +7,7 @@ !> module compute_broken_div_operator_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_dofmap_mod, & only : get_w0_m3x3_dofmap, & get_w3_m3x3_dofmap @@ -63,7 +63,7 @@ contains element_order_v=1_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/fem/compute_curl_operator_kernel_mod_test.pf b/components/science/unit-test/kernel/fem/compute_curl_operator_kernel_mod_test.pf index 50888b180..b2cff73fe 100644 --- a/components/science/unit-test/kernel/fem/compute_curl_operator_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/fem/compute_curl_operator_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module compute_curl_operator_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_dofmap_mod, only : get_w0_m3x3_dofmap, & get_w3_m3x3_dofmap use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & @@ -66,7 +66,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/fem/compute_derham_matrices_kernel_mod_test.pf b/components/science/unit-test/kernel/fem/compute_derham_matrices_kernel_mod_test.pf index 50dd756d5..1484bc961 100644 --- a/components/science/unit-test/kernel/fem/compute_derham_matrices_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/fem/compute_derham_matrices_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module compute_derham_matrices_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only: i_def, r_def, imdi use funit implicit none @@ -47,7 +47,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/fem/compute_div_operator_kernel_mod_test.pf b/components/science/unit-test/kernel/fem/compute_div_operator_kernel_mod_test.pf index 53474e517..936d6e980 100644 --- a/components/science/unit-test/kernel/fem/compute_div_operator_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/fem/compute_div_operator_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module compute_div_operator_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_dofmap_mod, & only : get_w0_m3x3_dofmap, & get_w3_m3x3_dofmap @@ -64,7 +64,7 @@ contains element_order_v=1_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/fem/compute_grad_operator_kernel_mod_test.pf b/components/science/unit-test/kernel/fem/compute_grad_operator_kernel_mod_test.pf index da1dd8b61..8fd8da77b 100644 --- a/components/science/unit-test/kernel/fem/compute_grad_operator_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/fem/compute_grad_operator_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module compute_grad_operator_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & get_w1_m3x3_q3x3x3_size, & get_w3_m3x3_q3x3x3_size @@ -58,7 +58,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/fem/compute_mass_matrix_kernel_w1_mod_test.pf b/components/science/unit-test/kernel/fem/compute_mass_matrix_kernel_w1_mod_test.pf index 1d85c8213..af7c56393 100644 --- a/components/science/unit-test/kernel/fem/compute_mass_matrix_kernel_w1_mod_test.pf +++ b/components/science/unit-test/kernel/fem/compute_mass_matrix_kernel_w1_mod_test.pf @@ -8,7 +8,7 @@ !> module compute_mass_matrix_kernel_w1_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_dofmap_mod, & only : get_w0_m3x3_dofmap, get_w3_m3x3_dofmap use get_unit_test_m3x3_q3x3x3_sizes_mod, & @@ -60,7 +60,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/fem/compute_mass_matrix_kernel_w2_mod_test.pf b/components/science/unit-test/kernel/fem/compute_mass_matrix_kernel_w2_mod_test.pf index 3e499f697..adaf7d78f 100644 --- a/components/science/unit-test/kernel/fem/compute_mass_matrix_kernel_w2_mod_test.pf +++ b/components/science/unit-test/kernel/fem/compute_mass_matrix_kernel_w2_mod_test.pf @@ -8,7 +8,7 @@ !> module compute_mass_matrix_kernel_w2_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_dofmap_mod, & only : get_w0_m3x3_dofmap, get_w3_m3x3_dofmap use get_unit_test_m3x3_q3x3x3_sizes_mod, & @@ -60,7 +60,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/fem/compute_mass_matrix_kernel_w3_mod_test.pf b/components/science/unit-test/kernel/fem/compute_mass_matrix_kernel_w3_mod_test.pf index 550e039c9..f996a7fa1 100644 --- a/components/science/unit-test/kernel/fem/compute_mass_matrix_kernel_w3_mod_test.pf +++ b/components/science/unit-test/kernel/fem/compute_mass_matrix_kernel_w3_mod_test.pf @@ -8,7 +8,7 @@ !> module compute_mass_matrix_kernel_w3_mod_test - use constants_mod, only : i_def, r_def, r_single, r_double + use constants_mod, only : i_def, r_def, r_single, r_double, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & get_w3_m3x3_q3x3x3_size @@ -60,7 +60,7 @@ contains element_order_v = 0_i_def, & rehabilitate = .true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/fem/compute_mass_matrix_kernel_wtheta_mod_test.pf b/components/science/unit-test/kernel/fem/compute_mass_matrix_kernel_wtheta_mod_test.pf index e214ebfb4..e313b2843 100644 --- a/components/science/unit-test/kernel/fem/compute_mass_matrix_kernel_wtheta_mod_test.pf +++ b/components/science/unit-test/kernel/fem/compute_mass_matrix_kernel_wtheta_mod_test.pf @@ -8,7 +8,7 @@ !> module compute_mass_matrix_kernel_wtheta_mod_test - use constants_mod, only : i_def, r_def, r_single, r_double, l_def + use constants_mod, only : i_def, r_def, r_single, r_double, l_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, & only : get_w0_m3x3_q3x3x3_size, & @@ -66,7 +66,7 @@ contains element_order_v = 0_i_def, & rehabilitate = .true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/fem/gp_rhs_kernel_mod_test.pf b/components/science/unit-test/kernel/fem/gp_rhs_kernel_mod_test.pf index eee93bfa4..4962f6ba1 100644 --- a/components/science/unit-test/kernel/fem/gp_rhs_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/fem/gp_rhs_kernel_mod_test.pf @@ -7,7 +7,7 @@ !------------------------------------------------------------------------------- module gp_rhs_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use funit use quadrature_xyoz_mod, only: quadrature_xyoz_type, & quadrature_xyoz_proxy_type @@ -65,7 +65,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) qr = quadrature_xyoz_type(3, quadrature_rule) diff --git a/components/science/unit-test/kernel/fem/gp_vector_rhs_kernel_mod_test.pf b/components/science/unit-test/kernel/fem/gp_vector_rhs_kernel_mod_test.pf index 20f623a67..c9f8146ec 100644 --- a/components/science/unit-test/kernel/fem/gp_vector_rhs_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/fem/gp_vector_rhs_kernel_mod_test.pf @@ -71,7 +71,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) qr = quadrature_xyoz_type(3, quadrature_rule) diff --git a/components/science/unit-test/kernel/fem/mg_derham_mat_kernel_mod_test.pf b/components/science/unit-test/kernel/fem/mg_derham_mat_kernel_mod_test.pf index 11bc64083..1478113c3 100644 --- a/components/science/unit-test/kernel/fem/mg_derham_mat_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/fem/mg_derham_mat_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module mg_derham_mat_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use funit implicit none @@ -47,7 +47,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/geometry/calc_da_at_w2_kernel_mod_test.pf b/components/science/unit-test/kernel/geometry/calc_da_at_w2_kernel_mod_test.pf index fee5e8bbb..442bcd541 100644 --- a/components/science/unit-test/kernel/geometry/calc_da_at_w2_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/geometry/calc_da_at_w2_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module calc_dA_at_w2_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & get_w2_m3x3_q3x3x3_size, & @@ -59,7 +59,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/geometry/calc_detj_at_w2_kernel_mod_test.pf b/components/science/unit-test/kernel/geometry/calc_detj_at_w2_kernel_mod_test.pf index 75650dd78..76297048d 100644 --- a/components/science/unit-test/kernel/geometry/calc_detj_at_w2_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/geometry/calc_detj_at_w2_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module calc_detj_at_w2_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use funit use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & @@ -60,7 +60,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/geometry/calc_detj_at_w3_kernel_mod_test.pf b/components/science/unit-test/kernel/geometry/calc_detj_at_w3_kernel_mod_test.pf index 4d69854d1..d7bfea43c 100644 --- a/components/science/unit-test/kernel/geometry/calc_detj_at_w3_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/geometry/calc_detj_at_w3_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module calc_detj_at_w3_kernel_mod_test - use constants_mod, only : i_def, r_def, r_single, r_double + use constants_mod, only: imdi, i_def, r_def, r_single, r_double use funit use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & @@ -59,7 +59,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/geometry/calc_directional_detj_at_w2_kernel_mod_test.pf b/components/science/unit-test/kernel/geometry/calc_directional_detj_at_w2_kernel_mod_test.pf index 963c6ecff..3db77d95f 100644 --- a/components/science/unit-test/kernel/geometry/calc_directional_detj_at_w2_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/geometry/calc_directional_detj_at_w2_kernel_mod_test.pf @@ -8,7 +8,7 @@ !> module calc_directional_detj_at_w2_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use funit use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & @@ -58,7 +58,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/geometry/chi_transform_mod_test.pf b/components/science/unit-test/kernel/geometry/chi_transform_mod_test.pf index a72fce3f5..a0fea734a 100644 --- a/components/science/unit-test/kernel/geometry/chi_transform_mod_test.pf +++ b/components/science/unit-test/kernel/geometry/chi_transform_mod_test.pf @@ -283,15 +283,20 @@ contains if ( this%source_coord_system == LLH_rot ) then north_pole(1) = PI/2.0_r_def north_pole(2) = 0.0_r_def - call init_chi_transforms(north_pole_arg=north_pole) + call init_chi_transforms(geometry_spherical,& + topology, & + north_pole_arg=north_pole) else if ( this%source_coord_system == ABH_stretch_rot ) then north_pole(1) = -PI/2.0_r_def north_pole(2) = 0.0_r_def equatorial_latitude = PI/6.0_r_def - call init_chi_transforms(north_pole_arg=north_pole, equator_lat_arg=equatorial_latitude) + call init_chi_transforms(geometry_spherical, & + topology, & + north_pole_arg=north_pole, & + equator_lat_arg=equatorial_latitude) else ! Non-rotated or stretched case - call init_chi_transforms() + call init_chi_transforms(geometry_spherical, topology) end if end subroutine setUp diff --git a/components/science/unit-test/kernel/geometry/compute_latlon_kernel_mod_test.pf b/components/science/unit-test/kernel/geometry/compute_latlon_kernel_mod_test.pf index 4b686f674..21508c9d0 100644 --- a/components/science/unit-test/kernel/geometry/compute_latlon_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/geometry/compute_latlon_kernel_mod_test.pf @@ -6,7 +6,7 @@ module compute_latlon_kernel_mod_test - use constants_mod, only : i_def, r_def, pi + use constants_mod, only : i_def, r_def, pi, imdi use get_unit_test_m3x3_dofmap_mod, & only : get_w3_m3x3_dofmap, get_wchi_m3x3_dofmap use get_unit_test_m3x3_q3x3x3_sizes_mod, & @@ -57,7 +57,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/geometry/coordinate_jacobian_alphabetaz_mod_test.pf b/components/science/unit-test/kernel/geometry/coordinate_jacobian_alphabetaz_mod_test.pf index 083909300..b3a6256b6 100644 --- a/components/science/unit-test/kernel/geometry/coordinate_jacobian_alphabetaz_mod_test.pf +++ b/components/science/unit-test/kernel/geometry/coordinate_jacobian_alphabetaz_mod_test.pf @@ -10,6 +10,12 @@ module coordinate_jacobian_alphabetaz_mod_test use funit use constants_mod, only : r_def, i_def + use base_mesh_config_mod, only : geometry_spherical, & + topology_fully_periodic +! use extrusion_config_mod, only : method_uniform, & +! stretching_method_linear + use finite_element_config_mod, only : coord_system_native + implicit none public :: set_up, tear_down, test_all @@ -22,46 +28,24 @@ contains @before subroutine set_up() - use base_mesh_config_mod, only : geometry_spherical, & - topology_fully_periodic - use extrusion_config_mod, only : method_uniform, & - stretching_method_linear - use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_native - use feign_config_mod, only : feign_base_mesh_config, & - feign_extrusion_config, & - feign_finite_element_config, & - feign_planet_config + + !use feign_config_mod, only : feign_base_mesh_config, & + ! feign_extrusion_config, & + ! feign_finite_element_config, & + ! feign_planet_config use sci_chi_transform_mod, only : init_chi_transforms implicit none - call feign_extrusion_config( method=method_uniform, & - planet_radius=radius, & - domain_height=10.0_r_def, & - number_of_layers=5_i_def, & - stretching_method=stretching_method_linear, & - stretching_height=15.0_r_def, & - eta_values=(/0.5_r_def/) ) - - call feign_base_mesh_config( file_prefix='foo', & - prime_mesh_name='unit_test', & - geometry=geometry_spherical, & - prepartitioned=.false., & - topology=topology_fully_periodic, & - fplane=.false., f_lat_deg=0.0_r_def ) - - call feign_finite_element_config( & - cellshape=cellshape_quadrilateral, & - coord_order=0_i_def, & - coord_system=coord_system_native, & - element_order_h=0_i_def, & - element_order_v=0_i_def, & - rehabilitate=.true. ) - - call feign_planet_config( scaling_factor=1.0_r_def ) - - call init_chi_transforms() + !call feign_extrusion_config( method=method_uniform, & + ! planet_radius=radius, & + ! domain_height=10.0_r_def, & + ! number_of_layers=5_i_def, & + ! stretching_method=stretching_method_linear, & + ! stretching_height=15.0_r_def, & + ! eta_values=(/0.5_r_def/) ) + + call init_chi_transforms(geometry_spherical, topology_fully_periodic) end subroutine set_up @@ -90,6 +74,10 @@ contains pointwise_coordinate_jacobian, & pointwise_coordinate_jacobian_inverse +! use base_mesh_config_mod, only : geometry_spherical, & +! topology_fully_periodic +! use finite_element_config_mod, only : coord_system_native + implicit none real(kind=r_def), parameter :: tol = 1.0e-14_r_def ! r_def 64bit @@ -109,6 +97,11 @@ contains real(kind=r_def), parameter :: b = 0.1_r_def real(kind=r_def), parameter :: h = 2.0_r_def + integer(i_def), parameter :: coord_system = coord_system_native + integer(i_def), parameter :: geometry = geometry_spherical + integer(i_def), parameter :: topology = topology_fully_periodic + real(r_def), parameter :: scaled_radius = 1000.0_r_def + ! We choose a box centred on alpha = 0, beta = 0 alpha(:) = (/ -a, a, a, -a, -a, a, a, -a /) beta(:) = (/ -b, -b, b, b, -b, -b, b, b /) @@ -147,7 +140,8 @@ contains basis(:,:,:,:) = 0.125_r_def - call coordinate_jacobian(ndf, ngp, ngp, alpha, beta, height, ipanel, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf, ngp, ngp, alpha, beta, height, ipanel, & basis, diff_basis, jac, dj) call coordinate_jacobian_inverse(ngp,ngp, jac, dj, jac_inv) @@ -183,7 +177,9 @@ contains end do ! Test the pointwise computations - call pointwise_coordinate_jacobian(ndf, alpha, beta, height, ipanel, & + call pointwise_coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf, alpha, beta, height, ipanel, & basis(:,:,1,1), diff_basis(:,:,1,1), & jac(:,:,1,1), dj(1,1) ) jac_inv(:,:,1,1) = pointwise_coordinate_jacobian_inverse(jac(:,:,1,1), & diff --git a/components/science/unit-test/kernel/geometry/coordinate_jacobian_lonlatz_mod_test.pf b/components/science/unit-test/kernel/geometry/coordinate_jacobian_lonlatz_mod_test.pf index f4f5fd353..6a7c627ef 100644 --- a/components/science/unit-test/kernel/geometry/coordinate_jacobian_lonlatz_mod_test.pf +++ b/components/science/unit-test/kernel/geometry/coordinate_jacobian_lonlatz_mod_test.pf @@ -22,47 +22,8 @@ contains @before subroutine set_up() - use base_mesh_config_mod, only : geometry_spherical, & - topology_non_periodic - use extrusion_config_mod, only : method_uniform, & - stretching_method_linear - use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_native - use feign_config_mod, only : feign_base_mesh_config, & - feign_extrusion_config, & - feign_finite_element_config, & - feign_planet_config - use sci_chi_transform_mod, only : init_chi_transforms - implicit none - call feign_base_mesh_config( file_prefix='foo', & - prime_mesh_name='unit_test', & - geometry=geometry_spherical, & - prepartitioned=.false., & - topology=topology_non_periodic, & - fplane=.false., f_lat_deg=0.0_r_def ) - - call feign_extrusion_config( method=method_uniform, & - planet_radius=radius, & - domain_height=10.0_r_def, & - number_of_layers=5_i_def, & - stretching_method=stretching_method_linear, & - stretching_height=15.0_r_def, & - eta_values=(/0.5_r_def/) ) - - call feign_finite_element_config( & - cellshape=cellshape_quadrilateral, & - coord_order=0_i_def, & - coord_system=coord_system_native, & - element_order_h=0_i_def, & - element_order_v=0_i_def, & - rehabilitate=.true. ) - - call feign_planet_config( scaling_factor=1.0_r_def ) - - call init_chi_transforms() - end subroutine set_up !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -84,12 +45,17 @@ contains subroutine test_all() use, intrinsic :: iso_fortran_env, only: real64 + use sci_chi_transform_mod, only : init_chi_transforms use sci_coordinate_jacobian_mod, & only : coordinate_jacobian, & coordinate_jacobian_inverse, & pointwise_coordinate_jacobian, & pointwise_coordinate_jacobian_inverse + use base_mesh_config_mod, only: geometry_spherical, & + topology_non_periodic + use finite_element_config_mod, only: coord_system_native + implicit none real(kind=r_def), parameter :: tol = 1.0e-12_r_def ! r_def 64bit @@ -104,6 +70,11 @@ contains real(kind=r_def) :: basis(1,8,1,1), jac(3,3,1,1), dj(1,1), h real(kind=r_def) :: jac_inv(3,3,1,1), identity(3,3,1,1), err, answer(3,3) + integer(i_def), parameter :: coord_system = coord_system_native + integer(i_def), parameter :: geometry = geometry_spherical + integer(i_def), parameter :: topology = topology_non_periodic + real(r_def), parameter :: scaled_radius = 270.0_r_def + ! Box of length dlon, width dlat and height dh real(kind=r_def), parameter :: dlon = 0.2_r_def real(kind=r_def), parameter :: dlat = 0.1_r_def @@ -163,7 +134,10 @@ contains basis(:,:,:,:) = 0.125_r_def - call coordinate_jacobian(ndf, ngp, ngp, longitude, latitude, height, & + call init_chi_transforms(geometry, topology) + + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf, ngp, ngp, longitude, latitude, height, & ipanel, basis, diff_basis, jac, dj) call coordinate_jacobian_inverse(ngp, ngp, jac, dj, jac_inv) @@ -197,7 +171,9 @@ contains end do ! Test the pointwise computations - call pointwise_coordinate_jacobian(ndf, longitude, latitude, height, ipanel, & + call pointwise_coordinate_jacobian(coord_system, geometry, & + topology, scaled_radius, & + ndf, longitude, latitude, height, ipanel, & basis(:,:,1,1), diff_basis(:,:,1,1), & jac(:,:,1,1), dj(1,1) ) jac_inv(:,:,1,1) = pointwise_coordinate_jacobian_inverse(jac(:,:,1,1), dj(1,1)) diff --git a/components/science/unit-test/kernel/geometry/coordinate_jacobian_xyz_mod_test.pf b/components/science/unit-test/kernel/geometry/coordinate_jacobian_xyz_mod_test.pf index 3f3379bbe..61ca94515 100644 --- a/components/science/unit-test/kernel/geometry/coordinate_jacobian_xyz_mod_test.pf +++ b/components/science/unit-test/kernel/geometry/coordinate_jacobian_xyz_mod_test.pf @@ -8,7 +8,7 @@ module coordinate_jacobian_xyz_mod_test use funit - use constants_mod, only : r_def, i_def + use constants_mod, only : r_def, i_def, imdi implicit none @@ -28,24 +28,13 @@ contains !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine setUp( this ) - use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz - use feign_config_mod, only : feign_finite_element_config use sci_chi_transform_mod, only : init_chi_transforms implicit none class(jacobian_xyz_test_type), intent(inout) :: this - call feign_finite_element_config( & - cellshape=cellshape_quadrilateral, & - coord_order=0_i_def, & - coord_system=coord_system_xyz, & - element_order_h=0_i_def, & - element_order_v=0_i_def, & - rehabilitate=.true. ) - - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp @@ -74,12 +63,21 @@ contains pointwise_coordinate_jacobian, & pointwise_coordinate_jacobian_inverse + use finite_element_config_mod, only: coord_system_xyz + use base_mesh_config_mod, only: geometry_planar, & + topology_non_periodic + implicit none class(jacobian_xyz_test_type), intent(inout) :: this real(kind=r_def) :: tol, zero, one, two, eight + integer(i_def), parameter :: coord_system = coord_system_xyz + integer(i_def), parameter :: geometry = geometry_planar + integer(i_def), parameter :: topology = topology_non_periodic + real(r_def), parameter :: scaled_radius = 1.0_r_def + integer :: ndf = 8 integer :: ngp = 1 integer :: ipanel = 1 @@ -109,7 +107,8 @@ contains basis(:,:,:,:) = 0.125_r_def - call coordinate_jacobian(ndf, ngp, ngp, x, y, z, ipanel, basis, & + call coordinate_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf, ngp, ngp, x, y, z, ipanel, basis, & diff_basis, jac, dj) call coordinate_jacobian_inverse(ngp,ngp, jac, dj, jac_inv) @@ -137,7 +136,9 @@ contains @assertEqual( zero, err, tol) ! Test the pointwise computations - call pointwise_coordinate_jacobian(ndf, x, y, z, ipanel, basis(:,:,1,1), & + call pointwise_coordinate_jacobian(coord_system, geometry, topology, & + scaled_radius, & + ndf, x, y, z, ipanel, basis(:,:,1,1), & diff_basis(:,:,1,1), jac(:,:,1,1), & dj(1,1)) diff --git a/components/science/unit-test/kernel/geometry/native_jacobian_alphabetaz_mod_test.pf b/components/science/unit-test/kernel/geometry/native_jacobian_alphabetaz_mod_test.pf index 74df5e0fe..7c19f7440 100644 --- a/components/science/unit-test/kernel/geometry/native_jacobian_alphabetaz_mod_test.pf +++ b/components/science/unit-test/kernel/geometry/native_jacobian_alphabetaz_mod_test.pf @@ -8,7 +8,10 @@ module native_jacobian_alphabetaz_mod_test use funit - use constants_mod, only : r_def, i_def + use constants_mod, only: r_def, i_def + use base_mesh_config_mod, only: geometry_spherical, & + topology_fully_periodic + use finite_element_config_mod, only: coord_system_native implicit none @@ -22,46 +25,11 @@ contains @before subroutine set_up() - use base_mesh_config_mod, only : geometry_spherical, & - topology_fully_periodic - use extrusion_config_mod, only : method_uniform, & - stretching_method_linear - use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_native - use feign_config_mod, only : feign_base_mesh_config, & - feign_extrusion_config, & - feign_finite_element_config, & - feign_planet_config use sci_chi_transform_mod, only : init_chi_transforms implicit none - call feign_extrusion_config( method=method_uniform, & - planet_radius=radius, & - domain_height=10.0_r_def, & - number_of_layers=5_i_def, & - stretching_method=stretching_method_linear, & - stretching_height=15.0_r_def, & - eta_values=(/0.5_r_def/) ) - - call feign_base_mesh_config( file_prefix='foo', & - prime_mesh_name='unit_test', & - geometry=geometry_spherical, & - prepartitioned=.false., & - topology=topology_fully_periodic, & - fplane=.false., f_lat_deg=0.0_r_def ) - - call feign_finite_element_config( & - cellshape=cellshape_quadrilateral, & - coord_order=0_i_def, & - coord_system=coord_system_native, & - element_order_h=0_i_def, & - element_order_v=0_i_def, & - rehabilitate=.true. ) - - call feign_planet_config( scaling_factor=1.0_r_def ) - - call init_chi_transforms() + call init_chi_transforms(geometry_spherical, topology_fully_periodic) end subroutine set_up @@ -105,6 +73,11 @@ contains real(kind=r_def), parameter :: b = 0.1_r_def real(kind=r_def), parameter :: h = 2.0_r_def + integer(i_def), parameter :: coord_system = coord_system_native + integer(i_def), parameter :: geometry = geometry_spherical + integer(i_def), parameter :: topology = topology_fully_periodic + real(r_def), parameter :: scaled_radius = 1000.0_r_def + ! We choose a box centred on alpha = 0, beta = 0 alpha(:) = (/ -a, a, a, -a, -a, a, a, -a /) beta(:) = (/ -b, -b, b, b, -b, -b, b, b /) @@ -142,7 +115,8 @@ contains basis(:,:,:,:) = 0.125_r_def ! Test the pointwise computations - call native_jacobian(ndf, nlayers, alpha, beta, height, ipanel, & + call native_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf, nlayers, alpha, beta, height, ipanel, & basis(:,:,1,1), diff_basis(:,:,1,1), jac, dj) if ( r_def == real64 ) then diff --git a/components/science/unit-test/kernel/geometry/native_jacobian_lonlatz_mod_test.pf b/components/science/unit-test/kernel/geometry/native_jacobian_lonlatz_mod_test.pf index 7497009b6..3ef5c0e6f 100644 --- a/components/science/unit-test/kernel/geometry/native_jacobian_lonlatz_mod_test.pf +++ b/components/science/unit-test/kernel/geometry/native_jacobian_lonlatz_mod_test.pf @@ -10,6 +10,10 @@ module native_jacobian_lonlatz_mod_test use funit use constants_mod, only : r_def, i_def, PI + use base_mesh_config_mod, only: geometry_spherical, & + topology_non_periodic + use finite_element_config_mod, only: coord_system_native + implicit none public :: set_up, tear_down, test_all @@ -22,46 +26,11 @@ contains @before subroutine set_up() - use base_mesh_config_mod, only : geometry_spherical, & - topology_non_periodic - use extrusion_config_mod, only : method_uniform, & - stretching_method_linear - use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_native - use feign_config_mod, only : feign_base_mesh_config, & - feign_extrusion_config, & - feign_finite_element_config, & - feign_planet_config - use sci_chi_transform_mod, only : init_chi_transforms + use sci_chi_transform_mod, only: init_chi_transforms implicit none - call feign_base_mesh_config( file_prefix='foo', & - prime_mesh_name='unit_test', & - geometry=geometry_spherical, & - prepartitioned=.false., & - topology=topology_non_periodic, & - fplane=.false., f_lat_deg=0.0_r_def ) - - call feign_extrusion_config( method=method_uniform, & - planet_radius=radius, & - domain_height=10.0_r_def, & - number_of_layers=5_i_def, & - stretching_method=stretching_method_linear, & - stretching_height=15.0_r_def, & - eta_values=(/0.5_r_def/) ) - - call feign_finite_element_config( & - cellshape=cellshape_quadrilateral, & - coord_order=0_i_def, & - coord_system=coord_system_native, & - element_order_h=0_i_def, & - element_order_v=0_i_def, & - rehabilitate=.true. ) - - call feign_planet_config( scaling_factor=1.0_r_def ) - - call init_chi_transforms() + call init_chi_transforms(geometry_spherical, topology_non_periodic) end subroutine set_up @@ -97,7 +66,13 @@ contains integer(kind=i_def) :: ipanel = 1 integer(kind=i_def) :: df, i, j - real(kind=r_def) :: longitude(8), latitude(8), height(1,8), diff_basis(3,8,1,1) + integer(i_def), parameter :: coord_system = coord_system_native + integer(i_def), parameter :: geometry = geometry_spherical + integer(i_def), parameter :: topology = topology_non_periodic + real(r_def), parameter :: scaled_radius = 270.0_r_def + + real(kind=r_def) :: longitude(8), latitude(8) + real(kind=r_def) :: height(1,8), diff_basis(3,8,1,1) real(kind=r_def) :: basis(1,8,1,1), jac(1,3,3), dj(1), h real(kind=r_def) :: answer(1,3,3), answer_dj(1) @@ -159,7 +134,8 @@ contains basis(:,:,:,:) = 0.125_r_def ! Test the pointwise computations - call native_jacobian(ndf, nlayers, longitude, latitude, height, ipanel, & + call native_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf, nlayers, longitude, latitude, height, ipanel, & basis(:,:,1,1), diff_basis(:,:,1,1), jac, dj) if ( r_def == real64 ) then diff --git a/components/science/unit-test/kernel/geometry/native_jacobian_xyz_mod_test.pf b/components/science/unit-test/kernel/geometry/native_jacobian_xyz_mod_test.pf index 4ccd5b67a..073765da9 100644 --- a/components/science/unit-test/kernel/geometry/native_jacobian_xyz_mod_test.pf +++ b/components/science/unit-test/kernel/geometry/native_jacobian_xyz_mod_test.pf @@ -8,7 +8,7 @@ module native_jacobian_xyz_mod_test use funit - use constants_mod, only : r_def, i_def + use constants_mod, only : r_def, i_def, imdi implicit none @@ -28,24 +28,13 @@ contains !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine setUp( this ) - use finite_element_config_mod, only : cellshape_quadrilateral, & - coord_system_xyz - use feign_config_mod, only : feign_finite_element_config - use sci_chi_transform_mod, only : init_chi_transforms + use sci_chi_transform_mod, only : init_chi_transforms implicit none class(jacobian_xyz_test_type), intent(inout) :: this - call feign_finite_element_config( & - cellshape=cellshape_quadrilateral, & - coord_order=0_i_def, & - coord_system=coord_system_xyz, & - element_order_h=0_i_def, & - element_order_v=0_i_def, & - rehabilitate=.true. ) - - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp @@ -68,7 +57,8 @@ contains @Test subroutine test_all( this ) - use sci_native_jacobian_mod, only : native_jacobian + use sci_native_jacobian_mod, only: native_jacobian + use finite_element_config_mod, only: coord_system_xyz implicit none @@ -82,6 +72,11 @@ contains integer :: ipanel = 1 integer :: df + integer(i_def), parameter :: coord_system = coord_system_xyz + integer(i_def), parameter :: geometry = imdi + integer(i_def), parameter :: topology = imdi + real(r_def), parameter :: scaled_radius = imdi + real(kind=r_def) :: x(8), y(8), z(1,8), diff_basis(3,8,1,1), basis(1,8,1,1) real(kind=r_def) :: jac(1,3,3), dj(1) @@ -104,7 +99,8 @@ contains basis(:,:,:,:) = 0.125_r_def ! Test the pointwise computations - call native_jacobian(ndf, nlayers, x, y, z, ipanel, basis(:,:,1,1), & + call native_jacobian(coord_system, geometry, topology, scaled_radius, & + ndf, nlayers, x, y, z, ipanel, basis(:,:,1,1), & diff_basis(:,:,1,1), jac, dj) eight = 8.0_r_def diff --git a/components/science/unit-test/kernel/geometry/nodal_xyz_coordinates_kernel_mod_test.pf b/components/science/unit-test/kernel/geometry/nodal_xyz_coordinates_kernel_mod_test.pf index abebdd0af..f8e4b0ca4 100644 --- a/components/science/unit-test/kernel/geometry/nodal_xyz_coordinates_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/geometry/nodal_xyz_coordinates_kernel_mod_test.pf @@ -6,7 +6,7 @@ module nodal_xyz_coordinates_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & get_w2_m3x3_q3x3x3_size, & @@ -61,7 +61,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/geometry/scale_by_detj_kernel_mod_test.pf b/components/science/unit-test/kernel/geometry/scale_by_detj_kernel_mod_test.pf index d65dd97f0..cea59d48d 100644 --- a/components/science/unit-test/kernel/geometry/scale_by_detj_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/geometry/scale_by_detj_kernel_mod_test.pf @@ -7,7 +7,7 @@ !> Test the scale by detJ kernel module scale_by_detj_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use funit use get_unit_test_wthetanodal_basis_mod, only : get_w0_wthetanodal_basis, & get_w0_wthetanodal_diff_basis @@ -49,7 +49,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/inter_function_space/compute_map_u_operators_kernel_mod_test.pf b/components/science/unit-test/kernel/inter_function_space/compute_map_u_operators_kernel_mod_test.pf index 1d218ac27..7184dea00 100644 --- a/components/science/unit-test/kernel/inter_function_space/compute_map_u_operators_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/inter_function_space/compute_map_u_operators_kernel_mod_test.pf @@ -61,7 +61,7 @@ contains call feign_planet_config( scaling_factor=1.0_r_def ) - call init_chi_transforms() + call init_chi_transforms(geometry_spherical,topology_non_periodic) end subroutine set_up diff --git a/components/science/unit-test/kernel/inter_function_space/compute_sample_u_ops_kernel_mod_test.pf b/components/science/unit-test/kernel/inter_function_space/compute_sample_u_ops_kernel_mod_test.pf index 20d9ce641..7f5afca5a 100644 --- a/components/science/unit-test/kernel/inter_function_space/compute_sample_u_ops_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/inter_function_space/compute_sample_u_ops_kernel_mod_test.pf @@ -63,7 +63,7 @@ contains call feign_planet_config( scaling_factor=scaling ) - call init_chi_transforms() + call init_chi_transforms(geometry_spherical, topology_non_periodic) end subroutine set_up diff --git a/components/science/unit-test/kernel/inter_function_space/convert_hcurl_field_kernel_mod_test.pf b/components/science/unit-test/kernel/inter_function_space/convert_hcurl_field_kernel_mod_test.pf index 563bcdab7..71c56809c 100644 --- a/components/science/unit-test/kernel/inter_function_space/convert_hcurl_field_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/inter_function_space/convert_hcurl_field_kernel_mod_test.pf @@ -6,7 +6,7 @@ module convert_hcurl_field_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & get_w1_m3x3_q3x3x3_size, & get_w3_m3x3_q3x3x3_size @@ -55,7 +55,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/inter_function_space/convert_hdiv_field_kernel_mod_test.pf b/components/science/unit-test/kernel/inter_function_space/convert_hdiv_field_kernel_mod_test.pf index 28e712d54..87c3eafa3 100644 --- a/components/science/unit-test/kernel/inter_function_space/convert_hdiv_field_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/inter_function_space/convert_hdiv_field_kernel_mod_test.pf @@ -6,7 +6,7 @@ module convert_hdiv_field_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & get_w2_m3x3_q3x3x3_size, & get_w3_m3x3_q3x3x3_size @@ -55,7 +55,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/inter_function_space/convert_hdiv_native_kernel_mod_test.pf b/components/science/unit-test/kernel/inter_function_space/convert_hdiv_native_kernel_mod_test.pf index 60ce7e2f2..21af2a64d 100644 --- a/components/science/unit-test/kernel/inter_function_space/convert_hdiv_native_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/inter_function_space/convert_hdiv_native_kernel_mod_test.pf @@ -6,7 +6,7 @@ module convert_hdiv_native_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & get_w2_m3x3_q3x3x3_size, & get_w3_m3x3_q3x3x3_size @@ -55,7 +55,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/inter_function_space/convert_phys_to_hdiv_kernel_mod_test.pf b/components/science/unit-test/kernel/inter_function_space/convert_phys_to_hdiv_kernel_mod_test.pf index 61802bbd0..bb379b26d 100644 --- a/components/science/unit-test/kernel/inter_function_space/convert_phys_to_hdiv_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/inter_function_space/convert_phys_to_hdiv_kernel_mod_test.pf @@ -56,7 +56,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar, topology_fully_periodic) end subroutine setUp diff --git a/components/science/unit-test/kernel/inter_function_space/dg_convert_hdiv_field_kernel_mod_test.pf b/components/science/unit-test/kernel/inter_function_space/dg_convert_hdiv_field_kernel_mod_test.pf index 27cf34cda..8fc891d82 100644 --- a/components/science/unit-test/kernel/inter_function_space/dg_convert_hdiv_field_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/inter_function_space/dg_convert_hdiv_field_kernel_mod_test.pf @@ -4,7 +4,8 @@ ! should have received as part of this distribution. !----------------------------------------------------------------------------- module dg_convert_hdiv_field_kernel_mod_test - use constants_mod, only : i_def, r_def + + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & get_w2_m3x3_q3x3x3_size, & get_w3_m3x3_q3x3x3_size, & @@ -58,7 +59,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/components/science/unit-test/kernel/inter_function_space/dg_convert_hdiv_native_kernel_mod_test.pf b/components/science/unit-test/kernel/inter_function_space/dg_convert_hdiv_native_kernel_mod_test.pf index 7c263835e..f111fdefe 100644 --- a/components/science/unit-test/kernel/inter_function_space/dg_convert_hdiv_native_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/inter_function_space/dg_convert_hdiv_native_kernel_mod_test.pf @@ -4,7 +4,7 @@ ! under which the code may be used. !----------------------------------------------------------------------------- module dg_convert_hdiv_native_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & get_w2_m3x3_q3x3x3_size, & get_w3_m3x3_q3x3x3_size @@ -56,7 +56,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/components/science/unit-test/kernel/inter_function_space/project_w3_to_w2b_operator_kernel_mod_test.pf b/components/science/unit-test/kernel/inter_function_space/project_w3_to_w2b_operator_kernel_mod_test.pf index 0f2f906e9..5ea1595c9 100644 --- a/components/science/unit-test/kernel/inter_function_space/project_w3_to_w2b_operator_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/inter_function_space/project_w3_to_w2b_operator_kernel_mod_test.pf @@ -7,7 +7,7 @@ !> Test the kernel for computing the operator to projec from W3 to W2b module project_w3_to_w2b_operator_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use funit implicit none @@ -46,7 +46,7 @@ contains rehabilitate=.true., & coord_system=coord_system_xyz ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/inter_function_space/project_ws_to_w1_operator_kernel_mod_test.pf b/components/science/unit-test/kernel/inter_function_space/project_ws_to_w1_operator_kernel_mod_test.pf index 1e15845ee..d6c38cbf1 100644 --- a/components/science/unit-test/kernel/inter_function_space/project_ws_to_w1_operator_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/inter_function_space/project_ws_to_w1_operator_kernel_mod_test.pf @@ -68,7 +68,7 @@ contains rehabilitate=.true., & coord_system=coord_system_xyz ) - call init_chi_transforms() + call init_chi_transforms(geometry_planar,topology_fully_periodic) end subroutine setUp diff --git a/components/science/unit-test/kernel/inter_function_space/project_ws_to_w2_operator_kernel_mod_test.pf b/components/science/unit-test/kernel/inter_function_space/project_ws_to_w2_operator_kernel_mod_test.pf index bd5b4ae33..2097b47ca 100644 --- a/components/science/unit-test/kernel/inter_function_space/project_ws_to_w2_operator_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/inter_function_space/project_ws_to_w2_operator_kernel_mod_test.pf @@ -7,7 +7,7 @@ !> Test the projection from a scalar space to W2 module project_ws_to_w2_operator_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use funit implicit none @@ -46,7 +46,7 @@ contains rehabilitate=.true., & coord_system=coord_system_xyz ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp diff --git a/components/science/unit-test/kernel/inter_function_space/w3_to_w2_displacement_kernel_mod_test.pf b/components/science/unit-test/kernel/inter_function_space/w3_to_w2_displacement_kernel_mod_test.pf index 79a9b86c9..2cfdd913a 100644 --- a/components/science/unit-test/kernel/inter_function_space/w3_to_w2_displacement_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/inter_function_space/w3_to_w2_displacement_kernel_mod_test.pf @@ -61,7 +61,7 @@ contains call feign_planet_config( scaling_factor=1.0_r_def ) - call init_chi_transforms() + call init_chi_transforms(geometry_spherical, topology_fully_periodic) end subroutine set_up diff --git a/components/science/unit-test/kernel/inter_mesh/consist_w3_to_sh_w3_op_kernel_mod_test.pf b/components/science/unit-test/kernel/inter_mesh/consist_w3_to_sh_w3_op_kernel_mod_test.pf index 67dbf5a5e..e444665d8 100644 --- a/components/science/unit-test/kernel/inter_mesh/consist_w3_to_sh_w3_op_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/inter_mesh/consist_w3_to_sh_w3_op_kernel_mod_test.pf @@ -6,7 +6,7 @@ !> Test the consist_w3_to_sh_w3_op kernel !> module consist_w3_to_sh_w3_op_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w3_m3x3_q3x3x3_size use get_unit_test_m3x3_dofmap_mod, only : get_w3_m3x3_dofmap use funit @@ -48,7 +48,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/components/science/unit-test/kernel/inter_mesh/proj_mr_to_sh_rho_rhs_op_kernel_mod_test.pf b/components/science/unit-test/kernel/inter_mesh/proj_mr_to_sh_rho_rhs_op_kernel_mod_test.pf index 82aeebcc4..840905ca2 100644 --- a/components/science/unit-test/kernel/inter_mesh/proj_mr_to_sh_rho_rhs_op_kernel_mod_test.pf +++ b/components/science/unit-test/kernel/inter_mesh/proj_mr_to_sh_rho_rhs_op_kernel_mod_test.pf @@ -7,7 +7,7 @@ !> module proj_mr_to_sh_rho_rhs_op_kernel_mod_test - use constants_mod, only : i_def, r_def + use constants_mod, only : i_def, r_def, imdi use get_unit_test_m3x3_q3x3x3_sizes_mod, only : get_w0_m3x3_q3x3x3_size, & get_w3_m3x3_q3x3x3_size, & get_wtheta_m3x3_q3x3x3_size @@ -59,7 +59,7 @@ contains element_order_v=0_i_def, & rehabilitate=.true. ) - call init_chi_transforms() + call init_chi_transforms(imdi, imdi) end subroutine setUp !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!