Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline RegCurry  
#1 Posted : 09 March 2019 02:46:43(UTC)
RegCurry


Rank: Advanced Member

Groups: Registered
Joined: 10/02/2019(UTC)
Posts: 56
Man
United States
Location: Colorado

Are there instructions anywhere on how to use the debugger window? I have an attempt at a complicated coupled time domain finite difference routine (image below)that does not show an error in the routine when I run it, but the result show an error as noted in the image. All necessary parameters are defined above the routine in the full code. I will be happy to provide the full code, but I will have to restructure it to make it simpler and I would need to provide the txt file which it reads. As you might guess from my previous posts, this routine works in Mathcad. I am trying to convert to SMath.
Thanks,
Reg

Capture.JPG

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline alyles  
#2 Posted : 09 March 2019 03:15:22(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 277
United States

Was thanked: 91 time(s) in 57 post(s)
To answer you question. You can right click where your cursor is positioned in the picture and set break point. When you recalculate the page you can use the "pause", "continue", and "step into" buttons in the toolbar to step the program. I would recommend the step into button.

Side note: I believe SMATH isn't actually evaluating TDFD until you assign it to ans, which is why it doesn't throw an error.

Also in your program look at your defition of ΔV. It references n+1. but n goes to Ncell. There isn't a definition VT at Ncell+1.
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline Razonar  
#3 Posted : 09 March 2019 03:52:30(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Hi. You can use also use trace(OneArg) to show intermediate results, using View/Otuput Window from the SMath Menu for see the intermediate values. For example, you can trace(n) or trace(k), or trace(VG) to see the intermediate values inside the for loops. With that, hope you can seek the values of k or n which causes the problem: iteration stops with the problematic number. Also notice that you can insert several trace in the same function.

Best regards.
Alvaro.

Edited by user 09 March 2019 03:54:12(UTC)  | Reason: Not specified

Offline RegCurry  
#4 Posted : 09 March 2019 04:21:56(UTC)
RegCurry


Rank: Advanced Member

Groups: Registered
Joined: 10/02/2019(UTC)
Posts: 56
Man
United States
Location: Colorado

Thanks guys. I will give both a try.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.