-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 29/09/15 08:31, Justin Chang wrote:
Lawrence,
Okay so if I understand this correctly, self.data need not follow the function space ordering. If it does not, then it is up to the user to interpolate/map the “natural ordered” self.data into function space ordering.
Exactly.
This would be easy if I created my own .msh or .exo file and preprocessed the auxiliary data such that it follows the respective “natural ordering” of the mesh formats. Now, how are you guys doing the function space ordering for the built-in mesh generators (e.g., SquareMesh,BoxMesh, etc)? I am looking through the source code, and it seems the ordering will eventually be reordered for caching purposes. In that case, how do I print to file the final coordinates and connectivity of the mesh within Firedrake?
If you build a mesh: You can print the (process-local) coordinate data with print mesh.coordinates.vector().array() You can get the map from cells to function space nodes with: print mesh.coordinates.cell_node_map().values These index the coordinate data above (on the local process) Similarly, if you have some different space, V. print V.cell_node_map().values gives you the map from cells to function space nodes. Cheers, Lawrence -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWClUeAAoJECOc1kQ8PEYvSNgH/AtV3Wh47zsB42CrxFKg/2RE KDxbfOq444Z/XHdyT+sB2Hf+7gTRfcDLFyjnOJD26LGFVIjYyX+HAvO5omvbDL7d dwnYy5VDw8ezP7psdd4dZg/GJiBKZGPFhPkoYedmPriOPRVXRfZd2BaBThMGbea8 KmSC+KDedzs3VcscnZtcg5r9/7+bM7G6Nz11EGJgFCRBtgZSKbO+7BtmE2I5gxuA bZ6pgNGQfT8hv4IBN0UeC7TjvO3hmbLqSGLDpI4aun6Zl0AuE1sorK334f8vwOFy QG915XGaD2MVfzE8nsJEpH4q11T+HiTvhfT6xGZjkBcdw2SwPGLsun1WZOIo5EU= =CZHN -----END PGP SIGNATURE-----