Ignore:
Timestamp:
Nov 21, 2019 10:37:50 AM (5 years ago)
Author:
oliver.maas
Message:

In case of turbulent inflow: Adjusted recycling_yshift, so that y-shift can be given as multiples of PE (as in y_shift for cyclic BCs).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/inflow_turbulence.f90

    r4183 r4297  
    2525! -----------------
    2626! $Id$
     27! changed recycling_yshift so that the y-shift can be a multiple of PE
     28! instead of y-shift of a half domain width
     29!
     30! 4183 2019-08-23 07:33:16Z oliver.maas
    2731! simplified steering of recycling of absolute values by initialization
    2832! parameter recycling_method_for_thermodynamic_quantities
     
    240244!
    241245!-- y-shift for inflow_dist
    242 !-- Shift inflow_dist in positive y direction by a distance of INT( npey / 2 )
    243     IF ( recycling_yshift .AND. myidx == id_inflow ) THEN
     246!-- Shift inflow_dist in positive y direction by a number of
     247!-- PEs equal to recycling_yshift
     248    IF ( ( recycling_yshift /= 0 ) .AND. myidx == id_inflow ) THEN
     249
    244250!
    245251!--    Calculate the ID of the PE which sends data to this PE (prev) and of the
    246252!--    PE which receives data from this PE (next).
    247        IF ( myidy >= INT( pdims(2) / 2 ) ) THEN
    248           prev = myidy - INT( pdims(2) / 2 )
    249        ELSE
    250           prev = pdims(2) - ( INT( pdims(2) / 2 ) - myidy )
    251        ENDIF
    252      
    253        IF ( myidy < pdims(2) - INT( pdims(2) / 2 ) ) THEN
    254           next = myidy + INT( pdims(2) / 2 )
    255        ELSE
    256           next = INT( pdims(2) / 2 ) - ( pdims(2) - myidy )
    257        ENDIF
    258 
     253       prev = MODULO(myidy - recycling_yshift , pdims(2))
     254       next = MODULO(myidy + recycling_yshift , pdims(2))
     255       
    259256       local_inflow_dist = 0.0_wp
    260257
Note: See TracChangeset for help on using the changeset viewer.