I have tried using pointers, etc but I cannot shake this problem.
The one issue is that I cannot see how these two variables are being equated.
So, I have two parameters defined as…
integer, parameter :: mj = 4000
integer, parameter :: me = 9
Later, I have two arrays defined as…
double precision :: hydrogen(mj), element(mj, me)
equivalence (element, hydrogen)
So, I know that hydrogen
is now an array with 4000 indices and element
is an array with 4000 x 9 = 36000 elements.
I understand that the equivalence
relates hydrogen(mj)
to element(mj, 1)
; is that it?
When the system steps through the second dimension of element (me > 1)
, does this mean there is no equivalence
there?
Basically, if I was to change the contents of element(200, 1)
then the contents of hydrogen(200)
would also alter. Yet, if I were to alter the contents of element(200, 2)
or element(200,3)
or element(200,4)
this would have no impact upon hydrogen
at all?
Am I correct there?