Ignore:
Timestamp:
07/05/19 15:13:09 (5 years ago)
Author:
dubos
Message:

devel : DySL for enstrophy-conserving scheme

File:
1 edited

Legend:

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

    r935 r940  
    163163  FIELD_MASS  :: convm 
    164164  FIELD_THETA :: theta, dtheta_rhodz 
     165  INTEGER, PARAMETER :: conserv_energy=1, conserv_enstrophy=2, caldyn_conserv = conserv_enstrophy ! FIXME 
    165166  DECLARE_INDICES 
    166167  DECLARE_EDGES 
     
    211212!----------------------------- Unused ----------------------------- 
    212213 
     214#ifdef BEGIN_DYSL 
     215KERNEL(gradient) 
     216  FORALL_CELLS_EXT() 
     217    ON_EDGES 
     218      grad(EDGE) = SIGN*(b(CELL2)-b(CELL1)) 
     219    END_BLOCK 
     220  END_BLOCK 
     221END_BLOCK 
     222 
     223KERNEL(div) 
     224  FORALL_CELLS_EXT() 
     225    ON_PRIMAL 
     226      div_ij=0. 
     227      FORALL_EDGES 
     228        div_ij = div_ij + SIGN*LE_DE*u(EDGE) 
     229      END_BLOCK 
     230      divu(CELL) = div_ij / AI 
     231    END_BLOCK 
     232  END_BLOCK 
     233END_BLOCK 
     234#endif END_DYSL 
     235 
    213236SUBROUTINE gradient(b,grad) BINDC(gradient) 
    214237  FIELD_MASS :: b 
Note: See TracChangeset for help on using the changeset viewer.