Skip to content

Commit 0359cb4

Browse files
Partition only the source and destination meshes used in lfric2lfric,
and not all the meshes in the multigrid mesh file
1 parent e5ac5f5 commit 0359cb4

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

applications/lfric2lfric/source/initialisation/lfric2lfric_init_mesh.f90

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ module lfric2lfric_init_mesh_mod
2929
use check_local_mesh_mod, only: check_local_mesh
3030
use create_mesh_mod, only: create_mesh
3131
use extrusion_mod, only: extrusion_type
32+
use global_mesh_collection_mod, only: global_mesh_collection
33+
use global_mesh_mod, only: global_mesh_type
3234
use load_global_mesh_mod, only: load_global_mesh
3335
use load_local_mesh_mod, only: load_local_mesh
3436
use load_local_mesh_maps_mod, only: load_local_mesh_maps
@@ -46,7 +48,6 @@ module lfric2lfric_init_mesh_mod
4648
create_local_mesh_maps, &
4749
create_local_mesh
4850
use runtime_partition_lfric_mod, only: get_partition_parameters
49-
use global_mesh_collection_mod, only: global_mesh_collection
5051

5152
! Lfric2lfric modules
5253
use lfric2lfric_config_mod, only: regrid_method_map, &
@@ -124,9 +125,12 @@ subroutine init_mesh( configuration, &
124125
integer(kind=i_def) :: mesh_selection(2)
125126

126127
! Local variables
127-
integer(kind=i_def) :: i
128-
character(len=str_max_filename) :: mesh_file(2)
129-
integer(kind=i_def) :: stencil_depths(2)
128+
integer(kind=i_def) :: i
129+
character(len=str_max_filename) :: mesh_file(2)
130+
integer(kind=i_def) :: stencil_depths(2)
131+
132+
type(global_mesh_type), pointer :: global_mesh_src
133+
type(global_mesh_type), pointer :: global_mesh_dst
130134

131135
procedure(partitioner_interface), pointer :: partitioner_src => null()
132136
procedure(partitioner_interface), pointer :: partitioner_dst => null()
@@ -317,6 +321,12 @@ subroutine init_mesh( configuration, &
317321
call load_global_mesh( mesh_file(src), mesh_names(src) )
318322
endif
319323

324+
global_mesh_dst => global_mesh_collection%get_global_mesh(mesh_names(dst))
325+
global_mesh_src => global_mesh_collection%get_global_mesh(mesh_names(src))
326+
327+
call global_mesh_dst%set_partition_nmeshes(.false.)
328+
call global_mesh_src%set_partition_nmeshes(.false.)
329+
320330
! Partition the global meshes
321331
!===========================================================
322332
call create_local_mesh( mesh_names(dst:dst), &

0 commit comments

Comments
 (0)