Hi James, > I can't really believe that it actually is this difficult to write the > full mesh to disk and read it back later - I feel it must be hiding > under my nose somewhere - but I've been staring and staring at the > documentation and can't seem to find anything.
It is not only difficult, it is impossible. deal.II cannot create a Triangulation with hanging nodes to start with, those are only allowed upon refinement. Thus, there is no way to store and load a general refined mesh. There is a way out of this dilemma, however: - You need access to the same coarse initial grid without hanging nodes you used before, either by reading it again from the same file or by creating it in the same way. - You can then use PersistentTriangulation instead of Triangulation. This class remembers in which way the grid was refined and coarsened and it can store and load that information. - Upon loading, all refinement steps are repeated and the mehs hierarchy is re-created. As it is guaranteed that the cells of the re-created mesh are in the same order than those of the original one you can then store any kind of information (e.g. the material IDs or solution vectors) externally. While this might seem rather complicated it works very well in practice. Furthermore, the memory you need to actually store the information on your disk is reduced as you only store the coarse mesh plus some refinement flags. You might argue, however, that this is not really relevant in most cases. Best, Tobias _______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
