Changes between Version 15 and Version 16 of Piernik

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

--

Legend:

Unmodified
Added
Removed
Modified
  • Piernik

    v15 v16  
    205205} 
    206206}}} 
     207In 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 
     208{{{ 
     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 
     211}}} 
     212As 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. 
     213 
     214Now we need to add corresponding `MUSCLE_Send` calls to the MHD kernel after the gas density and momentum is recomputed: 
     215{{{ 
     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