Welcome, Guest
Username: Password: Remember me

TOPIC: Current timestep (LT)

Current timestep (LT) 6 years 3 months ago #31139

  • MohdAlaa
  • MohdAlaa's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 76
  • Thank you received: 1
Hi,

The current timestep number variable (LT) is defined in DECLARATIONS_TELEMAC2D. Is there any similar variable defined in DECLARATIONS_TELEMAC3D?

Thanks,
Mohammed
The administrator has disabled public write access.

Current timestep (LT) 6 years 3 months ago #31143

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Hello Mohammed,

No, there is no global variable for the time step number in Telemac3D.
It's a local variable declared in telemac3d.F for the main time loop.
If you want to use it elsewhere in the code, you can compute it with AT and DT (double precision variables, not integer), or pass it as argument of a subroutine (with modification of the interface_telemac3d.f)

I hope it helps.

Regards,
Laurent
The administrator has disabled public write access.

Current timestep (LT) 6 years 3 months ago #31146

  • MohdAlaa
  • MohdAlaa's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 76
  • Thank you received: 1
Hi Laurent,

Thanks for the reply.

I add the following lines in the code to calculate LT.

Integer LT
LT = AT/DT

I know that AT and DT are double precision variables. But I wanted to have the result always as integer, so I defined LT as an integer.

Does what I did looks right?

Thanks,
Mohammed
The administrator has disabled public write access.

Current timestep (LT) 6 years 3 months ago #31147

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
It's safer to use the intrinsic procedures INT, AINT or NINT.

Regards,
Laurent
The administrator has disabled public write access.
The following user(s) said Thank You: MohdAlaa
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.