Giter Club home page Giter Club logo

Comments (3)

gducrozet avatar gducrozet commented on August 12, 2024

There was indeed a problem in the current version of the code. The treatment of the case k=0 was done afterwards (without preventing a division over 0). It is actually only detected thanks to the compilation option '-ffpe=invalid' that I was not using.

By the way, to correct it, you should change lines 1510 to 1527 of velocities.f90 to the following:

DO i2=1,1
DO i1=1,n1
index1=i1+n1*(i2-1)
DO ii2=1,1
DO ii1=1,n1
index2=ii1+n1*(ii2-1)
IF(k(ii1,ii2).EQ.0.0_rp) THEN ! Specific treatment of k=0
M(index1,index2) = 1.0_rp
ELSEIF(k(ii1,ii2).LT.50.0_rp) THEN
M(index1,index2) = COS(kx(ii1)*x(i1,i2))*COS(ky(ii2)*y(i1,i2))SINH(k(ii1,ii2)(eta(i1,i2)+1.0_rp))/SINH(k(ii1,ii2))
ELSE
M(index1,index2) = COS(kx(ii1)*x(i1,i2))*COS(ky(ii2)*y(i1,i2))*EXP(k(ii1,ii2)*eta(i1,i2))
ENDIF
ENDDO
ENDDO
ENDDO
ENDDO

from hos-nwt.

rickyspaceguy avatar rickyspaceguy commented on August 12, 2024

Shouldn't it be k(ii1,ii2).LE.tiny

from hos-nwt.

gducrozet avatar gducrozet commented on August 12, 2024

Yes indeed, would be safer.

from hos-nwt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.