Changes between Version 16 and Version 17 of Piernik

Show
Ignore:
Timestamp:
03/10/13 13:50:31 (12 years ago)
Author:
mmamonski
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Piernik

    v16 v17  
    207207In the original code, before every MC step the rho_gas and m_gas multidimensional arrays were recomputed, in the MUSCLE variant we replace the code with MUSCLE_Receive calls 
    208208{{{ 
    209          call MUSCLE_Receive("rho_gas", rho_gas, %REF(size(rho_gas)), MUSCLE_DOUBLE) !here we assume that real is always real*8 
    210          call MUSCLE_Receive("m_gas", m_gas, %REF(size(m_gas)), MUSCLE_DOUBLE) !here we assume that real is always real*8 
     209   call MUSCLE_Receive("rho_gas", rho_gas, %REF(size(rho_gas)), MUSCLE_DOUBLE) !here we assume that real is always real*8 
     210   call MUSCLE_Receive("m_gas", m_gas, %REF(size(m_gas)), MUSCLE_DOUBLE) !here we assume that real is always real*8 
    211211}}} 
    212212As mentioned before the arrays are multidimensional (4 and 3 dimensional saying more precisely) but taking into consideration fact that both kernels are FORTRAN codes and that FORTRAN multidimensional arrays have continues memory layout we can safely cast it to single dimension. 
     
    214214Now we need to add corresponding `MUSCLE_Send` calls to the MHD kernel after the gas density and momentum is recomputed: 
    215215{{{ 
    216       call MUSCLE_Send("rho_gas", rho_gas, %REF(size(rho_gas)), MUSCLE_DOUBLE) !here we assume that real is always real*8 
    217       call MUSCLE_Send("m_gas", m_gas, %REF(size(m_gas)), MUSCLE_DOUBLE) !here we assume that real is always real*8 
    218 }}} 
    219  
     216   call MUSCLE_Send("rho_gas", rho_gas, %REF(size(rho_gas)), MUSCLE_DOUBLE) !here we assume that real is always real*8 
     217   call MUSCLE_Send("m_gas", m_gas, %REF(size(m_gas)), MUSCLE_DOUBLE) !here we assume that real is always real*8 
     218}}} 
     219