Is allocate a function or subroutine?

My experiences are very similar. To get a radiation transport FEM code (7D) to have adaptive meshing I had to jump through all sorts of hoops. I opted for @certik 's solution, using a 1D array and storing separately the indices to access it. Honestly though, it made for an extremely frustrating and unnatural development experience. Having the ability, efficiently and laconically append/reallocate/resize Fortran arrays would have made a big difference.

3 Likes