9 use fckit_configuration_module,
only: fckit_configuration
10 use fckit_mpi_module,
only: fckit_mpi_comm
12 use missing_values_mod
22 subroutine bint_create_c(c_key_bint, c_comm, c_fspace1, c_fspace2, c_masks, &
23 c_config) bind(c, name='bint_create_f90')
27 integer(c_int),
intent(inout) :: c_key_bint
28 type(c_ptr),
value,
intent(in) :: c_comm
29 type(c_ptr),
intent(in),
value :: c_fspace1
30 type(c_ptr),
intent(in),
value :: c_fspace2
31 type(c_ptr),
intent(in),
value :: c_masks
32 type(c_ptr),
value,
intent(in) :: c_config
36 type(fckit_mpi_comm) :: f_comm
37 type(fckit_configuration) :: f_config
38 type(atlas_functionspace) :: fspace1, fspace2
41 f_comm = fckit_mpi_comm(c_comm)
42 f_config = fckit_configuration(c_config)
48 fspace1 = atlas_functionspace(c_fspace1)
49 fspace2 = atlas_functionspace(c_fspace2)
51 if (c_associated(c_masks))
then
52 masks = atlas_fieldset(c_masks)
53 call bint%init(f_config, f_comm, fspace1, fspace2, masks)
55 call bint%init(f_config, f_comm, fspace1, fspace2)
63 subroutine bint_apply_c(c_key_bint, c_infields, c_outfields) bind(c, name='bint_apply_f90')
68 integer(c_int),
intent(in) :: c_key_bint
69 type(c_ptr),
intent(in),
value :: c_infields
70 type(c_ptr),
intent(in),
value :: c_outfields
77 infields = atlas_fieldset(c_infields)
78 outfields = atlas_fieldset(c_outfields)
80 call bint%apply(infields, outfields)
87 subroutine bint_apply_ad_c(c_key_bint, c_fields2, c_fields1) bind(c, name='bint_apply_ad_f90')
92 integer(c_int),
intent(in) :: c_key_bint
93 type(c_ptr),
intent(in),
value :: c_fields2
94 type(c_ptr),
intent(in),
value :: c_fields1
101 fields_grid2 = atlas_fieldset(c_fields2)
102 fields_grid1 = atlas_fieldset(c_fields1)
104 call bint%apply_ad(fields_grid2, fields_grid1)
115 integer(c_int),
intent(inout) :: c_key_bint