kostis1981
Programmer
I have an array R defined as follows:
real, dimension,, pointer, save :: R
so i guess R is assigned with the ALLOCATABLE attribute
Starting the code R becomes (100,100)
In a point I want a subroutine(Ro) that takes R(100,100) and extends dimensions giving a R(102,102)
In the subroutine i want to define the values of the additional elements while i want the untouched elements to remain the same.
In the output of the subroutine i want an array R(102,102) ready for use by the following commands (i do not want to change the name R)
How do I do that???
Please provide help on the following structure:
THANX!!!!!
real, dimension,, pointer, save :: R
so i guess R is assigned with the ALLOCATABLE attribute
Starting the code R becomes (100,100)
In a point I want a subroutine(Ro) that takes R(100,100) and extends dimensions giving a R(102,102)
In the subroutine i want to define the values of the additional elements while i want the untouched elements to remain the same.
In the output of the subroutine i want an array R(102,102) ready for use by the following commands (i do not want to change the name R)
How do I do that???
Please provide help on the following structure:
Code:
program main
implicit none
real, dimension(:,:), pointer, save :: R
.........
call subroutine(R)
print'(...)',R(101,101)
.........
end program
subroutine(Ro)
!how should i define Ro here???
!(without conficting with R definition)
Ro(101,101)=Ro(100,100)
.........
end subroutine
THANX!!!!!