Changeset 877 for palm/trunk/SOURCE


Ignore:
Timestamp:
Apr 3, 2012 11:21:44 AM (13 years ago)
Author:
suehring
Message:

Avoid divisions by zero in case of using a 'neumann' bc for the pressure at the top of the model domain.

File:
1 edited

Legend:

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

    r810 r877  
    44! Current revisions:
    55! -----------------
    6 !
     6! Bugfix: Avoid divisions by zero in case of using a 'neumann' bc for the
     7! pressure at the top of the model domain.
    78!
    89! Former revisions:
     
    479480
    480481!
    481 !--       Backward substitution.
     482!--       Backward substitution
     483!--       Note, the 1.0E-20 in the denominator is due to avoid divisions
     484!--       by zero appearing if the pressure bc is set to neumann at the top of
     485!--       the model domain.
    482486          DO  i = nxl_z, nxr_z
    483487#if defined( __parallel )
    484              ar(i,j,nz) = ar1(i,nz-1) / tri(4,i,nz-1)
    485 #else
    486              ar(nz,j,i) = ar1(i,nz-1) / tri(4,i,nz-1)
     488             ar(i,j,nz) = ar1(i,nz-1) / ( tri(4,i,nz-1) + 1.0E-20 )
     489#else
     490             ar(nz,j,i) = ar1(i,nz-1) / ( tri(4,i,nz-1) + 1.0E-20 )
    487491#endif
    488492          ENDDO
Note: See TracChangeset for help on using the changeset viewer.