How are the initial X values chosen? Fortran

  • Context: Fortran 
  • Thread starter Thread starter adishpatel
  • Start date Start date
  • Tags Tags
    Fortran Initial
adishpatel
Messages
22
Reaction score
0
So, I had initially kept the values of X as 0.0D0 for all my 14 variables and it wouldn't populate any results. This was mainly done based on the guide that I was referring to.

On contacting my tutor, he placed the following values instead?

Code:
      X(1) = 0.0D-01
      X(2) = 0.0D-02
      X(3) = 0.0D-02
      X(4) = 0.0D0
      X(5) = -0.0D-03
      X(6) = 0.0D0
      X(7) = 0.0D0
      X(8) = 0.0D0
      X(9) = 0.0D0
      X(10) = 0.0D0
      X(11) = 1.0D-04
      X(12) = 0.0D0
      X(13) = 0.0D0
      X(14) = 0.0D0

I don't quite understand why he did this or what do we need to specify these values as something while we are trying to figure out those values in the program?

Also, I changed the powers further to see what happens, and the whole set of results just changed?

Full program can be viewed at: http://sysden.com/Trial.f
 
Changing the zero values to a different representation, like 0.0D0 changed to 0.0D-01, has no effect. Your tutor may have done that to indicate what magnitude and sign (for X(5)) of non-zero value would be appropriate there. Setting a spring force parameter, X(11), to 1.0D-04 must have caused the change of the results. When you tried other powers, did you also change X(11)? That would explain the change of those results.
 
Last edited:

Similar threads

  • · Replies 22 ·
Replies
22
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K