I don't see any real need for object orientation, since IIUC either the program is entirely model 1, or entirely model 2.
Can you not just pass around a derived type with an allocatable component?
Where the model 1 modules define the component as non-coarray, and the variables as coarrays,
and the model 2 modules the reverse?
That is, compile with the module versions you want.
Or if you want to allow both at once, then simple OO as Tom suggested sounds worth pursuing.
Cheers,
--
..............Malcolm Cohen, NAG Oxford/Tokyo.
|