i trying integrate 2 fortran-90 subroutines in 1 main function. algorithm used in both subroutines logically similar differs in array sizes (e.g. using 4 parameters calculate value instead of 3 etc).
i can either declare array, allocate memory in main function , pass argument subroutine or have subroutine when called. in former case end passing on lot of arguments , in latter case end allocating , de-allocating variables lot of times passing few arguments during subroutine call.
as code might end calling subroutines several thousand times, want make sure choose mot efficient way achieve goal. can shed light on this?
if arguments conceptually linked create object (derived data type) containing parameters want use arguments , pass object subroutine.
Comments
Post a Comment