Ignore:
Timestamp:
02/14/18 00:06:52 (6 years ago)
Author:
dubos
Message:

devel/unstructured : local mesh setup + halo exchange

Location:
codes/icosagcm/devel/src/unstructured
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/devel/src/unstructured/data_unstructured.F90

    r675 r681  
    1818       thermo_theta=1, thermo_entropy=2, thermo_moist=3, thermo_boussinesq=4, & 
    1919       caldyn_vert_cons=1, max_nb_stage=5 
    20   INTEGER(C_INT),  BIND(C) :: caldyn_thermo=thermo_theta, caldyn_eta=eta_lag, & 
     20  INDEX,  BIND(C) :: caldyn_thermo=thermo_theta, caldyn_eta=eta_lag, & 
    2121       caldyn_vert_variant=caldyn_vert_cons, nb_threads=0, nb_stage=0 
    2222  LOGICAL(C_BOOL), BIND(C) :: hydrostatic=.TRUE., debug_hevi_solver=.TRUE. 
     
    5454       'pvort_only', 'slow_hydro', 'fast      ', 'coriolis  ', 'theta     ', 'geopot    ', 'vert      ', & 
    5555       'solver    ', 'slow_NH   ', 'NH_geopot ', 'vert_NH   ',  'update    ' /) 
     56 
     57  INTEGER, PARAMETER ::transfer_primal=1, transfer_edge=2, transfer_dual=3, transfer_max=3 
     58  TYPE Halo_transfer 
     59     INTEGER :: ranks ! size of arrays rank, len 
     60     INTEGER, ALLOCATABLE :: rank(:), & ! MPI ranks to communicate with 
     61          num(:), & ! number of cells to send to / receive from other MPI ranks 
     62          cells(:) ! local indices of cells to send/receive 
     63     DBL, ALLOCATABLE :: buf1(:), buf2(:,:), buf3(:,:,:) 
     64  END TYPE Halo_transfer 
     65  TYPE(Halo_transfer), TARGET :: send_info(transfer_max), recv_info(transfer_max) 
    5666 
    5767CONTAINS 
  • codes/icosagcm/devel/src/unstructured/timestep_unstructured.F90

    r677 r681  
    66#endif 
    77  USE caldyn_unstructured_mod 
     8  USE transfer_unstructured_mod 
    89  IMPLICIT NONE 
    910  PRIVATE 
     
    151152       DO stage=1, nb_stage 
    152153           
     154          CALL update_halo(transfer_primal, rhodz) 
     155          CALL update_halo(transfer_primal, theta_rhodz(:,:,1)) ! FIXME 
     156 
    153157          IF(hydrostatic) THEN 
    154158              
     
    163167              
    164168             CALL compute_caldyn_fast(tauj(stage), pk,berni,theta,geopot, du_fast(:,:,stage), u) 
    165               
     169             CALL update_halo(transfer_edge, u) 
    166170             CALL compute_pvort_only(rhodz,u,qv,qu) 
     171             CALL update_halo(transfer_edge, qu) 
     172 
    167173             CALL compute_caldyn_slow_hydro(rhodz,theta,u, berni,hflux,du_slow(:,:,stage)) 
    168174             CALL compute_coriolis(hflux,theta,qu, bufu1, drhodz(:,:,stage), dtheta_rhodz(:,:,:,stage),du_slow(:,:,stage)) 
Note: See TracChangeset for help on using the changeset viewer.