commit 5abb40125bacd6f14c730ad0b84b8d1d27523635 Author: Achim Gsell Date: Fri Apr 12 12:32:58 2013 +0000 new trunk merged from old trunk, Roman's master thesis and my changes in the sandbox diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..ad28ee7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,631 @@ +* text=auto !eol +/AUTHORS -text +/COPYING -text +/ChangeLog -text +/Makefile.am -text +/NEWS -text +/README -text +/autogen.sh -text +/configure.ac -text +doc/Doxyfile -text +doc/DoxygenLayout.xml -text +doc/Examples/meshexample.dxf -text +doc/Examples/meshexample.txt -text +doc/Examples/simple_tet.vtk -text +doc/Examples/simple_tet_level0.vtk -text +doc/Examples/simple_tet_level1.vtk -text +doc/Examples/simple_tet_level2.vtk -text +doc/Examples/trimesh_dgraph_level0.metis -text +doc/Examples/trimesh_dgraph_level0.metis.part.2 -text +doc/Examples/trimesh_dgraph_level0.metis.part.3 -text +doc/Examples/trimesh_dnode_level1.metis -text +doc/Examples/trimesh_dnode_level1.metis.part.2 -text +doc/Examples/trimesh_level0.metis -text +doc/Examples/trimesh_level0.metis.epart.2 -text +doc/Examples/trimesh_level0.metis.ngraph -text +doc/Examples/trimesh_level0.metis.npart.2 -text +doc/Examples/trimesh_level1.metis -text +doc/Examples/trimesh_level1.metis.part.2 -text +doc/H5.dox -text +doc/H5X_File_Format.txt -text +doc/Makefile.am -text +doc/TracFooter.html -text +doc/TracHeader.html -text +doc/doxyfooter -text +doc/doxyheader -text +doc/html2twiki -text +doc/meshexample.dxf -text +doc/postprocess.py -text +doc/tetrahedron_refinements/1-edge/edge_01_refined/01.png -text +doc/tetrahedron_refinements/1-edge/edge_01_refined/01.pvsm -text +doc/tetrahedron_refinements/1-edge/edge_01_refined/01.txt -text +doc/tetrahedron_refinements/1-edge/edge_01_refined/01.vtk -text +doc/tetrahedron_refinements/1-edge/edge_01_refined/01_smal.png -text +doc/tetrahedron_refinements/1-edge/edge_01_refined/01_small.png -text +doc/tetrahedron_refinements/1-edge/edge_12_refined/12.png -text +doc/tetrahedron_refinements/1-edge/edge_12_refined/12.pvsm -text +doc/tetrahedron_refinements/1-edge/edge_12_refined/12.txt -text +doc/tetrahedron_refinements/1-edge/edge_12_refined/12.vtk -text +doc/tetrahedron_refinements/1-edge/edge_12_refined/12_small.png -text +doc/tetrahedron_refinements/1-edge/edge_20_refined/20.png -text +doc/tetrahedron_refinements/1-edge/edge_20_refined/20.pvsm -text +doc/tetrahedron_refinements/1-edge/edge_20_refined/20.txt -text +doc/tetrahedron_refinements/1-edge/edge_20_refined/20.vtk -text +doc/tetrahedron_refinements/1-edge/edge_20_refined/20_small.png -text +doc/tetrahedron_refinements/1-edge/edge_23_refined/23.png -text +doc/tetrahedron_refinements/1-edge/edge_23_refined/23.pvsm -text +doc/tetrahedron_refinements/1-edge/edge_23_refined/23.txt -text +doc/tetrahedron_refinements/1-edge/edge_23_refined/23.vtk -text +doc/tetrahedron_refinements/1-edge/edge_23_refined/23_small.png -text +doc/tetrahedron_refinements/1-edge/edge_30_refined/30.png -text +doc/tetrahedron_refinements/1-edge/edge_30_refined/30.pvsm -text +doc/tetrahedron_refinements/1-edge/edge_30_refined/30.txt -text +doc/tetrahedron_refinements/1-edge/edge_30_refined/30.vtk -text +doc/tetrahedron_refinements/1-edge/edge_30_refined/30_small.png -text +doc/tetrahedron_refinements/1-edge/edge_31_refined/31.png -text +doc/tetrahedron_refinements/1-edge/edge_31_refined/31.pvsm -text +doc/tetrahedron_refinements/1-edge/edge_31_refined/31.txt -text +doc/tetrahedron_refinements/1-edge/edge_31_refined/31.vtk -text +doc/tetrahedron_refinements/1-edge/edge_31_refined/31_small.png -text +doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12.png -text +doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12.pvsm -text +doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12.txt -text +doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12.vtk -text +doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12_smal.png -text +doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12_small.png -text +doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20.png -text +doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20.pvsm -text +doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20.txt -text +doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20.vtk -text +doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20_small.png -text +doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23.png -text +doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23.pvsm -text +doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23.txt -text +doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23.vtk -text +doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23_smal.png -text +doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23_small.png -text +doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30.png -text +doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30.pvsm -text +doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30.txt -text +doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30.vtk -text +doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30_small.png -text +doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31.png -text +doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31.pvsm -text +doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31.txt -text +doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31.vtk -text +doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31_small.png -text +doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20.png -text +doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20.pvsm -text +doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20.txt -text +doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20.vtk -text +doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20_small.png -text +doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23.png -text +doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23.pvsm -text +doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23.txt -text +doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23.vtk -text +doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23_small.png -text +doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30.png -text +doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30.pvsm -text +doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30.txt -text +doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30.vtk -text +doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30_small.png -text +doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31.png -text +doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31.pvsm -text +doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31.txt -text +doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31.vtk -text +doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31_small.png -text +doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23.png -text +doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23.pvsm -text +doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23.txt -text +doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23.vtk -text +doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23_small.png -text +doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30.png -text +doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30.pvsm -text +doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30.txt -text +doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30.vtk -text +doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30_small.png -text +doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31.png -text +doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31.pvsm -text +doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31.txt -text +doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31.vtk -text +doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31_small.png -text +doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30.png -text +doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30.pvsm -text +doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30.txt -text +doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30.vtk -text +doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30_small.png -text +doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31.png -text +doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31.pvsm -text +doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31.txt -text +doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31.vtk -text +doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31_small.png -text +doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31.png -text +doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31.pvsm -text +doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31.txt -text +doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31.vtk -text +doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31_small.png -text +doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20.png -text +doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20.txt -text +doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20.vtk -text +doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20_small.png -text +doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23.png -text +doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23.txt -text +doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23.vtk -text +doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23_small.png -text +doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30.png -text +doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30.txt -text +doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30.vtk -text +doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30_small.png -text +doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31.png -text +doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31.txt -text +doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31.vtk -text +doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31_small.png -text +doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23.png -text +doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23.txt -text +doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23.vtk -text +doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23_small.png -text +doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30.png -text +doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30.txt -text +doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30.vtk -text +doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30_small.png -text +doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31.png -text +doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31.txt -text +doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31.vtk -text +doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31_small.png -text +doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30.png -text +doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30.txt -text +doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30.vtk -text +doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30_small.png -text +doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31.png -text +doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31.txt -text +doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31.vtk -text +doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31_small.png -text +doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31.png -text +doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31.txt -text +doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31.vtk -text +doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31_small.png -text +doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23.png -text +doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23.txt -text +doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23.vtk -text +doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23_small.png -text +doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30.png -text +doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30.txt -text +doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30.vtk -text +doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30_small.png -text +doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31.png -text +doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31.txt -text +doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31.vtk -text +doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31_small.png -text +doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30.png -text +doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30.txt -text +doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30.vtk -text +doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30_small.png -text +doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31.png -text +doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31.txt -text +doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31.vtk -text +doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31_small.png -text +doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31.png -text +doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31.txt -text +doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31.vtk -text +doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31_small.png -text +doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30.png -text +doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30.txt -text +doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30.vtk -text +doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30_small.png -text +doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31.png -text +doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31.txt -text +doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31.vtk -text +doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31_small.png -text +doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31.png -text +doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31.txt -text +doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31.vtk -text +doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31_small.png -text +doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31.png -text +doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31.pvsm -text +doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31.txt -text +doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31.vtk -text +doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31_small.png -text +doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23.png -text +doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23.pvsm -text +doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23.txt -text +doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23.vtk -text +doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23_small.png -text +doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30.png -text +doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30.pvsm -text +doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30.txt -text +doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30.vtk -text +doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30_small.png -text +doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31.png -text +doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31.pvsm -text +doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31.txt -text +doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31.vtk -text +doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31_small.png -text +doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30.png -text +doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30.pvsm -text +doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30.txt -text +doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30.vtk -text +doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30_small.png -text +doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31.png -text +doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31.pvsm -text +doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31.txt -text +doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31.vtk -text +doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31_small.png -text +doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31.png -text +doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31.pvsm -text +doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31.txt -text +doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31.vtk -text +doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31_small.png -text +doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30.png -text +doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30.pvsm -text +doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30.txt -text +doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30.vtk -text +doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30_small.png -text +doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31.png -text +doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31.pvsm -text +doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31.txt -text +doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31.vtk -text +doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31_small.png -text +doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31.png -text +doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31.pvsm -text +doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31.txt -text +doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31.vtk -text +doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31_small.png -text +doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31.png -text +doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31.pvsm -text +doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31.txt -text +doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31.vtk -text +doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31_small.png -text +doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30.png -text +doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30.pvsm -text +doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30.txt -text +doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30.vtk -text +doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30_small.png -text +doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31.png -text +doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31.pvsm -text +doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31.txt -text +doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31.vtk -text +doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31_small.png -text +doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31.png -text +doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31.pvsm -text +doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31.txt -text +doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31.vtk -text +doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31_small.png -text +doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31.png -text +doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31.pvsm -text +doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31.txt -text +doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31.vtk -text +doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31_small.png -text +doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31.png -text +doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31.pvsm -text +doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31.txt -text +doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31.vtk -text +doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31_small.png -text +doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30.png -text +doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30.pvsm -text +doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30.txt -text +doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30.vtk -text +doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30_small.png -text +doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31.png -text +doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31.pvsm -text +doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31.txt -text +doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31.vtk -text +doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31_small.png -text +doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31.png -text +doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31.pvsm -text +doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31.txt -text +doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31.vtk -text +doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31_small.png -text +doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31.png -text +doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31.pvsm -text +doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31.txt -text +doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31.vtk -text +doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31_small.png -text +doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31.png -text +doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31.pvsm -text +doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31.txt -text +doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31.vtk -text +doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31_small.png -text +doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31.png -text +doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31.pvsm -text +doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31.txt -text +doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31.vtk -text +doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31_small.png -text +doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.aux -text +doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.log -text +doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.pdf -text +doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.png -text +doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.pvsm -text +doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.tex -text +doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.tex.orig -text +doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.txt -text +doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.vtk -text +doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31_small.png -text +doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/buildlatex.bash -text +doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/output_file.jpg -text +doc/tetrahedron_refinements/README -text +doc/tetrahedron_refinements/text2vtk.py -text +examples/H5/Makefile.am -text +examples/H5/openclose.c -text +examples/H5Block/H5BlockExample.pbs -text +examples/H5Block/H5BlockExampleF.f90 -text +examples/H5Block/Makefile.am -text +examples/H5Block/README -text +examples/H5Block/fields.c -text +examples/H5Block/read_write.c -text +examples/H5Fed/Makefile.am -text +examples/H5Fed/map_tet2globalid.c -text +examples/H5Fed/map_triangle2globalid.c -text +examples/H5Fed/tetmesh_adjacencies.c -text +examples/H5Fed/tetmesh_read.c -text +examples/H5Fed/tetmesh_read_tags.c -text +examples/H5Fed/tetmesh_write.c -text +examples/H5Fed/tetmesh_write1.c -text +examples/H5Fed/tetmesh_write2.c -text +examples/H5Fed/tetmesh_write_tags.c -text +examples/H5Fed/trimesh_2gnuplot.c -text +examples/H5Fed/trimesh_adjacencies.c -text +examples/H5Fed/trimesh_read.c -text +examples/H5Fed/trimesh_write.c -text +examples/H5Fed/trimesh_write_dunetest.c -text +examples/H5Fed/write_boundary.c -text +examples/H5Part/Bench.c -text +examples/H5Part/H5test.c -text +examples/H5Part/H5testF.f90 -text +examples/H5Part/Makefile.am -text +examples/H5Part/core_vfd.c -text +examples/H5Part/particles.c -text +examples/H5Part/read_canonicalview.c -text +examples/H5Part/simplef.f90 -text +examples/H5Part/stridedf.f90 -text +examples/H5Part/write_setnumparticles.c -text +examples/H5Part/write_setview.c -text +/license.txt -text +src/C/Makefile.am -text +src/Fortran/H5.c -text +src/Fortran/H5Block.c -text +src/Fortran/H5BlockF.f90 -text +src/Fortran/H5Block_F.c -text +src/Fortran/H5Block_attribs.c -text +src/Fortran/H5Block_attribsF.f90 -text +src/Fortran/H5Block_io.c -text +src/Fortran/H5Block_ioF.f90 -text +src/Fortran/H5Block_readwrite_F.c -text +src/Fortran/H5F.f90 -text +src/Fortran/H5Part.c -text +src/Fortran/H5PartF.f90 -text +src/Fortran/H5Part_F.c -text +src/Fortran/H5Part_io.c -text +src/Fortran/H5Part_ioF.f90 -text +src/Fortran/H5_F.c -text +src/Fortran/H5_attribs.c -text +src/Fortran/H5_attribsF.f90 -text +src/Fortran/H5_attribs_F.c -text +src/Fortran/H5_constF.f90 -text +src/Fortran/Makefile.am -text +src/Fortran/TestUnderscore.f -text +src/Fortran/TestUnderscoreC.c -text +src/Fortran/h5_private.h -text +src/Makefile.am -text +src/h5core/Makefile.am -text +src/h5core/h5_attach.c -text +src/h5core/h5_attribs.c -text +src/h5core/h5_attribs_private.h -text +src/h5core/h5_debug_private.h -text +src/h5core/h5_errorhandling.c -text +src/h5core/h5_errorhandling_private.h -text +src/h5core/h5_fcmp.c -text +src/h5core/h5_fcmp_private.h -text +src/h5core/h5_hdf5.c -text +src/h5core/h5_hdf5_private.h -text +src/h5core/h5_hsearch.c -text +src/h5core/h5_hsearch_private.h -text +src/h5core/h5_init.c -text +src/h5core/h5_init_private.h -text +src/h5core/h5_lustre.c -text +src/h5core/h5_lustre_private.h -text +src/h5core/h5_maps.c -text +src/h5core/h5_maps_private.h -text +src/h5core/h5_model.c -text +src/h5core/h5_model_private.h -text +src/h5core/h5_mpi.c -text +src/h5core/h5_mpi_private.h -text +src/h5core/h5_openclose.c -text +src/h5core/h5_private.h -text +src/h5core/h5_qsort.c -text +src/h5core/h5_qsort_private.h -text +src/h5core/h5_qsort_r.c -text +src/h5core/h5_readwrite.c -text +src/h5core/h5_readwrite_private.h -text +src/h5core/h5_syscall.c -text +src/h5core/h5_syscall_private.h -text +src/h5core/h5_types_private.h -text +src/h5core/h5_va_macros.h -text +src/h5core/h5b_attribs.c -text +src/h5core/h5b_model.c -text +src/h5core/h5b_model_private.h -text +src/h5core/h5b_readwrite.c -text +src/h5core/h5b_readwrite_private.h -text +src/h5core/h5b_types_private.h -text +src/h5core/h5t_access_private.h -text +src/h5core/h5t_access_tetm.c -text +src/h5core/h5t_access_trim.c -text +src/h5core/h5t_adjacencies.c -text +src/h5core/h5t_adjacencies_private.h -text +src/h5core/h5t_adjacencies_tetm.c -text +src/h5core/h5t_adjacencies_trim.c -text +src/h5core/h5t_core.c -text +src/h5core/h5t_core_private.h -text +src/h5core/h5t_core_tetm.c -text +src/h5core/h5t_core_trim.c -text +src/h5core/h5t_errorhandling_private.h -text +src/h5core/h5t_map.c -text +src/h5core/h5t_map_private.h -text +src/h5core/h5t_model.c -text +src/h5core/h5t_model_private.h -text +src/h5core/h5t_model_tetm.c -text +src/h5core/h5t_model_trim.c -text +src/h5core/h5t_octree.c -text +src/h5core/h5t_octree_private.h -text +src/h5core/h5t_readwrite.c -text +src/h5core/h5t_readwrite_private.h -text +src/h5core/h5t_readwrite_tetm.c -text +src/h5core/h5t_readwrite_trim.c -text +src/h5core/h5t_ref_elements.c -text +src/h5core/h5t_ref_elements_private.h -text +src/h5core/h5t_retrieve.c -text +src/h5core/h5t_retrieve_private.h -text +src/h5core/h5t_retrieve_tetm.c -text +src/h5core/h5t_retrieve_trim.c -text +src/h5core/h5t_store.c -text +src/h5core/h5t_store_private.h -text +src/h5core/h5t_store_tetm.c -text +src/h5core/h5t_store_trim.c -text +src/h5core/h5t_tags.c -text +src/h5core/h5t_tags_private.h -text +src/h5core/h5t_types_private.h -text +src/h5core/h5u_errorhandling_private.h -text +src/h5core/h5u_model.c -text +src/h5core/h5u_readwrite.c -text +src/h5core/h5u_readwrite_private.h -text +src/h5core/h5u_types_private.h -text +src/include/H5.h -text +src/include/H5Block.h -text +src/include/H5Block_attribs.h -text +src/include/H5Block_io.h -text +src/include/H5Block_model.h -text +src/include/H5Fed.h -text +src/include/H5Fed_adjacency.h -text +src/include/H5Fed_model.h -text +src/include/H5Fed_retrieve.h -text +src/include/H5Fed_store.h -text +src/include/H5Fed_tags.h -text +src/include/H5Part.h -text +src/include/H5Part_io.h -text +src/include/H5Part_model.h -text +src/include/H5_attribs.h -text +src/include/H5_model.h -text +src/include/H5hut.h -text +src/include/Makefile.am -text +src/include/h5core/h5.h -text +src/include/h5core/h5_attribs.h -text +src/include/h5core/h5_debug.h -text +src/include/h5core/h5_errorhandling.h -text +src/include/h5core/h5_model.h -text +src/include/h5core/h5_syscall.h -text +src/include/h5core/h5_types.h -text +src/include/h5core/h5b_attribs.h -text +src/include/h5core/h5b_io.h -text +src/include/h5core/h5b_model.h -text +src/include/h5core/h5t_adjacencies.h -text +src/include/h5core/h5t_map.h -text +src/include/h5core/h5t_model.h -text +src/include/h5core/h5t_octree.h -text +src/include/h5core/h5t_retrieve.h -text +src/include/h5core/h5t_store.h -text +src/include/h5core/h5t_tags.h -text +src/include/h5core/h5u_io.h -text +src/include/h5core/h5u_model.h -text +test/Makefile.am -text +test/h5_attach_test.c -text +test/h5b_read.c -text +test/h5b_test.c -text +test/h5b_write.c -text +test/h5u_read.c -text +test/h5u_test.c -text +test/h5u_write.c -text +test/params.h -text +test/testframe.c -text +test/testframe.h -text +tools/H5PartMerge/AUTHORS -text +tools/H5PartMerge/COPYING -text +tools/H5PartMerge/ChangeLog -text +tools/H5PartMerge/INSTALL -text +tools/H5PartMerge/NEWS -text +tools/H5PartMerge/README -text +tools/H5PartMerge/autogen.sh -text +tools/H5PartMerge/configure.ac -text +tools/H5PartMerge/makefile.am -text +tools/H5PartMerge/src/H5merge.cpp -text +tools/H5PartMerge/src/optparse.cpp -text +tools/H5PartMerge/src/optparse.hh -text +tools/Makefile.am -text +tools/README -text +tools/h5PartDcToVtk.cc -text +tools/h5PartSurfaceToVtk.cc -text +tools/h5hutcc.in -text +tools/h5pAttrib.cc -text +tools/h5pToGNUplot.cc -text +tools/vtk2h5grid/Makefile.am -text +tools/vtk2h5grid/vtk2h5grid.cc -text +visit_plugins/databases/H5Part/.depend -text +visit_plugins/databases/H5Part/Makefile -text +visit_plugins/databases/H5Part/README.txt -text +visit_plugins/databases/H5Part/avth5partFileFormat.C -text +visit_plugins/databases/H5Part/avth5partFileFormat.h -text +visit_plugins/databases/H5Part/h5part.xml -text +visit_plugins/databases/H5Part/h5partCommonPluginInfo.C -text +visit_plugins/databases/H5Part/h5partEnginePluginInfo.C -text +visit_plugins/databases/H5Part/h5partMDServerPluginInfo.C -text +visit_plugins/databases/H5Part/h5partPluginInfo.C -text +visit_plugins/databases/H5Part/h5partPluginInfo.h -text +visit_plugins/operators/BinnerFilter/.depend -text +visit_plugins/operators/BinnerFilter/Binner.xml -text +visit_plugins/operators/BinnerFilter/BinnerCommonPluginInfo.C -text +visit_plugins/operators/BinnerFilter/BinnerEnginePluginInfo.C -text +visit_plugins/operators/BinnerFilter/BinnerFilter.C -text +visit_plugins/operators/BinnerFilter/BinnerFilter.h -text +visit_plugins/operators/BinnerFilter/BinnerFilter.java -text +visit_plugins/operators/BinnerFilter/BinnerGUIPluginInfo.C -text +visit_plugins/operators/BinnerFilter/BinnerMakefile -text +visit_plugins/operators/BinnerFilter/BinnerPluginInfo.C -text +visit_plugins/operators/BinnerFilter/BinnerPluginInfo.h -text +visit_plugins/operators/BinnerFilter/BinnerScriptingPluginInfo.C -text +visit_plugins/operators/BinnerFilter/BinnerViewerPluginInfo.C -text +visit_plugins/operators/BinnerFilter/Binnerreplace.txt -text +visit_plugins/operators/BinnerFilter/Makefile -text +visit_plugins/operators/BinnerFilter/PyBinner.C -text +visit_plugins/operators/BinnerFilter/PyBinner.h -text +visit_plugins/operators/BinnerFilter/QvisBinnerWindow.C -text +visit_plugins/operators/BinnerFilter/QvisBinnerWindow.h -text +visit_plugins/operators/BinnerFilter/avtBinnerFilter.C -text +visit_plugins/operators/BinnerFilter/avtBinnerFilter.h -text +visit_plugins/operators/BinnerFilter/icon.xpm -text +visit_plugins/operators/RandomSample/.depend -text +visit_plugins/operators/RandomSample/H5PartRandomSampleAttributes.C -text +visit_plugins/operators/RandomSample/H5PartRandomSampleAttributes.h -text +visit_plugins/operators/RandomSample/H5PartRandomSampleAttributes.java -text +visit_plugins/operators/RandomSample/H5PartRandomSampleCommonPluginInfo.C -text +visit_plugins/operators/RandomSample/H5PartRandomSampleEnginePluginInfo.C -text +visit_plugins/operators/RandomSample/H5PartRandomSampleGUIPluginInfo.C -text +visit_plugins/operators/RandomSample/H5PartRandomSamplePluginInfo.C -text +visit_plugins/operators/RandomSample/H5PartRandomSamplePluginInfo.h -text +visit_plugins/operators/RandomSample/H5PartRandomSampleScriptingPluginInfo.C -text +visit_plugins/operators/RandomSample/H5PartRandomSampleViewerPluginInfo.C -text +visit_plugins/operators/RandomSample/Makefile -text +visit_plugins/operators/RandomSample/PyH5PartRandomSampleAttributes.C -text +visit_plugins/operators/RandomSample/PyH5PartRandomSampleAttributes.h -text +visit_plugins/operators/RandomSample/QvisH5PartRandomSampleWindow.C -text +visit_plugins/operators/RandomSample/QvisH5PartRandomSampleWindow.h -text +visit_plugins/operators/RandomSample/RandomSample.xml -text +visit_plugins/operators/RandomSample/avtH5PartRandomSampleFilter.C -text +visit_plugins/operators/RandomSample/avtH5PartRandomSampleFilter.h -text +visit_plugins/operators/RandomSample/icon.xpm -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3289e69 --- /dev/null +++ b/.gitignore @@ -0,0 +1,93 @@ +/.cproject +/.project +/Makefile +/Makefile.in +/aclocal.m4 +/autom4te.cache +/build +/config.guess +/config.h +/config.h.in +/config.log +/config.status +/config.sub +/configure +/depcomp +doc/Makefile +doc/Makefile.in +doc/man +doc/tagfile +examples/H5/.deps +examples/H5/Makefile +examples/H5/Makefile.in +examples/H5/openclose +examples/H5Block/.deps +examples/H5Block/H5BlockExample +examples/H5Block/H5BlockExampleF +examples/H5Block/Makefile +examples/H5Block/Makefile.in +examples/H5Block/blockfile0.h5 +examples/H5Block/blockfile1.h5 +examples/H5Block/blockfile8.h5 +examples/H5Fed/.deps +examples/H5Fed/Makefile +examples/H5Fed/Makefile.in +examples/H5Fed/tetmesh_adjacencies +examples/H5Fed/tetmesh_read +examples/H5Fed/tetmesh_read_tags +examples/H5Fed/tetmesh_write +examples/H5Fed/tetmesh_write1 +examples/H5Fed/tetmesh_write2 +examples/H5Fed/tetmesh_write_tags +examples/H5Fed/trimesh_2gnuplot +examples/H5Fed/trimesh_adjacencies +examples/H5Fed/trimesh_read +examples/H5Fed/trimesh_write +examples/H5Fed/trimesh_write_dunetest +examples/H5Part/.deps +examples/H5Part/Bench +examples/H5Part/H5test +examples/H5Part/H5testF +examples/H5Part/Makefile +examples/H5Part/Makefile.in +/ignore.txt +/install-sh +/libtool +/ltmain.sh +/m4 +/missing +src/.deps +src/C/.deps +src/C/Makefile +src/C/Makefile.in +src/C/libH5hutC.a +src/Fortran/.deps +src/Fortran/Makefile +src/Fortran/Makefile.in +src/Fortran/TestUnderscore +src/Fortran/Underscore.h +src/Makefile +src/Makefile.in +src/h5core/.deps +src/h5core/Makefile +src/h5core/Makefile.in +src/h5core/libH5hut.a +src/include/H5hutF.h +src/include/Makefile +src/include/Makefile.in +src/lib +src/lib/.dirstamp +/stamp-h1 +test/.deps +test/Makefile +test/Makefile.in +test/h5_attach.h5 +test/h5_attach_test +test/h5b_test +test/h5u_test +tools/.deps +tools/Makefile +tools/Makefile.in +tools/h5PartDcToVtk +tools/h5PartSurfaceToVtk +tools/h5hutcc diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..48fc3f6 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,10 @@ + +Andreas Adelmann (PSI) +Achim Gsell (PSI) +Benedikt Oswald (PSI) + +Wes Bethel (NERSC/LBNL) +John Shalf (NERSC/LBNL) +Cristina Siegerist (NERSC/LBNL) + +Please use h5part@lists.psi.ch for communication. diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..59c0886 --- /dev/null +++ b/COPYING @@ -0,0 +1,71 @@ +*** Copyright Notice *** + +H5hut Copyright (c) 2006-2010, The Regents of the University of California, +through Lawrence Berkeley National Laboratory (subject to receipt of any +required approvals from the U.S. Dept. of Energy) and the Paul Scherrer +Institut (Switzerland). All rights reserved. + +If you have questions about your rights to use or distribute this +software, please contact Berkeley Lab's Technology Transfer Department +at TTD@lbl.gov referring to "H5Part (LBNL Ref CR-2255)" + +NOTICE. This software was developed under partial funding from the U.S. +Department of Energy. As such, the U.S. Government has been granted for +itself and others acting on its behalf a paid-up, nonexclusive, +irrevocable, worldwide license in the Software to reproduce, prepare +derivative works, and perform publicly and display publicly. Beginning +five (5) years after the date permission to assert copyright is obtained +from the U.S. Department of Energy, and subject to any subsequent five +(5) year renewals, the U.S. Government is granted for itself and others +acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide +license in the Software to reproduce, prepare derivative works, +distribute copies to the public, perform publicly and display publicly, +and to permit others to do so. + + +*** License agreement *** + +H5Part Copyright (c) 2006-2009, The Regents of the University of California, +through Lawrence Berkeley National Laboratory (subject to receipt of any +required approvals from the U.S. Dept. of Energy) and the Paul Scherrer +Institut (Switzerland). All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +(1) Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +(2) Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +(3) Neither the name of the University of California, Lawrence Berkeley +National Laboratory, U.S. Dept. of Energy, Paul Scherrer Institut +(Switzerland) nor the names of its contributors may be used to endorse +or promote products derived from this software without specific prior +written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +You are under no obligation whatsoever to provide any bug fixes, +patches, or upgrades to the features, functionality or performance of +the source code ("Enhancements") to anyone; however, if you choose to +make your Enhancements available either publicly, or directly to +Lawrence Berkeley National Laboratory, without imposing a separate +written license agreement for such Enhancements, then you hereby grant +the following license: a non-exclusive, royalty-free perpetual license +to install, use, modify, prepare derivative works, incorporate into +other computer software, distribute, and sublicense such enhancements or +derivative works thereof, in binary and source code form. + diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..48b1381 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,13 @@ +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = \ + src \ + test \ + tools + +MAINTAINERCLEANFILES = \ + config.h \ + config.log \ + config.status \ + stamp-h.in \ + stamp-h1 diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..4bcf7fd --- /dev/null +++ b/NEWS @@ -0,0 +1,376 @@ +#### H5PART 1.99 ############################################################ + +Renamed type: + H5PartFile -> h5_file_t + h5part_int64_t -> h5_int64_t + +Renamed functions: + + +#### H5PART 1.6.6 ############################################################ + +Fixed typo (Write instead of Read) in the h5bl_3d_read_scalar_field* Fortran +interface. + +Added missing type normalization for int32 type. + +Rewrite of h5pAttrib tool. + +#### H5PART 1.6.5 ############################################################ + +Fixed several build errors reported by Iuri Prilepov on Ubuntu 11.04. + +#### H5PART 1.6.4 ############################################################ + +Fixed bug where H5PartSetViewIndices was not setting an empty view when the +number of elements is 0. + +Set a threshold on the HDF5 alignment parameter so that small metadata writes +are not aligned, which causes large gaps in the file. + +#### H5PART 1.6.3 ############################################################ + +New build system uses libtool and can build shared libraries. + +Fixed a bug that incorrectly identifies the number of selected points in a view +when using H5PartSetViewIndices. + +Fixed bug in Fortran test reported by several people, as well as several +incorrect views set in the C test that were causing segfaults. + +Fixed name mismatches in the Fortran interface, and an off-by-one indexing +problem. + +#### H5PART 1.6.2 ############################################################ + +Removed H5PartSetViewEmpty +-------------------------- + +An empty view can now be selected with: +H5PartSetNumParticles(file, 0); + +Bug Fixes to Attribute Calls in Fortran API +------------------------------------------- + +Fixed a problem where attribute values were reverting to zero. + +#### H5PART 1.6.1 ############################################################ + +Chunking in the H5Part API +-------------------------- + +There is now an H5Part equivalent H5PartSetChunkSize to the existing +H5BlockDefine3DChunkDims call. Both of these calls enable the chunking +mechanism in the underlying HDF5 layer. Chunking is used in combination +with the aligned open calls to pad datasets to alignment multiples +on disk. + +All Steps Available on Write +---------------------------- + +Previously, existing steps in a file were only accessible in read-only mode. +Now, all steps are available in all modes, including write-truncate and +write-append. Thus, it is now possible to overwrite existing data in write +mode. To help alert the user to this possibility, a warning is issued every +time an existing dataset is written to. Warnings can be printed by setting +the verbosity to H5PART_VERB_WARN or higher. + +New Throttling Routine +---------------------- + +Previously, a throttle factor of N meant that for P processors, the total +number of P writes were divided into N batches of P/N writes. + +To better accommodate round-robin lustre striping, the new policy is to +execute P/N batches of N writes. Thus, matching N to the number of stripes +results in the desirable 1-1 matching of writers to stripes. + +Other Fixes +----------- + +* The configure script should correctly detect PGI compilers now. +* There was a small memory leak in the Fortran file open calls. +* There was a compile error with HDF5 1.6.x due to a missing assignment. + +#### H5PART 1.6 ############################################################## + +Updated Documentation +--------------------- + +The Fortran API has been added to the doxygen documentation. Most entries have +a reference to their respective C API call. + +Regression Test Suite +--------------------- + +The test subdirectory has been reorganized to include a systematic series +of regression tests of common use cases for the API. The goal is to have both +complete coverage of the API (every call is exercised) and testing of some +unlikely or unsuspected values and cases. + +Currently, the C test covers the entire H5Part API and the Fortran test is +still in development. + +Benchmark Utilities +------------------- + +Two benchmarking utilities, H5PartBench and H5BlockBench, have been added to +the tools collection. Both require the parallel library and have functionality +and syntax similar to the IOR benchmark: + + http://sourceforge.net/projects/ior-sio/ + +File Mode Flags +--------------- + +Previously, the only flags used were H5PART_READ, H5PART_WRITE, and +H5PART_APPEND, and these were mutually exclusive. Additional flags have been +added to select the underlying virtual file driver (VFD) that HDF5 uses in +parallel mode and to accommodate the lustre filesystem: + +H5PART_VFD_MPIPOSIX (use the MPI-POSIX driver, which bypasses MPI-IO) +H5PART_VFD_MPIIO_IND (use MPI-IO in independent mode) +H5PART_FS_LUSTRE (activate H5P tunings for the lustre stripe size) + +These flags can be specified using the typical bitwise OR method, e.g. + + char flag = H5PART_WRITE | H5PART_VFD_MPIPOSIX | H5PART_FS_LUSTRE; + +will select write mode with these two additional options. + +The parallel library now defaults to using the MPI-IO collective mode driver +(previously it used independent mode). The collective buffering algorithm in +the Cray XT4/5 environment has been substantially improved in the last year, +and defaulting to collective mode allows us to take advantage of these +improvements automatically. + +There are also new open calls H5PartOpenAlign and H5PartOpenParallelAlign that +take an additional 'alignment' value. This value is passed to HDF5 and used to +pad out objects so that they align to filesystem boundaries. For instance, it +would make sense to use the stripe size as the alignment value when writing to +a lustre filesystem. + +Unified 'View' Model +-------------------- + +Views are now supported in both read and write mode (previously only supported +in read mode). It is possible to specify non-sensical views: you could for +instance specify a read view that is larger than the dataset on disk. Or you +could create a write view that is larger than the data in memory. In those +cases, you will encounter an error when you try to perform a read or write +operation on a dataset. + +There are two new methods for selecting views. H5PartSetNumParticlesStrided +selects a view with $n$ particles per processor, but such that the data in +memory is expected to have a 'stride' factor. For instance, if you have +particle data with fields $x$ and $y$ and a single array with entries +$x1,y1,x2,y2...$, then the stride factor is 2. Striding works for both reads +and writes and only affects the view of memory: individual fields are still +stored as individual arrays on disk. + +The second new method is H5PartSetViewIndices, which allows for point +selections of datasets. You can pass a list of indices for the points you +want to select. This is useful, for instance, when interfacing with FastBit +to perform queries that select a small subset of non-contiguous particles. + +Because views are now supported on write, it is possible to write a dataset +using multiple 'passes' or to leave some values unwritten. + +Also, all views are now *inclusive*, so that a view of (0,9) corresponds +to the 10 items 0, 1, 2, ... 9. + +Internal Handling of Dataspaces +------------------------------- + +H5PartSetNumParticles and H5PartSetNumParticlesStrided now share the same +HDF5 dataspace state in the H5PartFile struct with the calls that modify +the view (H5PartSetView etc.). Previously, the memory and disk dataspaces +were regenerated from the view on every read access, which was unnecessary. + +Autogeneration of API Calls +--------------------------- + +Python scripts have been added to automatically generate read/write call +variants for different data types. + +Renamed Fortran Include +----------------------- + +The automake system no longer greps the *F90.inc files to generate an include +called 'H5Part.inc'. Instead, the *F90.inc files have been renamed to *.f90, +and awk is used to generate an 'H5PartF.h' file (the same naming convention +as in MPI's 'mpif.h'). + +The change to *.f90 was necessary to facilitate integration of the Fortran +API into doxygen. Note that the *.f90 files will not compile, nor can they +be included directly. Simply use + + include 'H5PartF.h' + +in your Fortran code to include all the definitions for Fortran H5Part/H5Block +calls. + +64 Char Limit on Dataset Names +------------------------------ + +Previously, a user could overrun internal buffers for dataset names. Now, a +fixed limit of 64 chars is imposed. Dataset names that are longer than this are +truncated and a warning is printed. We expect that most users are using +short canonical names like x, px, id, etc. + +Changes to Existing API +----------------------- + +The H5BlockGetFieldInfo and H5BlockGetFieldInfoByName calls now both include +a parameter for the 'type' of the field. + + +#### H5PART 1.4 ############################################################## + +Error Handling +-------------- + Now all functions, in which an error could occure, are returning a +value. This value is either a 64bit integer or a pointer. + + A negative 64bit integer as result indicates an error. Values >= 0 +indicates successfull execution. This is similiar to the convention +used in UNIX system calls, but we do not return -1 but the error +number (which is always negative). + + For functions returning a pointer the NULL-pointer is used to indicate +an error. You can call the function H5PartGetErrno() to get the error +number. For the time being there is no strerror(3) or perror(3) +equivalent. + + +API Changes +----------- + There are several changes in the API of H5Part. The biggest change is +a side-effect of the implementation of strict error handling. The +impact to the existing C/C++ code is very small. But now you *can* +and *should* implement some kind of error handling. The simplest +error handling is to set an error handler which aborts the program as +soon as an error occured. + + The next "biggest" change is the use of H5Part types instead of "long +long" and "double". The replacement of "long long" is "h5part_int64_t" +and for "double" "h5part_float64_t". This change has now effect in +Fortran. + + In some functions the argument type changed from "int" to +"h5part_int64_t". Since on most systems "int" is a 32bit integer, +calls to these functions must be adapted to the new API. In C/C++ the +compiler will complain about it. But in Fortran you will *not* get an +error message.So, you must check your Fortran code carefully. + + Changes in detail (not listed are functions where only the return +type changed from any to "h5part_int64_t"): + + New API Changes to old API + + h5part_int64_t void + H5PartSetNumParticles ( + H5PartFile *f, + h5part_int64_t nparticles long long + ); + + h5part_int64_t int + H5PartWriteDataFloat64 ( + H5PartFile *f, + char *name, + h5part_float64_t *dta double + ); + + h5part_int64_t int + H5PartWriteDataInt64 ( + H5PartFile *f, + char *name, + h5part_int64_t *dta long long + ); + + h5part_int64_t void + H5PartSetStep ( + H5PartFile *f, + h5part_int64_t step int + ); + + h5part_int64_t void + H5PartSetView ( + H5PartFile *f, + h5part_int64_t start, long long + h5part_int64_t end long long + ); + + h5part_int64_t int + H5PartGetView ( + H5PartFile *f, + h5part_int64_t *start, long long + h5part_int64_t *end long long + ); + + h5part_int64_t int + H5PartReadDataFloat64 ( + H5PartFile *f, + char *name, + h5part_float64_t *dta double + ); + + h5part_int64_t int + H5PartReadDataInt64 ( + H5PartFile *f, + char *name, + h5part_int64_t *dta long long + ); + + h5part_int64_t void + H5PartReadParticleStep ( + H5PartFile *f, + h5part_int64_t step, int + h5part_float64_t *x, double + h5part_float64_t *y, double + h5part_float64_t *z, double + h5part_float64_t *px, double + h5part_float64_t *py, double + h5part_float64_t *pz, double + h5part_int64_t *id long long + ); + +New functions: + + h5part_int64_t + H5PartSetVerbosityLevel ( + unsigned int + ); + + h5part_int64_t + H5PartSetErrorHandler ( + h5part_error_handler handler + ); + + h5part_int64_t + H5PartGetErrno ( + void + ); + + h5part_int64_t + H5PartDefaultErrorHandler ( + const char *funcname, + const h5part_int64_t eno, + const char *fmt, + ... + ); + + h5part_int64_t + H5PartAbortErrorHandler ( + const char *funcname, + const h5part_int64_t eno, + const char *fmt, + ... + ); + +Removed functions: + + int + H5PartFileIsValid ( + H5PartFile *f + ); diff --git a/README b/README new file mode 100644 index 0000000..e69de29 diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..706351a --- /dev/null +++ b/autogen.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +ACLOCAL_FLAGS="-I m4 $ACLOCAL_FLAGS" +LIBTOOLIZE_FLAGS="--force $LIBTOOLIZE_FLAGS" +AUTOMAKE_FLAGS="--add-missing --copy --foreign $AUTOMAKE_FLAGS" + +LIBTOOLIZE=`which libtoolize` +if [ "$LIBTOOLIZE" = "" ]; then + LIBTOOLIZE=`which glibtoolize` +fi +if [ "$LIBTOOLIZE" = "" ]; then + echo "libtoolize not found" 1>&2 + exit 1 +fi + +echo "+ making misc files ..." +touch NEWS README AUTHORS ChangeLog +echo +$LIBTOOLIZE $LIBTOOLIZE_FLAGS || { + echo "libtoolize failed" + exit 1 +} +echo +echo "+ running aclocal ..." +aclocal $ACLOCAL_FLAGS || { + echo "aclocal failed - check that all needed development files are present on system" + exit 1 +} +echo +echo "+ running autoheader ... " +autoheader || { + echo "autoheader failed" + exit 1 +} +echo +echo "+ running autoconf ... " +autoconf || { + echo "autoconf failed" + exit 1 +} +echo +echo "+ running automake ... " +automake $AUTOMAKE_FLAGS || { + echo "automake failed" + exit 1 +} + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..5d6085a --- /dev/null +++ b/configure.ac @@ -0,0 +1,412 @@ +AC_INIT([H5hut], [1.99.10], [h5part@lists.psi.ch], H5hut) +AC_PREREQ(2.60) +AC_CONFIG_HEADERS(config.h) +AC_CONFIG_MACRO_DIR([m4]) +AM_INIT_AUTOMAKE + +BUILD_LIBS='libH5hut' + +ENABLE_DEBUG='no' +ENABLE_C='yes' +ENABLE_FORTRAN='no' +ENABLE_PARALLEL='no' + +############################################################################### +# --enable-xxx and --with-xxx Arguments +AC_ARG_ENABLE( + [debug], + [AS_HELP_STRING([--enable-debug], [Compile with debug flags [default=no]])], + [ENABLE_DEBUG=$enableval]) +AM_CONDITIONAL([ENABLE_DEBUG], [test "$ENABLE_DEBUG" = "yes"]) + +AC_ARG_ENABLE( + [c], + [AS_HELP_STRING([--enable-c], + [Compile the C interface [default=yes]])], + [ENABLE_C=$enableval]) +AM_CONDITIONAL([ENABLE_C], [test "$ENABLE_C" = "yes"]) + +AC_ARG_ENABLE( + [fortran], + [AS_HELP_STRING([--enable-fortran], + [Compile the Fortran interface [default=no]])], + [ENABLE_FORTRAN=$enableval]) +AM_CONDITIONAL([ENABLE_FORTRAN], [test "$ENABLE_FORTRAN" = "yes"]) + +AC_ARG_ENABLE( + [parallel], + [AS_HELP_STRING([--enable-parallel], + [Compile the MPI/IO interface [default=no]])], + [ENABLE_PARALLEL=$enableval]) +AM_CONDITIONAL([ENABLE_PARALLEL], [test "$ENABLE_PARALLEL" = "yes"]) + +AC_ARG_ENABLE( + [large-indices], + [AC_HELP_STRING([--enable-large-indices], + [Compile with 64bit local IDs and indices [default=no]])], + [USE_LARGE_INDICES=$enableval]) + +AC_ARG_ENABLE( + [experimental], + [AS_HELP_STRING([--enable-experimental], + [Compile experimental code [default=no]])], + [ENABLE_EXPERIMENTAL=$enableval]) +AM_CONDITIONAL([ENABLE_EXPERIMENTAL], [test "$ENABLE_EXPERIMENTAL" = "yes"]) + +AC_ARG_ENABLE( + [vtkconverter], + [AS_HELP_STRING([--enable-vtkconverter], + [Compile the vtk to H5hut converter for grids [default=no]])], + [ENABLE_VTKCONVERTER=$enableval]) +AM_CONDITIONAL([ENABLE_VTKCONVERTER], [test "$ENABLE_VTKCONVERTER" = "yes"]) + +AC_ARG_WITH( + [hdf5], + [AS_HELP_STRING([--with-hdf5], + [path to HDF5 installation [default=""]])], + [HDF5_PREFIX=$withval], [HDF5_PREFIX=""]) + +AC_ARG_WITH( + [mpi], + [AS_HELP_STRING([--with-mpi], + [path to MPI installation [default=""]])], + [PATH=$MPI_PREFIX/bin:$PATH]) + +AC_ARG_WITH( + [lustre], + [AS_HELP_STRING([--with-lustre], + [path to lustre user API [default=""]])], + [LUSTREPATH=$withval], [LUSTREPATH=""]) + +AC_ARG_WITH( + [parmetis], + [AC_HELP_STRING([--with-parmetis], + [path to ParMETIS API [default=""]])], + [PARMETISPATH=$withval], [PARMETISPATH=""]) + + +############################################################################### +############### PATH SERACH FUNCTION - to be used later... #################### +############################################################################### +# /*@@ +# @routine CCTK_Search +# @date Wed Jul 21 11:16:35 1999 +# @author Tom Goodale +# @desc +# Used to search for something in various directories +# @enddesc +#@@*/ + +PATH_Search() { + eval $1="" + if test $# -lt 4 ; then + h5part_basedir="" + else + h5part_basedir="$4/" + fi + for h5part_place in $2; do + AC_MSG_CHECKING([looking in $h5part_place ... ]) + if test -r "$h5part_basedir$h5part_place/$3" ; then + AC_MSG_RESULT([found]) + eval $1="$h5part_place" + break + fi + AC_MSG_RESULT([no]) + done + return +} + +############################################################################### +# MISC SETTINGS INCLUDING C & C++ COMPILER SETTING + +# Compute the canonical host-system type variable, host, and its three +# individual parts host_cpu, host_vendor, and host_os. +AC_CANONICAL_HOST +AC_PROG_MAKE_SET + +# debug enabled? +AC_MSG_CHECKING([if debug is enabled]) +if test "X$ENABLE_DEBUG" = "Xyes"; then + AC_MSG_RESULT([yes]) + CFLAGS="$CFLAGS -g -Wall" + CXXFLAGS="$CFLAGS -g -Wall" + FFLAGS="$FFLAGS -g" +else + AC_MSG_RESULT([no]) +fi + +# Determine a C/C++ compiler to use. +# If CC is not already set in the environment, check for other C compilers. +# Set output variable CC to the name of the compiler found. +if test "x$ENABLE_PARALLEL" = "xyes"; then + CCOMPILERS="mpicc" + CXXCOMPILERS="mpic++" +else + CCOMPILERS="pgcc pathcc icc gcc cc_r cc" + CXXCOMPILERS="pgcc pathcc icc g++ cc_r c++" +fi + +AC_PROG_CC($CCOMPILERS) +CC=`which $CC` +AC_PROG_CXX($CXXCOMPILERS) +CXX=`which $CXX` + +# Use macro to set C99 mode instead of checking for gcc, which breaks with +# parallel builds. +AC_PROG_CC_C99 +if test "x$ac_cv_prog_cc_c99" = "xno"; then + AC_MSG_ERROR([Cannot set C compiler to use C99 standard!]) + exit 1 +fi + +# Set output variable INSTALL to the path of a BSD-compatible install program, +# if one is found in the current PATH. +# Otherwise, set INSTALL to `dir/install-sh -c` +AC_PROG_INSTALL +AC_PROG_AWK + +# Disable shared libraries by default: can be enabled with --enable-shared +LT_INIT([disable-shared]) +AC_PROG_LIBTOOL + +# Default prefix for bindir, etc... (eg >> ./build/bin) +AC_PREFIX_DEFAULT(`pwd`/build) + +# Checks for header files. +AC_CHECK_HEADERS([fcntl.h limits.h stdint.h stdlib.h string.h sys/ioctl.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_INLINE +AC_TYPE_INT16_T +AC_TYPE_INT32_T +AC_TYPE_INT64_T +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T +AC_TYPE_UINT64_T +AC_CHECK_TYPES([ptrdiff_t]) + +# Checks for library functions. +AC_FUNC_MALLOC +AC_FUNC_REALLOC +AC_CHECK_FUNCS([memmove memset pow strchr strdup strerror strstr]) + +# AC_DEFINE_UNQUOTED (variable, value, [description]) +# Define the C preprocessor variable variable to value +# Use this macro instead of AC_DEFINE when variable or value is a shell variable. +AC_DEFINE_UNQUOTED(MY_BUILD_VENDOR, "$host_vendor", "") +AC_DEFINE_UNQUOTED(MY_BUILD_CPU, "$host_cpu", "") +AC_DEFINE_UNQUOTED(MY_BUILD_OS, "$host_os", "") +AC_DEFINE_UNQUOTED(MY_GNUNAME, "${host_cpu}-${host_vendor}-${host_os}", "") +AC_DEFINE_UNQUOTED(MY_UNAME, "$uname", "") + + +############################################################################### +# PROCESS ARGUMENTS + +# C enabled? +AC_MSG_CHECKING([if C interface enabled]) +if test "X$ENABLE_C" = "Xyes"; then + AC_MSG_RESULT([yes]) + BINDINGS="$BINDINGS C" + BUILD_LIBS="$BUILD_LIBS" + BUILD_TESTS="$BUILD_TESTS h5u_test h5b_test" + BUILD_TOOLS="$BUILD_TOOLS h5hutcc" +else + AC_MSG_RESULT([no]) +fi + +# fortran enabled? +AC_MSG_CHECKING([if fortran interface enabled]) +if test "X$ENABLE_FORTRAN" = "Xyes"; then + AC_MSG_RESULT([yes]) + BINDINGS="$BINDINGS Fortran" + LIB_FORTRAN="libH5hutF.la" + BUILD_LIBS="$BUILD_LIBS libH5hutF" + + if test "X$ENABLE_PARALLEL" = "Xyes"; then + AC_PROG_FC(mpif90 mpif77) + else + AC_PROG_FC(pgf90 ifort xlf_r pathf90 g95 g90 ftn gfortran) + fi + FC=`which $FC` + if test -z "$FC" ; then + AC_MSG_ERROR([Cannot find a Fortran compiler!]) + exit 1 + fi + + if test $FC = "g90"; then + FFLAGS="${FFLAGS} -fno-second-underscore" + fi + + if test $FC = "g95"; then + FFLAGS="${FFLAGS} -fno-second-underscore" + fi + + AC_MSG_CHECKING([symbol convention in object files]) + `cd src/Fortran && rm -f TestUnderscore.o TestUnderscoreC.o TestUnderscore` + `cd src/Fortran && ${FC} ${FFLAGS} -c TestUnderscore.f` + `cd src/Fortran && ${CC} ${CFLAGS} -c TestUnderscoreC.c` + `cd src/Fortran && ${FC} ${FFLAGS} -o TestUnderscore TestUnderscore.o TestUnderscoreC.o` + + if test -f src/Fortran/TestUnderscore ; then + UNDERSCORE_H=Underscore.h + `cd src/Fortran && ./TestUnderscore > Underscore.h` + AC_MSG_RESULT([ok]) + else + AC_MSG_RESULT([nok]) + AC_MSG_ERROR([Cannot determine the symbol convention for Fortran object files!]) + exit 1 + fi + +else + AC_MSG_RESULT([no]) +fi + +######################## large indices enabled ########################### +AC_MSG_CHECKING([if large indices are enabled]) +if test "X$USE_LARGE_INDICES" = "Xyes"; then + AC_MSG_RESULT([yes]) + CFLAGS="${CFLAGS} -DUSE_LARGE_INDICES" +else + AC_MSG_RESULT([no]) +fi + +######################## parallel interface enabled ########################### +AC_MSG_CHECKING([if parallel interface enabled]) +if test "X$ENABLE_PARALLEL" = "Xyes"; then + AC_MSG_RESULT([yes]) + AM_CPPFLAGS="${AM_CPPFLAGS} -DPARALLEL_IO -DMPICH_IGNORE_CXX_SEEK" + + if test "X$ENABLE_EXPERIMENTAL" = "Xyes"; then + AC_MSG_CHECKING([for ParMETIS]) + if test "X$PARMETISPATH" != "X"; then + AM_CPPFLAGS="$AM_CPPFLAGS -I$PARMETISPATH/include" + LDFLAGS="$LDFLAGS -L$PARMETISPATH/lib" + fi + + LIBS="$LIBS -lparmetis -lmetis" + AC_TRY_LINK([#include ], [ + ParMETIS_V3_PartGeom (NULL, NULL, NULL, NULL, NULL);], + [AC_MSG_RESULT([yes]); r='yes'], [AC_MSG_RESULT([no]); r='no'] ) + + if test "X$r" = "Xno"; then + AC_MSG_ERROR([ParMETIS]) + exit 1 + fi + fi +else # --enable-parallel=no + AC_MSG_RESULT([no]) +fi + +############################################################################### +# LIBRARY PATHS +if test -n "${HDF5_PREFIX}" ; then + AM_CPPFLAGS="$AM_CPPFLAGS -I$HDF5_PREFIX/include" + LDFLAGS="$LDFLAGS -L$HDF5_PREFIX/lib" +fi +AC_CHECK_LIB([z], [compress2]) +AC_CHECK_LIB([hdf5], [H5open]) +AS_IF([test "x$ac_cv_lib_hdf5_H5open" != xyes], + [AC_MSG_ERROR([Cannot compile and link a HDF5 program]); + exit 1]) + + +AC_MSG_CHECKING([for lustre API ]) +AC_MSG_RESULT([]) +if test -n "${LUSTREPATH}"; then + P=${LUSTREPATH} +elif test -n "${LUSTREROOT}" ; then + P=${LUSTREROOT} +elif test -n "${LUSTREHOME}" ; then + P=${LUSTREHOME} +elif test -n "${LUSTRE_DIR}" ; then + P=${LUSTRE_DIR} +else + P='' + P="$P /usr" + P="$P /usr/local" + P="$P /usr/local/lustre" + P="$P /opt/lustre" +fi +PATH_Search LUSTREROOT "$P" usr/include/lustre/liblustreapi.h +if test -z "$LUSTREROOT"; then + AC_MSG_WARN([Couldn't locate the lustre API... building without support for lustre striping!]) +else + CFLAGS="$CFLAGS -DH5_USE_LUSTRE" + AM_CPPFLAGS="$AM_CPPFLAGS -I$LUSTREROOT/usr/include" + LDFLAGS="$LDFLAGS -L$LUSTREROOT/usr/lib" + LIBS="$LIBS -llustreapi" +fi + +LIBS="$LIBS -lm" + +############################################################################### +# TOOLS +AC_MSG_CHECKING([if we have to compile the VTK to H5hut grid converter]) +if test "X$ENABLE_VTKCONVERTER" = "Xyes"; then + AC_MSG_RESULT([yes]) + # :TODO: add test whether we can compile/link a prog with vtk +else + AC_MSG_RESULT([no]) +fi + +############################################################################### +# EXPORTING VARIABLES & CREATING OUTPUT FILES +AC_SUBST(HDF5_PREFIX) +AC_SUBST(LUSTREROOT) +AC_SUBST(CFLAGS) +AC_SUBST(FFLAGS) +AC_SUBST(AM_CPPFLAGS) +AC_SUBST(LDFLAGS) +AC_SUBST(LIBS) +AC_SUBST(UNDERSCORE_H) +AC_SUBST(LIB_FORTRAN) +AC_SUBST(BINDINGS) +AC_SUBST(BUILD_TESTS) +AC_SUBST(BUILD_TOOLS) + +AC_CONFIG_FILES([ + Makefile + src/Makefile + src/h5core/Makefile + src/include/Makefile + src/C/Makefile + src/Fortran/Makefile + test/Makefile + doc/Makefile + examples/H5/Makefile + examples/H5Part/Makefile + examples/H5Block/Makefile + examples/H5Fed/Makefile + tools/Makefile + tools/h5hutcc + tools/vtk2h5grid/Makefile +]) + +AC_OUTPUT + +############################################################################### +# PRINTING SUMMARY +AC_MSG_RESULT([ ]) +AC_MSG_RESULT([Summary:]) +AC_MSG_RESULT([ ]) +AC_MSG_RESULT([Host OS: $host_os]) +AC_MSG_RESULT([Host CPU: $host_cpu]) +AC_MSG_RESULT([Host vendor: $host_vendor]) +AC_MSG_RESULT([Build libraries: $BUILD_LIBS]) +AC_MSG_RESULT([Build test programs: $BUILD_TESTS]) +AC_MSG_RESULT([Build tools: $BUILD_TOOLS]) +AC_MSG_RESULT([CC = $CC]) +AC_MSG_RESULT([CXX = $CXX]) +AC_MSG_RESULT([FC = $FC]) +AC_MSG_RESULT([CFLAGS = $CFLAGS]) +AC_MSG_RESULT([FFLAGS = $FFLAGS]) +AC_MSG_RESULT([AM_CPPFLAGS = $AM_CPPFLAGS]) +AC_MSG_RESULT([LDFLAGS = $LDFLAGS]) +AC_MSG_RESULT([LIBS = $LIBS]) +AC_MSG_RESULT([HDF5_PREFIX = $HDF5_PREFIX]) +AC_MSG_RESULT([LUSTREROOT = $LUSTREROOT]) +AC_MSG_RESULT([ ]) diff --git a/doc/Doxyfile b/doc/Doxyfile new file mode 100644 index 0000000..82802e3 --- /dev/null +++ b/doc/Doxyfile @@ -0,0 +1,1816 @@ +# Doxyfile 1.8.0 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" "). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or sequence of words) that should +# identify the project. Note that if you do not use Doxywizard you need +# to put quotes around the project name if it contains spaces. + +PROJECT_NAME = H5hut + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 1.99 + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = /var/cache/doxygen/H5hut/2.0/html +#OUTPUT_DIRECTORY = ./ReferencePages + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = ../src + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding +# "class=itcl::class" will allow you to use the command class in the +# itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all +# comments according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you +# can mix doxygen, HTML, and XML commands with Markdown formatting. +# Disable only in case of backward compatibilities issues. + +MARKDOWN_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and +# unions with only public data fields will be shown inline in the documentation +# of the scope in which they are defined (i.e. file, namespace, or group +# documentation), provided this scope is documented. If set to NO (the default), +# structs, classes, and unions are shown on a separate page (for HTML and Man +# pages) or section (for LaTeX and RTF). + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +SYMBOL_CACHE_SIZE = 0 + +# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be +# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given +# their name and scope. Since this can be an expensive process and often the +# same symbol appear multiple times in the code, doxygen keeps a cache of +# pre-resolved symbols. If the cache is too small doxygen will become slower. +# If the cache is too large, memory is wasted. The cache size is given by this +# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = YES + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = NO + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = NO + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 0 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = NO + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files +# containing the references data. This must be a list of .bib files. The +# .bib extension is automatically appended if omitted. Using this command +# requires the bibtex tool to be installed. See also +# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style +# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this +# feature you need bibtex and perl available in the search path. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = H5.dox \ + ../src/C/ \ + ../src/Fortran/ \ + ../src/include + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = ../src/C/.svn \ + ../src/Fortran/.svn \ + ../src/include/.svn + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = . + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is advised to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when +# changing the value of configuration settings such as GENERATE_TREEVIEW! + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# style sheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the style sheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) +# at top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. Since the tabs have the same information as the +# navigation tree you can set this option to NO if you already set +# GENERATE_TREEVIEW to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. +# Since the tree basically has the same information as the tab index you +# could consider to set DISABLE_INDEX to NO when enabling this option. + +GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you may also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to +# the MathJax Content Delivery Network so you can quickly see the result without +# installing MathJax. +# However, it is strongly recommended to install a local +# copy of MathJax from http://www.mathjax.org before deployment. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension +# names that should be enabled during MathJax rendering. + +MATHJAX_EXTENSIONS = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = NO + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = no + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the +# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See +# http://en.wikipedia.org/wiki/BibTeX for more info. + +LATEX_BIB_STYLE = plain + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load style sheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = YES + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# pointed to by INCLUDE_PATH will be searched when a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = PARALLEL_IO + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. For each +# tag file the location of the external documentation should be added. The +# format of a tag file without this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths +# or URLs. Note that each tag file must have a unique name (where the name does +# NOT include the path). If a tag file is not located in the directory in which +# doxygen is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = NO + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will use the Helvetica font for all dot files that +# doxygen generates. When you want a differently looking font you can specify +# the font name using DOT_FONTNAME. You need to make sure dot is able to find +# the font, which can be done by putting it in a standard location or by setting +# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the +# directory containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the Helvetica font. +# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to +# set the path where dot can find it. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = NO + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = NO + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = NO + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If the UML_LOOK tag is enabled, the fields and methods are shown inside +# the class node. If there are many fields or methods and many nodes the +# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS +# threshold limits the number of items for each type to make the size more +# managable. Set this to 0 for no limit. Note that the threshold may be +# exceeded by 50% before the limit is enforced. + +UML_LIMIT_NUM_FIELDS = 10 + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = NO + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = NO + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = NO + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are svg, png, jpg, or gif. +# If left blank png will be used. If you choose svg you need to set +# HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible in IE 9+ (other browsers do not have this requirement). + +DOT_IMAGE_FORMAT = png + +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to +# enable generation of interactive SVG images that allow zooming and panning. +# Note that this requires a modern browser other than Internet Explorer. +# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you +# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible. Older versions of IE do not have SVG support. + +INTERACTIVE_SVG = NO + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 1000 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/doc/DoxygenLayout.xml b/doc/DoxygenLayout.xml new file mode 100644 index 0000000..7f62755 --- /dev/null +++ b/doc/DoxygenLayout.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/Examples/meshexample.dxf b/doc/Examples/meshexample.dxf new file mode 100644 index 0000000..7e174cb --- /dev/null +++ b/doc/Examples/meshexample.dxf @@ -0,0 +1,47962 @@ +999 +dxflib 2.2.0.0 + 0 +SECTION + 2 +HEADER + 9 +$ACADVER + 1 +AC1015 + 9 +$HANDSEED + 5 +FFFF + 9 +$DIMASZ + 40 +2.5 + 9 +$PLIMMIN + 10 +0.0 + 20 +0.0 + 9 +$DIMEXE + 40 +1.25 + 9 +$DIMGAP + 40 +0.625 + 9 +$PLIMMAX + 10 +210.0 + 20 +297.0 + 9 +$PSVPSCALE + 40 +0.7295160000000001 + 9 +$PINSBASE + 10 +16.6994766976620639 + 20 +117.2065161928293264 + 30 +0.0 + 9 +$INSUNITS + 70 +4 + 9 +$DIMSTYLE + 2 +Standard + 9 +$CLAYER + 8 +1-UGrid Mark Neighbors + 9 +$DIMEXO + 40 +0.625 + 9 +$DIMTXT + 40 +2.5 + 9 +$CLAYER + 8 +1-UGrid Mark DownAdjVertices + 0 +ENDSEC + 0 +SECTION + 2 +TABLES + 0 +TABLE + 2 +VPORT + 5 +8 +100 +AcDbSymbolTable + 70 +1 + 0 +VPORT + 5 +30 +100 +AcDbSymbolTableRecord +100 +AcDbViewportTableRecord + 2 +*Active + 70 +0 + 10 +0.0 + 20 +0.0 + 11 +1.0 + 21 +1.0 + 12 +286.3055555555554861 + 22 +148.5 + 13 +0.0 + 23 +0.0 + 14 +10.0 + 24 +10.0 + 15 +10.0 + 25 +10.0 + 16 +0.0 + 26 +0.0 + 36 +1.0 + 17 +0.0 + 27 +0.0 + 37 +0.0 + 40 +297.0 + 41 +1.92798353909465 + 42 +50.0 + 43 +0.0 + 44 +0.0 + 50 +0.0 + 51 +0.0 + 71 +0 + 72 +100 + 73 +1 + 74 +3 + 75 +1 + 76 +1 + 77 +0 + 78 +0 +281 +0 + 65 +1 +110 +0.0 +120 +0.0 +130 +0.0 +111 +1.0 +121 +0.0 +131 +0.0 +112 +0.0 +122 +1.0 +132 +0.0 + 79 +0 +146 +0.0 + 0 +ENDTAB + 0 +TABLE + 2 +LTYPE + 5 +5 +100 +AcDbSymbolTable + 70 +21 + 0 +LTYPE + 5 +14 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +ByBlock + 70 +0 + 3 + + 72 +65 + 73 +0 + 40 +0.0 + 0 +LTYPE + 5 +15 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +ByLayer + 70 +0 + 3 + + 72 +65 + 73 +0 + 40 +0.0 + 0 +LTYPE + 5 +16 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +CONTINUOUS + 70 +0 + 3 +Solid line + 72 +65 + 73 +0 + 40 +0.0 + 0 +LTYPE + 5 +31 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DOT + 70 +0 + 3 +Dot . . . . . . . . . . . . . . . . . . . . . . + 72 +65 + 73 +2 + 40 +6.3499999999999996 + 49 +0.0 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 0 +LTYPE + 5 +32 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DOT2 + 70 +0 + 3 +Dot (.5x) ..................................... + 72 +65 + 73 +2 + 40 +3.1749999999999998 + 49 +0.0 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 0 +LTYPE + 5 +33 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DOTX2 + 70 +0 + 3 +Dot (2x) . . . . . . . . . . . . . + 72 +65 + 73 +2 + 40 +12.6999999999999993 + 49 +0.0 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 0 +LTYPE + 5 +34 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DASHED + 70 +0 + 3 +Dashed __ __ __ __ __ __ __ __ __ __ __ __ __ _ + 72 +65 + 73 +2 + 40 +19.0500000000000007 + 49 +12.6999999999999993 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 0 +LTYPE + 5 +35 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DASHED2 + 70 +0 + 3 +Dashed (.5x) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + 72 +65 + 73 +2 + 40 +9.5250000000000004 + 49 +6.3499999999999996 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 0 +LTYPE + 5 +36 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DASHEDX2 + 70 +0 + 3 +Dashed (2x) ____ ____ ____ ____ ____ ___ + 72 +65 + 73 +2 + 40 +38.1000000000000014 + 49 +25.3999999999999986 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 0 +LTYPE + 5 +37 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DASHDOT + 70 +0 + 3 +Dash dot __ . __ . __ . __ . __ . __ . __ . __ + 72 +65 + 73 +4 + 40 +25.3999999999999986 + 49 +12.6999999999999993 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 0 +LTYPE + 5 +38 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DASHDOT2 + 70 +0 + 3 +Dash dot (.5x) _._._._._._._._._._._._._._._. + 72 +65 + 73 +4 + 40 +12.6999999999999993 + 49 +6.3499999999999996 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 0 +LTYPE + 5 +39 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DASHDOTX2 + 70 +0 + 3 +Dash dot (2x) ____ . ____ . ____ . ___ + 72 +65 + 73 +4 + 40 +50.7999999999999972 + 49 +25.3999999999999986 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 0 +LTYPE + 5 +3A +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DIVIDE + 70 +0 + 3 +Divide ____ . . ____ . . ____ . . ____ . . ____ + 72 +65 + 73 +6 + 40 +31.75 + 49 +12.6999999999999993 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 0 +LTYPE + 5 +3B +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DIVIDE2 + 70 +0 + 3 +Divide (.5x) __..__..__..__..__..__..__..__.._ + 72 +65 + 73 +6 + 40 +15.875 + 49 +6.3499999999999996 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 0 +LTYPE + 5 +3C +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DIVIDEX2 + 70 +0 + 3 +Divide (2x) ________ . . ________ . . _ + 72 +65 + 73 +6 + 40 +63.5 + 49 +25.3999999999999986 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 0 +LTYPE + 5 +3D +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +CENTER + 70 +0 + 3 +Center ____ _ ____ _ ____ _ ____ _ ____ _ ____ + 72 +65 + 73 +4 + 40 +50.7999999999999972 + 49 +31.75 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 49 +6.3499999999999996 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 0 +LTYPE + 5 +3E +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +CENTER2 + 70 +0 + 3 +Center (.5x) ___ _ ___ _ ___ _ ___ _ ___ _ ___ + 72 +65 + 73 +4 + 40 +28.5749999999999993 + 49 +19.0500000000000007 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 49 +3.1749999999999998 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 0 +LTYPE + 5 +3F +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +CENTERX2 + 70 +0 + 3 +Center (2x) ________ __ ________ __ _____ + 72 +65 + 73 +4 + 40 +101.5999999999999943 + 49 +63.5 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 49 +12.6999999999999993 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 0 +LTYPE + 5 +40 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +BORDER + 70 +0 + 3 +Border __ __ . __ __ . __ __ . __ __ . __ __ . + 72 +65 + 73 +6 + 40 +44.4500000000000028 + 49 +12.6999999999999993 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 49 +12.6999999999999993 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 0 +LTYPE + 5 +41 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +BORDER2 + 70 +0 + 3 +Border (.5x) __.__.__.__.__.__.__.__.__.__.__. + 72 +65 + 73 +6 + 40 +22.2250000000000014 + 49 +6.3499999999999996 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 49 +6.3499999999999996 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 0 +LTYPE + 5 +42 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +BORDERX2 + 70 +0 + 3 +Border (2x) ____ ____ . ____ ____ . ___ + 72 +65 + 73 +6 + 40 +88.9000000000000057 + 49 +25.3999999999999986 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 49 +25.3999999999999986 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 0 +ENDTAB + 0 +TABLE + 2 +LAYER + 5 +2 +100 +AcDbSymbolTable + 70 +125 + 0 +LAYER + 5 +10 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0 + 70 +0 + 62 +7 +420 +0 + 6 +CONTINUOUS +370 +70 +390 +F + 0 +LAYER + 5 +43 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid New Triangles + 70 +1 + 62 +-1 +420 +16711680 + 6 +CONTINUOUS +370 +50 +390 +F + 0 +LAYER + 5 +44 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +2 + 70 +1 + 62 +-3 +420 +65280 + 6 +CONTINUOUS +370 +50 +390 +F + 0 +LAYER + 5 +45 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Vertex Idx + 70 +1 + 62 +-7 +420 +0 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +46 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid New Vertex Idx + 70 +1 + 62 +-1 +420 +16711680 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +47 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +2-Vertices + 70 +1 + 62 +-3 +420 +65280 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +48 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Triangle IDs + 70 +1 + 62 +-7 +420 +0 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +49 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid New Triangle IDs + 70 +1 + 62 +-1 +420 +16711680 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +4A +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +2-Triangles + 70 +1 + 62 +-3 +420 +65280 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +4B +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid Triangle Idx + 70 +1 + 62 +-7 +420 +0 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +4C +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Edge Idx + 70 +1 + 62 +-8 +420 +8421504 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +4D +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid Edge Idx + 70 +1 + 62 +-6 +420 +16711935 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +4E +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-DGraph + 70 +1 + 62 +-8 +420 +8421504 + 6 +CONTINUOUS +370 +50 +390 +F + 0 +LAYER + 5 +4F +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part1 + 70 +1 + 62 +-91 +420 +7405424 + 6 +CONTINUOUS +370 +25 +390 +F + 0 +LAYER + 5 +50 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 + 70 +1 + 62 +-150 +420 +39423 + 6 +CONTINUOUS +370 +25 +390 +F + 0 +LAYER + 5 +51 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid + 70 +0 + 62 +7 +420 +0 + 6 +CONTINUOUS +370 +100 +390 +F + 0 +LAYER + 5 +52 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-NGraph + 70 +1 + 62 +-7 +420 +0 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +53 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-NGraph Vertex Idx + 70 +1 + 62 +-7 +420 +0 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +54 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-NGraph Part 1 + 70 +1 + 62 +-91 +420 +7405424 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +55 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-NGraph Part 2 + 70 +1 + 62 +-150 +420 +3769599 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +56 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-DGraph Vertex Idx + 70 +1 + 62 +-7 +420 +0 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +57 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-DGraph Part1 + 70 +1 + 62 +-91 +420 +7405424 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +58 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-DGraph Part2 + 70 +1 + 62 +-150 +420 +3769599 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +59 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid Triangle IDs + 70 +1 + 62 +-7 +420 +0 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +5A +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid Vertex Idx + 70 +0 + 62 +7 +420 +0 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +5B +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid + 70 +1 + 62 +-7 +420 +0 + 6 +CONTINUOUS +370 +100 +390 +F + 0 +LAYER + 5 +5C +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Triangle Idx + 70 +1 + 62 +-7 +420 +0 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +5D +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-DGraph + 70 +1 + 62 +-8 +420 +8421504 + 6 +CONTINUOUS +370 +25 +390 +F + 0 +LAYER + 5 +5E +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-DGraph Vertex Idx + 70 +1 + 62 +-7 +420 +0 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +5F +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-NGraph + 70 +1 + 62 +-7 +420 +0 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +60 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-NGraph Vertex Idx + 70 +1 + 62 +-7 +420 +0 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +61 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid NGraph Part1 + 70 +1 + 62 +-91 +420 +7405424 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +62 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid NGraph Part2 + 70 +1 + 62 +-150 +420 +3769599 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +63 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-DGraph InitPart1 + 70 +1 + 62 +-91 +420 +7405424 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +64 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-DGraph InitPart2 + 70 +1 + 62 +-150 +420 +3769599 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +65 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG InitPart1 + 70 +1 + 62 +-91 +420 +7405424 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +66 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG InitPart2 + 70 +1 + 62 +-150 +420 +3769599 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +67 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 BorderEdges + 70 +1 + 62 +-150 +420 +3381759 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +68 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 InteriorEdges + 70 +1 + 62 +-4 +420 +65535 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +69 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 GhostElems + 70 +1 + 62 +-2 +420 +16776960 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +6A +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 GhostEdges + 70 +1 + 62 +-40 +420 +16763955 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +6B +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 BorderVertices + 70 +1 + 62 +-150 +420 +3381759 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +6C +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 InteriorVertices + 70 +1 + 62 +-4 +420 +65535 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +6D +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 GhostVertices + 70 +1 + 62 +-51 +420 +16777088 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +6E +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 OverlapElems Example + 70 +1 + 62 +-3 +420 +65280 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +6F +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 OverlapEdges Example + 70 +1 + 62 +-94 +420 +32768 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +70 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 FrontEdges Example + 70 +1 + 62 +-6 +420 +16711935 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +71 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 FrontVertices Example + 70 +1 + 62 +-6 +420 +16711935 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +72 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 Ghost2OverlapElems + 70 +1 + 62 +-2 +420 +16776960 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +73 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 Ghost2OverlapEdges + 70 +1 + 62 +-52 +420 +11776768 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +74 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 Ghost2OverlapVertices + 70 +1 + 62 +-52 +420 +11776768 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +75 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Mark Element + 70 +0 + 62 +2 +420 +16776960 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +76 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Mark Neighbors + 70 +1 + 62 +-30 +420 +16737843 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +77 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Mark UpAdj Vertex + 70 +1 + 62 +-2 +420 +16776960 + 6 +CONTINUOUS +370 +50 +390 +F + 0 +LAYER + 5 +78 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Mark UpAdj Edges + 70 +1 + 62 +-1 +420 +16711680 + 6 +CONTINUOUS +370 +100 +390 +F + 0 +LAYER + 5 +79 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Mark DownAdj Vertices + 70 +1 + 62 +-1 +420 +16711680 + 6 +CONTINUOUS +370 +50 +390 +F + 0 +LAYER + 5 +7A +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-NGraph Part2 Elements + 70 +1 + 62 +-141 +420 +8446207 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +7B +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-NGraph Part1 Elements + 70 +1 + 62 +-61 +420 +14745472 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +7C +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid Mark Element + 70 +1 + 62 +-2 +420 +16776960 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +7D +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid Mark Neighbors + 70 +1 + 62 +-30 +420 +16737843 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +7E +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid DG Part1 + 70 +1 + 62 +-91 +420 +7405424 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +7F +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid DG Part2 + 70 +1 + 62 +-150 +420 +3769599 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +80 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid DG Part2 BorderEdges + 70 +1 + 62 +-4 +420 +65535 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +81 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 H5Fed OverlapElems + 70 +1 + 62 +-3 +420 +65280 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +82 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 H5Fed FrontVertices + 70 +1 + 62 +-6 +420 +16711935 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +83 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 H5Fed FrontEdges + 70 +1 + 62 +-6 +420 +16711935 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +84 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 H5Fed OverlapEdges + 70 +1 + 62 +-82 +420 +3381504 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +85 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 OverlapVertices H5Fed + 70 +1 + 62 +-82 +420 +3381504 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +86 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part1 FrontEdges H5Fed + 70 +1 + 62 +-6 +420 +16711935 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +87 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part1 FrontVertices H5Fed + 70 +1 + 62 +-6 +420 +16711935 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +88 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part1 OverlapVertices H5Fed + 70 +1 + 62 +-7 +420 +0 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +89 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part1 OverlapEdges H5Fed + 70 +1 + 62 +-82 +420 +3381504 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +8A +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part1 OverlapElems H5Fed + 70 +1 + 62 +-3 +420 +65280 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +8B +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part1 BorderVertices H5Fed + 70 +1 + 62 +-150 +420 +3381759 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +8C +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part1 BorderEdges H5Fed + 70 +1 + 62 +-150 +420 +3381759 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +8D +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part1 InteriorElems H5Fed + 70 +1 + 62 +-30 +420 +16737843 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +8E +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part1 InteriorVertices H5Fed + 70 +1 + 62 +-1 +420 +16711680 + 6 +CONTINUOUS +370 +-3 +390 +F + 0 +LAYER + 5 +8F +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part1 InteriorEdges H5Fed + 70 +1 + 62 +-1 +420 +16711680 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +90 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part1 BorderEdges H5Fed + 70 +1 + 62 +-4 +420 +65535 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +91 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part1 BorderVertices H5Fed + 70 +1 + 62 +-4 +420 +65535 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +92 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part1 FrontEdges H5Fed + 70 +1 + 62 +-6 +420 +16711935 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +93 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part1 FrontVertices H5Fed + 70 +1 + 62 +-6 +420 +16711935 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +94 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part1 InteriorEdges H5Fed + 70 +1 + 62 +-1 +420 +16711680 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +95 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part1 InteriorElems H5Fed + 70 +1 + 62 +-30 +420 +16737843 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +96 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part1 InteriorVertices H5Fed + 70 +1 + 62 +-1 +420 +16711680 + 6 +CONTINUOUS +370 +-3 +390 +F + 0 +LAYER + 5 +97 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part1 OverlapEdges H5Fed + 70 +1 + 62 +-82 +420 +3381504 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +98 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part1 OverlapElems H5Fed + 70 +1 + 62 +-3 +420 +65280 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +99 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part1 OverlapVertices H5Fed + 70 +1 + 62 +-7 +420 +0 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +9A +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part2 BorderEdges H5Fed + 70 +1 + 62 +-150 +420 +3381759 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +9B +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part2 BorderVertices H5Fed + 70 +1 + 62 +-150 +420 +3381759 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +9C +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part2 FrontEdges H5Fed + 70 +1 + 62 +-6 +420 +16711935 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +9D +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part2 FrontVertices H5Fed + 70 +1 + 62 +-6 +420 +16711935 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +9E +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part2 InteriorEdges H5Fed + 70 +1 + 62 +-1 +420 +16711680 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +9F +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part2 InteriorElems H5Fed + 70 +1 + 62 +-30 +420 +16737843 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +A0 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part2 InteriorVertices H5Fed + 70 +1 + 62 +-1 +420 +16711680 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +A1 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part2 OverlapEdges H5Fed + 70 +1 + 62 +-82 +420 +3381504 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +A2 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part2 OverlapElems H5Fed + 70 +1 + 62 +-3 +420 +65280 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +A3 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Part2 OverlapVertices H5Fed + 70 +1 + 62 +-82 +420 +3381504 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +A4 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part2 BorderEdges H5Fed + 70 +1 + 62 +-150 +420 +3381759 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +A5 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part2 BorderVertices H5Fed + 70 +1 + 62 +-150 +420 +3381759 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +A6 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part2 FrontEdges H5Fed + 70 +1 + 62 +-6 +420 +16711935 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +A7 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part2 FrontVertices H5Fed + 70 +1 + 62 +-6 +420 +16711935 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +A8 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part2 InteriorEdges H5Fed + 70 +1 + 62 +-1 +420 +16711680 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +A9 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part2 InteriorVertices H5Fed + 70 +1 + 62 +-1 +420 +16711680 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +AA +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part2 InteriorElems H5Fed + 70 +1 + 62 +-30 +420 +16737843 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +AB +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part2 OverlapEdges H5Fed + 70 +1 + 62 +-82 +420 +3381504 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +AC +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part2 OverlapVertices H5Fed + 70 +1 + 62 +-82 +420 +3381504 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +AD +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part2 OverlapElems H5Fed + 70 +1 + 62 +-3 +420 +65280 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +AE +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part2 GhostElems H5Fed + 70 +1 + 62 +-2 +420 +16776960 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +AF +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part1 GhostElems H5Fed + 70 +1 + 62 +-2 +420 +16776960 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +B0 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part1 GhostEdges H5Fed + 70 +1 + 62 +-40 +420 +16763955 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +B1 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid 0Part1 GhostVertices H5Fed + 70 +1 + 62 +-40 +420 +16763955 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +B2 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +2-UGrid Triangle Idx + 70 +1 + 62 +-7 +420 +0 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +B3 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Mark UpAdj Elems + 70 +1 + 62 +-30 +420 +16737843 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +B4 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-UGrid Mark DownAdj Edges + 70 +0 + 62 +1 +420 +16711680 + 6 +CONTINUOUS +370 +100 +390 +F + 0 +LAYER + 5 +B5 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 H5Fed BorderVertices + 70 +1 + 62 +-5 +420 +255 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +B6 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 H5Fed BorderEdges + 70 +1 + 62 +-150 +420 +3381759 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +B7 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 H5Fed GhostEdges + 70 +1 + 62 +-40 +420 +13421568 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +B8 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 H5Fed GhostElems + 70 +1 + 62 +-2 +420 +16776960 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +B9 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 H5Fed OverlapVertices + 70 +1 + 62 +-82 +420 +3381504 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +BA +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 H5Fed InteriorElems + 70 +1 + 62 +-30 +420 +16737843 + 6 +CONTINUOUS +370 +-3 +390 +F + 0 +LAYER + 5 +BB +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 H5Fed InteriorEdges + 70 +1 + 62 +-1 +420 +16711680 + 6 +CONTINUOUS +370 +140 +390 +F + 0 +LAYER + 5 +BC +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid DG Part2 H5Fed InteriorVertices + 70 +1 + 62 +-1 +420 +16711680 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +BD +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid GlobalIdx Triangles + 70 +0 + 62 +7 +420 +0 + 6 +CONTINUOUS +370 +35 +390 +F + 0 +LAYER + 5 +BE +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-UGrid Mark DownAdjVertices + 70 +0 + 62 +1 +420 +16711680 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +ENDTAB + 0 +TABLE + 2 +STYLE + 5 +3 +100 +AcDbSymbolTable + 70 +1 + 0 +STYLE + 5 +11 +100 +AcDbSymbolTableRecord +100 +AcDbTextStyleTableRecord + 2 +Standard + 70 +0 + 40 +0.0 + 41 +0.75 + 50 +0.0 + 71 +0 + 42 +2.5 + 3 +txt + 4 + + 0 +ENDTAB + 0 +TABLE + 2 +VIEW + 5 +6 +100 +AcDbSymbolTable + 70 +0 + 0 +ENDTAB + 0 +TABLE + 2 +UCS + 5 +7 +100 +AcDbSymbolTable + 70 +0 + 0 +ENDTAB + 0 +TABLE + 2 +APPID + 5 +9 +100 +AcDbSymbolTable + 70 +1 + 0 +APPID + 5 +12 +100 +AcDbSymbolTableRecord +100 +AcDbRegAppTableRecord + 2 +ACAD + 70 +0 + 0 +ENDTAB + 0 +TABLE + 2 +DIMSTYLE + 5 +A +100 +AcDbSymbolTable + 70 +1 +100 +AcDbDimStyleTable + 71 +0 + 0 +DIMSTYLE +105 +27 +100 +AcDbSymbolTableRecord +100 +AcDbDimStyleTableRecord + 2 +Standard + 41 +2.5 + 42 +0.625 + 43 +3.75 + 44 +1.25 + 70 +0 + 73 +0 + 74 +0 + 77 +1 + 78 +8 +140 +2.5 +141 +2.5 +143 +0.03937007874016 +147 +0.625 +171 +3 +172 +1 +271 +2 +272 +2 +274 +3 +278 +44 +283 +0 +284 +8 +340 +11 + 0 +ENDTAB + 0 +TABLE + 2 +BLOCK_RECORD + 5 +1 +100 +AcDbSymbolTable + 70 +1 + 0 +BLOCK_RECORD + 5 +1F +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord + 2 +*Model_Space +340 +22 + 0 +BLOCK_RECORD + 5 +1B +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord + 2 +*Paper_Space +340 +1E + 0 +BLOCK_RECORD + 5 +23 +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord + 2 +*Paper_Space0 +340 +26 + 0 +BLOCK_RECORD + 5 +BF +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord + 2 +dnode +340 +0 + 0 +ENDTAB + 0 +ENDSEC + 0 +SECTION + 2 +BLOCKS + 0 +BLOCK + 5 +20 +100 +AcDbEntity + 8 +0 +100 +AcDbBlockBegin + 2 +*Model_Space + 70 +0 + 10 +0.0 + 20 +0.0 + 30 +0.0 + 3 +*Model_Space + 1 + + 0 +ENDBLK + 5 +21 +100 +AcDbEntity + 8 +0 +100 +AcDbBlockEnd + 0 +BLOCK + 5 +1C +100 +AcDbEntity + 67 +1 + 8 +0 +100 +AcDbBlockBegin + 2 +*Paper_Space + 70 +0 + 10 +0.0 + 20 +0.0 + 30 +0.0 + 3 +*Paper_Space + 1 + + 0 +ENDBLK + 5 +1D +100 +AcDbEntity + 67 +1 + 8 +0 +100 +AcDbBlockEnd + 0 +BLOCK + 5 +24 +100 +AcDbEntity + 8 +0 +100 +AcDbBlockBegin + 2 +*Paper_Space0 + 70 +0 + 10 +0.0 + 20 +0.0 + 30 +0.0 + 3 +*Paper_Space0 + 1 + + 0 +ENDBLK + 5 +25 +100 +AcDbEntity + 8 +0 +100 +AcDbBlockEnd + 0 +BLOCK + 5 +C0 +100 +AcDbEntity + 8 +0 +100 +AcDbBlockBegin + 2 +dnode + 70 +0 + 10 +0.0 + 20 +0.0 + 30 +0.0 + 3 +dnode + 1 + + 0 +CIRCLE + 5 +C1 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +0.0 + 20 +-7.2874765306784965 + 30 +0.0 + 40 +7.2874765306784965 + 0 +MTEXT + 5 +C2 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +-5.8010481366463864 + 20 +-5.4746489879768205 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +D[3] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +ENDBLK + 5 +C3 +100 +AcDbEntity + 8 +0 +100 +AcDbBlockEnd + 0 +ENDSEC + 0 +SECTION + 2 +ENTITIES + 0 +HATCH + 5 +C4 + 8 +0-UGrid Mark Element + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +180.0000175342504178 + 21 +74.9999934246560969 + 72 +1 + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +200.0 + 21 +120.0 + 72 +1 + 10 +200.0 + 20 +120.0 + 11 +140.0 + 21 +90.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +C5 + 8 +1-UGrid Mark Neighbors + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 11 +180.0000175342504178 + 21 +74.9999934246560827 + 72 +1 + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 11 +200.0 + 21 +24.9999999999999964 + 72 +1 + 10 +200.0 + 20 +25.0 + 11 +159.9999450076830385 + 21 +40.0001374807924535 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +C6 + 8 +1-UGrid Mark Neighbors + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 72 +1 + 10 +159.9999450076830385 + 20 +40.0001374807924535 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +C7 + 8 +1-UGrid Mark Neighbors + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +200.0 + 21 +120.0 + 72 +1 + 10 +200.0 + 20 +120.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +180.0000175342504178 + 21 +74.9999934246560969 + 72 +1 + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 11 +140.0 + 21 +90.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +C8 + 8 +1-UGrid Mark Element + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 11 +180.0000175342504178 + 21 +74.9999934246560827 + 72 +1 + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +159.9999450076830385 + 21 +40.0001374807924535 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +C9 + 8 +0-UGrid Mark Neighbors + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +180.0 + 21 +-10.0 + 72 +1 + 10 +180.0 + 20 +-10.0 + 11 +140.0 + 21 +90.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +CA + 8 +0-UGrid Mark Neighbors + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +180.0 + 21 +-10.0 + 72 +1 + 10 +180.0 + 20 +-10.0 + 11 +240.0 + 21 +-60.0 + 72 +1 + 10 +240.0 + 20 +-60.0 + 11 +220.0 + 21 +60.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +CB + 8 +0-UGrid Mark Neighbors + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +200.0 + 21 +120.0 + 72 +1 + 10 +200.0 + 20 +120.0 + 11 +140.0 + 21 +90.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +CC + 8 +1-UGrid DG Part2 H5Fed InteriorElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +9 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +135.0 + 21 +-10.0 + 72 +1 + 10 +135.0 + 20 +-10.0 + 11 +159.9997155749006481 + 21 +-40.0004266376490492 + 72 +1 + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 11 +140.0 + 21 +-70.0 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +240.0 + 21 +-60.0 + 72 +1 + 10 +240.0 + 20 +-60.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +200.0 + 21 +120.0 + 72 +1 + 10 +200.0 + 20 +120.0 + 11 +130.0 + 21 +150.0 + 72 +1 + 10 +130.0 + 20 +150.0 + 11 +140.0 + 21 +90.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +CD + 8 +1-UGrid DG Part2 H5Fed GhostElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +70.0 + 20 +35.0 + 11 +95.0 + 21 +85.0 + 72 +1 + 10 +95.0 + 20 +85.0 + 11 +50.0 + 21 +80.0 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +70.0 + 21 +35.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +CE + 8 +1-UGrid DG Part2 H5Fed OverlapElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +95.0 + 20 +85.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +95.0 + 21 +85.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +CF + 8 +1-UGrid DG Part2 H5Fed OverlapElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +1 + 10 +95.0 + 20 +85.0 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +130.0 + 21 +150.0 + 72 +1 + 10 +130.0 + 20 +150.0 + 11 +50.0 + 21 +80.0 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +95.0 + 21 +85.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +D0 + 8 +1-UGrid DG Part2 H5Fed OverlapElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +135.0 + 21 +-10.0 + 72 +1 + 10 +135.0 + 20 +-10.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +D1 + 8 +1-UGrid DG Part2 H5Fed OverlapElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229736 + 72 +1 + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 11 +134.9999999999999716 + 21 +-10.0000000000000355 + 72 +1 + 10 +135.0 + 20 +-10.0 + 11 +159.9997155749006481 + 21 +-40.0004266376490492 + 72 +1 + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 11 +140.0 + 21 +-70.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +D2 + 8 +0-UGrid Mark UpAdj Elems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +6 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +180.0 + 21 +-10.0 + 72 +1 + 10 +180.0 + 20 +-10.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +200.0 + 21 +120.0 + 72 +1 + 10 +200.0 + 20 +120.0 + 11 +130.0 + 21 +150.0 + 72 +1 + 10 +130.0 + 20 +150.0 + 11 +50.0 + 21 +80.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +D3 + 8 +1-UGrid 0Part1 GhostElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +7 + 72 +1 + 10 +159.9999450076830385 + 20 +40.0001374807924535 + 11 +200.0 + 21 +25.0 + 72 +1 + 10 +200.0 + 20 +24.9999999999999964 + 11 +180.0 + 21 +-10.0 + 72 +1 + 10 +180.0 + 20 +-10.0 + 11 +159.9997155749006197 + 21 +-40.0004266376490492 + 72 +1 + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 11 +140.0 + 21 +-70.0 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 72 +1 + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 11 +135.0 + 21 +-10.0 + 72 +1 + 10 +135.0 + 20 +-10.0 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +D4 + 8 +1-UGrid 0Part2 GhostElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +70.0 + 20 +35.0 + 11 +95.0 + 21 +85.0 + 72 +1 + 10 +95.0 + 20 +85.0 + 11 +50.0 + 21 +80.0 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +70.0 + 21 +35.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +D5 + 8 +1-UGrid 0Part2 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +5 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +180.0000175342504178 + 21 +74.9999934246560969 + 72 +1 + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +200.0 + 21 +120.0 + 72 +1 + 10 +200.0 + 20 +120.0 + 11 +130.0 + 21 +150.0 + 72 +1 + 10 +130.0 + 20 +150.0 + 11 +140.0 + 21 +90.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +D6 + 8 +1-UGrid 0Part2 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +1 + 10 +95.0 + 20 +85.0 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +130.0 + 21 +150.0 + 72 +1 + 10 +130.0 + 20 +150.0 + 11 +50.0 + 21 +80.0 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +95.0 + 21 +85.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +D7 + 8 +1-UGrid 0Part2 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +95.0 + 20 +85.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +95.0 + 21 +85.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +D8 + 8 +1-UGrid 0Part2 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +70.0 + 20 +35.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +95.0 + 21 +85.0 + 72 +1 + 10 +95.0 + 20 +85.0 + 11 +70.0 + 21 +35.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +D9 + 8 +1-UGrid 0Part2 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +70.0 + 20 +35.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +70.0 + 21 +35.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +DA + 8 +1-UGrid 0Part2 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +1 + 10 +70.0 + 20 +35.0 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +0.0 + 21 +0.0 + 72 +1 + 10 +0.0 + 20 +0.0 + 11 +50.0 + 21 +80.0 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +70.0 + 21 +35.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +DB + 8 +1-UGrid 0Part2 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +0.0 + 20 +0.0 + 11 +60.0 + 21 +-70.0 + 72 +1 + 10 +60.0 + 20 +-70.0 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +0.0 + 21 +0.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +DC + 8 +1-UGrid 0Part2 InteriorElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +8 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +60.0 + 21 +-70.0 + 72 +1 + 10 +60.0 + 20 +-70.0 + 11 +140.0 + 21 +-70.0 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +240.0 + 21 +-60.0 + 72 +1 + 10 +240.0 + 20 +-60.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +180.0000175342504178 + 21 +74.9999934246560969 + 72 +1 + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +DD + 8 +0-UGrid Part2 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +8 + 72 +1 + 10 +0.0 + 20 +0.0 + 11 +50.0 + 21 +80.0 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +130.0 + 21 +150.0 + 72 +1 + 10 +130.0 + 20 +150.0 + 11 +200.0 + 21 +120.0 + 72 +1 + 10 +200.0 + 20 +120.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +60.0 + 21 +-70.0 + 72 +1 + 10 +60.0 + 20 +-70.0 + 11 +0.0 + 21 +0.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +DE + 8 +0-UGrid Part2 InteriorElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +6 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +60.0 + 21 +-70.0 + 72 +1 + 10 +60.0 + 20 +-70.0 + 11 +140.0 + 21 +-70.0 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +240.0 + 21 +-60.0 + 72 +1 + 10 +240.0 + 20 +-60.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +90.0 + 21 +-10.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +DF + 8 +0-UGrid Part1 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +7 + 72 +1 + 10 +180.0 + 20 +-10.0 + 11 +140.0 + 21 +-70.0 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +60.0 + 21 +-70.0 + 72 +1 + 10 +60.0 + 20 +-70.0 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +240.0 + 21 +-60.0 + 72 +1 + 10 +240.0 + 20 +-60.0 + 11 +180.0 + 21 +-10.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +E0 + 8 +0-UGrid Part1 InteriorElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +8 + 72 +1 + 10 +0.0 + 20 +0.0 + 11 +50.0 + 21 +80.0 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +130.0 + 21 +150.0 + 72 +1 + 10 +130.0 + 20 +150.0 + 11 +200.0 + 21 +120.0 + 72 +1 + 10 +200.0 + 20 +120.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +60.0 + 21 +-70.0 + 72 +1 + 10 +60.0 + 20 +-70.0 + 11 +0.0 + 21 +0.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +LINE + 5 +E1 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +0.0 + 20 +0.0 + 30 +0.0 + 11 +60.0 + 21 +-70.0 + 31 +0.0 + 0 +HATCH + 5 +E2 + 8 +1-UGrid 0Part1 InteriorElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +10 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +60.0 + 21 +-70.0 + 72 +1 + 10 +60.0 + 20 +-70.0 + 11 +0.0 + 21 +0.0 + 72 +1 + 10 +0.0 + 20 +0.0 + 11 +50.0 + 21 +80.0 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +130.0 + 21 +150.0 + 72 +1 + 10 +130.0 + 20 +150.0 + 11 +200.0 + 21 +120.0 + 72 +1 + 10 +200.0 + 20 +120.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +180.0000175342504178 + 21 +74.9999934246560969 + 72 +1 + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +E3 + 8 +1-UGrid 0Part1 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +1 + 10 +200.0 + 20 +25.0 + 11 +180.0 + 21 +-10.0 + 72 +1 + 10 +180.0 + 20 +-10.0 + 11 +240.0 + 21 +-60.0 + 72 +1 + 10 +240.0 + 20 +-60.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +200.0 + 21 +25.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +E4 + 8 +1-UGrid 0Part1 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +200.0 + 20 +24.9999999999999964 + 11 +180.0000175342504178 + 21 +74.9999934246560969 + 72 +1 + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +200.0 + 21 +25.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +E5 + 8 +1-UGrid 0Part1 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +200.0 + 20 +24.9999999999999964 + 11 +180.0000175342504178 + 21 +74.9999934246560969 + 72 +1 + 10 +180.0000175342504178 + 20 +74.9999934246560827 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 72 +1 + 10 +159.9999450076830385 + 20 +40.0001374807924535 + 11 +200.0 + 21 +25.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +E6 + 8 +1-UGrid 0Part1 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +180.0000175342504178 + 21 +74.9999934246560969 + 72 +1 + 10 +180.0000175342504178 + 20 +74.9999934246560827 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 72 +1 + 10 +159.9999450076830385 + 20 +40.0001374807924535 + 11 +140.0 + 21 +90.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +E7 + 8 +1-UGrid 0Part1 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 72 +1 + 10 +159.9999450076830385 + 20 +40.0001374807924535 + 11 +140.0 + 21 +90.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +E8 + 8 +1-UGrid 0Part1 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 11 +135.0 + 21 +-10.0 + 72 +1 + 10 +135.0 + 20 +-10.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +E9 + 8 +1-UGrid 0Part1 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +135.0 + 21 +-10.0 + 72 +1 + 10 +135.0 + 20 +-10.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +EA + 8 +1-UGrid 0Part1 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +114.9999989626024757 + 20 +-39.9999987551229736 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +135.0 + 21 +-10.0 + 72 +1 + 10 +135.0 + 20 +-10.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +EB + 8 +1-UGrid 0Part1 OverlapElems H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +1 + 10 +114.9999989626024757 + 20 +-39.9999987551229736 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +60.0 + 21 +-70.0 + 72 +1 + 10 +60.0 + 20 +-70.0 + 11 +140.0 + 21 +-70.0 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229736 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +LINE + 5 +EC +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +HATCH + 5 +ED + 8 +1-UGrid DG Part2 H5Fed OverlapElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +1 + 10 +114.9999989626024757 + 20 +-39.9999987551229736 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +60.0 + 21 +-70.0 + 72 +1 + 10 +60.0 + 20 +-70.0 + 11 +140.0 + 21 +-70.0 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229736 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +EE + 8 +1-UGrid DG Part2 OverlapElems Example + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +159.9997155749006481 + 20 +-40.0004266376490492 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 72 +1 + 10 +114.9999989626024757 + 20 +-39.9999987551229736 + 11 +140.0 + 21 +-70.0 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +159.9997155749006197 + 21 +-40.0004266376490492 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +EF + 8 +1-UGrid DG Part2 OverlapElems Example + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 11 +135.0 + 21 +-10.0 + 72 +1 + 10 +134.9999999999999716 + 20 +-10.0000000000000249 + 11 +159.9997155749006197 + 21 +-40.0004266376490492 + 72 +1 + 10 +159.9997155749006481 + 20 +-40.0004266376490492 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +F0 + 8 +1-UGrid DG Part2 H5Fed OverlapElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +114.9999989626024757 + 20 +-39.9999987551229736 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +135.0 + 21 +-10.0 + 72 +1 + 10 +135.0 + 20 +-10.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +F1 + 8 +1-UGrid DG Part2 OverlapElems Example + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +135.0 + 20 +-10.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +135.0 + 21 +-10.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +F2 + 8 +1-UGrid DG Part2 H5Fed OverlapElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +70.0 + 20 +35.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +70.0 + 21 +35.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +F3 + 8 +1-UGrid DG Part2 H5Fed OverlapElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +70.0 + 20 +35.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +95.0 + 21 +85.0 + 72 +1 + 10 +95.0 + 20 +85.0 + 11 +70.0 + 21 +35.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +LINE + 5 +F4 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.0 + 20 +35.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +F5 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.0 + 20 +35.0 + 30 +0.0 + 11 +95.0 + 21 +85.0 + 31 +0.0 + 0 +LINE + 5 +F6 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.0 + 20 +35.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +F7 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +70.0 + 21 +35.0 + 31 +0.0 + 0 +LINE + 5 +F8 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.0 + 20 +85.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +F9 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.0 + 20 +85.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +FA +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +95.0 + 21 +85.0 + 31 +0.0 + 0 +LINE + 5 +FB +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +24.9999999999999964 + 30 +0.0 + 11 +180.0000175342504178 + 21 +74.9999934246560969 + 31 +0.0 + 0 +LINE + 5 +FC +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830385 + 20 +40.0001374807924535 + 30 +0.0 + 11 +200.0 + 21 +25.0 + 31 +0.0 + 0 +LINE + 5 +FD +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +25.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +FE +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +200.0 + 21 +25.0 + 31 +0.0 + 0 +LINE + 5 +FF +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +100 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.9999989626024757 + 20 +-39.9999987551229736 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +101 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229736 + 31 +0.0 + 0 +LINE + 5 +102 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +180.0000175342504178 + 21 +74.9999934246560969 + 31 +0.0 + 0 +LINE + 5 +103 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +104 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +105 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +106 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +159.9997155749006197 + 21 +-40.0004266376490492 + 31 +0.0 + 0 +LINE + 5 +107 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830385 + 20 +40.0001374807924535 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +108 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +159.9999450076830385 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +109 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9997155749006481 + 20 +-40.0004266376490492 + 30 +0.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 31 +0.0 + 0 +LINE + 5 +10A +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +159.9997155749006481 + 21 +-40.0004266376490492 + 31 +0.0 + 0 +LINE + 5 +10B +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +10C +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 30 +0.0 + 11 +180.0000175342504178 + 21 +74.9999934246560827 + 31 +0.0 + 0 +LINE + 5 +10D +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +10E +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +10F +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +120.0 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +LINE + 5 +110 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +111 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +112 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +113 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +130.0 + 21 +150.0 + 31 +0.0 + 0 +LINE + 5 +114 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +240.0 + 21 +-60.0 + 31 +0.0 + 0 +LINE + 5 +115 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +240.0 + 20 +-60.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +116 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 11 +240.0 + 21 +-60.0 + 31 +0.0 + 0 +LINE + 5 +117 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +60.0 + 20 +-70.0 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +118 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +60.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +119 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +0.0 + 21 +0.0 + 31 +0.0 + 0 +LINE + 5 +11A +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +0.0 + 20 +0.0 + 30 +0.0 + 11 +50.0 + 21 +80.0 + 31 +0.0 + 0 +LINE + 5 +11B +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +73.2422985673746894 + 20 +41.4845971347493929 + 30 +0.0 + 11 +91.7577014326253106 + 21 +78.5154028652506071 + 31 +0.0 + 0 +LINE + 5 +11C +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +52.9445038788874953 + 20 +73.3748662725031409 + 30 +0.0 + 11 +67.0554961211124976 + 21 +41.6251337274968662 + 31 +0.0 + 0 +LINE + 5 +11D +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +87.0554961211124976 + 20 +-3.3748662725031346 + 30 +0.0 + 11 +72.9445038788875024 + 21 +28.3748662725031267 + 31 +0.0 + 0 +LINE + 5 +11E +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +77.2056541154809963 + 20 +35.8006552117183077 + 30 +0.0 + 11 +107.7944350756780523 + 21 +39.199523170599889 + 31 +0.0 + 0 +CIRCLE + 5 +11F +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.0 + 20 +35.0 + 30 +0.0 + 40 +7.25 + 0 +LINE + 5 +120 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +87.7943429236162558 + 20 +84.1993714359573744 + 30 +0.0 + 11 +57.2056570763837442 + 21 +80.8006285640426398 + 31 +0.0 + 0 +LINE + 5 +121 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +57.2056570763837371 + 20 +80.8006285640426398 + 30 +0.0 + 11 +87.7943429236162558 + 21 +84.1993714359573602 + 31 +0.0 + 0 +LINE + 5 +122 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +97.9059571128615147 + 20 +78.3578683197177099 + 30 +0.0 + 11 +111.8341033799194122 + 21 +46.5223738595351151 + 31 +0.0 + 0 +CIRCLE + 5 +123 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.0 + 20 +85.0 + 30 +0.0 + 40 +7.25 + 0 +LINE + 5 +124 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +216.4029926969129747 + 20 +53.7052372195976702 + 30 +0.0 + 11 +203.5970073030870822 + 21 +31.2947627804023867 + 31 +0.0 + 0 +LINE + 5 +125 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +196.4029926969129463 + 20 +18.7052372195976773 + 30 +0.0 + 11 +183.5970073030870537 + 21 +-3.7052372195976488 + 31 +0.0 + 0 +LINE + 5 +126 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +193.2116199827562184 + 20 +27.545662338466272 + 30 +0.0 + 11 +166.7883250249267917 + 21 +37.4544751423261957 + 31 +0.0 + 0 +LINE + 5 +127 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +182.6925982080520043 + 20 +68.2685367238319571 + 30 +0.0 + 11 +197.3074193261984135 + 21 +31.7314567008241397 + 31 +0.0 + 0 +CIRCLE + 5 +128 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +25.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +129 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +12A +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +12B +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +12C +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +12D +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +12E +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +12F +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 40 +7.25 + 0 +LINE + 5 +130 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +234.4303957229190303 + 20 +-55.3586631024325229 + 30 +0.0 + 11 +185.5696042770808845 + 21 +-14.6413368975674132 + 31 +0.0 + 0 +LINE + 5 +131 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +177.3074175964327424 + 20 +-3.2685439910818692 + 30 +0.0 + 11 +162.6925274112502677 + 21 +33.2686814718743733 + 31 +0.0 + 0 +LINE + 5 +132 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +177.3074175964327424 + 20 +-3.2685439910818701 + 30 +0.0 + 11 +162.6925274112502393 + 21 +33.2686814718743875 + 31 +0.0 + 0 +LINE + 5 +133 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +142.25 + 20 +-10.0 + 30 +0.0 + 11 +172.75 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +134 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +142.25 + 20 +-10.0 + 30 +0.0 + 11 +172.75 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +135 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +175.9784235773670957 + 20 +-16.0323646339493635 + 30 +0.0 + 11 +164.021291997533524 + 21 +-33.9680620036996856 + 31 +0.0 + 0 +LINE + 5 +136 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +175.9784235773670957 + 20 +-16.0323646339493671 + 30 +0.0 + 11 +164.0212919975335524 + 21 +-33.9680620036996856 + 31 +0.0 + 0 +CIRCLE + 5 +137 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +138 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +139 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +13A +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +13B +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 40 +7.25 + 0 +LINE + 5 +13C +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +97.25 + 20 +-10.0 + 30 +0.0 + 11 +127.75 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +13D +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +55.4561810366248622 + 20 +84.7741584070467553 + 30 +0.0 + 11 +124.5438189633751307 + 21 +145.2258415929532589 + 31 +0.0 + 0 +LINE + 5 +13E +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +3.8424923150230548 + 20 +6.147987704036888 + 30 +0.0 + 11 +46.1575076849770198 + 21 +73.8520122959632204 + 31 +0.0 + 0 +LINE + 5 +13F +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +82.79434292361627 + 20 +-9.199371435957362 + 30 +0.0 + 11 +7.2056570763837584 + 21 +-0.8006285640426398 + 31 +0.0 + 0 +LINE + 5 +140 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +4.7182374575557713 + 20 +-5.5046103671484001 + 30 +0.0 + 11 +55.2817625424442269 + 21 +-64.4953896328515981 + 31 +0.0 + 0 +LINE + 5 +141 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +131.191892657963848 + 20 +142.8486440522169687 + 30 +0.0 + 11 +138.808107342036152 + 21 +97.1513559477830313 + 31 +0.0 + 0 +LINE + 5 +142 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.6638014676309183 + 20 +147.1440850853010431 + 30 +0.0 + 11 +193.3361985323691954 + 21 +122.8559149146989142 + 31 +0.0 + 0 +LINE + 5 +143 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +102.4808890160708756 + 20 +85.8312098906745433 + 30 +0.0 + 11 +132.7943429236165116 + 21 +89.1993714359573886 + 31 +0.0 + 0 +LINE + 5 +144 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +132.7943429236162558 + 20 +89.1993714359573602 + 30 +0.0 + 11 +102.4808890160709183 + 21 +85.8312098906745575 + 31 +0.0 + 0 +LINE + 5 +145 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +93.2422985673746894 + 20 +-3.5154028652506106 + 30 +0.0 + 11 +111.7577906237844161 + 21 +33.5155812475688037 + 31 +0.0 + 0 +LINE + 5 +146 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +132.3074362290774673 + 20 +-3.2685365380538922 + 30 +0.0 + 11 +117.6926529620816382 + 21 +33.2687149203720764 + 31 +0.0 + 0 +LINE + 5 +147 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +111.7577906237844161 + 20 +33.5155812475688109 + 30 +0.0 + 11 +93.2422985673746751 + 21 +-3.5154028652506497 + 31 +0.0 + 0 +LINE + 5 +148 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +118.2423877585337948 + 20 +46.4847755170675967 + 30 +0.0 + 11 +136.7577014326253106 + 21 +83.5154028652506213 + 31 +0.0 + 0 +LINE + 5 +149 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +122.2500891911561069 + 20 +40.0001717926068281 + 30 +0.0 + 11 +152.7499450076860228 + 21 +40.0001440705038291 + 31 +0.0 + 0 +LINE + 5 +14A +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.7577014326253106 + 20 +83.5154028652506071 + 30 +0.0 + 11 +118.2423877585337948 + 21 +46.4847755170675754 + 31 +0.0 + 0 +LINE + 5 +14B +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +97.25 + 20 +-10.0 + 30 +0.0 + 11 +127.75 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +14C +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +110.3586620650349914 + 20 +-34.4303944780419897 + 30 +0.0 + 11 +94.64133689756747 + 21 +-15.5696042770809697 + 31 +0.0 + 0 +LINE + 5 +14D +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +110.3586620650350056 + 20 +-34.4303944780420039 + 30 +0.0 + 11 +94.64133689756747 + 21 +-15.5696042770809697 + 31 +0.0 + 0 +LINE + 5 +14E +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +86.7577014326253106 + 20 +-16.4845971347493894 + 30 +0.0 + 11 +63.2422985673747391 + 21 +-63.5154028652505218 + 31 +0.0 + 0 +LINE + 5 +14F +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +67.25 + 20 +-70.0 + 30 +0.0 + 11 +132.75 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +150 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +156.7576592780008582 + 20 +33.5155339272127222 + 30 +0.0 + 11 +138.2422857296822087 + 21 +-3.5153964464201763 + 31 +0.0 + 0 +LINE + 5 +151 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +139.6412667799993415 + 20 +-15.5696627076398872 + 30 +0.0 + 11 +155.3584487949012782 + 21 +-34.4307639300091637 + 31 +0.0 + 0 +LINE + 5 +152 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +119.0215756451814286 + 20 +-33.9676342944709688 + 30 +0.0 + 11 +130.9784233174210613 + 21 +-16.0323644606520013 + 31 +0.0 + 0 +LINE + 5 +153 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.35866310243253 + 20 +-64.4303957229190303 + 30 +0.0 + 11 +119.6413358601699457 + 21 +-45.5696030322039363 + 31 +0.0 + 0 +LINE + 5 +154 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +152.7497155752283788 + 20 +-40.0003577005857167 + 30 +0.0 + 11 +122.2499989622747592 + 21 +-40.000067692186299 + 31 +0.0 + 0 +LINE + 5 +155 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.35866310243253 + 20 +-64.4303957229190303 + 30 +0.0 + 11 +119.6413358601699457 + 21 +-45.5696030322039363 + 31 +0.0 + 0 +LINE + 5 +156 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +155.9781391522677154 + 20 +-46.0327912715984411 + 30 +0.0 + 11 +144.0215764226329043 + 21 +-63.9676353660506365 + 31 +0.0 + 0 +LINE + 5 +157 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +155.9781391522677154 + 20 +-46.0327912715984127 + 30 +0.0 + 11 +144.0215764226329043 + 21 +-63.9676353660506152 + 31 +0.0 + 0 +LINE + 5 +158 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +147.214019629022431 + 20 +-69.2785980370977512 + 30 +0.0 + 11 +232.7859803709775974 + 21 +-60.7214019629022417 + 31 +0.0 + 0 +LINE + 5 +159 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +221.191892657963848 + 20 +52.8486440522169545 + 30 +0.0 + 11 +238.808107342036152 + 21 +-52.848644052216855 + 31 +0.0 + 0 +LINE + 5 +15A +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +163.5969733045182579 + 20 +46.2948882647208393 + 30 +0.0 + 11 +176.4029892374151984 + 21 +68.7052426407277324 + 31 +0.0 + 0 +LINE + 5 +15B +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +157.3073626041157809 + 20 +46.7315934897106047 + 30 +0.0 + 11 +142.6925824035672861 + 21 +83.268543991081799 + 31 +0.0 + 0 +LINE + 5 +15C +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +157.3073626041157809 + 20 +46.7315934897105478 + 30 +0.0 + 11 +142.6925824035672576 + 21 +83.2685439910818701 + 31 +0.0 + 0 +LINE + 5 +15D +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +146.4845971347493787 + 20 +93.2422985673746894 + 30 +0.0 + 11 +193.515402865250536 + 21 +116.757701432625268 + 31 +0.0 + 0 +LINE + 5 +15E +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +146.7883865373755725 + 20 +87.4543550484841603 + 30 +0.0 + 11 +173.2116309968748169 + 21 +77.5456383761719508 + 31 +0.0 + 0 +LINE + 5 +15F +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +146.7883865373755725 + 20 +87.4543550484841603 + 30 +0.0 + 11 +173.2116309968748169 + 21 +77.5456383761719508 + 31 +0.0 + 0 +LINE + 5 +160 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +186.7884040716259904 + 20 +72.4543484731402572 + 30 +0.0 + 11 +213.2116134626243991 + 21 +62.5456449515158539 + 31 +0.0 + 0 +LINE + 5 +161 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +186.7884040716259904 + 20 +72.4543484731402572 + 30 +0.0 + 11 +213.2116134626243138 + 21 +62.5456449515158823 + 31 +0.0 + 0 +LINE + 5 +162 +100 +AcDbEntity +100 +AcDbLine + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +202.2926513036220797 + 20 +113.1220460891337751 + 30 +0.0 + 11 +217.7073486963779203 + 21 +66.8779539108662249 + 31 +0.0 + 0 +CIRCLE + 5 +163 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +240.0 + 20 +-60.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +164 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830385 + 20 +40.0001374807924819 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +165 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +120.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +166 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +0.0 + 20 +0.0 + 30 +0.0 + 40 +7.25 + 0 +HATCH + 5 +167 + 8 +1-NGraph Part 2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +200.0 + 20 +25.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +168 + 8 +1-NGraph Part 1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +70.0 + 20 +35.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +169 + 8 +0-UGrid DG Part2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +6 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +60.0 + 21 +-70.0 + 72 +1 + 10 +60.0 + 20 +-70.0 + 11 +140.0 + 21 +-70.0 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +240.0 + 21 +-60.0 + 72 +1 + 10 +240.0 + 20 +-60.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +140.0 + 21 +90.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +16A + 8 +0-UGrid DG Part1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +8 + 72 +1 + 10 +0.0 + 20 +0.0 + 11 +50.0 + 21 +80.0 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +130.0 + 21 +150.0 + 72 +1 + 10 +130.0 + 20 +150.0 + 11 +200.0 + 21 +120.0 + 72 +1 + 10 +200.0 + 20 +120.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +60.0 + 21 +-70.0 + 72 +1 + 10 +60.0 + 20 +-70.0 + 11 +0.0 + 21 +0.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +16B + 8 +1-NGraph Part1 Elements + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +8 + 72 +1 + 10 +0.0 + 20 +0.0 + 11 +50.0 + 21 +80.0 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +130.0 + 21 +150.0 + 72 +1 + 10 +130.0 + 20 +150.0 + 11 +200.0 + 21 +120.0 + 72 +1 + 10 +200.0 + 20 +120.0 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +60.0 + 21 +-70.0 + 72 +1 + 10 +60.0 + 20 +-70.0 + 11 +0.0 + 21 +0.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +16C + 8 +1-NGraph Part2 Elements + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +7 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +240.0 + 21 +-60.0 + 72 +1 + 10 +240.0 + 20 +-60.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +180.0000175342504178 + 21 +74.9999934246560969 + 72 +1 + 10 +180.0000175342504178 + 20 +74.9999934246560827 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 72 +1 + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 11 +135.0 + 21 +-10.0 + 72 +1 + 10 +135.0 + 20 +-10.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 72 +1 + 10 +114.9999989626024757 + 20 +-39.9999987551229736 + 11 +140.0 + 21 +-70.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +16D + 8 +1-UGrid DG Part2 Ghost2OverlapElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +60.0 + 21 +-70.0 + 72 +1 + 10 +60.0 + 20 +-70.0 + 11 +140.0 + 21 +-70.0 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229736 + 72 +1 + 10 +114.9999989626024757 + 20 +-39.9999987551229736 + 11 +90.0 + 21 +-10.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +16E + 8 +1-UGrid DG Part2 Ghost2OverlapElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 11 +135.0 + 21 +-10.0 + 72 +1 + 10 +135.0 + 20 +-10.0 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229736 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +16F + 8 +1-UGrid DG Part2 Ghost2OverlapElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +68.2762309724051448 + 21 +38.8784803120884277 + 72 +1 + 10 +68.2762309724051448 + 20 +38.8784803120884348 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +170 + 8 +1-UGrid DG Part2 Ghost2OverlapElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +68.2762309724051448 + 21 +38.8784803120884277 + 72 +1 + 10 +68.2762309724051448 + 20 +38.8784803120884277 + 11 +95.2752319396871599 + 21 +85.0305813266319035 + 72 +1 + 10 +95.2752319396871599 + 20 +85.0305813266319035 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +171 + 8 +1-UGrid DG Part2 Ghost2OverlapElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +68.2762309724051448 + 20 +38.8784803120884277 + 11 +95.2752319396871599 + 21 +85.0305813266319035 + 72 +1 + 10 +95.2752319396871599 + 20 +85.0305813266319177 + 11 +50.0 + 21 +80.0 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +68.2762309724051448 + 21 +38.8784803120884348 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +172 + 8 +1-UGrid DG Part2 OverlapElems Example + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +130.0 + 21 +150.0 + 72 +1 + 10 +130.0 + 20 +150.0 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +95.2752319396871599 + 21 +85.0305813266319177 + 72 +1 + 10 +95.2752319396871599 + 20 +85.0305813266319177 + 11 +50.0 + 21 +80.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +173 + 8 +1-UGrid DG Part2 OverlapElems Example + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +95.2752319396871599 + 20 +85.0305813266319035 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +95.2752319396871599 + 21 +85.0305813266319177 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +174 + 8 +1-UGrid DG Part2 GhostElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +159.9997155749006481 + 20 +-40.0004266376490492 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 72 +1 + 10 +114.9999989626024757 + 20 +-39.9999987551229736 + 11 +140.0 + 21 +-70.0 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +159.9997155749006197 + 21 +-40.0004266376490492 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +175 + 8 +1-UGrid DG Part2 GhostElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 11 +135.0 + 21 +-10.0 + 72 +1 + 10 +134.9999999999999716 + 20 +-10.0000000000000249 + 11 +159.9997155749006197 + 21 +-40.0004266376490492 + 72 +1 + 10 +159.9997155749006481 + 20 +-40.0004266376490492 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +176 + 8 +1-UGrid DG Part2 GhostElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +135.0 + 20 +-10.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +135.0 + 21 +-10.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +177 + 8 +1-UGrid DG Part2 GhostElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +1 + 10 +95.2752319396871599 + 20 +85.0305813266319035 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +95.2752319396871599 + 21 +85.0305813266319177 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +178 + 8 +1-UGrid DG Part2 GhostElems + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +130.0 + 21 +150.0 + 72 +1 + 10 +130.0 + 20 +150.0 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +95.2752319396871599 + 21 +85.0305813266319177 + 72 +1 + 10 +95.2752319396871599 + 20 +85.0305813266319177 + 11 +50.0 + 21 +80.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +179 + 8 +1-UGrid DG InitPart2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +6 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +180.0 + 21 +-10.0 + 72 +1 + 10 +180.0 + 20 +-10.0 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +68.2762309724051448 + 21 +38.8784803120884348 + 72 +1 + 10 +68.2762309724051448 + 20 +38.8784803120884348 + 11 +50.0 + 21 +80.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +17A + 8 +1-UGrid DG InitPart1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +8 + 72 +1 + 10 +0.0 + 20 +0.0 + 11 +50.0 + 21 +80.0 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +180.0 + 21 +-10.0 + 72 +1 + 10 +180.0 + 20 +-10.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +240.0 + 21 +-60.0 + 72 +1 + 10 +240.0 + 20 +-60.0 + 11 +140.0 + 21 +-70.0 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +60.0 + 21 +-70.0 + 72 +1 + 10 +60.0 + 20 +-70.0 + 11 +0.0 + 21 +0.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +17B + 8 +1-UGrid DG InitPart1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +7 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +130.0 + 21 +150.0 + 72 +1 + 10 +130.0 + 20 +150.0 + 11 +200.0 + 21 +120.0 + 72 +1 + 10 +200.0 + 20 +120.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +180.0000175342504178 + 21 +74.9999934246560969 + 72 +1 + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +95.2752319396871599 + 21 +85.0305813266319177 + 72 +1 + 10 +95.2752319396871599 + 20 +85.0305813266319177 + 11 +50.0 + 21 +80.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +17C + 8 +1-DGraph InitPart2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +10 + 72 +2 + 10 +181.2827542701893435 + 20 +18.9985228384989568 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +113.7549283045438813 + 20 +7.6683506966121229 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +91.0945840207701991 + 20 +22.6241779239027494 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +179.4699267274874614 + 20 +48.4569704074047252 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +202.1302710112611294 + 20 +53.8954530355103998 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +158.1692031007402761 + 20 +6.7619369252611818 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +136.4152725883175776 + 20 +23.5305916952536904 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +138.2281001310194597 + 20 +55.255073692536854 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +162.2480650718194397 + 20 +67.4916596057746005 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +115.5677558472457633 + 20 +71.5705215768539063 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +17D + 8 +1-DGraph InitPart2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +2 + 72 +2 + 10 +94.2670322204983933 + 20 +55.8350883152182789 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +70.2470672796984132 + 20 +67.9448664914501137 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +17E + 8 +1-DGraph InitPart1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +136.4152725883174639 + 20 +-29.0414070431012306 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +17F + 8 +1-DGraph InitPart1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +158.1692031007402193 + 20 +-21.3368899866181749 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +180 + 8 +1-DGraph InitPart1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +138.6813070166948307 + 20 +-51.2485444411994138 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +181 + 8 +1-DGraph InitPart1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +114.2081351902192807 + 20 +-21.3368899866181749 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +182 + 8 +1-DGraph InitPart1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +46.6803092245737332 + 20 +22.624177923902721 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +183 + 8 +1-DGraph InitPart1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +110.1292732191399608 + 20 +106.9206586595407487 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +184 + 8 +1-DGraph InitPart1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +155.9031686723627672 + 20 +118.7040376871030105 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +185 + 8 +1-DGraph InitPart1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +188.5340644409968149 + 20 +91.0584176608991527 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +186 + 8 +1-DGraph InitPart1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +209.8347880677440287 + 20 +-2.3022007882482916 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +187 + 8 +1-DGraph InitPart1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +185.3616162412685071 + 20 +-43.544027384716351 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +188 + 8 +1-DGraph InitPart1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +95.6266528775248332 + 20 +-47.6228893557956141 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +189 + 8 +1-DGraph InitPart1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +52.5719987383548784 + 20 +-28.134993271750254 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +18A + 8 +1-UGrid NGraph Part1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +8 + 72 +1 + 10 +0.0 + 20 +0.0 + 11 +50.0 + 21 +80.0 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +130.0 + 21 +150.0 + 72 +1 + 10 +130.0 + 20 +150.0 + 11 +200.0 + 21 +120.0 + 72 +1 + 10 +200.0 + 20 +120.0 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823181967 + 11 +90.0 + 21 +-10.0 + 72 +1 + 10 +90.0 + 20 +-10.0 + 11 +60.0 + 21 +-70.0 + 72 +1 + 10 +60.0 + 20 +-70.0 + 11 +0.0 + 21 +0.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +18B + 8 +1-UGrid NGraph Part2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +7 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +240.0 + 21 +-60.0 + 72 +1 + 10 +240.0 + 20 +-60.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +180.0000175342504178 + 21 +74.9999934246560969 + 72 +1 + 10 +180.0000175342504178 + 20 +74.9999934246560827 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 72 +1 + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 11 +135.0 + 21 +-10.0 + 72 +1 + 10 +135.0 + 20 +-10.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 72 +1 + 10 +114.9999989626024757 + 20 +-39.9999987551229736 + 11 +140.0 + 21 +-70.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +18C + 8 +1-DGraph Part2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +155.9031686723627672 + 20 +118.7040376871030105 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +18D + 8 +1-DGraph Part2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +188.5340644409968149 + 20 +91.0584176608991527 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +18E + 8 +1-DGraph Part2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +162.2480650718194397 + 20 +67.4916596057746005 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +18F + 8 +1-DGraph Part2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +202.1302710112611294 + 20 +53.8954530355103998 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +190 + 8 +1-DGraph Part2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +179.4699267274874614 + 20 +48.4569704074047252 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +191 + 8 +1-DGraph Part2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +138.2281001310194597 + 20 +55.255073692536854 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +192 + 8 +1-DGraph Part2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +136.4152725883175776 + 20 +23.5305916952536904 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +193 + 8 +1-DGraph Part2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +181.2827542701893435 + 20 +18.9985228384989568 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +194 + 8 +1-DGraph Part2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +158.1692031007402761 + 20 +6.7619369252611818 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +195 + 8 +1-DGraph Part2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +209.8347880677440287 + 20 +-2.3022007882482916 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +196 + 8 +1-DGraph Part2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +185.3616162412685071 + 20 +-43.544027384716351 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +197 + 8 +1-DGraph Part2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +158.1692031007402193 + 20 +-21.3368899866181749 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +198 + 8 +1-DGraph Part1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +110.1292732191399608 + 20 +106.9206586595407487 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +199 + 8 +1-DGraph Part1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +115.5677558472457633 + 20 +71.5705215768539063 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +19A + 8 +1-DGraph Part1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +70.2470672796984132 + 20 +67.9448664914501137 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +19B + 8 +1-DGraph Part1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +94.2670322204983933 + 20 +55.8350883152182789 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +19C + 8 +1-DGraph Part1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +46.6803092245737332 + 20 +22.624177923902721 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +19D + 8 +1-DGraph Part1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +91.0945840207701991 + 20 +22.6241779239027494 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +19E + 8 +1-DGraph Part1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +113.7549283045438813 + 20 +7.6683506966121229 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +19F + 8 +1-DGraph Part1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +114.2081351902192807 + 20 +-21.3368899866181749 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1A0 + 8 +1-DGraph Part1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +136.4152725883174639 + 20 +-29.0414070431012306 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1A1 + 8 +1-DGraph Part1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +138.6813070166948307 + 20 +-51.2485444411994138 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1A2 + 8 +1-DGraph Part1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +95.6266528775248332 + 20 +-47.6228893557956141 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1A3 + 8 +1-DGraph Part1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +52.5719987383548784 + 20 +-28.134993271750254 + 40 +7.2874765306784965 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1A4 + 8 +1-NGraph Part 2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +140.0 + 20 +-70.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1A5 + 8 +1-NGraph Part 2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1A6 + 8 +1-NGraph Part 2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1A7 + 8 +1-NGraph Part 2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +240.0 + 20 +-60.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1A8 + 8 +1-NGraph Part 2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +180.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1A9 + 8 +1-NGraph Part 2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +135.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1AA + 8 +1-NGraph Part 2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +159.9999450076830385 + 20 +40.0001374807924819 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1AB + 8 +1-NGraph Part 2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +220.0 + 20 +60.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1AC + 8 +1-NGraph Part 2 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1AD + 8 +1-UGrid DG Part2 + 62 +256 +370 +25 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +9 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +240.0 + 21 +-60.0 + 72 +1 + 10 +240.0 + 20 +-60.0 + 11 +220.0 + 21 +60.0 + 72 +1 + 10 +220.0 + 20 +60.0 + 11 +200.0 + 21 +120.0 + 72 +1 + 10 +200.0 + 20 +120.0 + 11 +130.0 + 21 +150.0 + 72 +1 + 10 +130.0 + 20 +150.0 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +135.0 + 21 +-10.0 + 72 +1 + 10 +135.0 + 20 +-10.0 + 11 +159.9997155749006481 + 21 +-40.0004266376490492 + 72 +1 + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 11 +140.0 + 21 +-70.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1AE + 8 +1-NGraph Part 1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +200.0 + 20 +120.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1AF + 8 +1-NGraph Part 1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +130.0 + 20 +150.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1B0 + 8 +1-NGraph Part 1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +140.0 + 20 +90.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1B1 + 8 +1-NGraph Part 1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +95.2752319396871599 + 20 +85.0305813266319035 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1B2 + 8 +1-NGraph Part 1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1B3 + 8 +1-NGraph Part 1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +50.0 + 20 +80.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1B4 + 8 +1-NGraph Part 1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +90.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1B5 + 8 +1-NGraph Part 1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +60.0 + 20 +-70.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1B6 + 8 +1-NGraph Part 1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +0.0 + 20 +0.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +1B7 + 8 +1-UGrid DG Part1 + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +9 + 72 +1 + 10 +0.0 + 20 +0.0 + 11 +50.0 + 21 +80.0 + 72 +1 + 10 +50.0 + 20 +80.0 + 11 +130.0 + 21 +150.0 + 72 +1 + 10 +130.0 + 20 +150.0 + 11 +140.0 + 21 +90.0 + 72 +1 + 10 +140.0 + 20 +90.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 72 +1 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 11 +135.0 + 21 +-10.0 + 72 +1 + 10 +135.0 + 20 +-10.0 + 11 +159.9997155749006481 + 21 +-40.0004266376490492 + 72 +1 + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 11 +140.0 + 21 +-70.0 + 72 +1 + 10 +140.0 + 20 +-70.0 + 11 +60.0 + 21 +-70.0 + 72 +1 + 10 +60.0 + 20 +-70.0 + 11 +0.0 + 21 +0.0 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +LINE + 5 +1B8 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +137.5000391911498241 + 20 +40.0001579315352487 + 30 +0.0 + 11 +127.5000445955795527 + 21 +65.0000891911591054 + 31 +0.0 + 0 +LINE + 5 +1B9 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +127.5000445955795527 + 20 +65.0000891911591054 + 30 +0.0 + 11 +149.9999725038415193 + 21 +65.0000687403962303 + 31 +0.0 + 0 +LINE + 5 +1BA +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +149.9999725038415193 + 20 +65.0000687403962303 + 30 +0.0 + 11 +137.5000391911498241 + 21 +40.0001579315352487 + 31 +0.0 + 0 +LINE + 5 +1BB +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +125.000040987657556 + 20 +15.000098211036514 + 30 +0.0 + 11 +137.5000391911498241 + 21 +40.0001579315352558 + 31 +0.0 + 0 +LINE + 5 +1BC +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +137.5000391911498241 + 20 +40.0001579315352558 + 30 +0.0 + 11 +147.4999729933480523 + 21 +15.0000697194141779 + 31 +0.0 + 0 +LINE + 5 +1BD +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +147.4999729933480523 + 20 +15.0000697194141779 + 30 +0.0 + 11 +125.000040987657556 + 21 +15.0000982110365175 + 31 +0.0 + 0 +LINE + 5 +1BE +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +102.5001337867386582 + 20 +15.0002675734773092 + 30 +0.0 + 11 +125.000040987657556 + 21 +15.000098211036514 + 31 +0.0 + 0 +LINE + 5 +1BF +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +125.000040987657556 + 20 +15.000098211036514 + 30 +0.0 + 11 +112.5 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +1C0 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +112.5 + 20 +-10.0 + 30 +0.0 + 11 +102.5001337867386582 + 21 +15.0002675734773092 + 31 +0.0 + 0 +LINE + 5 +1C1 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +102.5001337867386582 + 20 +15.0002675734773092 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823181967 + 31 +0.0 + 0 +LINE + 5 +1C2 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823181967 + 30 +0.0 + 11 +125.000040987657556 + 21 +15.0000982110365051 + 31 +0.0 + 0 +LINE + 5 +1C3 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +125.000040987657556 + 20 +15.0000982110365051 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +1C4 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +112.5 + 21 +-10.0000000000000071 + 31 +0.0 + 0 +LINE + 5 +1C5 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +112.5 + 20 +-10.0000000000000071 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +1C6 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +102.5001337867386582 + 21 +15.0002675734773092 + 31 +0.0 + 0 +LINE + 5 +1C7 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +147.4999729933480523 + 21 +15.0000697194141779 + 31 +0.0 + 0 +LINE + 5 +1C8 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +147.4999729933480523 + 20 +15.0000697194141779 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +1C9 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 30 +0.0 + 11 +137.5000391911498241 + 21 +40.0001579315352487 + 31 +0.0 + 0 +LINE + 5 +1CA +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +137.5000391911498241 + 20 +40.0001579315352487 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +1CB +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +127.5000445955795527 + 21 +65.0000891911591054 + 31 +0.0 + 0 +LINE + 5 +1CC +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +127.5000445955795527 + 20 +65.0000891911591054 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +1CD +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +149.9999725038414908 + 21 +65.0000687403962303 + 31 +0.0 + 0 +LINE + 5 +1CE +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +149.9999725038414908 + 20 +65.0000687403962303 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 31 +0.0 + 0 +CIRCLE + 5 +1CF +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +52.5719987383548784 + 20 +-28.134993271750254 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +1D0 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +181.2827542701893435 + 20 +18.9985228384989568 + 30 +0.0 + 40 +7.2874765306784965 + 0 +LINE + 5 +1D1 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +117.0663894873990358 + 20 +109.1530860527262945 + 30 +0.0 + 11 +148.7002692329466527 + 21 +117.5969903300089641 + 31 +0.0 + 0 +LINE + 5 +1D2 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +161.0733551532779018 + 20 +113.5682333744610162 + 30 +0.0 + 11 +183.575801274210761 + 21 +96.3991049344701025 + 31 +0.0 + 0 +LINE + 5 +1D3 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +111.4015211376070482 + 20 +99.7450960043097297 + 30 +0.0 + 11 +114.6096243571640798 + 21 +78.7947376750131951 + 31 +0.0 + 0 +LINE + 5 +1D4 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +104.7580067637884156 + 20 +101.9955382700674988 + 30 +0.0 + 11 +73.4966925114486571 + 21 +74.4676918024915011 + 31 +0.0 + 0 +LINE + 5 +1D5 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +76.1931188188140851 + 20 +63.7315797365080812 + 30 +0.0 + 11 +87.7164915187649541 + 21 +59.028476907313447 + 31 +0.0 + 0 +LINE + 5 +1D6 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +99.9946576622824495 + 20 +60.3408203294217245 + 30 +0.0 + 11 +109.7743838396840061 + 21 +67.1496444051616521 + 31 +0.0 + 0 +LINE + 5 +1D7 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +93.8672244689266648 + 20 +48.5585872366109896 + 30 +0.0 + 11 +91.9421374946896321 + 21 +29.8622002569739173 + 31 +0.0 + 0 +LINE + 5 +1D8 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +83.8177055517509757 + 20 +23.0170569540308065 + 30 +0.0 + 11 +53.9557632499493138 + 21 +22.2057488261619973 + 31 +0.0 + 0 +LINE + 5 +1D9 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +49.7188011688338634 + 20 +29.2479895825971461 + 30 +0.0 + 11 +66.5392470092963038 + 21 +61.6711608060050978 + 31 +0.0 + 0 +LINE + 5 +1DA +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +47.3738399774666519 + 20 +15.3697772401810333 + 30 +0.0 + 11 +51.2134059390515759 + 21 +-20.9752768115214607 + 31 +0.0 + 0 +LINE + 5 +1DB +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +59.1418092734212308 + 20 +-31.2885474124811616 + 30 +0.0 + 11 +89.0254225905666345 + 21 +-44.5356457820334768 + 31 +0.0 + 0 +LINE + 5 +1DC +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +102.82615361453243 + 20 +-48.7518283811716628 + 30 +0.0 + 11 +131.4457510050113456 + 21 +-52.1169011576361143 + 31 +0.0 + 0 +LINE + 5 +1DD +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +100.9400792490871197 + 20 +-42.6354236286776498 + 30 +0.0 + 11 +110.6217882398498631 + 21 +-27.6808185594164122 + 31 +0.0 + 0 +LINE + 5 +1DE +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.2081351902193518 + 20 +-14.0494134559396784 + 30 +0.0 + 11 +113.7549283045438671 + 21 +0.3808741659336263 + 31 +0.0 + 0 +LINE + 5 +1DF +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +107.3268652768313984 + 20 +11.101617347623332 + 30 +0.0 + 11 +96.4243139969763803 + 21 +17.6541384305064355 + 31 +0.0 + 0 +LINE + 5 +1E0 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +118.5132464992991288 + 20 +13.1879269613856334 + 30 +0.0 + 11 +130.0970234639306398 + 21 +19.8991949684592058 + 31 +0.0 + 0 +LINE + 5 +1E1 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.0855588401563239 + 20 +30.8106056395716124 + 30 +0.0 + 11 +137.8220691226858037 + 21 +47.9789172205070358 + 31 +0.0 + 0 +LINE + 5 +1E2 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +132.0621934632773105 + 20 +59.1395182023584027 + 30 +0.0 + 11 +121.3611278548075205 + 21 +67.1496444051616521 + 31 +0.0 + 0 +LINE + 5 +1E3 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +144.4965281535111501 + 20 +58.9718093990447585 + 30 +0.0 + 11 +155.7949987523801099 + 21 +64.1056222075600175 + 31 +0.0 + 0 +LINE + 5 +1E4 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +167.1546350932089524 + 20 +72.8798768258197924 + 30 +0.0 + 11 +183.5919051473148897 + 21 +85.7028247244388837 + 31 +0.0 + 0 +LINE + 5 +1E5 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +191.9777200706736835 + 20 +84.6359142479468005 + 30 +0.0 + 11 +199.5826106269433353 + 21 +60.7230983654442582 + 31 +0.0 + 0 +LINE + 5 +1E6 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +195.6772046918217995 + 20 +50.5094156372958167 + 30 +0.0 + 11 +186.7427469334054138 + 21 +48.9189232595242203 + 31 +0.0 + 0 +LINE + 5 +1E7 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +174.5263069457357687 + 20 +53.81121523171592 + 30 +0.0 + 11 +167.035383749864053 + 21 +61.997217499424309 + 31 +0.0 + 0 +LINE + 5 +1E8 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +179.8998733536512589 + 20 +41.1821879306676877 + 30 +0.0 + 11 +181.2827542701894288 + 21 +26.2859993691774534 + 31 +0.0 + 0 +LINE + 5 +1E9 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +175.0593242544883594 + 20 +15.2069225134565205 + 30 +0.0 + 11 +164.4644808926549047 + 21 +10.4330119323696628 + 31 +0.0 + 0 +LINE + 5 +1EA +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +152.1242734909995988 + 20 +10.832089280944011 + 30 +0.0 + 11 +141.7706840980021923 + 21 +18.58823580487838 + 31 +0.0 + 0 +LINE + 5 +1EB +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +157.3608962054955498 + 20 +-0.4805732851761988 + 30 +0.0 + 11 +158.1692031007402761 + 21 +-14.0494134559396784 + 31 +0.0 + 0 +LINE + 5 +1EC +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +151.7248965217239629 + 20 +-24.7395693574725435 + 30 +0.0 + 11 +143.4767985681490643 + 21 +-27.2408057487128161 + 31 +0.0 + 0 +LINE + 5 +1ED +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +129.5110029981215121 + 20 +-26.7093745366628212 + 30 +0.0 + 11 +120.8402730543294723 + 21 +-24.3571650629358594 + 31 +0.0 + 0 +LINE + 5 +1EE +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +137.3834732802219492 + 20 +-36.264280543681565 + 30 +0.0 + 11 +137.8337535427754688 + 21 +-44.0105221081282352 + 31 +0.0 + 0 +LINE + 5 +1EF +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +145.8374171398901069 + 20 +-49.8710822493799668 + 30 +0.0 + 11 +178.2862246910513022 + 21 +-45.2893493023879969 + 31 +0.0 + 0 +LINE + 5 +1F0 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.4179964595168428 + 20 +-38.1897825604051349 + 30 +0.0 + 11 +163.3369343428615252 + 21 +-26.4751647938266643 + 31 +0.0 + 0 +LINE + 5 +1F1 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +189.2810776738391496 + 20 +-37.4003203389840166 + 30 +0.0 + 11 +206.4546341387568589 + 21 +-8.758350848581653 + 31 +0.0 + 0 +LINE + 5 +1F2 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +203.8435861455147631 + 20 +1.8466320249976524 + 30 +0.0 + 11 +186.9211438584256371 + 21 +14.3816107712771277 + 31 +0.0 + 0 +LINE + 5 +1F3 +100 +AcDbEntity +100 +AcDbLine + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +208.969243761796406 + 20 +4.9336921932455304 + 30 +0.0 + 11 +203.7178530796088296 + 21 +46.7830063846418867 + 31 +0.0 + 0 +CIRCLE + 5 +1F4 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.6266528775248332 + 20 +-47.6228893557956141 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +1F5 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +185.3616162412685071 + 20 +-43.544027384716351 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +1F6 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +209.8347880677440287 + 20 +-2.3022007882482916 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +1F7 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.4152725883174639 + 20 +-29.0414070431012306 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +1F8 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +138.6813070166948307 + 20 +-51.2485444411994138 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +1F9 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +158.1692031007402193 + 20 +-21.3368899866181749 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +1FA +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.2081351902192807 + 20 +-21.3368899866181749 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +1FB +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +113.7549283045438813 + 20 +7.6683506966121229 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +1FC +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +91.0945840207701991 + 20 +22.6241779239027494 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +1FD +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +181.2827542701893435 + 20 +18.9985228384989568 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +1FE +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +179.4699267274874614 + 20 +48.4569704074047252 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +1FF +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +202.1302710112611294 + 20 +53.8954530355103998 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +200 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +158.1692031007402761 + 20 +6.7619369252611818 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +201 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.4152725883175776 + 20 +23.5305916952536904 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +202 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +138.2281001310194597 + 20 +55.255073692536854 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +203 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +162.2480650718194397 + 20 +67.4916596057746005 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +204 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +188.5340644409968149 + 20 +91.0584176608991527 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +205 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +155.9031686723627672 + 20 +118.7040376871030105 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +206 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +110.1292732191399608 + 20 +106.9206586595407487 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +207 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.5677558472457633 + 20 +71.5705215768539063 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +208 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +94.2670322204983933 + 20 +55.8350883152182789 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +209 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.2470672796984132 + 20 +67.9448664914501137 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +20A +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +46.6803092245737332 + 20 +22.624177923902721 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +20B +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +138.2281001310194597 + 20 +55.255073692536854 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +20C +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.4152725883175776 + 20 +23.5305916952536904 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +20D +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +113.7549283045438813 + 20 +7.6683506966121229 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +20E +100 +AcDbEntity +100 +AcDbCircle + 8 +1-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +158.1692031007402761 + 20 +6.7619369252611818 + 30 +0.0 + 40 +7.2874765306784965 + 0 +LINE + 5 +20F +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +0.0 + 20 +0.0 + 30 +0.0 + 11 +50.0 + 21 +80.0 + 31 +0.0 + 0 +LINE + 5 +210 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +211 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +0.0 + 21 +0.0 + 31 +0.0 + 0 +LINE + 5 +212 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +213 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +214 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +215 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +216 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +60.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +217 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +60.0 + 20 +-70.0 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +218 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +0.0 + 20 +0.0 + 30 +0.0 + 11 +60.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +219 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 11 +240.0 + 21 +-60.0 + 31 +0.0 + 0 +LINE + 5 +21A +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +240.0 + 20 +-60.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +21B +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +240.0 + 21 +-60.0 + 31 +0.0 + 0 +LINE + 5 +21C +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +130.0 + 21 +150.0 + 31 +0.0 + 0 +LINE + 5 +21D +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +21E +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +120.0 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +CIRCLE + 5 +21F +100 +AcDbEntity +100 +AcDbCircle + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +52.5719987383548784 + 20 +-28.134993271750254 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +220 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.6266528775248332 + 20 +-47.6228893557956141 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +221 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +185.3616162412685071 + 20 +-43.544027384716351 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +222 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +209.8347880677440287 + 20 +-2.3022007882482916 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +223 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.4152725883174639 + 20 +-29.0414070431012306 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +224 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +179.4699267274874614 + 20 +48.4569704074047252 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +225 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.4152725883175776 + 20 +23.5305916952536904 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +226 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +188.5340644409968149 + 20 +91.0584176608991527 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +227 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +155.9031686723627672 + 20 +118.7040376871030105 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +228 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +110.1292732191399608 + 20 +106.9206586595407487 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +229 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +94.2670322204983933 + 20 +55.8350883152182789 + 30 +0.0 + 40 +7.2874765306784965 + 0 +CIRCLE + 5 +22A +100 +AcDbEntity +100 +AcDbCircle + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +46.6803092245737332 + 20 +22.624177923902721 + 30 +0.0 + 40 +7.2874765306784965 + 0 +LINE + 5 +22B +100 +AcDbEntity +100 +AcDbLine + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +116.9224286389353722 + 20 +109.5589068714597971 + 30 +0.0 + 11 +149.0725566084316824 + 21 +116.1643422295197325 + 31 +0.0 + 0 +LINE + 5 +22C +100 +AcDbEntity +100 +AcDbLine + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +161.1561976051828822 + 20 +113.6529980697425799 + 30 +0.0 + 11 +183.0935634081621686 + 21 +95.9069496755315214 + 31 +0.0 + 0 +LINE + 5 +22D +100 +AcDbEntity +100 +AcDbLine + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +186.6766076979713489 + 20 +84.0116333848637993 + 30 +0.0 + 11 +181.6498348866109041 + 21 +55.4107689810604924 + 31 +0.0 + 0 +LINE + 5 +22E +100 +AcDbEntity +100 +AcDbLine + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +173.5676709696586784 + 20 +44.1825475043256759 + 30 +0.0 + 11 +142.893245413748275 + 21 +26.8687322342621044 + 31 +0.0 + 0 +LINE + 5 +22F +100 +AcDbEntity +100 +AcDbLine + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +129.8819964583924218 + 20 +26.7591544088059727 + 30 +0.0 + 11 +99.4569941016231382 + 21 +50.719268746697324 + 31 +0.0 + 0 +LINE + 5 +230 +100 +AcDbEntity +100 +AcDbLine + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +96.7980774373386197 + 20 +62.6689104006621278 + 30 +0.0 + 11 +108.0352555588045362 + 21 +99.9405150920062511 + 31 +0.0 + 0 +LINE + 5 +231 +100 +AcDbEntity +100 +AcDbLine + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +88.3229909309385732 + 20 +51.618966005180539 + 30 +0.0 + 11 +52.9344629061442333 + 21 +26.3648831932988585 + 31 +0.0 + 0 +LINE + 5 +232 +100 +AcDbEntity +100 +AcDbLine + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +47.7009386051260691 + 20 +15.4085261963909748 + 30 +0.0 + 11 +51.6158010891128001 + 21 +-20.9105209560185479 + 31 +0.0 + 0 +LINE + 5 +233 +100 +AcDbEntity +100 +AcDbLine + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +58.891290414668795 + 20 +-31.7645754646285887 + 30 +0.0 + 11 +88.7931687907969405 + 21 +-45.0909317294466874 + 31 +0.0 + 0 +LINE + 5 +234 +100 +AcDbEntity +100 +AcDbLine + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +102.4209663878701235 + 20 +-44.9876250221225433 + 30 +0.0 + 11 +130.0249121618746244 + 21 +-32.5443497781945723 + 31 +0.0 + 0 +LINE + 5 +235 +100 +AcDbEntity +100 +AcDbLine + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.5341927063395246 + 20 +-21.7549008713671057 + 30 +0.0 + 11 +136.5664881169093974 + 21 +16.2446841986474766 + 31 +0.0 + 0 +LINE + 5 +236 +100 +AcDbEntity +100 +AcDbLine + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +143.1815100811218144 + 20 +-31.7479443837190303 + 30 +0.0 + 11 +178.3367605437638304 + 21 +-41.605286397780219 + 31 +0.0 + 0 +LINE + 5 +237 +100 +AcDbEntity +100 +AcDbLine + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +189.9953946806359966 + 20 +-37.91949082069236 + 30 +0.0 + 11 +206.3034992574559965 + 21 +-8.6769410593122434 + 31 +0.0 + 0 +LINE + 5 +238 +100 +AcDbEntity +100 +AcDbLine + 8 +0-DGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +206.3624939160768292 + 20 +4.1048646483995688 + 30 +0.0 + 11 +183.3135422971571415 + 21 +42.2655300630435917 + 31 +0.0 + 0 +CIRCLE + 5 +239 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +0.0 + 20 +0.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +23A +100 +AcDbEntity +100 +AcDbCircle + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +120.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +23B +100 +AcDbEntity +100 +AcDbCircle + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +23C +100 +AcDbEntity +100 +AcDbCircle + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +23D +100 +AcDbEntity +100 +AcDbCircle + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +23E +100 +AcDbEntity +100 +AcDbCircle + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +240.0 + 20 +-60.0 + 30 +0.0 + 40 +7.25 + 0 +LINE + 5 +23F +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +202.2926513036220797 + 20 +113.1220460891337751 + 30 +0.0 + 11 +217.7073486963779203 + 21 +66.8779539108662249 + 31 +0.0 + 0 +LINE + 5 +240 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +146.7883865373755725 + 20 +87.4543550484841603 + 30 +0.0 + 11 +173.2116309968748169 + 21 +77.5456383761719508 + 31 +0.0 + 0 +LINE + 5 +241 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +146.4845971347493787 + 20 +93.2422985673746894 + 30 +0.0 + 11 +193.515402865250536 + 21 +116.757701432625268 + 31 +0.0 + 0 +LINE + 5 +242 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +221.191892657963848 + 20 +52.8486440522169545 + 30 +0.0 + 11 +238.808107342036152 + 21 +-52.848644052216855 + 31 +0.0 + 0 +LINE + 5 +243 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +147.214019629022431 + 20 +-69.2785980370977512 + 30 +0.0 + 11 +232.7859803709775974 + 21 +-60.7214019629022417 + 31 +0.0 + 0 +LINE + 5 +244 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +155.9781391522677154 + 20 +-46.0327912715984127 + 30 +0.0 + 11 +144.0215764226329043 + 21 +-63.9676353660506152 + 31 +0.0 + 0 +LINE + 5 +245 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.35866310243253 + 20 +-64.4303957229190303 + 30 +0.0 + 11 +119.6413358601699457 + 21 +-45.5696030322039363 + 31 +0.0 + 0 +LINE + 5 +246 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +67.25 + 20 +-70.0 + 30 +0.0 + 11 +132.75 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +247 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +86.7577014326253106 + 20 +-16.4845971347493894 + 30 +0.0 + 11 +63.2422985673747391 + 21 +-63.5154028652505218 + 31 +0.0 + 0 +LINE + 5 +248 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +111.7577906237844161 + 20 +33.5155812475688109 + 30 +0.0 + 11 +93.2422985673746751 + 21 +-3.5154028652506497 + 31 +0.0 + 0 +LINE + 5 +249 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.6638014676309183 + 20 +147.1440850853010431 + 30 +0.0 + 11 +193.3361985323691954 + 21 +122.8559149146989142 + 31 +0.0 + 0 +LINE + 5 +24A +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +131.191892657963848 + 20 +142.8486440522169687 + 30 +0.0 + 11 +138.808107342036152 + 21 +97.1513559477830313 + 31 +0.0 + 0 +LINE + 5 +24B +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +4.7182374575557713 + 20 +-5.5046103671484001 + 30 +0.0 + 11 +55.2817625424442269 + 21 +-64.4953896328515981 + 31 +0.0 + 0 +LINE + 5 +24C +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +82.79434292361627 + 20 +-9.199371435957362 + 30 +0.0 + 11 +7.2056570763837584 + 21 +-0.8006285640426398 + 31 +0.0 + 0 +LINE + 5 +24D +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +3.8424923150230548 + 20 +6.147987704036888 + 30 +0.0 + 11 +46.1575076849770198 + 21 +73.8520122959632204 + 31 +0.0 + 0 +LINE + 5 +24E +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +52.9445038788874953 + 20 +73.3748662725031409 + 30 +0.0 + 11 +65.3317270935176424 + 21 +45.5036140395853081 + 31 +0.0 + 0 +LINE + 5 +24F +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +55.4561810366248622 + 20 +84.7741584070467553 + 30 +0.0 + 11 +124.5438189633751307 + 21 +145.2258415929532589 + 31 +0.0 + 0 +LINE + 5 +250 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +88.0695748633034157 + 20 +84.2299527625892779 + 30 +0.0 + 11 +57.2056570763837442 + 21 +80.8006285640426398 + 31 +0.0 + 0 +LINE + 5 +251 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +97.25 + 20 +-10.0 + 30 +0.0 + 11 +127.75 + 21 +-10.0 + 31 +0.0 + 0 +CIRCLE + 5 +252 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 40 +7.25 + 0 +LINE + 5 +253 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +177.3074175964327424 + 20 +-3.2685439910818701 + 30 +0.0 + 11 +162.6925274112502393 + 21 +33.2686814718743875 + 31 +0.0 + 0 +LINE + 5 +254 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +234.4303957229190303 + 20 +-55.3586631024325229 + 30 +0.0 + 11 +185.5696042770808845 + 21 +-14.6413368975674132 + 31 +0.0 + 0 +LINE + 5 +255 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +197.598048143516877 + 20 +20.7965842511545489 + 30 +0.0 + 11 +183.5970073030870537 + 21 +-3.7052372195976488 + 31 +0.0 + 0 +CIRCLE + 5 +256 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 40 +7.25 + 0 +LINE + 5 +257 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +146.7883865373755725 + 20 +87.4543550484841603 + 30 +0.0 + 11 +213.2116134626243138 + 21 +62.5456449515158965 + 31 +0.0 + 0 +LINE + 5 +258 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +93.2422985673746894 + 20 +-3.5154028652506106 + 30 +0.0 + 11 +136.7577014326253106 + 21 +83.515402865250536 + 31 +0.0 + 0 +LINE + 5 +259 +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +57.2056570763837371 + 20 +80.8006285640426398 + 30 +0.0 + 11 +132.7943429236163126 + 21 +89.199371435957346 + 31 +0.0 + 0 +LINE + 5 +25A +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +177.3074175964327424 + 20 +-3.2685439910818692 + 30 +0.0 + 11 +142.6925824035672576 + 21 +83.2685439910819838 + 31 +0.0 + 0 +LINE + 5 +25B +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +216.4029926969129178 + 20 +53.7052372195976488 + 30 +0.0 + 11 +183.5970073030870537 + 21 +-3.7052372195976488 + 31 +0.0 + 0 +LINE + 5 +25C +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +175.9784235773671242 + 20 +-16.0323646339493777 + 30 +0.0 + 11 +144.0215764226329043 + 21 +-63.9676353660506365 + 31 +0.0 + 0 +LINE + 5 +25D +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +97.25 + 20 +-10.0 + 30 +0.0 + 11 +172.75 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +25E +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.35866310243253 + 20 +-64.4303957229190303 + 30 +0.0 + 11 +94.6413368975674985 + 21 +-15.5696042770809981 + 31 +0.0 + 0 +LINE + 5 +25F +100 +AcDbEntity +100 +AcDbLine + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +52.9445038788874953 + 20 +73.3748662725031409 + 30 +0.0 + 11 +87.0554961211124407 + 21 +-3.374866272503013 + 31 +0.0 + 0 +LINE + 5 +260 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +261 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +120.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +262 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +120.0 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +LINE + 5 +263 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +240.0 + 21 +-60.0 + 31 +0.0 + 0 +LINE + 5 +264 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +240.0 + 20 +-60.0 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +265 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +240.0 + 20 +-60.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +266 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +267 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +LINE + 5 +268 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +269 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +159.9997155749006481 + 21 +-40.000426637649042 + 31 +0.0 + 0 +LINE + 5 +26A +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +159.9999450076830385 + 21 +40.0001374807924819 + 31 +0.0 + 0 +LINE + 5 +26B +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830385 + 20 +40.0001374807924819 + 30 +0.0 + 11 +180.0000175342504178 + 21 +74.9999934246560827 + 31 +0.0 + 0 +LINE + 5 +26C +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924748 + 31 +0.0 + 0 +LINE + 5 +26D +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +26E +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 GhostEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +50.0 + 21 +80.0 + 31 +0.0 + 0 +LINE + 5 +26F +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 GhostEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +270 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 GhostEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.2752319396871599 + 20 +85.0305813266319035 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182109 + 31 +0.0 + 0 +LINE + 5 +271 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 GhostEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182109 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +272 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 GhostEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +134.9999999999999432 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +273 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 GhostEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +134.9999999999999432 + 20 +-10.0 + 30 +0.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 31 +0.0 + 0 +LINE + 5 +274 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 GhostEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +HATCH + 5 +275 + 8 +1-UGrid DG Part2 GhostVertices + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +2 + 10 +95.2752319396871599 + 20 +85.0305813266319035 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +50.0 + 20 +80.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +90.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +LINE + 5 +276 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 OverlapEdges Example + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.2752319396871599 + 20 +85.0305813266319035 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +277 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 OverlapEdges Example + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +130.0 + 21 +150.0 + 31 +0.0 + 0 +LINE + 5 +278 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 FrontEdges Example + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +95.2752319396871599 + 21 +85.0305813266319035 + 31 +0.0 + 0 +LINE + 5 +279 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 FrontEdges Example + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.2752319396871599 + 20 +85.0305813266319035 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +27A +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 FrontEdges Example + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +27B +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 FrontEdges Example + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +27C +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 FrontEdges Example + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 31 +0.0 + 0 +LINE + 5 +27D +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 FrontEdges Example + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +27E +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 OverlapEdges Example + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 30 +0.0 + 11 +159.9997155749006197 + 21 +-40.0004266376490278 + 31 +0.0 + 0 +LINE + 5 +27F +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 Ghost2OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +60.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +280 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 Ghost2OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +60.0 + 20 +-70.0 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +281 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 Ghost2OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 31 +0.0 + 0 +CIRCLE + 5 +282 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-UGrid Mark UpAdj Vertex + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 40 +7.25 + 0 +LINE + 5 +283 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +127.5000445955795527 + 21 +65.0000891911591054 + 31 +0.0 + 0 +LINE + 5 +284 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +127.5000445955795527 + 20 +65.0000891911591054 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182109 + 31 +0.0 + 0 +LINE + 5 +285 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +149.9999725038415193 + 21 +65.0000687403962303 + 31 +0.0 + 0 +LINE + 5 +286 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +149.9999725038415193 + 20 +65.0000687403962303 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +287 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 30 +0.0 + 11 +147.4999729933480523 + 21 +15.0000697194141779 + 31 +0.0 + 0 +LINE + 5 +288 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +147.4999729933480523 + 20 +15.0000697194141779 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +289 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +125.000040987657556 + 21 +15.0000982110365175 + 31 +0.0 + 0 +LINE + 5 +28A +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +125.000040987657556 + 20 +15.0000982110365175 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +28B +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +102.5001337867386439 + 21 +15.0002675734773021 + 31 +0.0 + 0 +LINE + 5 +28C +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +102.5001337867386439 + 20 +15.0002675734773021 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +28D +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +112.5 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +28E +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +112.5 + 20 +-10.0 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +28F +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591765 + 20 +40.0001783823180403 + 30 +0.0 + 11 +137.5000391911498241 + 21 +40.0001579315352487 + 31 +0.0 + 0 +LINE + 5 +290 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +137.5000391911498241 + 20 +40.0001579315352487 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924464 + 31 +0.0 + 0 +LINE + 5 +291 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +LINE + 5 +292 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +293 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +94.5242361313597144 + 20 +84.9471373479288729 + 30 +0.0 + 11 +92.9157837984631954 + 21 +85.1676936334508383 + 31 +0.0 + 0 +LINE + 5 +294 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 Ghost2OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.0 + 20 +85.0 + 30 +0.0 + 11 +70.0 + 21 +35.0 + 31 +0.0 + 0 +LINE + 5 +295 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 Ghost2OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.0 + 20 +35.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +296 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 Ghost2OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.0 + 20 +35.0000000000000071 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +297 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 Ghost2OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +70.0 + 21 +35.0000000000000071 + 31 +0.0 + 0 +HATCH + 5 +298 + 8 +1-UGrid DG Part2 Ghost2OverlapVertices + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +2 + 72 +2 + 10 +70.0 + 20 +35.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +60.0 + 20 +-70.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +LINE + 5 +299 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +25.0 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +29A +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +25.0 + 30 +0.0 + 11 +180.0000175342504178 + 21 +74.9999934246560827 + 31 +0.0 + 0 +HATCH + 5 +29B + 8 +1-UGrid DG Part2 InteriorVertices + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +7 + 72 +2 + 10 +200.0 + 20 +25.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +180.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +240.0 + 20 +-60.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +159.9999450076830385 + 20 +40.0001374807924819 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +200.0 + 20 +120.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +220.0 + 20 +60.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +LINE + 5 +29C +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +29D +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +29E +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +29F +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.2752319396871599 + 20 +85.0305813266319035 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +2A0 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 30 +0.0 + 11 +180.0000175342504178 + 21 +74.9999934246560827 + 31 +0.0 + 0 +LINE + 5 +2A1 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2A2 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +159.9997155749006481 + 21 +-40.0004266376490492 + 31 +0.0 + 0 +LINE + 5 +2A3 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9997155749006481 + 20 +-40.0004266376490492 + 30 +0.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 31 +0.0 + 0 +LINE + 5 +2A4 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +2A5 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +95.2752319396871599 + 21 +85.0305813266319177 + 31 +0.0 + 0 +LINE + 5 +2A6 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.2752319396871599 + 20 +85.0305813266319177 + 30 +0.0 + 11 +50.0 + 21 +80.0 + 31 +0.0 + 0 +LINE + 5 +2A7 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +68.2762309724051448 + 21 +38.8784803120884348 + 31 +0.0 + 0 +LINE + 5 +2A8 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +68.2762309724051448 + 20 +38.8784803120884348 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2A9 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823181967 + 31 +0.0 + 0 +LINE + 5 +2AA +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2AB +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +159.9999450076830385 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +2AC +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830385 + 20 +40.0001374807924535 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +2AD +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2AE +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +159.9997155749006197 + 21 +-40.0004266376490492 + 31 +0.0 + 0 +LINE + 5 +2AF +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +2B0 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2B1 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2B2 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +180.0000175342504178 + 21 +74.9999934246560969 + 31 +0.0 + 0 +LINE + 5 +2B3 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +LINE + 5 +2B4 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 30 +0.0 + 11 +200.0 + 21 +25.0 + 31 +0.0 + 0 +LINE + 5 +2B5 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +24.9999999999999929 + 30 +0.0 + 11 +159.9999450076830385 + 21 +40.0001374807924819 + 31 +0.0 + 0 +LINE + 5 +2B6 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.0 + 20 +35.0000000000000071 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +2B7 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid New Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.0 + 20 +35.0000000000000071 + 30 +0.0 + 11 +95.0 + 21 +85.0000000000000142 + 31 +0.0 + 0 +POINT + 5 +2B8 +100 +AcDbEntity +100 +AcDbPoint + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +102.5001337867386582 + 20 +15.0002675734773092 + 30 +0.0 + 0 +POINT + 5 +2B9 +100 +AcDbEntity +100 +AcDbPoint + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +147.4999729933480523 + 20 +15.000069719414185 + 30 +0.0 + 0 +POINT + 5 +2BA +100 +AcDbEntity +100 +AcDbPoint + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 0 +POINT + 5 +2BB +100 +AcDbEntity +100 +AcDbPoint + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +149.9999725038415193 + 20 +65.0000687403962303 + 30 +0.0 + 0 +POINT + 5 +2BC +100 +AcDbEntity +100 +AcDbPoint + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +149.9999725038414908 + 20 +65.0000687403962303 + 30 +0.0 + 0 +POINT + 5 +2BD +100 +AcDbEntity +100 +AcDbPoint + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +127.5000445955795527 + 20 +65.0000891911591054 + 30 +0.0 + 0 +MTEXT + 5 +2BE +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +101.7609509658366989 + 20 +-1.2455832025757063 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D29 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +2BF +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +124.7910609212629112 + 20 +-1.5133751788015928 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D31 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +2C0 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.6149658246792313 + 20 +23.6590705864316959 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D30 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +2C1 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +113.5437979197756846 + 20 +6.5203841079749889 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D32 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +2C2 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +125.9961248142793977 + 20 +31.2911419088694487 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D33 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +2C3 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.6366359584112899 + 20 +6.3864881198620456 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D34 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +2C4 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +148.3567548291408684 + 20 +31.5589338850953318 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D35 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +2C5 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.9755958395407163 + 20 +23.7929665745446393 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D36 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +2C6 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +126.7995007429570506 + 20 +48.5637243754391079 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D37 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +2C7 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +148.892338781592656 + 20 +48.429828387326161 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D38 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +2C8 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +139.5196196136866433 + 20 +73.3344821763335659 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D39 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +2C9 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +137.912867756331309 + 20 +56.4635876741027403 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D40 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +2CA +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +105.6439346211120665 + 20 +78.2886337365124518 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D41 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +2CB +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.2844457652439445 + 20 +56.1957956978768536 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D42 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +2CC +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +127.2011887072958984 + 20 +81.9038254155619114 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D43 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +2CD +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +117.2928855869380982 + 20 +71.9955222952041254 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D44 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +LINE + 5 +2CE +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +169.9999725038415193 + 21 +15.0000687403962267 + 31 +0.0 + 0 +LINE + 5 +2CF +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +169.9999725038415193 + 20 +15.0000687403962267 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924464 + 31 +0.0 + 0 +LINE + 5 +2D0 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +157.5 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2D1 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +157.5 + 20 +-10.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2D2 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +157.5 + 20 +-10.0 + 30 +0.0 + 11 +147.4999729933480523 + 21 +15.000069719414185 + 31 +0.0 + 0 +LINE + 5 +2D3 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +147.4999729933480523 + 20 +15.000069719414185 + 30 +0.0 + 11 +169.9999725038415193 + 21 +15.0000687403962267 + 31 +0.0 + 0 +LINE + 5 +2D4 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +169.9999725038415193 + 20 +15.0000687403962267 + 30 +0.0 + 11 +157.5 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2D5 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +2D6 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 BorderEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +2D7 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 BorderEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +2D8 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 BorderEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +134.9999999999999716 + 20 +-10.0000000000000249 + 30 +0.0 + 11 +159.9997155749006197 + 21 +-40.0004266376490492 + 31 +0.0 + 0 +LINE + 5 +2D9 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 BorderEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +2DA +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 BorderEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +134.9999999999999716 + 21 +-10.0000000000000249 + 31 +0.0 + 0 +HATCH + 5 +2DB + 8 +1-UGrid DG Part2 FrontVertices Example + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +2 + 10 +95.2752319396871599 + 20 +85.0305813266319035 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +50.0 + 20 +80.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +90.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +LINE + 5 +2DC +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed FrontEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +95.0 + 21 +85.0 + 31 +0.0 + 0 +LINE + 5 +2DD +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed FrontEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.0 + 20 +85.0 + 30 +0.0 + 11 +70.0 + 21 +35.0 + 31 +0.0 + 0 +LINE + 5 +2DE +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed FrontEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.0 + 20 +35.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2DF +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed FrontEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +60.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +2E0 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2E1 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2E2 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 30 +0.0 + 11 +134.9999999999999716 + 21 +-10.0000000000000355 + 31 +0.0 + 0 +LINE + 5 +2E3 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +2E4 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +70.0 + 21 +35.0 + 31 +0.0 + 0 +LINE + 5 +2E5 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +95.2752319396871599 + 21 +85.0305813266319177 + 31 +0.0 + 0 +HATCH + 5 +2E6 + 8 +1-UGrid DG Part2 BorderVertices + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +130.0 + 20 +150.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +2E7 + 8 +1-UGrid DG Part2 BorderVertices + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +5 + 72 +2 + 10 +140.0 + 20 +90.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +135.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +140.0 + 20 +-70.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +2E8 + 8 +1-UGrid DG Part2 OverlapVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +LINE + 5 +2E9 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2EA +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid DG Part2 BorderEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +2EB +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid DG Part2 BorderEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2EC +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid DG Part2 BorderEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +60.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +2ED +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 FrontEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 31 +0.0 + 0 +LINE + 5 +2EE +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 FrontEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2EF +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 FrontEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +159.9999450076830385 + 21 +40.0001374807924819 + 31 +0.0 + 0 +LINE + 5 +2F0 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 FrontEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830385 + 20 +40.0001374807924819 + 30 +0.0 + 11 +200.0 + 21 +24.9999999999999964 + 31 +0.0 + 0 +LINE + 5 +2F1 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 FrontEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +24.9999999999999964 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2F2 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 FrontEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +240.0 + 21 +-60.0 + 31 +0.0 + 0 +LINE + 5 +2F3 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +60.0 + 20 +-70.0 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +2F4 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 31 +0.0 + 0 +LINE + 5 +2F5 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +2F6 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +2F7 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +159.9999450076831238 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +2F8 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076831238 + 20 +40.0001374807924535 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +2F9 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830385 + 20 +40.0001374807924535 + 30 +0.0 + 11 +180.0000175342504178 + 21 +74.9999934246560969 + 31 +0.0 + 0 +LINE + 5 +2FA +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 30 +0.0 + 11 +200.0 + 21 +24.9999999999999964 + 31 +0.0 + 0 +LINE + 5 +2FB +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +24.9999999999999964 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +LINE + 5 +2FC +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +240.0 + 21 +-60.0 + 31 +0.0 + 0 +LINE + 5 +2FD +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 BorderEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +173.2116309968748453 + 20 +77.5456383761719508 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +2FE +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 BorderEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +2FF +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 BorderEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +90.0 + 21 +-10.0000000000000036 + 31 +0.0 + 0 +LINE + 5 +300 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 BorderEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0000000000000036 + 30 +0.0 + 11 +60.0 + 21 +-70.0 + 31 +0.0 + 0 +HATCH + 5 +301 + 8 +1-UGrid 0Part1 InteriorVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +6 + 72 +2 + 10 +70.0 + 20 +35.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +95.0 + 20 +85.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +130.0 + 20 +150.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +50.0 + 20 +80.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +200.0 + 20 +120.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +0.0 + 20 +0.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +LINE + 5 +302 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +CIRCLE + 5 +303 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +304 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +305 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +306 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +60.0 + 20 +-70.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +307 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +308 +100 +AcDbEntity +100 +AcDbCircle + 8 +1-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 40 +7.25 + 0 +LINE + 5 +309 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 BorderEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +173.2116309968748453 + 21 +77.5456383761719508 + 31 +0.0 + 0 +LINE + 5 +30A +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 BorderEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +30B +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 BorderEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +30C +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 BorderEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +60.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +30D +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 FrontEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +240.0 + 20 +-60.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +30E +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 FrontEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +30F +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +217.7073486963779203 + 20 +66.8779539108662107 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +310 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +120.0 + 30 +0.0 + 11 +130.0 + 21 +150.0 + 31 +0.0 + 0 +LINE + 5 +311 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +50.0 + 21 +80.0 + 31 +0.0 + 0 +LINE + 5 +312 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +0.0 + 21 +0.0 + 31 +0.0 + 0 +LINE + 5 +313 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +0.0 + 20 +0.0 + 30 +0.0 + 11 +60.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +314 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +0.0 + 20 +0.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +315 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +50.0 + 21 +80.0 + 31 +0.0 + 0 +LINE + 5 +316 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +317 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +130.0 + 21 +150.0 + 31 +0.0 + 0 +LINE + 5 +318 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +319 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +60.0 + 20 +-70.0 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +31A +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +31B +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +31C +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +31D +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part1 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +HATCH + 5 +31E + 8 +0-UGrid Part1 InteriorVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +2 + 10 +0.0 + 20 +0.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +200.0 + 20 +120.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +130.0 + 20 +150.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +50.0 + 20 +80.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +31F + 8 +0-UGrid Part1 FrontVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +2 + 10 +140.0 + 20 +-70.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +240.0 + 20 +-60.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +180.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +CIRCLE + 5 +320 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +60.0 + 20 +-70.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +321 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +322 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +323 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 40 +7.25 + 0 +CIRCLE + 5 +324 +100 +AcDbEntity +100 +AcDbCircle + 8 +0-NGraph + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 40 +7.25 + 0 +HATCH + 5 +325 + 8 +0-UGrid Part1 BorderVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +2 + 10 +60.0 + 20 +-70.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +220.0 + 20 +60.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +140.0 + 20 +90.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +90.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +LINE + 5 +326 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 BorderEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +327 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 BorderEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +328 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 BorderEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +60.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +329 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +LINE + 5 +32A +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +240.0 + 21 +-60.0 + 31 +0.0 + 0 +LINE + 5 +32B +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +240.0 + 20 +-60.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +32C +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +32D +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +32E +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +32F +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +330 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +60.0 + 20 +-70.0 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +331 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 11 +240.0 + 21 +-60.0 + 31 +0.0 + 0 +LINE + 5 +332 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +333 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +120.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +334 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +50.0 + 21 +80.0 + 31 +0.0 + 0 +LINE + 5 +335 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +336 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +0.0 + 21 +0.0 + 31 +0.0 + 0 +LINE + 5 +337 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +0.0 + 20 +0.0 + 30 +0.0 + 11 +60.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +338 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +0.0 + 20 +0.0 + 30 +0.0 + 11 +50.0 + 21 +80.0 + 31 +0.0 + 0 +LINE + 5 +339 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +130.0 + 21 +150.0 + 31 +0.0 + 0 +LINE + 5 +33A +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +33B +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +130.0 + 21 +150.0 + 31 +0.0 + 0 +LINE + 5 +33C +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Part2 BorderVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +227.25 + 20 +60.0 + 30 +0.0 + 11 +227.25 + 21 +60.0 + 31 +0.0 + 0 +HATCH + 5 +33D + 8 +0-UGrid Part2 BorderVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +2 + 10 +60.0 + 20 +-70.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +90.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +140.0 + 20 +90.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +220.0 + 20 +60.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +33E + 8 +0-UGrid Part2 InteriorVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +2 + 10 +140.0 + 20 +-70.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +240.0 + 20 +-60.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +180.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +33F + 8 +0-UGrid Part2 OverlapVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +4 + 72 +2 + 10 +0.0 + 20 +0.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +200.0 + 20 +120.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +130.0 + 20 +150.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +50.0 + 20 +80.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +LINE + 5 +340 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 BorderEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +219.7987421383647586 + 20 +60.0754716981132191 + 30 +0.0 + 11 +180.0000175342504178 + 21 +74.9999934246560827 + 31 +0.0 + 0 +LINE + 5 +341 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 BorderEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0000175342504178 + 20 +74.9999934246560827 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +342 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 BorderEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +343 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 BorderEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +90.2000000000002018 + 21 +-9.5999999999995893 + 31 +0.0 + 0 +LINE + 5 +344 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 BorderEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.2000000000002018 + 20 +-9.5999999999995893 + 30 +0.0 + 11 +60.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +345 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 FrontEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.0 + 20 +35.0 + 30 +0.0 + 11 +95.0 + 21 +85.0 + 31 +0.0 + 0 +LINE + 5 +346 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 FrontEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.0 + 20 +85.0 + 30 +0.0 + 11 +50.0 + 21 +80.0 + 31 +0.0 + 0 +LINE + 5 +347 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 FrontEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +70.0 + 21 +35.0 + 31 +0.0 + 0 +LINE + 5 +348 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +349 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 30 +0.0 + 11 +180.0000175342504178 + 21 +74.9999934246560827 + 31 +0.0 + 0 +LINE + 5 +34A +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0000175342504178 + 20 +74.9999934246560827 + 30 +0.0 + 11 +200.0 + 21 +25.0 + 31 +0.0 + 0 +LINE + 5 +34B +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +25.0 + 30 +0.0 + 11 +219.7987421383647586 + 21 +60.0754716981132191 + 31 +0.0 + 0 +LINE + 5 +34C +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +219.7987421383647586 + 20 +60.0754716981132191 + 30 +0.0 + 11 +240.0 + 21 +-60.0 + 31 +0.0 + 0 +LINE + 5 +34D +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +240.0 + 20 +-60.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +34E +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +200.0 + 21 +25.0 + 31 +0.0 + 0 +LINE + 5 +34F +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +25.0 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +350 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +351 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +352 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +353 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +354 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +134.9999999999999716 + 21 +-10.0000000000000249 + 31 +0.0 + 0 +LINE + 5 +355 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +134.9999999999999716 + 20 +-10.0000000000000249 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +356 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229736 + 31 +0.0 + 0 +LINE + 5 +357 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.9999989626024757 + 20 +-39.9999987551229736 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +358 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +159.9997155749006197 + 21 +-40.0004266376490492 + 31 +0.0 + 0 +LINE + 5 +359 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 30 +0.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229736 + 31 +0.0 + 0 +LINE + 5 +35A +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.9999989626024757 + 20 +-39.9999987551229736 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +35B +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 11 +159.9997155749006197 + 21 +-40.0004266376490492 + 31 +0.0 + 0 +LINE + 5 +35C +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +35D +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +60.0 + 20 +-70.0 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +35E +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 11 +240.0 + 21 +-60.0 + 31 +0.0 + 0 +LINE + 5 +35F +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +60.0 + 20 +-70.0 + 30 +0.0 + 11 +0.0 + 21 +0.0 + 31 +0.0 + 0 +LINE + 5 +360 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +0.0 + 20 +0.0 + 30 +0.0 + 11 +50.0 + 21 +80.0 + 31 +0.0 + 0 +LINE + 5 +361 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +130.0 + 21 +150.0 + 31 +0.0 + 0 +LINE + 5 +362 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +363 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +120.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +364 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +95.0 + 21 +85.0 + 31 +0.0 + 0 +LINE + 5 +365 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.0 + 20 +85.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +366 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +70.0 + 21 +35.0 + 31 +0.0 + 0 +LINE + 5 +367 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.0 + 20 +35.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +368 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +0.0 + 21 +0.0 + 31 +0.0 + 0 +LINE + 5 +369 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +130.0 + 21 +150.0 + 31 +0.0 + 0 +LINE + 5 +36A +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 OverlapEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +36B +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part2 BorderVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +227.25 + 20 +60.0 + 30 +0.0 + 11 +227.25 + 21 +60.0 + 31 +0.0 + 0 +HATCH + 5 +36C + 8 +1-UGrid 0Part2 BorderVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +6 + 72 +2 + 10 +90.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +140.0 + 20 +90.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +60.0 + 20 +-70.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +220.0 + 20 +60.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +36D + 8 +1-UGrid 0Part2 FrontVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +2 + 10 +70.0 + 20 +35.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +95.0 + 20 +85.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +50.0 + 20 +80.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +36E + 8 +1-UGrid 0Part2 InteriorVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +8 + 72 +2 + 10 +200.0 + 20 +25.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +140.0 + 20 +-70.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +135.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +180.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +240.0 + 20 +-60.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +159.9999450076830385 + 20 +40.0001374807924819 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +36F + 8 +1-UGrid 0Part2 OverlapVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +2 + 10 +130.0 + 20 +150.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +200.0 + 20 +120.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +0.0 + 20 +0.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +LINE + 5 +370 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 GhostEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830385 + 20 +40.000137480792489 + 30 +0.0 + 11 +179.7347266203639151 + 21 +-9.336816550909802 + 31 +0.0 + 0 +LINE + 5 +371 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 GhostEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +159.9997155749006197 + 21 +-40.0004266376490492 + 31 +0.0 + 0 +LINE + 5 +372 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 GhostEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 30 +0.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229736 + 31 +0.0 + 0 +LINE + 5 +373 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 GhostEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 11 +159.9997155749006197 + 21 +-40.0004266376490492 + 31 +0.0 + 0 +LINE + 5 +374 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 GhostEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +HATCH + 5 +375 + 8 +1-UGrid 0Part1 GhostVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +LINE + 5 +376 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 GhostEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +HATCH + 5 +377 + 8 +1-UGrid 0Part1 FrontVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +7 + 72 +2 + 10 +200.0 + 20 +25.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +140.0 + 20 +-70.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +135.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +180.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +240.0 + 20 +-60.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +159.9999450076830385 + 20 +40.0001374807924819 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +LINE + 5 +378 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +379 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +120.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +37A +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +130.0 + 21 +150.0 + 31 +0.0 + 0 +LINE + 5 +37B +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +37C +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +50.0 + 21 +80.0 + 31 +0.0 + 0 +LINE + 5 +37D +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +0.0 + 21 +0.0 + 31 +0.0 + 0 +LINE + 5 +37E +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +0.0 + 20 +0.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +37F +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +70.0 + 21 +35.0 + 31 +0.0 + 0 +LINE + 5 +380 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.0 + 20 +35.0 + 30 +0.0 + 11 +50.0 + 21 +80.0 + 31 +0.0 + 0 +LINE + 5 +381 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +102.20565707638373 + 21 +85.8006285640426398 + 31 +0.0 + 0 +LINE + 5 +382 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +102.20565707638373 + 20 +85.8006285640426398 + 30 +0.0 + 11 +140.0 + 21 +89.9999999999999858 + 31 +0.0 + 0 +LINE + 5 +383 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +95.0 + 21 +85.0 + 31 +0.0 + 0 +LINE + 5 +384 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.0 + 20 +85.0 + 30 +0.0 + 11 +70.0 + 21 +35.0 + 31 +0.0 + 0 +LINE + 5 +385 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.0 + 20 +35.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +386 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid 0Part1 InteriorEdges H5Fed + 62 +256 +370 +-1 + 6 +ByLayer + 10 +0.0 + 20 +0.0 + 30 +0.0 + 11 +60.0 + 21 +-70.0 + 31 +0.0 + 0 +HATCH + 5 +387 + 8 +1-UGrid 0Part1 BorderVertices H5Fed + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +6 + 72 +2 + 10 +90.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +140.0 + 20 +90.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +60.0 + 20 +-70.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +220.0 + 20 +60.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +MTEXT + 5 +388 +100 +AcDbEntity +100 +AcDbMText + 8 +0-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +52.4994856366487497 + 20 +-27.617758389235437 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +0 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +389 +100 +AcDbEntity +100 +AcDbMText + 8 +0-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.5541397758186974 + 20 +-47.1056544732807936 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +1 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +38A +100 +AcDbEntity +100 +AcDbMText + 8 +0-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.3427594866113282 + 20 +-28.52417216058641 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +2 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +38B +100 +AcDbEntity +100 +AcDbMText + 8 +0-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +185.2891031395623713 + 20 +-43.0267925022015305 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +3 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +38C +100 +AcDbEntity +100 +AcDbMText + 8 +0-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +209.7622749660378929 + 20 +-1.784965905733471 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +4 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +38D +100 +AcDbEntity +100 +AcDbMText + 8 +0-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +179.3974136257813257 + 20 +48.9742052899195457 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +5 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +38E +100 +AcDbEntity +100 +AcDbMText + 8 +0-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +188.4615513392906792 + 20 +91.5756525434139803 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +6 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +38F +100 +AcDbEntity +100 +AcDbMText + 8 +0-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +155.8306555706566314 + 20 +119.2212725696178381 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +7 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +390 +100 +AcDbEntity +100 +AcDbMText + 8 +0-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +110.056760117433825 + 20 +107.4378935420555763 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +8 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +391 +100 +AcDbEntity +100 +AcDbMText + 8 +0-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +94.1945191187922575 + 20 +56.3523231977330994 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +9 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +392 +100 +AcDbEntity +100 +AcDbMText + 8 +0-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +46.6077961228675974 + 20 +23.1414128064175415 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +10 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +393 +100 +AcDbEntity +100 +AcDbMText + 8 +0-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.3427594866114418 + 20 +24.047826577768511 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +11 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +394 +100 +AcDbEntity +100 +AcDbMText + 8 +0-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +-0.3333333333333712 + 20 +0.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +0 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +395 +100 +AcDbEntity +100 +AcDbMText + 8 +0-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +59.6666666666666643 + 20 +-69.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +1 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +396 +100 +AcDbEntity +100 +AcDbMText + 8 +0-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +89.6666666666666572 + 20 +-9.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +2 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +397 +100 +AcDbEntity +100 +AcDbMText + 8 +0-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +139.6666666666666572 + 20 +-69.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +3 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +398 +100 +AcDbEntity +100 +AcDbMText + 8 +0-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +179.6666666666666572 + 20 +-9.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +4 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +399 +100 +AcDbEntity +100 +AcDbMText + 8 +0-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +239.6666666666666288 + 20 +-59.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +5 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +39A +100 +AcDbEntity +100 +AcDbMText + 8 +0-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +219.6666666666666288 + 20 +60.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +6 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +39B +100 +AcDbEntity +100 +AcDbMText + 8 +0-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +139.6666666666666288 + 20 +90.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +7 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +39C +100 +AcDbEntity +100 +AcDbMText + 8 +0-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +199.6666666666666288 + 20 +120.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +8 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +39D +100 +AcDbEntity +100 +AcDbMText + 8 +0-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +129.6666666666666288 + 20 +150.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +9 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +39E +100 +AcDbEntity +100 +AcDbMText + 8 +0-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +49.6666666666666288 + 20 +80.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +10 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +39F +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +25.3795855978264058 + 20 +-41.2418265964679094 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[0] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3A0 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +45.3206885675471511 + 20 +-8.6109308278339594 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[1] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3A1 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +67.9810328513207196 + 20 +-36.70975773971319 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[2] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3A2 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +119.6466178183244722 + 20 +-37.1629646253886605 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[3] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3A3 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +97.4394804202263742 + 20 +-74.325929250777321 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[4] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3A4 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +164.5140995001961528 + 20 +-40.3354128251169612 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[5] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3A5 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +132.7896175029131598 + 20 +-12.6897927989132029 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[6] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3A6 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +208.0219605250414077 + 20 +-24.4731718264754612 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[7] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3A7 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +188.0808575553206765 + 20 +-68.8874466226716748 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[8] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3A8 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +236.5739943225961213 + 20 +2.7192413140528289 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[9] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3A9 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +199.8642365828829384 + 20 +19.0346891983698043 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[10] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3AA +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +178.1103060704602967 + 20 +71.6066879367244979 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[11] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3AB +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +165.8737201572225786 + 20 +37.1629646253886605 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[12] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3AC +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +214.8200638101734796 + 20 +92.9074115634716549 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[13] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3AD +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +175.8442716420829299 + 20 +104.2375837053584462 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[14] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3AE +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +165.8737201572225786 + 20 +141.8537552164225701 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[15] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3AF +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +138.6813070166942907 + 20 +125.9915142177810736 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[16] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3B0 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +91.5477909064452433 + 20 +80.6708256502339225 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[17] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3B1 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +80.6708256502339225 + 20 +121.4594453610263685 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[18] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3B2 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.114548961569767 + 20 +31.2712751116075331 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[19] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3B3 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +73.8727223651018505 + 20 +39.8822059394414907 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[20] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3B4 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +14.955827227290559 + 20 +39.8822059394414907 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[21] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3B5 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +52.4994856366487497 + 20 +-27.617758389235437 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D0 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3B6 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.5541397758186974 + 20 +-47.1056544732807936 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D1 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3B7 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.3427594866113282 + 20 +-28.52417216058641 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D2 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3B8 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +185.2891031395623713 + 20 +-43.0267925022015305 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D3 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3B9 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +209.7622749660378929 + 20 +-1.784965905733471 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D4 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3BA +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +179.3974136257813257 + 20 +48.9742052899195457 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D5 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3BB +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +188.4615513392906792 + 20 +91.5756525434139803 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D6 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3BC +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +155.8306555706566314 + 20 +119.2212725696178381 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D7 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3BD +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +110.056760117433825 + 20 +107.4378935420555763 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D8 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3BE +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +94.1945191187922575 + 20 +56.3523231977330994 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D9 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3BF +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +46.6077961228675974 + 20 +23.1414128064175415 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D10 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3C0 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.3427594866114418 + 20 +24.047826577768511 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D11 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3C1 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +52.4994856366487497 + 20 +-27.617758389235437 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +0 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3C2 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.5541397758186974 + 20 +-47.1056544732807936 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +1 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3C3 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +185.2891031395623713 + 20 +-43.0267925022015305 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +2 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3C4 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +209.7622749660378929 + 20 +-1.784965905733471 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +3 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3C5 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +188.4615513392906792 + 20 +91.5756525434139803 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +4 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3C6 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +155.8306555706566314 + 20 +119.2212725696178381 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +5 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3C7 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +110.056760117433825 + 20 +107.4378935420555763 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +6 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3C8 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +46.6077961228675974 + 20 +23.1414128064175415 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +7 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3C9 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.1356220885131449 + 20 +-20.8196551041033544 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +8 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3CA +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +138.608793914988695 + 20 +-50.7313095586845932 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +9 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3CB +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +158.0966899990340835 + 20 +-20.8196551041033544 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +10 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3CC +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.3427594866113282 + 20 +-28.52417216058641 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +11 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3CD +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +162.1755519701133039 + 20 +68.0088944882894282 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +12 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3CE +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +181.2102411684832077 + 20 +19.5157577210137774 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +13 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3CF +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +202.0577579095549936 + 20 +54.4126879180252203 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +14 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3D0 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +179.3974136257813257 + 20 +48.9742052899195457 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +15 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3D1 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +113.6824152028377455 + 20 +8.1855855791269434 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +16 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3D2 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +138.1555870293133239 + 20 +55.7723085750516745 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +17 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3D3 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +158.0966899990341403 + 20 +7.2791718077760024 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +18 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3D4 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.3427594866114418 + 20 +24.047826577768511 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +19 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3D5 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.1745541779922775 + 20 +68.4621013739649413 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +20 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3D6 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +91.0220709190640633 + 20 +23.1414128064175699 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +21 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3D7 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.4952427455396275 + 20 +72.0877564593687339 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +22 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3D8 +100 +AcDbEntity +100 +AcDbMText + 8 +1-DGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +94.1945191187922575 + 20 +56.3523231977330994 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +23 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3D9 +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +-0.3333333333333712 + 20 +0.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +0 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3DA +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +59.6666666666666643 + 20 +-69.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +1 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3DB +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +89.6666666666666572 + 20 +-9.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +2 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3DC +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +139.6666666666666572 + 20 +-69.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +3 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3DD +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +179.6666666666666572 + 20 +-9.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +4 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3DE +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +239.6666666666666288 + 20 +-59.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +5 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3DF +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +219.6666666666666288 + 20 +60.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +6 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3E0 +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +139.6666666666666288 + 20 +90.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +7 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3E1 +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +199.6666666666666288 + 20 +120.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +8 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3E2 +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +129.6666666666666288 + 20 +150.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +9 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3E3 +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +49.6666666666666288 + 20 +80.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +10 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3E4 +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.6667558578257342 + 20 +40.5001783823182038 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +11 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3E5 +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.0 + 20 +85.0 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +12 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3E6 +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.1835145864434651 + 20 +35.1647746245767863 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +13 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3E7 +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.6663822415672769 + 20 +-39.5004266376490492 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +14 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3E8 +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +134.6666666666666572 + 20 +-9.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +15 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3E9 +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.6666656292691329 + 20 +-39.4999987551229665 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +16 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3EA +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +199.6666666666666288 + 20 +25.5 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +17 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3EB +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +179.6666842009170466 + 20 +75.4999934246560969 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +18 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3EC +100 +AcDbEntity +100 +AcDbMText + 8 +1-NGraph Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.6666116743496673 + 20 +40.5001374807924819 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +19 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3ED +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +66.349488062889165 + 20 +-39.5196404309011982 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[0] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3EE +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +43.8704265333857322 + 20 +-7.976441187888315 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[1] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3EF +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +25.0170200892860777 + 20 +-40.6073369565223317 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[2] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3F0 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.5707006987594383 + 20 +-52.9345642468951851 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[3] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3F1 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +92.0916391692559984 + 20 +-73.6007982336967217 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[4] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3F2 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +202.6741192740712734 + 20 +-36.6191163625781755 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[5] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3F3 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +182.0078852872697439 + 20 +-70.700274165373699 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[6] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3F4 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +157.7159962150644219 + 20 +-49.6714746700317775 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[7] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3F5 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +235.6675805512456634 + 20 +-7.2513101708075594 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[8] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3F6 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +199.7735952057482507 + 20 +13.777489324534363 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[9] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3F7 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +215.7264775815248754 + 20 +88.46598408385222 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[10] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3F8 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +190.7094574922388119 + 20 +77.9515843361812557 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[11] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3F9 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +173.6688785908410466 + 20 +102.9686044254673476 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[12] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3FA +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +173.6688785908410466 + 20 +140.3128518051262574 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[13] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3FB +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +138.5000242624243754 + 20 +125.0851004464304026 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[14] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3FC +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +93.5419012034175097 + 20 +93.9044667119578946 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[15] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3FD +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +94.6295977290386503 + 20 +129.7984520574553073 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[16] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3FE +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +51.8468677212740516 + 20 +49.3089091614913997 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[17] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +3FF +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +23.5667580551245663 + 20 +54.7473917895970743 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[18] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +400 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +116.3835282414613204 + 20 +-24.291889072205322 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[19] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +401 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +106.9568250194114967 + 20 +-13.0523583074536074 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[20] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +402 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +105.1439974767096146 + 20 +-23.9293235636649442 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[21] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +403 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.3128518051262574 + 20 +-54.7473917895970743 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[22] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +404 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +131.9738451086975886 + 20 +-42.7827300077645987 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[23] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +405 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +128.7107555318341667 + 20 +-52.2094332298144295 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[24] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +406 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +160.9790857919278153 + 20 +-25.0170200892860777 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[25] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +407 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +151.5523825698779774 + 20 +-12.6897927989132278 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[26] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +408 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +149.7395550271760953 + 20 +-21.3913650038822993 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[27] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +409 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +162.0667823175489559 + 20 +61.6361364518642532 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[28] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +40A +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +157.3534307065240228 + 20 +79.0392808618023963 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[29] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +40B +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +149.3769895186357246 + 20 +72.875667216615966 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[30] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +40C +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +182.7330163043504854 + 20 +11.2395307647517164 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[31] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +40D +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +181.6453197787293448 + 20 +30.0929372088513709 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[32] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +40E +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +170.4057890139776532 + 20 +24.6544545807456998 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[33] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +40F +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +203.0366847826116441 + 20 +47.1335161102491327 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[34] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +410 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +201.223857239909762 + 20 +62.7238329774853867 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[35] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +411 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +190.7094574922388119 + 20 +59.0981778920816083 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[36] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +412 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +121.822010869566995 + 20 +2.5379585597826457 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[37] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +413 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +106.231694002330741 + 20 +15.5903168672362522 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[38] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +414 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.236934685560982 + 20 +45.3206885675472435 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[39] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +415 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +126.5353624805919139 + 20 +58.7356123835412305 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[40] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +416 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +150.8272515527972359 + 20 +13.0523583074536074 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[41] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +417 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +73.9633637422371066 + 20 +64.5366605201872829 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[42] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +418 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +76.1387567934793736 + 20 +80.1269773874235227 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[43] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +419 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +61.2735709433238753 + 20 +64.174095011646898 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[44] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +41A +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +89.5536806094733606 + 20 +36.2565508540377976 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[45] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +41B +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +79.401846370342767 + 20 +20.6662339868015437 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[46] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +41C +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +116.3835282414613204 + 20 +83.7526324728273153 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[47] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +41D +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Edge Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +108.7696525621133929 + 20 +62.7238329774853867 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +e[48] + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +41E +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.1356220885131449 + 20 +-20.8196551041033544 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D12 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +41F +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +138.6087939149886097 + 20 +-50.7313095586845932 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D13 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +420 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +158.0966899990340835 + 20 +-20.8196551041033544 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D14 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +421 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.3427594866113282 + 20 +-28.52417216058641 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D15 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +422 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +162.1755519701133039 + 20 +68.0088944882894282 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D16 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +423 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +181.2102411684832077 + 20 +19.5157577210137774 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D17 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +424 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +202.0577579095549936 + 20 +54.4126879180252203 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D18 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +425 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +179.3974136257813257 + 20 +48.9742052899195457 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D29 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +426 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +113.6824152028377455 + 20 +8.1855855791269434 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D20 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +427 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +138.1555870293133239 + 20 +55.7723085750516745 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D21 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +428 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +158.0966899990341403 + 20 +7.2791718077760024 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D22 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +429 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.3427594866114418 + 20 +24.047826577768511 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D23 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +42A +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.2470672796984132 + 20 +68.1721391581167779 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D24 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +42B +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +91.0945840207701991 + 20 +22.8514505905694207 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D25 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +42C +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.5677558472457633 + 20 +71.7977942435205705 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D26 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +42D +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +94.2670322204983933 + 20 +56.0623609818849502 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D27 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +42E +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +164.8437500000022169 + 20 +-41.4062500000005613 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +11 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +42F +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +134.375000000001819 + 20 +-16.0156250000002167 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +12 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +430 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +109.7656250000014779 + 20 +-41.4062500000005613 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +13 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +431 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +204.2968750000027569 + 20 +24.609375000000334 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +14 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +432 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +181.2500000000024443 + 20 +82.0312500000011084 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +15 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +433 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +166.7968750000022453 + 20 +43.7500000000005898 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +16 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +434 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +105.8593750000014353 + 20 +37.1093750000005045 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +17 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +435 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +94.531250000001279 + 20 +76.1718750000010232 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +18 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +436 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid New Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +62.5000000000008455 + 20 +36.7187500000004974 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +19 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +437 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +52.4994856366487497 + 20 +-27.617758389235437 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D0 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +438 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.5541397758186974 + 20 +-47.1056544732807936 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D1 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +439 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +185.2891031395623713 + 20 +-43.0267925022015305 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D3 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +43A +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +209.7622749660378929 + 20 +-1.784965905733471 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D4 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +43B +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +188.4615513392906792 + 20 +91.5756525434139803 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D6 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +43C +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +155.8306555706566314 + 20 +119.2212725696178381 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D7 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +43D +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +110.056760117433825 + 20 +107.4378935420555763 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D8 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +43E +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +46.6077961228675974 + 20 +23.1414128064175415 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D10 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +43F +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.1356220885131449 + 20 +-20.8196551041033544 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D12 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +440 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +138.6087939149886097 + 20 +-50.7313095586845932 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D13 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +441 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +158.0966899990340835 + 20 +-20.8196551041033544 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D14 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +442 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.3427594866113282 + 20 +-28.52417216058641 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D15 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +443 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +162.1755519701133039 + 20 +68.0088944882894282 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D16 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +444 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +181.2102411684832077 + 20 +19.5157577210137774 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D17 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +445 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +202.0577579095549936 + 20 +54.4126879180252203 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D18 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +446 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +179.3974136257813257 + 20 +48.9742052899195457 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D19 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +447 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +113.6824152028377455 + 20 +8.1855855791269434 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D20 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +448 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +138.1555870293133239 + 20 +55.7723085750516745 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D21 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +449 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +158.0966899990341403 + 20 +7.2791718077760024 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D22 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +44A +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.3427594866114418 + 20 +24.047826577768511 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D23 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +44B +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.2470672796984132 + 20 +68.1721391581167779 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D24 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +44C +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +91.0945840207701991 + 20 +22.8514505905694207 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D25 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +44D +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.5677558472457633 + 20 +71.7977942435205705 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D26 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +44E +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle IDs + 62 +256 +370 +-1 + 6 +ByLayer + 10 +94.2670322204983933 + 20 +56.0623609818849502 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D27 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +44F +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +52.755019316493339 + 20 +-26.5040026106983753 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[0,0] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +450 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +188.0 + 20 +90.4090909999999894 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[6,1] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +451 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +154.9479940564648643 + 20 +117.7642173001495252 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[7,2] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +452 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +109.292600297177728 + 20 +106.186921609213357 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[8,3] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +453 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +47.0728083209512889 + 20 +22.1671890683508188 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[10,4] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +454 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.0 + 20 +68.4090909999999894 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[12,5] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +455 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.5471619613676211 + 20 +23.0040389940566072 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[13,6] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +456 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.2844457652311689 + 20 +73.7840924858846421 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[14,7] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +457 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +93.4593997028238874 + 20 +54.1013822332842054 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[15,8] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +458 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.4531946508173093 + 20 +-47.971295329866301 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[1,9] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +459 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +186.3298662704316371 + 20 +-45.356139312035836 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[3,10] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +45A +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +209.6811173848448959 + 20 +-3.8755806196136904 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[4,11] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +45B +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +113.2224475482913562 + 20 +-19.0861648692422179 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[16,12] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +45C +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +138.0 + 20 +-48.5909089999999964 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[17,13] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +45D +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +158.3186163447253989 + 20 +-19.7288656121842862 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[18,14] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +45E +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.6810246656762331 + 20 +-30.2263110802377781 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[19,15] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +45F +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +160.8090817236268322 + 20 +67.624877032689966 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[20,16] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +460 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +182.2056606240723227 + 20 +18.1904782213968303 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[21,17] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +461 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +202.0490460624087348 + 20 +55.0386541500747342 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[22,18] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +462 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +177.8138722139687218 + 20 +45.6659349821697518 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[23,19] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +463 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +113.2362555720659714 + 20 +4.5933406285289973 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[24,20] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +464 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +137.645075780090167 + 20 +55.306446126300564 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[25,21] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +465 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +158.2169390787526879 + 20 +4.3318250267459346 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[26,22] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +466 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.0717979197631564 + 20 +23.8408889197624134 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[27,23] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +467 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0781250000017621 + 20 +63.2812500000008527 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +20 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +468 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.2343750000015632 + 20 +94.531250000001279 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +21 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +469 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +98.0468750000013216 + 20 +60.9375000000008242 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +22 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +46A +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +122.2656250000016485 + 20 +9.3750000000001261 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +23 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +46B +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +109.7656250000014779 + 20 +-14.0625000000001901 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +24 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +46C +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.3125000000012932 + 20 +18.7500000000002522 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +25 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +46D +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +153.1250000000020748 + 20 +66.4062500000008953 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +26 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +46E +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +139.4531250000018758 + 20 +38.6718750000005258 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +27 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +46F +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +150.0000000000020179 + 20 +13.6718750000001847 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +30 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +470 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +156.7213114754110563 + 20 +-12.4590163934427203 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +29 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +471 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +173.114754098361999 + 20 +16.0655737704919268 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +28 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +LINE + 5 +472 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +117.5 + 21 +87.5 + 31 +0.0 + 0 +LINE + 5 +473 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +117.5 + 20 +87.5 + 30 +0.0 + 11 +95.0 + 21 +85.0 + 31 +0.0 + 0 +LINE + 5 +474 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +127.5000445955795527 + 20 +65.0000891911591054 + 30 +0.0 + 11 +117.5 + 21 +87.5 + 31 +0.0 + 0 +LINE + 5 +475 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +105.0000445955795527 + 21 +62.5000891911591054 + 31 +0.0 + 0 +LINE + 5 +476 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +105.0000445955795527 + 20 +62.5000891911591054 + 30 +0.0 + 11 +95.0 + 21 +85.0 + 31 +0.0 + 0 +LINE + 5 +477 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +127.5000445955795527 + 20 +65.0000891911591054 + 30 +0.0 + 11 +105.0000445955795527 + 21 +62.5000891911591054 + 31 +0.0 + 0 +LINE + 5 +478 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +105.0000445955795527 + 20 +62.5000891911591054 + 30 +0.0 + 11 +117.5 + 21 +87.5 + 31 +0.0 + 0 +MTEXT + 5 +479 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +52.755019316493339 + 20 +-26.5040026106983753 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[0,0] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +47A +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +160.8090817236268322 + 20 +67.624877032689966 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[20,16] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +47B +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +182.2056606240723227 + 20 +18.1904782213968303 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[21,17] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +47C +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +202.0490460624087348 + 20 +55.0386541500747342 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[22,18] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +47D +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +177.8138722139687218 + 20 +45.6659349821697518 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[23,19] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +47E +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +137.645075780090167 + 20 +55.306446126300564 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[25,21] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +47F +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +158.2169390787526879 + 20 +4.3318250267459346 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[26,22] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +480 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.0717979197631564 + 20 +23.8408889197624134 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[27,23] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +481 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.4531946508173093 + 20 +-47.971295329866301 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[1,1] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +482 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +109.292600297177728 + 20 +106.186921609213357 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[8,2] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +483 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +47.0728083209512889 + 20 +22.1671890683508188 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[10,3] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +484 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.0 + 20 +68.4090909999999894 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[12,4] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +485 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.5471619613676211 + 20 +23.0040389940566072 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[13,5] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +486 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +93.4593997028238874 + 20 +54.1013822332842054 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[15,6] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +487 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +113.2224475482913562 + 20 +-19.0861648692422179 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[16,7] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +488 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +138.0 + 20 +-48.5909089999999964 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[17,8] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +489 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.6810246656762331 + 20 +-30.2263110802377781 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[19,9] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +48A +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +106.5573770491830032 + 20 +82.3763041147561523 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[28,10] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +48B +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.7786885245930648 + 20 +58.8107303442637601 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[29,11] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +48C +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +128.0737704918064992 + 20 +84.9377795245922869 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[30,12] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +48D +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +117.315573770494737 + 20 +69.056631983608284 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[31,13] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +48E +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +100.409836065576286 + 20 +-5.226154901639485 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[32,14] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +48F +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.4194098360685246 + 20 +19.6132877213119698 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[33,15] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +490 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +123.6857704918064655 + 20 +-5.6341876885247455 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[34,16] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +491 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +113.4793442622979995 + 20 +12.3613532950822744 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[35,17] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +492 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +186.3298662704316371 + 20 +-45.356139312035836 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[3,18] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +493 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +209.6811173848448959 + 20 +-3.8755806196136904 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[4,19] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +494 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +188.0 + 20 +90.4090909999999894 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[6,20] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +495 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +154.9479940564648643 + 20 +117.7642173001495252 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[7,21] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +496 +100 +AcDbEntity +100 +AcDbMText + 8 +2-UGrid Triangle Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +158.3186163447253989 + 20 +-19.7288656121842862 + 30 +0.0 + 40 +3.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +D[18,22] + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +LINE + 5 +497 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Mark DownAdj Edges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +LINE + 5 +498 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +499 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +49A +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +49B +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.2752319396871599 + 20 +85.0305813266319035 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +49C +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +67.25 + 20 +-70.0 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +49D +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +50.0 + 21 +80.0 + 31 +0.0 + 0 +LINE + 5 +49E +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed OverlapEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.9999989626024757 + 20 +-39.9999987551229736 + 30 +0.0 + 11 +159.9997155749006197 + 21 +-40.0004266376490492 + 31 +0.0 + 0 +LINE + 5 +49F +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed BorderEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +4A0 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed BorderEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +4A1 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed BorderEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +134.9999999999999716 + 20 +-10.0000000000000249 + 30 +0.0 + 11 +159.9997155749006197 + 21 +-40.0004266376490492 + 31 +0.0 + 0 +LINE + 5 +4A2 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed BorderEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +4A3 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed BorderEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +134.9999999999999716 + 21 +-10.0000000000000249 + 31 +0.0 + 0 +LINE + 5 +4A4 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed GhostEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +70.0 + 21 +35.0 + 31 +0.0 + 0 +HATCH + 5 +4A5 + 8 +1-UGrid DG Part2 H5Fed OverlapVertices + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +LINE + 5 +4A6 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +4A7 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +120.0 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +LINE + 5 +4A8 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +240.0 + 21 +-60.0 + 31 +0.0 + 0 +LINE + 5 +4A9 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +240.0 + 20 +-60.0 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +4AA +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +240.0 + 20 +-60.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +4AB +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +159.9997155749006197 + 21 +-40.0004266376490278 + 31 +0.0 + 0 +LINE + 5 +4AC +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +4AD +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +200.0 + 21 +25.0 + 31 +0.0 + 0 +LINE + 5 +4AE +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +25.0 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +LINE + 5 +4AF +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +4B0 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +4B1 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 30 +0.0 + 11 +180.0000175342504178 + 21 +74.9999934246560969 + 31 +0.0 + 0 +LINE + 5 +4B2 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 30 +0.0 + 11 +200.0 + 21 +25.0 + 31 +0.0 + 0 +LINE + 5 +4B3 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +25.0 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +4B4 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +4B5 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +4B6 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +4B7 +100 +AcDbEntity +100 +AcDbLine + 8 +1-UGrid DG Part2 H5Fed InteriorEdges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +HATCH + 5 +4B8 + 8 +1-UGrid DG Part2 H5Fed InteriorVertices + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +7 + 72 +2 + 10 +200.0 + 20 +25.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +180.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +240.0 + 20 +-60.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +159.9999450076830385 + 20 +40.0001374807924819 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +200.0 + 20 +120.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +220.0 + 20 +60.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +4B9 + 8 +1-UGrid DG Part2 H5Fed FrontVertices + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +5 + 72 +2 + 10 +70.0 + 20 +35.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +95.0 + 20 +85.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +90.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +50.0 + 20 +80.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +60.0 + 20 +-70.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +4BA + 8 +1-UGrid DG Part2 H5Fed BorderVertices + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +130.0 + 20 +150.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +4BB + 8 +1-UGrid DG Part2 H5Fed BorderVertices + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +5 + 72 +2 + 10 +140.0 + 20 +90.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +135.0 + 20 +-10.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +159.9997155749006197 + 20 +-40.0004266376490492 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +140.0 + 20 +-70.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +MTEXT + 5 +4BC +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle Idx + 62 +256 +370 +15 + 6 +ByLayer + 10 +155.8306555706566314 + 20 +119.2212725696178381 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +7 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4BD +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle Idx + 62 +256 +370 +15 + 6 +ByLayer + 10 +188.4615513392906792 + 20 +91.5756525434139803 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +6 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4BE +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle Idx + 62 +256 +370 +15 + 6 +ByLayer + 10 +110.056760117433825 + 20 +107.4378935420555763 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +8 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4BF +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle Idx + 62 +256 +370 +15 + 6 +ByLayer + 10 +94.1945191187922575 + 20 +56.3523231977330994 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +9 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4C0 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle Idx + 62 +256 +370 +15 + 6 +ByLayer + 10 +179.3974136257813257 + 20 +48.9742052899195457 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +5 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4C1 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle Idx + 62 +256 +370 +15 + 6 +ByLayer + 10 +136.3427594866114418 + 20 +24.047826577768511 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +11 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4C2 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle Idx + 62 +256 +370 +15 + 6 +ByLayer + 10 +209.7622749660378929 + 20 +-1.784965905733471 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +4 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4C3 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle Idx + 62 +256 +370 +15 + 6 +ByLayer + 10 +46.6077961228675974 + 20 +23.1414128064175415 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +10 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4C4 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle Idx + 62 +256 +370 +15 + 6 +ByLayer + 10 +185.2891031395623713 + 20 +-43.0267925022015305 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +3 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4C5 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle Idx + 62 +256 +370 +15 + 6 +ByLayer + 10 +136.3427594866113282 + 20 +-28.52417216058641 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +2 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4C6 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle Idx + 62 +256 +370 +15 + 6 +ByLayer + 10 +52.4994856366487497 + 20 +-27.617758389235437 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +0 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4C7 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Triangle Idx + 62 +256 +370 +15 + 6 +ByLayer + 10 +95.5541397758186974 + 20 +-47.1056544732807936 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +1 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4C8 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +-4.3945312500000435 + 20 +4.3945312500000435 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +0 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4C9 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +54.6875000000005471 + 20 +-72.7539062500007248 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +1 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4CA +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +141.1132812500013927 + 20 +-74.218750000000739 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +3 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4CB +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +243.1640625000024158 + 20 +-61.5234375000006111 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +5 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4CC +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +134.7656250000013358 + 20 +155.2734375000015348 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +9 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4CD +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +62.5000000000008455 + 20 +36.7187500000004974 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +13 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4CE +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +204.2968750000027569 + 20 +24.609375000000334 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +17 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4CF +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +92.0 + 20 +77.0 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +12 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4D0 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +133.0 + 20 +-16.0 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +15 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4D1 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +105.73567994187664 + 20 +37.7278502906245166 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +11 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4D2 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +45.3924356096011437 + 20 +86.2214684672021718 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +10 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4D3 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +165.1414925312053299 + 20 +44.6676598784014445 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +19 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4D4 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +162.4571379712058956 + 20 +-39.2184201216014188 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +14 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4D5 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +108.517764522053838 + 20 +-39.1882183094548893 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +16 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4D6 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +82.4432394240034654 + 20 +-11.274289152000474 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +2 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4D7 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +184.6835937280083613 + 20 +-6.7108864000003035 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +4 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4D8 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +184.6835937280083613 + 20 +-6.7108864000003035 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +4 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4D9 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +52.755019316493339 + 20 +-26.5040026106983753 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +0 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4DA +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.4531946508173093 + 20 +-47.971295329866301 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +1 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4DB +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +186.3298662704316371 + 20 +-45.356139312035836 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +3 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4DC +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +209.6811173848448959 + 20 +-3.8755806196136904 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +4 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4DD +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +188.0 + 20 +90.4090909999999894 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +6 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4DE +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +154.9479940564648643 + 20 +117.7642173001495252 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +7 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4DF +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +109.292600297177728 + 20 +106.186921609213357 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +8 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4E0 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +47.0728083209512889 + 20 +22.1671890683508188 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +10 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4E1 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +70.0 + 20 +68.4090909999999894 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +12 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4E2 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.5471619613676211 + 20 +23.0040389940566072 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +13 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4E3 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.2844457652311689 + 20 +73.7840924858846421 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +14 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4E4 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +93.4593997028238874 + 20 +54.1013822332842054 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +15 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4E5 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +113.2224475482913562 + 20 +-19.0861648692422179 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +16 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4E6 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +138.0 + 20 +-48.5909089999999964 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +17 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4E7 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +158.3186163447253989 + 20 +-19.7288656121842862 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +18 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4E8 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.6810246656762331 + 20 +-30.2263110802377781 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +19 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4E9 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +160.8090817236268322 + 20 +67.624877032689966 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +20 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4EA +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +182.2056606240723227 + 20 +18.1904782213968303 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +21 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4EB +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +202.0490460624087348 + 20 +55.0386541500747342 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +22 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4EC +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +177.8138722139687218 + 20 +45.6659349821697518 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +23 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4ED +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +113.2362555720659714 + 20 +4.5933406285289973 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +24 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4EE +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +137.645075780090167 + 20 +55.306446126300564 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +25 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4EF +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +158.2169390787526879 + 20 +4.3318250267459346 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +26 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4F0 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid GlobalIdx Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.0717979197631564 + 20 +23.8408889197624134 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +5 + 72 +2 + 1 +27 + 7 +greeks + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4F1 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +-4.3945312500000435 + 20 +4.3945312500000435 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +0 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4F2 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +54.6875000000005471 + 20 +-72.7539062500007248 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +1 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4F3 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +141.1132812500013927 + 20 +-74.218750000000739 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +3 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4F4 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +243.1640625000024158 + 20 +-61.5234375000006111 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +5 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4F5 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +223.6328125000022169 + 20 +62.9882812500006253 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +6 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4F6 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +202.1484375000020179 + 20 +124.5117187500012363 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +8 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4F7 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +134.7656250000013358 + 20 +155.2734375000015348 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +9 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4F8 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +45.3924356096011437 + 20 +86.2214684672021718 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +10 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4F9 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +82.4432394240034654 + 20 +-11.274289152000474 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +2 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +4FA +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +184.6835937280083613 + 20 +-6.7108864000003035 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +4 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +LINE + 5 +4FB +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Mark UpAdj Edges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +4FC +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Mark UpAdj Edges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +LINE + 5 +4FD +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Mark UpAdj Edges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +4FE +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Mark UpAdj Edges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +4FF +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Mark UpAdj Edges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +50.0 + 21 +80.0 + 31 +0.0 + 0 +LINE + 5 +500 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Mark UpAdj Edges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +130.0 + 21 +150.0 + 31 +0.0 + 0 +HATCH + 5 +501 + 8 +0-UGrid Mark UpAdj Vertex + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +140.0 + 20 +90.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +MTEXT + 5 +502 +100 +AcDbEntity +100 +AcDbMText + 8 +0-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +142.0 + 20 +99.0 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +7 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +LINE + 5 +503 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Mark DownAdj Edges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +504 +100 +AcDbEntity +100 +AcDbLine + 8 +0-UGrid Mark DownAdj Edges + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +120.0 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +HATCH + 5 +505 + 8 +0-UGrid Mark DownAdj Vertices + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +2 + 10 +200.0 + 20 +120.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +140.0 + 20 +90.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +220.0 + 20 +60.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +506 + 8 +1-UGrid Mark DownAdjVertices + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +3 + 72 +2 + 10 +200.0 + 20 +120.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +140.0 + 20 +90.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 72 +2 + 10 +220.0 + 20 +60.0 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +HATCH + 5 +507 + 8 +1-UGrid Mark DownAdjVertices + 62 +256 +370 +-1 + 6 +ByLayer +100 +AcDbEntity +100 +AcDbHatch + 10 +0.0 + 20 +0.0 + 30 +0.0 +210 +0.0 +220 +0.0 +230 +1.0 + 2 +SOLID + 70 +1 + 71 +0 + 91 +1 + 92 +1 + 93 +1 + 72 +2 + 10 +180.0000175342504178 + 20 +74.9999934246560969 + 40 +7.25 + 50 +0.0 + 51 +360.0 + 73 +1 + 97 +0 + 75 +0 + 76 +1 + 98 +0 + 0 +MTEXT + 5 +508 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +223.6328125000022169 + 20 +62.9882812500006253 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +6 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +509 +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +202.1484375000020179 + 20 +124.5117187500012363 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +8 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +50A +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +181.2500000000024443 + 20 +82.0312500000011084 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +18 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +MTEXT + 5 +50B +100 +AcDbEntity +100 +AcDbMText + 8 +1-UGrid Vertex Idx + 62 +256 +370 +-1 + 6 +ByLayer + 10 +142.0 + 20 +99.0 + 30 +0.0 + 40 +5.0 + 41 +100.0 + 71 +1 + 72 +2 + 1 +7 + 7 +normal + 50 +0.0 + 73 +0 + 44 +1.0 + 0 +ENDSEC + 0 +SECTION + 2 +OBJECTS + 0 +DICTIONARY + 5 +C +100 +AcDbDictionary +280 +0 +281 +1 + 3 +ACAD_GROUP +350 +D + 3 +ACAD_LAYOUT +350 +1A + 3 +ACAD_MLINESTYLE +350 +17 + 3 +ACAD_PLOTSETTINGS +350 +19 + 3 +ACAD_PLOTSTYLENAME +350 +E + 3 +AcDbVariableDictionary +350 +50C + 0 +DICTIONARY + 5 +D +100 +AcDbDictionary +280 +0 +281 +1 + 0 +ACDBDICTIONARYWDFLT + 5 +E +100 +AcDbDictionary +281 +1 + 3 +Normal +350 +F +100 +AcDbDictionaryWithDefault +340 +F + 0 +ACDBPLACEHOLDER + 5 +F + 0 +DICTIONARY + 5 +17 +100 +AcDbDictionary +280 +0 +281 +1 + 3 +Standard +350 +18 + 0 +MLINESTYLE + 5 +18 +100 +AcDbMlineStyle + 2 +STANDARD + 70 +0 + 3 + + 62 +256 + 51 +90.0 + 52 +90.0 + 71 +2 + 49 +0.5 + 62 +256 + 6 +BYLAYER + 49 +-0.5 + 62 +256 + 6 +BYLAYER + 0 +DICTIONARY + 5 +19 +100 +AcDbDictionary +280 +0 +281 +1 + 0 +DICTIONARY + 5 +1A +100 +AcDbDictionary +281 +1 + 3 +Layout1 +350 +1E + 3 +Layout2 +350 +26 + 3 +Model +350 +22 + 0 +LAYOUT + 5 +1E +100 +AcDbPlotSettings + 1 + + 2 +C:\Program Files\AutoCAD 2002\plotters\DWF ePlot (optimized for plotting).pc3 + 4 + + 6 + + 40 +0.0 + 41 +0.0 + 42 +0.0 + 43 +0.0 + 44 +0.0 + 45 +0.0 + 46 +0.0 + 47 +0.0 + 48 +0.0 + 49 +0.0 +140 +0.0 +141 +0.0 +142 +1.0 +143 +1.0 + 70 +688 + 72 +0 + 73 +0 + 74 +5 + 7 + + 75 +16 +147 +1.0 +148 +0.0 +149 +0.0 +100 +AcDbLayout + 1 +Layout1 + 70 +1 + 71 +1 + 10 +0.0 + 20 +0.0 + 11 +420.0 + 21 +297.0 + 12 +0.0 + 22 +0.0 + 32 +0.0 + 14 +100000000000000000000.0 + 24 +100000000000000000000.0 + 34 +100000000000000000000.0 + 15 +-100000000000000000000.0 + 25 +-100000000000000000000.0 + 35 +-100000000000000000000.0 +146 +0.0 + 13 +0.0 + 23 +0.0 + 33 +0.0 + 16 +1.0 + 26 +0.0 + 36 +0.0 + 17 +0.0 + 27 +1.0 + 37 +0.0 + 76 +0 +330 +1B + 0 +LAYOUT + 5 +22 +100 +AcDbPlotSettings + 1 + + 2 +C:\Program Files\AutoCAD 2002\plotters\DWF ePlot (optimized for plotting).pc3 + 4 + + 6 + + 40 +0.0 + 41 +0.0 + 42 +0.0 + 43 +0.0 + 44 +0.0 + 45 +0.0 + 46 +0.0 + 47 +0.0 + 48 +0.0 + 49 +0.0 +140 +0.0 +141 +0.0 +142 +1.0 +143 +1.0 + 70 +1712 + 72 +0 + 73 +0 + 74 +0 + 7 + + 75 +0 +147 +1.0 +148 +0.0 +149 +0.0 +100 +AcDbLayout + 1 +Model + 70 +1 + 71 +0 + 10 +0.0 + 20 +0.0 + 11 +12.0 + 21 +9.0 + 12 +0.0 + 22 +0.0 + 32 +0.0 + 14 +0.0 + 24 +0.0 + 34 +0.0 + 15 +0.0 + 25 +0.0 + 35 +0.0 +146 +0.0 + 13 +0.0 + 23 +0.0 + 33 +0.0 + 16 +1.0 + 26 +0.0 + 36 +0.0 + 17 +0.0 + 27 +1.0 + 37 +0.0 + 76 +0 +330 +1F + 0 +LAYOUT + 5 +26 +100 +AcDbPlotSettings + 1 + + 2 +C:\Program Files\AutoCAD 2002\plotters\DWF ePlot (optimized for plotting).pc3 + 4 + + 6 + + 40 +0.0 + 41 +0.0 + 42 +0.0 + 43 +0.0 + 44 +0.0 + 45 +0.0 + 46 +0.0 + 47 +0.0 + 48 +0.0 + 49 +0.0 +140 +0.0 +141 +0.0 +142 +1.0 +143 +1.0 + 70 +688 + 72 +0 + 73 +0 + 74 +5 + 7 + + 75 +16 +147 +1.0 +148 +0.0 +149 +0.0 +100 +AcDbLayout + 1 +Layout2 + 70 +1 + 71 +2 + 10 +0.0 + 20 +0.0 + 11 +12.0 + 21 +9.0 + 12 +0.0 + 22 +0.0 + 32 +0.0 + 14 +0.0 + 24 +0.0 + 34 +0.0 + 15 +0.0 + 25 +0.0 + 35 +0.0 +146 +0.0 + 13 +0.0 + 23 +0.0 + 33 +0.0 + 16 +1.0 + 26 +0.0 + 36 +0.0 + 17 +0.0 + 27 +1.0 + 37 +0.0 + 76 +0 +330 +23 + 0 +DICTIONARY + 5 +50C +100 +AcDbDictionary +281 +1 + 3 +DIMASSOC +350 +50E + 3 +HIDETEXT +350 +50D + 0 +DICTIONARYVAR + 5 +50D +100 +DictionaryVariables +280 +0 + 1 +2 + 0 +DICTIONARYVAR + 5 +50E +100 +DictionaryVariables +280 +0 + 1 +1 + 0 +ENDSEC + 0 +EOF diff --git a/doc/Examples/meshexample.txt b/doc/Examples/meshexample.txt new file mode 100644 index 0000000..0cb1312 --- /dev/null +++ b/doc/Examples/meshexample.txt @@ -0,0 +1,77 @@ +NumLevels: 2 + +NumVerticesOnLevel: 11 20 29 + +Vertices: +1 0.0 0.0 +2 60.0 -70.0 +3 90.0 -10.0 +4 140.0 -70.0 +5 180.0 -10.0 +6 240.0 -60.0 +7 220.0 60.0 +8 140.0 90.0 +9 200.0 120.0 +10 130.0 150.0 +11 50.0 80.0 +12 115.0 40.0 +13 95.0 85.0 +14 70.0 35.0 +15 160.0 -40.0 +16 135.0 -10.0 +17 115.0 -40.0 +18 200.0 25.0 +19 180.0 75.0 +20 160.0 40.0 + +21 125.0 15.0 +22 112.5 -10.0 +23 102.5 15.0 +24 147.5 15.0 +25 137.5 40.0 +26 150.0 65.0 +27 127.5 65.0 +28 117.5 87.5 +29 105.0 62.5 + +NumElemsOnLevel: 12 24 36 +NumElems: 12 28 44 + +Elements: +ID PID CID VertexIDs Adj Translation Tbl (dim num lvls - 1) +1 -1 -1 1 2 3 2 11 -1 1 +2 -1 -1 2 3 4 3 -1 1 2 +3 -1 12 3 4 5 4 12 2 -1 +4 -1 -1 4 5 6 5 -1 3 3 +5 -1 -1 5 7 6 -1 4 6 4 +6 -1 17 8 5 7 5 7 12 -1 +7 -1 -1 8 9 7 -1 6 8 5 +8 -1 -1 10 8 9 7 -1 9 6 +9 -1 -1 11 10 8 8 10 -1 7 +10 -1 25 11 3 8 12 9 11 -1 +11 -1 -1 1 11 3 10 1 -1 8 +12 -1 21 3 8 5 6 3 10 -1 +13 3 -1 3 14 13 16 21 2 9 +14 3 -1 14 4 12 4 16 2 10 +15 3 -1 13 12 5 4 23 16 11 +16 3 -1 14 13 12 15 14 13 12 +17 6 -1 8 17 16 20 5 22 13 +18 6 -1 17 5 15 5 20 23 14 +19 6 -1 16 15 7 5 7 20 15 +20 6 -1 17 16 15 19 18 17 16 +21 12 -1 3 18 13 24 13 26 17 +22 12 -1 18 8 17 17 24 27 18 +23 12 -1 13 17 5 18 15 24 19 +24 12 -1 18 13 17 23 22 21 20 +25 10 -1 11 20 19 28 9 11 21 +26 10 -1 20 3 18 21 28 11 22 +27 10 -1 19 18 8 22 9 28 23 +28 10 -1 20 3 18 27 26 25 24 + +3,0 3,1 4,2 2,3 16,4 + +1 2 -1 3 4 + +1 2 3 +1 3 6 +2 11 1 13 14 diff --git a/doc/Examples/simple_tet.vtk b/doc/Examples/simple_tet.vtk new file mode 100644 index 0000000..79db55f --- /dev/null +++ b/doc/Examples/simple_tet.vtk @@ -0,0 +1,107 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 17 DOUBLE +-1 0 0 +1 0 0 +0 1 0 +0 0 1 +0 -1 0 +-0.5 0 0.5 +-0.5 0.5 0 +0 0 0 +0 0.5 0.5 +0.5 0 0.5 +0.5 0.5 0 +-0.75 0 0.25 +-0.75 0.25 0 +-0.5 0 0 +-0.5 0.25 0.25 +-0.25 0 0.25 +-0.25 0.25 0 + +CELLS 18 90 +4 0 3 2 1 +4 0 4 3 1 +4 0 5 6 7 +4 5 3 8 9 +4 6 8 2 10 +4 7 9 10 1 +4 5 6 7 9 +4 5 6 8 9 +4 6 7 9 10 +4 6 8 9 10 +4 0 11 12 13 +4 11 5 14 15 +4 12 14 6 16 +4 13 15 16 7 +4 11 12 13 15 +4 11 12 14 15 +4 12 13 15 16 +4 12 14 15 16 + +CELL_TYPES 18 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 + +POINT_DATA 17 +SCALARS vertex_id int 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 + +CELL_DATA 18 +SCALARS cell_attribute_data int 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 + diff --git a/doc/Examples/simple_tet_level0.vtk b/doc/Examples/simple_tet_level0.vtk new file mode 100644 index 0000000..9a07498 --- /dev/null +++ b/doc/Examples/simple_tet_level0.vtk @@ -0,0 +1,59 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 17 DOUBLE +-1 0 0 +1 0 0 +0 1 0 +0 0 1 +0 -1 0 +-0.5 0 0.5 +-0.5 0.5 0 +0 0 0 +0 0.5 0.5 +0.5 0 0.5 +0.5 0.5 0 +-0.75 0 0.25 +-0.75 0.25 0 +-0.5 0 0 +-0.5 0.25 0.25 +-0.25 0 0.25 +-0.25 0.25 0 + +CELLS 2 10 +4 0 3 2 1 +4 0 4 3 1 + +CELL_TYPES 2 +10 +10 + +POINT_DATA 17 +SCALARS vertex_id int 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 + +CELL_DATA 2 +SCALARS cell_attribute_data int 1 +LOOKUP_TABLE default +0 +1 + diff --git a/doc/Examples/simple_tet_level1.vtk b/doc/Examples/simple_tet_level1.vtk new file mode 100644 index 0000000..40561bb --- /dev/null +++ b/doc/Examples/simple_tet_level1.vtk @@ -0,0 +1,80 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 17 DOUBLE +-1 0 0 +1 0 0 +0 1 0 +0 0 1 +0 -1 0 +-0.5 0 0.5 +-0.5 0.5 0 +0 0 0 +0 0.5 0.5 +0.5 0 0.5 +0.5 0.5 0 +-0.75 0 0.25 +-0.75 0.25 0 +-0.5 0 0 +-0.5 0.25 0.25 +-0.25 0 0.25 +-0.25 0.25 0 + +CELLS 9 45 +4 0 4 3 1 +4 0 5 6 7 +4 5 3 8 9 +4 6 8 2 10 +4 7 9 10 1 +4 5 6 7 9 +4 5 6 8 9 +4 6 7 9 10 +4 6 8 9 10 + +CELL_TYPES 9 +10 +10 +10 +10 +10 +10 +10 +10 +10 + +POINT_DATA 17 +SCALARS vertex_id int 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 + +CELL_DATA 9 +SCALARS cell_attribute_data int 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 +7 +8 + diff --git a/doc/Examples/simple_tet_level2.vtk b/doc/Examples/simple_tet_level2.vtk new file mode 100644 index 0000000..031e6de --- /dev/null +++ b/doc/Examples/simple_tet_level2.vtk @@ -0,0 +1,101 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 17 DOUBLE +-1 0 0 +1 0 0 +0 1 0 +0 0 1 +0 -1 0 +-0.5 0 0.5 +-0.5 0.5 0 +0 0 0 +0 0.5 0.5 +0.5 0 0.5 +0.5 0.5 0 +-0.75 0 0.25 +-0.75 0.25 0 +-0.5 0 0 +-0.5 0.25 0.25 +-0.25 0 0.25 +-0.25 0.25 0 + +CELLS 16 80 +4 0 4 3 1 +4 5 3 8 9 +4 6 8 2 10 +4 7 9 10 1 +4 5 6 7 9 +4 5 6 8 9 +4 6 7 9 10 +4 6 8 9 10 +4 0 11 12 13 +4 11 5 14 15 +4 12 14 6 16 +4 13 15 16 7 +4 11 12 13 15 +4 11 12 14 15 +4 12 13 15 16 +4 12 14 15 16 + +CELL_TYPES 16 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 + +POINT_DATA 17 +SCALARS vertex_id int 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 + +CELL_DATA 16 +SCALARS cell_attribute_data int 1 +LOOKUP_TABLE default +1 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 + diff --git a/doc/Examples/trimesh_dgraph_level0.metis b/doc/Examples/trimesh_dgraph_level0.metis new file mode 100644 index 0000000..17fef31 --- /dev/null +++ b/doc/Examples/trimesh_dgraph_level0.metis @@ -0,0 +1,13 @@ +12 14 +2 11 +1 3 +2 4 12 +3 5 +4 6 +5 7 12 +6 8 +7 9 +8 10 +9 11 12 +1 10 +3 6 10 diff --git a/doc/Examples/trimesh_dgraph_level0.metis.part.2 b/doc/Examples/trimesh_dgraph_level0.metis.part.2 new file mode 100644 index 0000000..932bdd1 --- /dev/null +++ b/doc/Examples/trimesh_dgraph_level0.metis.part.2 @@ -0,0 +1,12 @@ +0 +1 +1 +1 +1 +1 +0 +0 +0 +0 +0 +1 diff --git a/doc/Examples/trimesh_dgraph_level0.metis.part.3 b/doc/Examples/trimesh_dgraph_level0.metis.part.3 new file mode 100644 index 0000000..82e1d15 --- /dev/null +++ b/doc/Examples/trimesh_dgraph_level0.metis.part.3 @@ -0,0 +1,12 @@ +1 +1 +2 +2 +2 +0 +0 +0 +0 +1 +1 +2 diff --git a/doc/Examples/trimesh_dnode_level1.metis b/doc/Examples/trimesh_dnode_level1.metis new file mode 100644 index 0000000..ac60ffd --- /dev/null +++ b/doc/Examples/trimesh_dnode_level1.metis @@ -0,0 +1,49 @@ +24 35 +%1 +2 8 +%2 +1 9 10 +%3 +4 10 11 +%4 +3 14 15 +%5 +6 13 15 +%6 +5 7 +%7 +6 21 23 +%8 +1 21 22 +%9 +2 12 17 +%10 +2 3 12 +%11 +3 12 19 +%12 +9 10 11 +%13 +5 16 18 +%14 +4 16 19 +%15 +4 5 16 +%16 +13 14 15 +%17 +9 20 22 +%18 +13 20 23 +%19 +11 14 20 +%20 +17 18 19 +%21 +7 8 24 +%22 +8 17 24 +%23 +7 18 24 +%24 +21 22 23 diff --git a/doc/Examples/trimesh_dnode_level1.metis.part.2 b/doc/Examples/trimesh_dnode_level1.metis.part.2 new file mode 100644 index 0000000..4324494 --- /dev/null +++ b/doc/Examples/trimesh_dnode_level1.metis.part.2 @@ -0,0 +1,24 @@ +1 +1 +0 +0 +0 +0 +1 +1 +1 +1 +0 +1 +0 +0 +0 +0 +1 +0 +0 +0 +1 +1 +1 +1 diff --git a/doc/Examples/trimesh_level0.metis b/doc/Examples/trimesh_level0.metis new file mode 100644 index 0000000..60e7a0b --- /dev/null +++ b/doc/Examples/trimesh_level0.metis @@ -0,0 +1,13 @@ +12 1 +1 2 3 +2 3 4 +3 4 6 +4 5 6 +5 6 7 +6 7 8 +7 8 11 +8 10 11 +8 9 10 +3 8 9 +1 3 9 +3 6 8 diff --git a/doc/Examples/trimesh_level0.metis.epart.2 b/doc/Examples/trimesh_level0.metis.epart.2 new file mode 100644 index 0000000..0302f5a --- /dev/null +++ b/doc/Examples/trimesh_level0.metis.epart.2 @@ -0,0 +1,12 @@ +1 +1 +1 +1 +0 +0 +0 +0 +0 +0 +1 +1 diff --git a/doc/Examples/trimesh_level0.metis.ngraph b/doc/Examples/trimesh_level0.metis.ngraph new file mode 100644 index 0000000..66b8473 --- /dev/null +++ b/doc/Examples/trimesh_level0.metis.ngraph @@ -0,0 +1,12 @@ +11 22 + 2 3 9 + 1 3 4 + 1 2 4 6 8 9 + 2 3 6 5 + 4 6 7 + 3 4 5 7 8 + 5 6 8 11 + 6 7 11 10 9 3 + 8 10 3 1 + 8 11 9 + 7 8 10 \ No newline at end of file diff --git a/doc/Examples/trimesh_level0.metis.npart.2 b/doc/Examples/trimesh_level0.metis.npart.2 new file mode 100644 index 0000000..aa2eb92 --- /dev/null +++ b/doc/Examples/trimesh_level0.metis.npart.2 @@ -0,0 +1,11 @@ +1 +1 +1 +1 +1 +0 +0 +0 +0 +0 +0 diff --git a/doc/Examples/trimesh_level1.metis b/doc/Examples/trimesh_level1.metis new file mode 100644 index 0000000..56def42 --- /dev/null +++ b/doc/Examples/trimesh_level1.metis @@ -0,0 +1,41 @@ +20 43 +%1 +2 3 11 +%2 +1 3 4 +%3 +1 2 14 13 18 20 +%4 +2 14 12 6 +%5 +12 6 15 17 13 +%6 +4 5 7 +%7 +6 15 16 9 +%8 +9 10 19 18 17 16 +%9 +7 8 10 +%10 +8 9 11 +%11 +1 20 19 10 +%12 +4 14 13 5 +%13 +3 14 12 5 17 18 +%14 +3 13 12 4 +%15 +5 17 17 7 +%16 +7 8 17 15 +%17 +5 15 16 8 18 13 +%18 +3 13 17 8 19 20 +%19 +8 11 20 18 +%20 +3 18 19 11 diff --git a/doc/Examples/trimesh_level1.metis.part.2 b/doc/Examples/trimesh_level1.metis.part.2 new file mode 100644 index 0000000..73e4d78 --- /dev/null +++ b/doc/Examples/trimesh_level1.metis.part.2 @@ -0,0 +1,20 @@ +1 +1 +1 +0 +0 +0 +0 +1 +1 +1 +1 +0 +0 +0 +0 +0 +0 +1 +1 +1 diff --git a/doc/H5.dox b/doc/H5.dox new file mode 100644 index 0000000..374ec09 --- /dev/null +++ b/doc/H5.dox @@ -0,0 +1,84 @@ +/*! +\mainpage H5hut: A High-Performance I/O Library for Particle-based Simulations + +Particle-based simulations running on large high-performance computing systems +over many time steps can generate an enormous amount of particle- and +field-based data for post-processing and analysis. Achieving high-performance +I/O for this data, effectively managing it on disk, and interfacing it with +analysis and visualization tools can be challenging, especially for domain +scientists who do not have I/O and data management expertise. We present the +H5hut library, an implementation of several data models for particle-based +simulations that encapsulates the complexity of HDF5 and is simple to use, yet +does not compromise performance. + +Developers: + +
    +
  • Andreas Adelmann (PSI)
  • +
  • Achim Gsell (PSI)
  • +
  • Benedikt Oswald (PSI)
  • +
  • Mark Howison (NERSC/LBNL)
  • +
  • Prabhat (NERSC/LBNL)
  • +
  • Wes Bethel (NERSC/LBNL)
  • +
+ +Previous developers: + +
    +
  • John Shalf (NERSC/LBNL)
  • +
  • Cristina Siegerist (NERSC/LBNL)
  • +
+ +For more information, please contact the + h5part mailing list. + +*/ + +/*! + \defgroup c_api C API + @{ + \defgroup h5hut_c_api H5hut basic functions + @{ + \defgroup h5hut_file file handling + \defgroup h5hut_error error handling + \defgroup h5hut_model setting up the data model + \defgroup h5hut_attrib reading and writing attributes + @} + \defgroup h5part_c_api H5Part + @{ + \defgroup h5part_model setting up the data model + \defgroup h5part_data reading and writing datasets + @} + \defgroup h5block_c_api H5Block + @{ + \defgroup h5block_model setting up the data model + \defgroup h5block_data reading and writing datasets + \defgroup h5block_attrib reading and writing attributes + @} + @} +*/ + +/*! + \defgroup f90_api Fortran90 API + @{ + \defgroup h5hut_f90_api H5hut basic functions + @{ + \defgroup h5hut_file_f file handling + \defgroup h5hut_error_f error handling + \defgroup h5hut_model_f setting up the data model + \defgroup h5hut_attrib_f reading and writing attributes + @} + \defgroup h5part_f90_api H5Part + @{ + \defgroup h5part_model_f setting up the data model + \defgroup h5part_data_f reading and writing datasets + @} + \defgroup h5block_f90_api H5Block + @{ + \defgroup h5block_model_f setting up the data model + \defgroup h5block_data_f reading and writing datasets + \defgroup h5block_attrib_f reading and writing attributes + @} + @} +*/ + diff --git a/doc/H5X_File_Format.txt b/doc/H5X_File_Format.txt new file mode 100644 index 0000000..dc0d0f3 --- /dev/null +++ b/doc/H5X_File_Format.txt @@ -0,0 +1,170 @@ +Proposal for a more general file format used by H5Part/H5Block + + Authors: Achim Gsell + Status: Draft + +1. Introduction + +H5X is the file format used by H5Part and H5Block. H5X is designed on +top of HDF5: A H5X file is a very special HDF5 file. + + +--------------------+ + | Application | + +--------------------+ + | H5Part/H5Block API | + +--------------------+ + | H5X API | + +--------------------+ + | HDF5 API | + +--------------------+ + | Filesystem of OS | + +--------------------+ + + +2. H5X file format specification + +2.1 The root group + +2.1.1 File attributes + +Attributes of the HDF5 root group are called "file attributes". There +are no restrictions on file attribute names. Names with "__" as prefix and +postfix are intended for internal use. Supported values for file attributes +are scalars and arrays of 64bit integer and 64bit floating point number as +well as string values. Arrays of strings are not supported. + +2.1.1.1 Predefined file attributes + +__stepname__ (optional) + See below. + +__stepnumwidth__ (optional) + See below. + +2.1.2 Members of the root group + +Members of the root group are special formated HDF5 groups called +"step groups". The name of a step group is "#". +Whereby is either defined by the optional file attribute +__stepname__ or set to "Step" by default. is an +unsigned integer less than 2^63. + +/ ++- Step#0 ++- Step#1 +... ++- Step#n ++- StepProperties [NEW] ++- Mesh [NEW] + +The optional file attribute __stepnumwidth__ defines the minimum width +of in the name of the step group. The number is padded with +'0'. The minimum width defaults to zero, so that no paddings occurs. +Example: With __stepnumwidth__ := 5 the name of the step group with +number 42 is "Step#00042", with __stepnumwidth__ := 0 the name is +"Step#42". + +Step groups may be unsorted in the HDF5 file und needn't be number +consecutively. + +2.1.3 Other members of the root group + +Other sub-groups of the root group are allowed, but the group names are restricted +to names not matching "Step#.*". + +2.2 Format of a step group + +2.2.1 Step attributes + +Step attributes are HDF5 attributes asigned to a step group. There +are no restrictions on step attribute names. As with file attributes names +enclosed in "__" are intended for internal use. Supported values are the same +as for file attributes: + * 64bit integer value + * arrays of 64bit integer values + * 64bit floating point number + * array of 64bit floating point number + * strings +Note that array of strings are not supported! + +2.2.2 Predefined step attributes + +No predefined step attributes exists. + + +2.2.3 Members of a step group + +Members of a step group are HDF5 datasets and optional one HDF5 group +with the name "Block". HDF5 datasets in a step group are called "step +datasets". The optional block group is called "block data". + +Mesh?! + +2.2.4 Step datasets + +Step datasets are arrays of rank 1. The dataset size must be the same +for all datasets inside a step. The size of the dataset may vary +from step to step. Array values are 64bit integer or 64bit floating +point numbers. No limitations (other than given by HDF5) are given on +step dataset names. + + +2.2.5 Block Data + +The block data group is a container for an arbitrary number of field +data. A field is a data structure to store arrays of rank m with +n-dimensional vector values. Fields are represented within HDF5 +groups. The HDF5 group name is the unique identifier for a field in +the current step. + +2.2.5.1 m-rank fields with n-dimensional-vector values + +Values are stored per dimension in separate datasets. Thus we have n +datasets for a field with n-dimensional vector values. Each dataset +corresponse to one dimension. The datasets are numbered from '0' to +'n-1'. Arrays are stored in column major order (Fortran indexing +scheme). + +/ # HDF5 root group +... ++- Step# # HDF5 group + | + +- Block # HDF5 group + | + +- # HDF5 group + | + +- 0 # HDF5 dataset, first dim of vector + +- 1 # HDF5 dataset, second dim of vector + ... + +- n-1 # HDF5 dataset, last dim of vector +... + +2.2.5.2 m-rank fields with scalar values + +Fields with scalar values are stored as special case of fields with +n-dimensional vector values with n := 1. + +/ # HDF5 root group +... ++- Step# # HDF5 group + | + +- Block # HDF5 group + | + +- # HDF5 group + | + +- 0 # HDF5 dataset, scalar value +... + + +2.3 Step properties [NEW] + +Why? Much faster than step attributes if you need to access consecutive values + +Group of root group with name "StepProperties" + +Members are datasets + +Supported values are the same as for step attributes + +Mapping of value to step via object index of step group + diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..9fb9c13 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,14 @@ +EXTRA_DIST = \ + Doxyfile \ + H5.dox + +all: + +doc: + +doxydoc: + doxygen + +clean-local: + $(RM) -r ReferencePages TWiki + $(RM) *~ diff --git a/doc/TracFooter.html b/doc/TracFooter.html new file mode 100644 index 0000000..139597f --- /dev/null +++ b/doc/TracFooter.html @@ -0,0 +1,2 @@ + + diff --git a/doc/TracHeader.html b/doc/TracHeader.html new file mode 100644 index 0000000..0172b3c --- /dev/null +++ b/doc/TracHeader.html @@ -0,0 +1,4 @@ + + diff --git a/doc/doxyfooter b/doc/doxyfooter new file mode 100644 index 0000000..e04310f --- /dev/null +++ b/doc/doxyfooter @@ -0,0 +1,2 @@ + + diff --git a/doc/doxyheader b/doc/doxyheader new file mode 100644 index 0000000..7065a9f --- /dev/null +++ b/doc/doxyheader @@ -0,0 +1,6 @@ + + + H5/H5Part/H5Block/H5Fed API + + + diff --git a/doc/html2twiki b/doc/html2twiki new file mode 100755 index 0000000..2a6646e --- /dev/null +++ b/doc/html2twiki @@ -0,0 +1,36 @@ +#!/bin/bash + +shopt -s nullglob + +function html2twiki() { + declare -rx infile=$1 + declare -rx outdir=$2 + declare -rx fname=$( sed -n 's/.* member="\([a-zA-Z0-9_.]*\)::\([_a-zA-Z0-9]*\)" .*/\2/p' "${infile}" ) + declare -rx outfile="${outdir}/${fname}.txt" + + grep -q " member=" "${infile}" || return 0 + + sed '/Generated by/,/anchor/d' "${infile}" > "${outfile}" +} + +mkdir -p TWiki/h5_core +mkdir -p TWiki/H5 +mkdir -p TWiki/H5Part +mkdir -p TWiki/H5Block +mkdir -p TWiki/H5Fed + +for f in ReferencePages/group__h5__core_*.html; do + html2twiki $f TWiki/h5_core +done +for f in ReferencePages/group__h5__c__api_*.html; do + html2twiki $f TWiki/H5 +done +for f in ReferencePages/group__h5part__c__api_*.html; do + html2twiki $f TWiki/H5Part +done +for f in ReferencePages/group__h5block__c__api_*.html; do + html2twiki $f TWiki/H5Block +done +for f in ReferencePages/group__h5fed__c__api_*.html; do + html2twiki $f TWiki/H5Fed +done diff --git a/doc/meshexample.dxf b/doc/meshexample.dxf new file mode 100644 index 0000000..3b139b4 --- /dev/null +++ b/doc/meshexample.dxf @@ -0,0 +1,6982 @@ +999 +dxflib 2.1.2.0 + 0 +SECTION + 2 +HEADER + 9 +$ACADVER + 1 +AC1015 + 9 +$HANDSEED + 5 +FFFF + 9 +$DIMASZ + 40 +2.5 + 9 +$PLIMMIN + 10 +0.0 + 20 +0.0 + 9 +$DIMEXE + 40 +1.25 + 9 +$DIMGAP + 40 +0.625 + 9 +$PLIMMAX + 10 +210.0 + 20 +297.0 + 9 +$PSVPSCALE + 40 +0.7295160000000001 + 9 +$PINSBASE + 10 +19.7952181877565074 + 20 +121.5358650546580606 + 30 +0.0 + 9 +$INSUNITS + 70 +4 + 9 +$DIMEXO + 40 +0.625 + 9 +$DIMTXT + 40 +2.5 + 9 +$CLAYER + 8 +2-Triangles + 0 +ENDSEC + 0 +SECTION + 2 +TABLES + 0 +TABLE + 2 +VPORT + 5 +8 +100 +AcDbSymbolTable + 70 +1 + 0 +VPORT + 5 +30 +100 +AcDbSymbolTableRecord +100 +AcDbViewportTableRecord + 2 +*Active + 70 +0 + 10 +0.0 + 20 +0.0 + 11 +1.0 + 21 +1.0 + 12 +286.3055555555554861 + 22 +148.5 + 13 +0.0 + 23 +0.0 + 14 +10.0 + 24 +10.0 + 15 +10.0 + 25 +10.0 + 16 +0.0 + 26 +0.0 + 36 +1.0 + 17 +0.0 + 27 +0.0 + 37 +0.0 + 40 +297.0 + 41 +1.92798353909465 + 42 +50.0 + 43 +0.0 + 44 +0.0 + 50 +0.0 + 51 +0.0 + 71 +0 + 72 +100 + 73 +1 + 74 +3 + 75 +1 + 76 +1 + 77 +0 + 78 +0 +281 +0 + 65 +1 +110 +0.0 +120 +0.0 +130 +0.0 +111 +1.0 +121 +0.0 +131 +0.0 +112 +0.0 +122 +1.0 +132 +0.0 + 79 +0 +146 +0.0 + 0 +ENDTAB + 0 +TABLE + 2 +LTYPE + 5 +5 +100 +AcDbSymbolTable + 70 +21 + 0 +LTYPE + 5 +14 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +ByBlock + 70 +0 + 3 + + 72 +65 + 73 +0 + 40 +0.0 + 0 +LTYPE + 5 +15 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +ByLayer + 70 +0 + 3 + + 72 +65 + 73 +0 + 40 +0.0 + 0 +LTYPE + 5 +16 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +CONTINUOUS + 70 +0 + 3 +Solid line + 72 +65 + 73 +0 + 40 +0.0 + 0 +LTYPE + 5 +31 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DOT + 70 +0 + 3 +Dot . . . . . . . . . . . . . . . . . . . . . . + 72 +65 + 73 +2 + 40 +6.3499999999999996 + 49 +0.0 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 0 +LTYPE + 5 +32 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DOT2 + 70 +0 + 3 +Dot (.5x) ..................................... + 72 +65 + 73 +2 + 40 +3.1749999999999998 + 49 +0.0 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 0 +LTYPE + 5 +33 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DOTX2 + 70 +0 + 3 +Dot (2x) . . . . . . . . . . . . . + 72 +65 + 73 +2 + 40 +12.6999999999999993 + 49 +0.0 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 0 +LTYPE + 5 +34 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DASHED + 70 +0 + 3 +Dashed __ __ __ __ __ __ __ __ __ __ __ __ __ _ + 72 +65 + 73 +2 + 40 +19.0500000000000007 + 49 +12.6999999999999993 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 0 +LTYPE + 5 +35 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DASHED2 + 70 +0 + 3 +Dashed (.5x) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + 72 +65 + 73 +2 + 40 +9.5250000000000004 + 49 +6.3499999999999996 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 0 +LTYPE + 5 +36 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DASHEDX2 + 70 +0 + 3 +Dashed (2x) ____ ____ ____ ____ ____ ___ + 72 +65 + 73 +2 + 40 +38.1000000000000014 + 49 +25.3999999999999986 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 0 +LTYPE + 5 +37 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DASHDOT + 70 +0 + 3 +Dash dot __ . __ . __ . __ . __ . __ . __ . __ + 72 +65 + 73 +4 + 40 +25.3999999999999986 + 49 +12.6999999999999993 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 0 +LTYPE + 5 +38 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DASHDOT2 + 70 +0 + 3 +Dash dot (.5x) _._._._._._._._._._._._._._._. + 72 +65 + 73 +4 + 40 +12.6999999999999993 + 49 +6.3499999999999996 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 0 +LTYPE + 5 +39 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DASHDOTX2 + 70 +0 + 3 +Dash dot (2x) ____ . ____ . ____ . ___ + 72 +65 + 73 +4 + 40 +50.7999999999999972 + 49 +25.3999999999999986 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 0 +LTYPE + 5 +3A +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DIVIDE + 70 +0 + 3 +Divide ____ . . ____ . . ____ . . ____ . . ____ + 72 +65 + 73 +6 + 40 +31.75 + 49 +12.6999999999999993 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 0 +LTYPE + 5 +3B +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DIVIDE2 + 70 +0 + 3 +Divide (.5x) __..__..__..__..__..__..__..__.._ + 72 +65 + 73 +6 + 40 +15.875 + 49 +6.3499999999999996 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 0 +LTYPE + 5 +3C +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DIVIDEX2 + 70 +0 + 3 +Divide (2x) ________ . . ________ . . _ + 72 +65 + 73 +6 + 40 +63.5 + 49 +25.3999999999999986 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 0 +LTYPE + 5 +3D +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +CENTER + 70 +0 + 3 +Center ____ _ ____ _ ____ _ ____ _ ____ _ ____ + 72 +65 + 73 +4 + 40 +50.7999999999999972 + 49 +31.75 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 49 +6.3499999999999996 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 0 +LTYPE + 5 +3E +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +CENTER2 + 70 +0 + 3 +Center (.5x) ___ _ ___ _ ___ _ ___ _ ___ _ ___ + 72 +65 + 73 +4 + 40 +28.5749999999999993 + 49 +19.0500000000000007 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 49 +3.1749999999999998 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 0 +LTYPE + 5 +3F +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +CENTERX2 + 70 +0 + 3 +Center (2x) ________ __ ________ __ _____ + 72 +65 + 73 +4 + 40 +101.5999999999999943 + 49 +63.5 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 49 +12.6999999999999993 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 0 +LTYPE + 5 +40 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +BORDER + 70 +0 + 3 +Border __ __ . __ __ . __ __ . __ __ . __ __ . + 72 +65 + 73 +6 + 40 +44.4500000000000028 + 49 +12.6999999999999993 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 49 +12.6999999999999993 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-6.3499999999999996 + 74 +0 + 0 +LTYPE + 5 +41 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +BORDER2 + 70 +0 + 3 +Border (.5x) __.__.__.__.__.__.__.__.__.__.__. + 72 +65 + 73 +6 + 40 +22.2250000000000014 + 49 +6.3499999999999996 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 49 +6.3499999999999996 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-3.1749999999999998 + 74 +0 + 0 +LTYPE + 5 +42 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +BORDERX2 + 70 +0 + 3 +Border (2x) ____ ____ . ____ ____ . ___ + 72 +65 + 73 +6 + 40 +88.9000000000000057 + 49 +25.3999999999999986 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 49 +25.3999999999999986 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 49 +0.0 + 74 +0 + 49 +-12.6999999999999993 + 74 +0 + 0 +ENDTAB + 0 +TABLE + 2 +LAYER + 5 +2 +100 +AcDbSymbolTable + 70 +9 + 0 +LAYER + 5 +10 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0 + 70 +0 + 62 +7 + 6 +CONTINUOUS +370 +120 +390 +F + 0 +LAYER + 5 +43 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1 + 70 +0 + 62 +1 + 6 +CONTINUOUS +370 +60 +390 +F + 0 +LAYER + 5 +44 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +2 + 70 +0 + 62 +3 + 6 +CONTINUOUS +370 +20 +390 +F + 0 +LAYER + 5 +45 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-Vertices + 70 +0 + 62 +7 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +46 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-Vertices + 70 +0 + 62 +1 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +47 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +2-Vertices + 70 +0 + 62 +3 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +48 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0-Triangles + 70 +0 + 62 +7 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +49 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +1-Triangles + 70 +0 + 62 +1 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +LAYER + 5 +4A +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +2-Triangles + 70 +0 + 62 +3 + 6 +CONTINUOUS +370 +0 +390 +F + 0 +ENDTAB + 0 +TABLE + 2 +STYLE + 5 +3 +100 +AcDbSymbolTable + 70 +1 + 0 +STYLE + 5 +11 +100 +AcDbSymbolTableRecord +100 +AcDbTextStyleTableRecord + 2 +Standard + 70 +0 + 40 +0.0 + 41 +0.75 + 50 +0.0 + 71 +0 + 42 +2.5 + 3 +txt + 4 + + 0 +ENDTAB + 0 +TABLE + 2 +VIEW + 5 +6 +100 +AcDbSymbolTable + 70 +0 + 0 +ENDTAB + 0 +TABLE + 2 +UCS + 5 +7 +100 +AcDbSymbolTable + 70 +0 + 0 +ENDTAB + 0 +TABLE + 2 +APPID + 5 +9 +100 +AcDbSymbolTable + 70 +1 + 0 +APPID + 5 +12 +100 +AcDbSymbolTableRecord +100 +AcDbRegAppTableRecord + 2 +ACAD + 70 +0 + 0 +ENDTAB + 0 +TABLE + 2 +DIMSTYLE + 5 +A +100 +AcDbSymbolTable + 70 +1 +100 +AcDbDimStyleTable + 71 +0 + 0 +DIMSTYLE +105 +27 +100 +AcDbSymbolTableRecord +100 +AcDbDimStyleTableRecord + 2 +Standard + 41 +2.5 + 42 +0.625 + 43 +3.75 + 44 +1.25 + 70 +0 + 73 +0 + 74 +0 + 77 +1 + 78 +8 +140 +2.5 +141 +2.5 +143 +0.03937007874016 +147 +0.625 +171 +3 +172 +1 +271 +2 +272 +2 +274 +3 +278 +44 +283 +0 +284 +8 +340 +11 + 0 +ENDTAB + 0 +TABLE + 2 +BLOCK_RECORD + 5 +1 +100 +AcDbSymbolTable + 70 +1 + 0 +BLOCK_RECORD + 5 +1F +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord + 2 +*Model_Space +340 +22 + 0 +BLOCK_RECORD + 5 +1B +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord + 2 +*Paper_Space +340 +1E + 0 +BLOCK_RECORD + 5 +23 +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord + 2 +*Paper_Space0 +340 +26 + 0 +ENDTAB + 0 +ENDSEC + 0 +SECTION + 2 +BLOCKS + 0 +BLOCK + 5 +20 +100 +AcDbEntity + 8 +0 +100 +AcDbBlockBegin + 2 +*Model_Space + 70 +0 + 10 +0.0 + 20 +0.0 + 30 +0.0 + 3 +*Model_Space + 1 + + 0 +ENDBLK + 5 +21 +100 +AcDbEntity + 8 +0 +100 +AcDbBlockEnd + 0 +BLOCK + 5 +1C +100 +AcDbEntity + 67 +1 + 8 +0 +100 +AcDbBlockBegin + 2 +*Paper_Space + 70 +0 + 10 +0.0 + 20 +0.0 + 30 +0.0 + 3 +*Paper_Space + 1 + + 0 +ENDBLK + 5 +1D +100 +AcDbEntity + 67 +1 + 8 +0 +100 +AcDbBlockEnd + 0 +BLOCK + 5 +24 +100 +AcDbEntity + 8 +0 +100 +AcDbBlockBegin + 2 +*Paper_Space0 + 70 +0 + 10 +0.0 + 20 +0.0 + 30 +0.0 + 3 +*Paper_Space0 + 1 + + 0 +ENDBLK + 5 +25 +100 +AcDbEntity + 8 +0 +100 +AcDbBlockEnd + 0 +ENDSEC + 0 +SECTION + 2 +ENTITIES + 0 +LINE + 5 +4B +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +0.0 + 20 +0.0 + 30 +0.0 + 11 +50.0 + 21 +80.0 + 31 +0.0 + 0 +LINE + 5 +4C +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +4D +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +0.0 + 21 +0.0 + 31 +0.0 + 0 +LINE + 5 +4E +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +4F +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +50 +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +51 +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +52 +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +LINE + 5 +53 +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +54 +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +55 +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +56 +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +60.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +57 +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +60.0 + 20 +-70.0 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +58 +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +0.0 + 20 +0.0 + 30 +0.0 + 11 +60.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +59 +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 11 +240.0 + 21 +-60.0 + 31 +0.0 + 0 +LINE + 5 +5A +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +240.0 + 20 +-60.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +5B +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +240.0 + 21 +-60.0 + 31 +0.0 + 0 +LINE + 5 +5C +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +130.0 + 21 +150.0 + 31 +0.0 + 0 +LINE + 5 +5D +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +5E +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +5F +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0 + 20 +150.0 + 30 +0.0 + 11 +200.0 + 21 +120.0 + 31 +0.0 + 0 +LINE + 5 +60 +100 +AcDbEntity +100 +AcDbLine + 8 +0 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.0 + 20 +120.0 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +LINE + 5 +61 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +62 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +63 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +64 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +68.2762309724051448 + 21 +38.8784803120884277 + 31 +0.0 + 0 +LINE + 5 +65 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +68.2762309724051448 + 20 +38.8784803120884277 + 30 +0.0 + 11 +95.2752319396871599 + 21 +85.0305813266319035 + 31 +0.0 + 0 +LINE + 5 +66 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.2752319396871599 + 20 +85.0305813266319035 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +67 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 30 +0.0 + 11 +180.0000175342504178 + 21 +74.9999934246560827 + 31 +0.0 + 0 +LINE + 5 +68 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0000175342504178 + 20 +74.9999934246560827 + 30 +0.0 + 11 +201.1950554466039307 + 21 +27.0913470315568894 + 31 +0.0 + 0 +LINE + 5 +69 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +201.1950554466039307 + 20 +27.0913470315568894 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924606 + 31 +0.0 + 0 +LINE + 5 +6A +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.9999989626024757 + 20 +-39.9999987551229665 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +6B +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +159.9997155749006481 + 21 +-40.0004266376490492 + 31 +0.0 + 0 +LINE + 5 +6C +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9997155749006481 + 20 +-40.0004266376490492 + 30 +0.0 + 11 +114.9999989626024757 + 21 +-39.9999987551229665 + 31 +0.0 + 0 +LINE + 5 +6D +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +6E +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +95.2752319396871599 + 21 +85.0305813266319177 + 31 +0.0 + 0 +LINE + 5 +6F +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.2752319396871599 + 20 +85.0305813266319177 + 30 +0.0 + 11 +50.0 + 21 +80.0 + 31 +0.0 + 0 +LINE + 5 +70 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.0 + 20 +80.0 + 30 +0.0 + 11 +68.2762309724051448 + 21 +38.8784803120884348 + 31 +0.0 + 0 +LINE + 5 +71 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +68.2762309724051448 + 20 +38.8784803120884348 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +72 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823181967 + 31 +0.0 + 0 +LINE + 5 +73 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +220.0 + 21 +60.0 + 31 +0.0 + 0 +LINE + 5 +74 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +220.0 + 20 +60.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +75 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +159.9999450076830385 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +76 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830385 + 20 +40.0001374807924535 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +77 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +180.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +78 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +180.0 + 20 +-10.0 + 30 +0.0 + 11 +140.0 + 21 +-70.0 + 31 +0.0 + 0 +LINE + 5 +79 +100 +AcDbEntity +100 +AcDbLine + 8 +1 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +-70.0 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +7A +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +105.1376539098557146 + 20 +62.5153950486475196 + 30 +0.0 + 11 +117.6376159698435799 + 21 +87.5152906633159517 + 31 +0.0 + 0 +LINE + 5 +7B +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +117.6376159698435799 + 20 +87.5152906633159517 + 30 +0.0 + 11 +127.5000445955795527 + 21 +65.0000891911591054 + 31 +0.0 + 0 +LINE + 5 +7C +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +127.5000445955795527 + 20 +65.0000891911591054 + 30 +0.0 + 11 +105.1376539098557146 + 21 +62.5153950486475196 + 31 +0.0 + 0 +LINE + 5 +7D +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +137.5000391911498241 + 20 +40.0001579315352487 + 30 +0.0 + 11 +127.5000445955795527 + 21 +65.0000891911591054 + 31 +0.0 + 0 +LINE + 5 +7E +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +127.5000445955795527 + 20 +65.0000891911591054 + 30 +0.0 + 11 +149.9999725038415193 + 21 +65.0000687403962303 + 31 +0.0 + 0 +LINE + 5 +7F +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +149.9999725038415193 + 20 +65.0000687403962303 + 30 +0.0 + 11 +137.5000391911498241 + 21 +40.0001579315352487 + 31 +0.0 + 0 +LINE + 5 +80 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +125.000040987657556 + 20 +15.000098211036514 + 30 +0.0 + 11 +137.5000391911498241 + 21 +40.0001579315352558 + 31 +0.0 + 0 +LINE + 5 +81 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +137.5000391911498241 + 20 +40.0001579315352558 + 30 +0.0 + 11 +147.4999729933480523 + 21 +15.0000697194141779 + 31 +0.0 + 0 +LINE + 5 +82 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +147.4999729933480523 + 20 +15.0000697194141779 + 30 +0.0 + 11 +125.000040987657556 + 21 +15.0000982110365175 + 31 +0.0 + 0 +LINE + 5 +83 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +102.5001337867386582 + 20 +15.0002675734773092 + 30 +0.0 + 11 +125.000040987657556 + 21 +15.000098211036514 + 31 +0.0 + 0 +LINE + 5 +84 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +125.000040987657556 + 20 +15.000098211036514 + 30 +0.0 + 11 +112.5 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +85 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +112.5 + 20 +-10.0 + 30 +0.0 + 11 +102.5001337867386582 + 21 +15.0002675734773092 + 31 +0.0 + 0 +LINE + 5 +86 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +102.5001337867386582 + 20 +15.0002675734773092 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823181967 + 31 +0.0 + 0 +LINE + 5 +87 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823181967 + 30 +0.0 + 11 +125.000040987657556 + 21 +15.0000982110365051 + 31 +0.0 + 0 +LINE + 5 +88 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +125.000040987657556 + 20 +15.0000982110365051 + 30 +0.0 + 11 +135.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +89 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +112.5 + 21 +-10.0000000000000071 + 31 +0.0 + 0 +LINE + 5 +8A +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +112.5 + 20 +-10.0000000000000071 + 30 +0.0 + 11 +90.0 + 21 +-10.0 + 31 +0.0 + 0 +LINE + 5 +8B +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +90.0 + 20 +-10.0 + 30 +0.0 + 11 +102.5001337867386582 + 21 +15.0002675734773092 + 31 +0.0 + 0 +LINE + 5 +8C +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.0 + 20 +-10.0 + 30 +0.0 + 11 +147.4999729933480523 + 21 +15.0000697194141779 + 31 +0.0 + 0 +LINE + 5 +8D +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +147.4999729933480523 + 20 +15.0000697194141779 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +8E +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +159.9999450076830101 + 20 +40.0001374807924535 + 30 +0.0 + 11 +137.5000391911498241 + 21 +40.0001579315352487 + 31 +0.0 + 0 +LINE + 5 +8F +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +137.5000391911498241 + 20 +40.0001579315352487 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823182038 + 31 +0.0 + 0 +LINE + 5 +90 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.0000891911591054 + 20 +40.0001783823182038 + 30 +0.0 + 11 +127.5000445955795527 + 21 +65.0000891911591054 + 31 +0.0 + 0 +LINE + 5 +91 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +127.5000445955795527 + 20 +65.0000891911591054 + 30 +0.0 + 11 +140.0 + 21 +90.0 + 31 +0.0 + 0 +LINE + 5 +92 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +149.9999725038414908 + 21 +65.0000687403962303 + 31 +0.0 + 0 +LINE + 5 +93 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +149.9999725038414908 + 20 +65.0000687403962303 + 30 +0.0 + 11 +159.9999450076830101 + 21 +40.0001374807924535 + 31 +0.0 + 0 +LINE + 5 +94 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.0 + 20 +90.0 + 30 +0.0 + 11 +95.2752319396872025 + 21 +85.0305813266319177 + 31 +0.0 + 0 +LINE + 5 +95 +100 +AcDbEntity +100 +AcDbLine + 8 +2 + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.2752319396872025 + 20 +85.0305813266319177 + 30 +0.0 + 11 +115.0000891911591054 + 21 +40.0001783823181896 + 31 +0.0 + 0 +MTEXT + 5 +96 +100 +AcDbEntity +100 +AcDbMText + 8 +0-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +-4.3945312500000435 + 20 +4.3945312500000435 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +0 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +97 +100 +AcDbEntity +100 +AcDbMText + 8 +0-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +54.6875000000005471 + 20 +-72.7539062500007248 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +1 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +98 +100 +AcDbEntity +100 +AcDbMText + 8 +0-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +81.54296875000081 + 20 +-13.1835937500001315 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +2 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +99 +100 +AcDbEntity +100 +AcDbMText + 8 +0-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +141.1132812500013927 + 20 +-74.218750000000739 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +3 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +9A +100 +AcDbEntity +100 +AcDbMText + 8 +0-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +243.1640625000024158 + 20 +-61.5234375000006111 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +4 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +9B +100 +AcDbEntity +100 +AcDbMText + 8 +0-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +187.5000000000018758 + 20 +-8.3007812500000835 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +5 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +9C +100 +AcDbEntity +100 +AcDbMText + 8 +0-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +223.6328125000022169 + 20 +62.9882812500006253 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +6 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +9D +100 +AcDbEntity +100 +AcDbMText + 8 +0-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +143.0664062500014211 + 20 +99.1210937500009805 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +7 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +9E +100 +AcDbEntity +100 +AcDbMText + 8 +0-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +45.8984375000004547 + 20 +85.9375000000008527 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +8 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +9F +100 +AcDbEntity +100 +AcDbMText + 8 +0-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +134.7656250000013358 + 20 +155.2734375000015348 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +9 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +A0 +100 +AcDbEntity +100 +AcDbMText + 8 +0-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +202.1484375000020179 + 20 +124.5117187500012363 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +10 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +A1 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +204.2968750000027569 + 20 +24.609375000000334 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +15 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +A2 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +109.7656250000014779 + 20 +-41.4062500000005613 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +11 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +A3 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +164.8437500000022169 + 20 +-41.4062500000005613 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +12 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +A4 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +134.375000000001819 + 20 +-16.0156250000002167 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +13 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +A5 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +166.7968750000022453 + 20 +43.7500000000005898 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +14 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +A6 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +181.2500000000024443 + 20 +82.0312500000011084 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +16 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +A7 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +62.5000000000008455 + 20 +36.7187500000004974 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +17 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +A8 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +105.8593750000014353 + 20 +37.1093750000005045 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +18 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +A9 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +94.531250000001279 + 20 +76.1718750000010232 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +19 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +AA +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +95.3125000000012932 + 20 +18.7500000000002522 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +20 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +AB +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +109.7656250000014779 + 20 +-14.0625000000001901 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +21 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +AC +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +122.2656250000016485 + 20 +9.3750000000001261 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +22 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +AD +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +150.0000000000020179 + 20 +13.6718750000001847 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +23 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +AE +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +139.4531250000018758 + 20 +38.6718750000005258 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +24 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +AF +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +153.1250000000020748 + 20 +66.4062500000008953 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +25 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +B0 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +130.0781250000017621 + 20 +63.2812500000008527 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +26 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +B1 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +115.2343750000015632 + 20 +94.531250000001279 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +27 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +B2 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Vertices + 62 +256 +370 +-1 + 6 +ByLayer + 10 +98.0468750000013216 + 20 +60.9375000000008242 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +28 + 7 +normal + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +B3 +100 +AcDbEntity +100 +AcDbMText + 8 +0-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +50.6591796875007105 + 20 +-23.1933593750003268 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +0 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +B4 +100 +AcDbEntity +100 +AcDbMText + 8 +0-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +96.43554687500135 + 20 +-45.1660156250006324 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +1 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +B5 +100 +AcDbEntity +100 +AcDbMText + 8 +0-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +137.3291015625019327 + 20 +-34.7900390625004903 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +2 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +B6 +100 +AcDbEntity +100 +AcDbMText + 8 +0-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +184.9365234375025864 + 20 +-43.9453125000006182 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +3 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +B7 +100 +AcDbEntity +100 +AcDbMText + 8 +0-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +209.3505859375029274 + 20 +-0.6103515625000085 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +4 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +B8 +100 +AcDbEntity +100 +AcDbMText + 8 +0-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +183.7158203125025864 + 20 +43.9453125000006182 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +5 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +B9 +100 +AcDbEntity +100 +AcDbMText + 8 +0-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +192.2607421875027001 + 20 +94.6044921875013358 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +6 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +BA +100 +AcDbEntity +100 +AcDbMText + 8 +0-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +153.80859375000216 + 20 +117.7978515625016485 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +7 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +BB +100 +AcDbEntity +100 +AcDbMText + 8 +0-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +107.4218750000015064 + 20 +106.2011718750014921 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +8 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +BC +100 +AcDbEntity +100 +AcDbMText + 8 +0-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +93.9941406250013216 + 20 +51.8798828125007319 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +9 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +BD +100 +AcDbEntity +100 +AcDbMText + 8 +0-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +48.217773437500675 + 20 +19.5312500000002736 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +10 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +BE +100 +AcDbEntity +100 +AcDbMText + 8 +0-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +140.3808593750019611 + 20 +20.1416015625002842 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +11 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +BF +100 +AcDbEntity +100 +AcDbMText + 8 +1-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +112.1093750000016058 + 20 +-20.7031250000002984 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +12 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +C0 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +137.5000000000019895 + 20 +-48.8281250000007034 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +13 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +C1 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +158.2031250000022737 + 20 +-18.75000000000027 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +14 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +C2 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +135.5468750000019611 + 20 +-27.3437500000003944 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +15 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +C3 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +178.515625000002558 + 20 +20.3125000000002913 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +16 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +C4 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +200.781250000002899 + 20 +55.4687500000007958 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +17 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +C5 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +160.5468750000023022 + 20 +70.312500000001009 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +18 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +C6 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +178.515625000002558 + 20 +49.6093750000007105 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +19 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +C7 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.3281250000019611 + 20 +53.9062500000007745 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +20 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +C8 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +111.3281250000016058 + 20 +13.2812500000001901 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +21 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +C9 +100 +AcDbEntity +100 +AcDbMText + 8 +1-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +156.6406250000022453 + 20 +7.8125000000001119 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +22 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +CA +100 +AcDbEntity +100 +AcDbMText + 8 +1-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +134.3750000000019327 + 20 +21.093750000000302 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +23 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +CB +100 +AcDbEntity +100 +AcDbMText + 8 +1-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +88.2812500000012648 + 20 +26.9531250000003872 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +24 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +CC +100 +AcDbEntity +100 +AcDbMText + 8 +1-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +118.3593750000017053 + 20 +71.0937500000010232 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +25 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +CD +100 +AcDbEntity +100 +AcDbMText + 8 +1-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +66.7968750000009663 + 20 +70.7031250000010232 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +26 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +CE +100 +AcDbEntity +100 +AcDbMText + 8 +1-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +89.4531250000012932 + 20 +55.8593750000008029 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +27 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +CF +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +99.5000000000015774 + 20 +1.7500000000000278 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +28 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +D0 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +122.7500000000019469 + 20 +1.2500000000000198 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +29 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +D1 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +111.0000000000017621 + 20 +25.500000000000405 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +30 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +D2 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +110.7500000000017621 + 20 +8.2500000000001315 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +31 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +D3 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +133.2500000000021032 + 20 +9.7500000000001545 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +32 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +D4 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +145.5000000000023022 + 20 +33.0000000000005258 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +33 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +D5 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +123.7500000000019611 + 20 +35.7500000000005684 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +34 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +D6 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +134.5000000000021316 + 20 +27.7500000000004405 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +35 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +D7 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +123.2500000000019611 + 20 +51.2500000000008171 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +36 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +D8 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +147.2500000000023306 + 20 +51.2500000000008171 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +37 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +D9 +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +137.5000000000021885 + 20 +74.7500000000011937 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +38 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +DA +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +136.00000000000216 + 20 +58.0000000000009237 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +39 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +DB +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +113.0000000000017906 + 20 +60.0000000000009521 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +40 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +DC +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +126.0000000000020037 + 20 +84.2500000000013358 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +41 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +DD +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +104.5000000000016627 + 20 +81.7500000000012932 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +42 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +MTEXT + 5 +DE +100 +AcDbEntity +100 +AcDbMText + 8 +2-Triangles + 62 +256 +370 +-1 + 6 +ByLayer + 10 +114.500000000001819 + 20 +75.5000000000011937 + 30 +0.0 + 40 +4.0 + 41 +100.0 + 71 +1 + 72 +0 + 1 +43 + 7 +italicc + 50 +0.0 + 73 +1 + 44 +1.0 + 0 +ENDSEC + 0 +SECTION + 2 +OBJECTS + 0 +DICTIONARY + 5 +C +100 +AcDbDictionary +280 +0 +281 +1 + 3 +ACAD_GROUP +350 +D + 3 +ACAD_LAYOUT +350 +1A + 3 +ACAD_MLINESTYLE +350 +17 + 3 +ACAD_PLOTSETTINGS +350 +19 + 3 +ACAD_PLOTSTYLENAME +350 +E + 3 +AcDbVariableDictionary +350 +DF + 0 +DICTIONARY + 5 +D +100 +AcDbDictionary +280 +0 +281 +1 + 0 +ACDBDICTIONARYWDFLT + 5 +E +100 +AcDbDictionary +281 +1 + 3 +Normal +350 +F +100 +AcDbDictionaryWithDefault +340 +F + 0 +ACDBPLACEHOLDER + 5 +F + 0 +DICTIONARY + 5 +17 +100 +AcDbDictionary +280 +0 +281 +1 + 3 +Standard +350 +18 + 0 +MLINESTYLE + 5 +18 +100 +AcDbMlineStyle + 2 +STANDARD + 70 +0 + 3 + + 62 +256 + 51 +90.0 + 52 +90.0 + 71 +2 + 49 +0.5 + 62 +256 + 6 +BYLAYER + 49 +-0.5 + 62 +256 + 6 +BYLAYER + 0 +DICTIONARY + 5 +19 +100 +AcDbDictionary +280 +0 +281 +1 + 0 +DICTIONARY + 5 +1A +100 +AcDbDictionary +281 +1 + 3 +Layout1 +350 +1E + 3 +Layout2 +350 +26 + 3 +Model +350 +22 + 0 +LAYOUT + 5 +1E +100 +AcDbPlotSettings + 1 + + 2 +C:\Program Files\AutoCAD 2002\plotters\DWF ePlot (optimized for plotting).pc3 + 4 + + 6 + + 40 +0.0 + 41 +0.0 + 42 +0.0 + 43 +0.0 + 44 +0.0 + 45 +0.0 + 46 +0.0 + 47 +0.0 + 48 +0.0 + 49 +0.0 +140 +0.0 +141 +0.0 +142 +1.0 +143 +1.0 + 70 +688 + 72 +0 + 73 +0 + 74 +5 + 7 + + 75 +16 +147 +1.0 +148 +0.0 +149 +0.0 +100 +AcDbLayout + 1 +Layout1 + 70 +1 + 71 +1 + 10 +0.0 + 20 +0.0 + 11 +420.0 + 21 +297.0 + 12 +0.0 + 22 +0.0 + 32 +0.0 + 14 +100000000000000000000.0 + 24 +100000000000000000000.0 + 34 +100000000000000000000.0 + 15 +-100000000000000000000.0 + 25 +-100000000000000000000.0 + 35 +-100000000000000000000.0 +146 +0.0 + 13 +0.0 + 23 +0.0 + 33 +0.0 + 16 +1.0 + 26 +0.0 + 36 +0.0 + 17 +0.0 + 27 +1.0 + 37 +0.0 + 76 +0 +330 +1B + 0 +LAYOUT + 5 +22 +100 +AcDbPlotSettings + 1 + + 2 +C:\Program Files\AutoCAD 2002\plotters\DWF ePlot (optimized for plotting).pc3 + 4 + + 6 + + 40 +0.0 + 41 +0.0 + 42 +0.0 + 43 +0.0 + 44 +0.0 + 45 +0.0 + 46 +0.0 + 47 +0.0 + 48 +0.0 + 49 +0.0 +140 +0.0 +141 +0.0 +142 +1.0 +143 +1.0 + 70 +1712 + 72 +0 + 73 +0 + 74 +0 + 7 + + 75 +0 +147 +1.0 +148 +0.0 +149 +0.0 +100 +AcDbLayout + 1 +Model + 70 +1 + 71 +0 + 10 +0.0 + 20 +0.0 + 11 +12.0 + 21 +9.0 + 12 +0.0 + 22 +0.0 + 32 +0.0 + 14 +0.0 + 24 +0.0 + 34 +0.0 + 15 +0.0 + 25 +0.0 + 35 +0.0 +146 +0.0 + 13 +0.0 + 23 +0.0 + 33 +0.0 + 16 +1.0 + 26 +0.0 + 36 +0.0 + 17 +0.0 + 27 +1.0 + 37 +0.0 + 76 +0 +330 +1F + 0 +LAYOUT + 5 +26 +100 +AcDbPlotSettings + 1 + + 2 +C:\Program Files\AutoCAD 2002\plotters\DWF ePlot (optimized for plotting).pc3 + 4 + + 6 + + 40 +0.0 + 41 +0.0 + 42 +0.0 + 43 +0.0 + 44 +0.0 + 45 +0.0 + 46 +0.0 + 47 +0.0 + 48 +0.0 + 49 +0.0 +140 +0.0 +141 +0.0 +142 +1.0 +143 +1.0 + 70 +688 + 72 +0 + 73 +0 + 74 +5 + 7 + + 75 +16 +147 +1.0 +148 +0.0 +149 +0.0 +100 +AcDbLayout + 1 +Layout2 + 70 +1 + 71 +2 + 10 +0.0 + 20 +0.0 + 11 +12.0 + 21 +9.0 + 12 +0.0 + 22 +0.0 + 32 +0.0 + 14 +0.0 + 24 +0.0 + 34 +0.0 + 15 +0.0 + 25 +0.0 + 35 +0.0 +146 +0.0 + 13 +0.0 + 23 +0.0 + 33 +0.0 + 16 +1.0 + 26 +0.0 + 36 +0.0 + 17 +0.0 + 27 +1.0 + 37 +0.0 + 76 +0 +330 +23 + 0 +DICTIONARY + 5 +DF +100 +AcDbDictionary +281 +1 + 3 +DIMASSOC +350 +E1 + 3 +HIDETEXT +350 +E0 + 0 +DICTIONARYVAR + 5 +E0 +100 +DictionaryVariables +280 +0 + 1 +2 + 0 +DICTIONARYVAR + 5 +E1 +100 +DictionaryVariables +280 +0 + 1 +1 + 0 +ENDSEC + 0 +EOF diff --git a/doc/postprocess.py b/doc/postprocess.py new file mode 100755 index 0000000..1607f66 --- /dev/null +++ b/doc/postprocess.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python + +from lxml import etree +from lxml.html import builder as E +import os +import re + +tree = etree.parse('tagfile') +tags = tree.xpath ('//member[@kind="function"]') +tags_per_files = {} +for tag in tags: + name = tag.find("name").text + anchor = tag.find("anchor").text + anchorfile = tag.find("anchorfile").text + if anchorfile in tags_per_files: + tags_per_files[anchorfile].append([name, anchor]) + else: + tags_per_files[anchorfile] = [[name, anchor]] + + +prefix = None +for line in open("Doxyfile", "r"): + if re.search ("^OUTPUT_DIRECTORY", line): + prefix = line.split("=")[-1].strip() + +if not prefix: + prefix = "." + +parser = etree.HTMLParser() +for filename,anchors in tags_per_files.items(): + print "Processing file: %s/%s" % (prefix, filename) + tree = etree.parse ("%s/%s" % (prefix, filename), parser) + for name,id in anchors: + anchor = tree.xpath ('//a[@id="%s"]' % id) + el = E.A(id="%s" % name) + anchor[0].addnext (el) + + f = open ("%s/%s" % (prefix, filename), "w") + f.write (etree.tostring (tree)) diff --git a/doc/tetrahedron_refinements/1-edge/edge_01_refined/01.png b/doc/tetrahedron_refinements/1-edge/edge_01_refined/01.png new file mode 100644 index 0000000..1467231 Binary files /dev/null and b/doc/tetrahedron_refinements/1-edge/edge_01_refined/01.png differ diff --git a/doc/tetrahedron_refinements/1-edge/edge_01_refined/01.pvsm b/doc/tetrahedron_refinements/1-edge/edge_01_refined/01.pvsm new file mode 100644 index 0000000..b0a3d17 --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_01_refined/01.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/1-edge/edge_01_refined/01.txt b/doc/tetrahedron_refinements/1-edge/edge_01_refined/01.txt new file mode 100644 index 0000000..b5f4bc1 --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_01_refined/01.txt @@ -0,0 +1,10 @@ +TET no. 0: +0.5, 0.5, 0.0 +0.0, 0.0, 1.0 +0.0, 0.0, 0.0 +0.0, 1.0, 0.0 +TET no. 1: +0.5, 0.5, 0.0 +0.0, 0.0, 0.0 +0.0, 0.0, 1.0 +1.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/1-edge/edge_01_refined/01.vtk b/doc/tetrahedron_refinements/1-edge/edge_01_refined/01.vtk new file mode 100644 index 0000000..caa7c29 --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_01_refined/01.vtk @@ -0,0 +1,25 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 5 DOUBLE +0.5 0.5 0.0 +0.0 0.0 1.0 +0.0 0.0 0.0 +0.0 1.0 0.0 +1.0 0.0 0.0 + +CELLS 2 10 +4 0 1 2 3 +4 0 2 1 4 + +CELL_TYPES 2 +10 +10 + +CELL_DATA 2 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 diff --git a/doc/tetrahedron_refinements/1-edge/edge_01_refined/01_smal.png b/doc/tetrahedron_refinements/1-edge/edge_01_refined/01_smal.png new file mode 100644 index 0000000..4ffa9ff Binary files /dev/null and b/doc/tetrahedron_refinements/1-edge/edge_01_refined/01_smal.png differ diff --git a/doc/tetrahedron_refinements/1-edge/edge_01_refined/01_small.png b/doc/tetrahedron_refinements/1-edge/edge_01_refined/01_small.png new file mode 100644 index 0000000..4ffa9ff Binary files /dev/null and b/doc/tetrahedron_refinements/1-edge/edge_01_refined/01_small.png differ diff --git a/doc/tetrahedron_refinements/1-edge/edge_12_refined/12.png b/doc/tetrahedron_refinements/1-edge/edge_12_refined/12.png new file mode 100644 index 0000000..8f34e64 Binary files /dev/null and b/doc/tetrahedron_refinements/1-edge/edge_12_refined/12.png differ diff --git a/doc/tetrahedron_refinements/1-edge/edge_12_refined/12.pvsm b/doc/tetrahedron_refinements/1-edge/edge_12_refined/12.pvsm new file mode 100644 index 0000000..bd4c75a --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_12_refined/12.pvsm @@ -0,0 +1,2225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/1-edge/edge_12_refined/12.txt b/doc/tetrahedron_refinements/1-edge/edge_12_refined/12.txt new file mode 100644 index 0000000..81f9f7e --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_12_refined/12.txt @@ -0,0 +1,10 @@ +TET no. 0: +0.0, 0.5, 0.5 +0.0, 0.0, 0.0 +1.0, 0.0, 0.0 +0.0, 1.0, 0.0 +TET no. 1: +0.0, 0.5, 0.5 +1.0, 0.0, 0.0 +0.0, 0.0, 0.0 +0.0, 0.0, 1.0 diff --git a/doc/tetrahedron_refinements/1-edge/edge_12_refined/12.vtk b/doc/tetrahedron_refinements/1-edge/edge_12_refined/12.vtk new file mode 100644 index 0000000..fd2638d --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_12_refined/12.vtk @@ -0,0 +1,25 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 5 DOUBLE +0.0 0.5 0.5 +0.0 0.0 0.0 +1.0 0.0 0.0 +0.0 1.0 0.0 +0.0 0.0 1.0 + +CELLS 2 10 +4 0 1 2 3 +4 0 2 1 4 + +CELL_TYPES 2 +10 +10 + +CELL_DATA 2 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 diff --git a/doc/tetrahedron_refinements/1-edge/edge_12_refined/12_small.png b/doc/tetrahedron_refinements/1-edge/edge_12_refined/12_small.png new file mode 100644 index 0000000..ee2931f Binary files /dev/null and b/doc/tetrahedron_refinements/1-edge/edge_12_refined/12_small.png differ diff --git a/doc/tetrahedron_refinements/1-edge/edge_20_refined/20.png b/doc/tetrahedron_refinements/1-edge/edge_20_refined/20.png new file mode 100644 index 0000000..981b12e Binary files /dev/null and b/doc/tetrahedron_refinements/1-edge/edge_20_refined/20.png differ diff --git a/doc/tetrahedron_refinements/1-edge/edge_20_refined/20.pvsm b/doc/tetrahedron_refinements/1-edge/edge_20_refined/20.pvsm new file mode 100644 index 0000000..603a0ba --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_20_refined/20.pvsm @@ -0,0 +1,2225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/1-edge/edge_20_refined/20.txt b/doc/tetrahedron_refinements/1-edge/edge_20_refined/20.txt new file mode 100644 index 0000000..1e5caeb --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_20_refined/20.txt @@ -0,0 +1,10 @@ +TET no. 0: +0.5, 0.0, 0.5 +0.0, 0.0, 0.0 +0.0, 1.0, 0.0 +0.0, 0.0, 1.0 +TET no. 1: +0.5, 0.0, 0.5 +0.0, 1.0, 0.0 +0.0, 0.0, 0.0 +1.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/1-edge/edge_20_refined/20.vtk b/doc/tetrahedron_refinements/1-edge/edge_20_refined/20.vtk new file mode 100644 index 0000000..177d3d3 --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_20_refined/20.vtk @@ -0,0 +1,25 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 5 DOUBLE +0.5 0.0 0.5 +0.0 0.0 0.0 +0.0 1.0 0.0 +0.0 0.0 1.0 +1.0 0.0 0.0 + +CELLS 2 10 +4 0 1 2 3 +4 0 2 1 4 + +CELL_TYPES 2 +10 +10 + +CELL_DATA 2 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 diff --git a/doc/tetrahedron_refinements/1-edge/edge_20_refined/20_small.png b/doc/tetrahedron_refinements/1-edge/edge_20_refined/20_small.png new file mode 100644 index 0000000..ae94c78 Binary files /dev/null and b/doc/tetrahedron_refinements/1-edge/edge_20_refined/20_small.png differ diff --git a/doc/tetrahedron_refinements/1-edge/edge_23_refined/23.png b/doc/tetrahedron_refinements/1-edge/edge_23_refined/23.png new file mode 100644 index 0000000..8cf86cb Binary files /dev/null and b/doc/tetrahedron_refinements/1-edge/edge_23_refined/23.png differ diff --git a/doc/tetrahedron_refinements/1-edge/edge_23_refined/23.pvsm b/doc/tetrahedron_refinements/1-edge/edge_23_refined/23.pvsm new file mode 100644 index 0000000..55e1da9 --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_23_refined/23.pvsm @@ -0,0 +1,2225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/1-edge/edge_23_refined/23.txt b/doc/tetrahedron_refinements/1-edge/edge_23_refined/23.txt new file mode 100644 index 0000000..f505f69 --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_23_refined/23.txt @@ -0,0 +1,10 @@ +TET no. 0: +0.0, 0.0, 0.5 +1.0, 0.0, 0.0 +0.0, 1.0, 0.0 +0.0, 0.0, 0.0 +TET no. 1: +0.0, 0.0, 0.5 +0.0, 1.0, 0.0 +1.0, 0.0, 0.0 +0.0, 0.0, 1.0 diff --git a/doc/tetrahedron_refinements/1-edge/edge_23_refined/23.vtk b/doc/tetrahedron_refinements/1-edge/edge_23_refined/23.vtk new file mode 100644 index 0000000..7344fe8 --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_23_refined/23.vtk @@ -0,0 +1,25 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 5 DOUBLE +0.0 0.0 0.5 +1.0 0.0 0.0 +0.0 1.0 0.0 +0.0 0.0 0.0 +0.0 0.0 1.0 + +CELLS 2 10 +4 0 1 2 3 +4 0 2 1 4 + +CELL_TYPES 2 +10 +10 + +CELL_DATA 2 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 diff --git a/doc/tetrahedron_refinements/1-edge/edge_23_refined/23_small.png b/doc/tetrahedron_refinements/1-edge/edge_23_refined/23_small.png new file mode 100644 index 0000000..9d412d8 Binary files /dev/null and b/doc/tetrahedron_refinements/1-edge/edge_23_refined/23_small.png differ diff --git a/doc/tetrahedron_refinements/1-edge/edge_30_refined/30.png b/doc/tetrahedron_refinements/1-edge/edge_30_refined/30.png new file mode 100644 index 0000000..259a12d Binary files /dev/null and b/doc/tetrahedron_refinements/1-edge/edge_30_refined/30.png differ diff --git a/doc/tetrahedron_refinements/1-edge/edge_30_refined/30.pvsm b/doc/tetrahedron_refinements/1-edge/edge_30_refined/30.pvsm new file mode 100644 index 0000000..14bda5b --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_30_refined/30.pvsm @@ -0,0 +1,2225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/1-edge/edge_30_refined/30.txt b/doc/tetrahedron_refinements/1-edge/edge_30_refined/30.txt new file mode 100644 index 0000000..a9a0eb6 --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_30_refined/30.txt @@ -0,0 +1,10 @@ +TET no. 0: +0.5, 0.0, 0.0 +0.0, 1.0, 0.0 +0.0, 0.0, 1.0 +0.0, 0.0, 0.0 +TET no. 1: +0.5, 0.0, 0.0 +0.0, 0.0, 1.0 +0.0, 1.0, 0.0 +1.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/1-edge/edge_30_refined/30.vtk b/doc/tetrahedron_refinements/1-edge/edge_30_refined/30.vtk new file mode 100644 index 0000000..4943f6b --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_30_refined/30.vtk @@ -0,0 +1,25 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 5 DOUBLE +0.5 0.0 0.0 +0.0 1.0 0.0 +0.0 0.0 1.0 +0.0 0.0 0.0 +1.0 0.0 0.0 + +CELLS 2 10 +4 0 1 2 3 +4 0 2 1 4 + +CELL_TYPES 2 +10 +10 + +CELL_DATA 2 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 diff --git a/doc/tetrahedron_refinements/1-edge/edge_30_refined/30_small.png b/doc/tetrahedron_refinements/1-edge/edge_30_refined/30_small.png new file mode 100644 index 0000000..74ad080 Binary files /dev/null and b/doc/tetrahedron_refinements/1-edge/edge_30_refined/30_small.png differ diff --git a/doc/tetrahedron_refinements/1-edge/edge_31_refined/31.png b/doc/tetrahedron_refinements/1-edge/edge_31_refined/31.png new file mode 100644 index 0000000..d7dc63b Binary files /dev/null and b/doc/tetrahedron_refinements/1-edge/edge_31_refined/31.png differ diff --git a/doc/tetrahedron_refinements/1-edge/edge_31_refined/31.pvsm b/doc/tetrahedron_refinements/1-edge/edge_31_refined/31.pvsm new file mode 100644 index 0000000..490dcb1 --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_31_refined/31.pvsm @@ -0,0 +1,2225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/1-edge/edge_31_refined/31.txt b/doc/tetrahedron_refinements/1-edge/edge_31_refined/31.txt new file mode 100644 index 0000000..431e943 --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_31_refined/31.txt @@ -0,0 +1,10 @@ +TET no. 0: +0.0, 0.5, 0.0 +0.0, 0.0, 1.0 +1.0, 0.0, 0.0 +0.0, 0.0, 0.0 +TET no. 1: +0.0, 0.5, 0.0 +1.0, 0.0, 0.0 +0.0, 0.0, 1.0 +0.0, 1.0, 0.0 diff --git a/doc/tetrahedron_refinements/1-edge/edge_31_refined/31.vtk b/doc/tetrahedron_refinements/1-edge/edge_31_refined/31.vtk new file mode 100644 index 0000000..a7c0c96 --- /dev/null +++ b/doc/tetrahedron_refinements/1-edge/edge_31_refined/31.vtk @@ -0,0 +1,25 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 5 DOUBLE +0.0 0.5 0.0 +0.0 0.0 1.0 +1.0 0.0 0.0 +0.0 0.0 0.0 +0.0 1.0 0.0 + +CELLS 2 10 +4 0 1 2 3 +4 0 2 1 4 + +CELL_TYPES 2 +10 +10 + +CELL_DATA 2 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 diff --git a/doc/tetrahedron_refinements/1-edge/edge_31_refined/31_small.png b/doc/tetrahedron_refinements/1-edge/edge_31_refined/31_small.png new file mode 100644 index 0000000..77e56b2 Binary files /dev/null and b/doc/tetrahedron_refinements/1-edge/edge_31_refined/31_small.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12.png b/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12.png new file mode 100644 index 0000000..7a8fdd7 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12.pvsm b/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12.pvsm new file mode 100644 index 0000000..a5fc96b --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12.txt b/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12.txt new file mode 100644 index 0000000..c6066e9 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12.txt @@ -0,0 +1,15 @@ +TET no. 0: +0.5, 0.5, 0.0 +0.0, 1.0, 0.0 +0.0, 0.5, 0.5 +0.0, 0.0, 0.0 +TET no. 1: +0.0, 0.5, 0.5 +1.0, 0.0, 0.0 +0.5, 0.5, 0.0 +0.0, 0.0, 0.0 +TET no. 2: +1.0, 0.0, 0.0 +0.0, 0.5, 0.5 +0.0, 0.0, 1.0 +0.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12.vtk b/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12.vtk new file mode 100644 index 0000000..9703b06 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12.vtk @@ -0,0 +1,29 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 6 DOUBLE +0.5 0.5 0.0 +0.0 1.0 0.0 +0.0 0.5 0.5 +0.0 0.0 0.0 +1.0 0.0 0.0 +0.0 0.0 1.0 + +CELLS 3 15 +4 0 1 2 3 +4 2 4 0 3 +4 4 2 5 3 + +CELL_TYPES 3 +10 +10 +10 + +CELL_DATA 3 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12_smal.png b/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12_smal.png new file mode 100644 index 0000000..6fff898 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12_smal.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12_small.png b/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12_small.png new file mode 100644 index 0000000..6fff898 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_01-12_refined/01-12_small.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20.png b/doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20.png new file mode 100644 index 0000000..9d5cdf5 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20.pvsm b/doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20.pvsm new file mode 100644 index 0000000..0ceadce --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20.txt b/doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20.txt new file mode 100644 index 0000000..18b4cc7 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20.txt @@ -0,0 +1,15 @@ +TET no. 0: +0.5, 0.0, 0.5 +1.0, 0.0, 0.0 +0.5, 0.5, 0.0 +0.0, 0.0, 0.0 +TET no. 1: +0.5, 0.5, 0.0 +0.0, 0.0, 1.0 +0.5, 0.0, 0.5 +0.0, 0.0, 0.0 +TET no. 2: +0.0, 0.0, 1.0 +0.5, 0.5, 0.0 +0.0, 1.0, 0.0 +0.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20.vtk b/doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20.vtk new file mode 100644 index 0000000..8f89517 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20.vtk @@ -0,0 +1,29 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 6 DOUBLE +0.5 0.0 0.5 +1.0 0.0 0.0 +0.5 0.5 0.0 +0.0 0.0 0.0 +0.0 0.0 1.0 +0.0 1.0 0.0 + +CELLS 3 15 +4 0 1 2 3 +4 2 4 0 3 +4 4 2 5 3 + +CELL_TYPES 3 +10 +10 +10 + +CELL_DATA 3 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20_small.png b/doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20_small.png new file mode 100644 index 0000000..b03d2ea Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_01-20_refined/01-20_small.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23.png b/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23.png new file mode 100644 index 0000000..9922355 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23.pvsm b/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23.pvsm new file mode 100644 index 0000000..d690ff6 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23.txt b/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23.txt new file mode 100644 index 0000000..38e651c --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23.txt @@ -0,0 +1,20 @@ +TET no. 0: +1.0, 0.0, 0.0 +0.5, 0.5, 0.0 +0.0, 0.0, 0.5 +0.0, 0.0, 0.0 +TET no. 1: +0.5, 0.5, 0.0 +0.0, 1.0, 0.0 +0.0, 0.0, 0.5 +0.0, 0.0, 0.0 +TET no. 2: +0.5, 0.5, 0.0 +0.0, 0.0, 0.5 +0.0, 1.0, 0.0 +0.0, 0.0, 1.0 +TET no. 3: +1.0, 0.0, 0.0 +0.0, 0.0, 0.5 +0.5, 0.5, 0.0 +0.0, 0.0, 1.0 diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23.vtk b/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23.vtk new file mode 100644 index 0000000..f7310fd --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23.vtk @@ -0,0 +1,32 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 6 DOUBLE +1.0 0.0 0.0 +0.5 0.5 0.0 +0.0 0.0 0.5 +0.0 0.0 0.0 +0.0 1.0 0.0 +0.0 0.0 1.0 + +CELLS 4 20 +4 0 1 2 3 +4 1 4 2 3 +4 1 2 4 5 +4 0 2 1 5 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23_smal.png b/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23_smal.png new file mode 100644 index 0000000..ccbb10c Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23_smal.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23_small.png b/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23_small.png new file mode 100644 index 0000000..ccbb10c Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_01-23_refined/01-23_small.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30.png b/doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30.png new file mode 100644 index 0000000..5005856 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30.pvsm b/doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30.pvsm new file mode 100644 index 0000000..cb94856 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30.txt b/doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30.txt new file mode 100644 index 0000000..870a776 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30.txt @@ -0,0 +1,15 @@ +TET no. 0: +0.5, 0.5, 0.0 +1.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 1.0 +TET no. 1: +0.5, 0.0, 0.0 +0.0, 1.0, 0.0 +0.5, 0.5, 0.0 +0.0, 0.0, 1.0 +TET no. 2: +0.0, 1.0, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 0.0 +0.0, 0.0, 1.0 diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30.vtk b/doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30.vtk new file mode 100644 index 0000000..e1069c1 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30.vtk @@ -0,0 +1,29 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 6 DOUBLE +0.5 0.5 0.0 +1.0 0.0 0.0 +0.5 0.0 0.0 +0.0 0.0 1.0 +0.0 1.0 0.0 +0.0 0.0 0.0 + +CELLS 3 15 +4 0 1 2 3 +4 2 4 0 3 +4 4 2 5 3 + +CELL_TYPES 3 +10 +10 +10 + +CELL_DATA 3 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30_small.png b/doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30_small.png new file mode 100644 index 0000000..4ef8008 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_01-30_refined/01-30_small.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31.png b/doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31.png new file mode 100644 index 0000000..321a04d Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31.pvsm b/doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31.pvsm new file mode 100644 index 0000000..a1b5946 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31.txt b/doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31.txt new file mode 100644 index 0000000..ff361ec --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31.txt @@ -0,0 +1,15 @@ +TET no. 0: +0.0, 0.5, 0.0 +0.0, 1.0, 0.0 +0.5, 0.5, 0.0 +0.0, 0.0, 1.0 +TET no. 1: +0.5, 0.5, 0.0 +0.0, 0.0, 0.0 +0.0, 0.5, 0.0 +0.0, 0.0, 1.0 +TET no. 2: +0.0, 0.0, 0.0 +0.5, 0.5, 0.0 +1.0, 0.0, 0.0 +0.0, 0.0, 1.0 diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31.vtk b/doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31.vtk new file mode 100644 index 0000000..8580cf2 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31.vtk @@ -0,0 +1,29 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 6 DOUBLE +0.0 0.5 0.0 +0.0 1.0 0.0 +0.5 0.5 0.0 +0.0 0.0 1.0 +0.0 0.0 0.0 +1.0 0.0 0.0 + +CELLS 3 15 +4 0 1 2 3 +4 2 4 0 3 +4 4 2 5 3 + +CELL_TYPES 3 +10 +10 +10 + +CELL_DATA 3 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 diff --git a/doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31_small.png b/doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31_small.png new file mode 100644 index 0000000..e875b71 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_01-31_refined/01-31_small.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20.png b/doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20.png new file mode 100644 index 0000000..4525fad Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20.pvsm b/doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20.pvsm new file mode 100644 index 0000000..c3f128b --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20.txt b/doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20.txt new file mode 100644 index 0000000..93f842d --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20.txt @@ -0,0 +1,15 @@ +TET no. 0: +0.0, 0.5, 0.5 +0.0, 0.0, 1.0 +0.5, 0.0, 0.5 +0.0, 0.0, 0.0 +TET no. 1: +0.5, 0.0, 0.5 +0.0, 1.0, 0.0 +0.0, 0.5, 0.5 +0.0, 0.0, 0.0 +TET no. 2: +0.0, 1.0, 0.0 +0.5, 0.0, 0.5 +1.0, 0.0, 0.0 +0.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20.vtk b/doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20.vtk new file mode 100644 index 0000000..79acc34 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20.vtk @@ -0,0 +1,29 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 6 DOUBLE +0.0 0.5 0.5 +0.0 0.0 1.0 +0.5 0.0 0.5 +0.0 0.0 0.0 +0.0 1.0 0.0 +1.0 0.0 0.0 + +CELLS 3 15 +4 0 1 2 3 +4 2 4 0 3 +4 4 2 5 3 + +CELL_TYPES 3 +10 +10 +10 + +CELL_DATA 3 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20_small.png b/doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20_small.png new file mode 100644 index 0000000..cd84e9c Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_12-20_refined/12-20_small.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23.png b/doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23.png new file mode 100644 index 0000000..5a61741 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23.pvsm b/doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23.pvsm new file mode 100644 index 0000000..ee6f84c --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23.txt b/doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23.txt new file mode 100644 index 0000000..143d814 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23.txt @@ -0,0 +1,15 @@ +TET no. 0: +0.0, 0.0, 0.5 +0.0, 0.0, 1.0 +0.0, 0.5, 0.5 +1.0, 0.0, 0.0 +TET no. 1: +0.0, 0.5, 0.5 +0.0, 0.0, 0.0 +0.0, 0.0, 0.5 +1.0, 0.0, 0.0 +TET no. 2: +0.0, 0.0, 0.0 +0.0, 0.5, 0.5 +0.0, 1.0, 0.0 +1.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23.vtk b/doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23.vtk new file mode 100644 index 0000000..efe3fa0 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23.vtk @@ -0,0 +1,29 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 6 DOUBLE +0.0 0.0 0.5 +0.0 0.0 1.0 +0.0 0.5 0.5 +1.0 0.0 0.0 +0.0 0.0 0.0 +0.0 1.0 0.0 + +CELLS 3 15 +4 0 1 2 3 +4 2 4 0 3 +4 4 2 5 3 + +CELL_TYPES 3 +10 +10 +10 + +CELL_DATA 3 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23_small.png b/doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23_small.png new file mode 100644 index 0000000..0a41d5d Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_12-23_refined/12-23_small.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30.png b/doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30.png new file mode 100644 index 0000000..173f194 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30.pvsm b/doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30.pvsm new file mode 100644 index 0000000..0ff4b5a --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30.txt b/doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30.txt new file mode 100644 index 0000000..5bb4c81 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30.txt @@ -0,0 +1,20 @@ +TET no. 0: +1.0, 0.0, 0.0 +0.0, 0.5, 0.5 +0.5, 0.0, 0.0 +0.0, 1.0, 0.0 +TET no. 1: +0.0, 0.5, 0.5 +0.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.0, 1.0, 0.0 +TET no. 2: +0.0, 0.5, 0.5 +0.5, 0.0, 0.0 +0.0, 0.0, 0.0 +0.0, 0.0, 1.0 +TET no. 3: +1.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.0, 0.5, 0.5 +0.0, 0.0, 1.0 diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30.vtk b/doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30.vtk new file mode 100644 index 0000000..03ee1f9 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30.vtk @@ -0,0 +1,32 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 6 DOUBLE +1.0 0.0 0.0 +0.0 0.5 0.5 +0.5 0.0 0.0 +0.0 1.0 0.0 +0.0 0.0 0.0 +0.0 0.0 1.0 + +CELLS 4 20 +4 0 1 2 3 +4 1 4 2 3 +4 1 2 4 5 +4 0 2 1 5 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30_small.png b/doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30_small.png new file mode 100644 index 0000000..6a34cf2 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_12-30_refined/12-30_small.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31.png b/doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31.png new file mode 100644 index 0000000..e2d6ab9 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31.pvsm b/doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31.pvsm new file mode 100644 index 0000000..a5acbf4 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31.txt b/doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31.txt new file mode 100644 index 0000000..8745825 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31.txt @@ -0,0 +1,15 @@ +TET no. 0: +0.0, 0.5, 0.5 +0.0, 1.0, 0.0 +0.0, 0.5, 0.0 +1.0, 0.0, 0.0 +TET no. 1: +0.0, 0.5, 0.0 +0.0, 0.0, 1.0 +0.0, 0.5, 0.5 +1.0, 0.0, 0.0 +TET no. 2: +0.0, 0.0, 1.0 +0.0, 0.5, 0.0 +0.0, 0.0, 0.0 +1.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31.vtk b/doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31.vtk new file mode 100644 index 0000000..f5503a8 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31.vtk @@ -0,0 +1,29 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 6 DOUBLE +0.0 0.5 0.5 +0.0 1.0 0.0 +0.0 0.5 0.0 +1.0 0.0 0.0 +0.0 0.0 1.0 +0.0 0.0 0.0 + +CELLS 3 15 +4 0 1 2 3 +4 2 4 0 3 +4 4 2 5 3 + +CELL_TYPES 3 +10 +10 +10 + +CELL_DATA 3 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 diff --git a/doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31_small.png b/doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31_small.png new file mode 100644 index 0000000..9835ee1 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_12-31_refined/12-31_small.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23.png b/doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23.png new file mode 100644 index 0000000..2130120 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23.pvsm b/doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23.pvsm new file mode 100644 index 0000000..6bbfc6d --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23.txt b/doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23.txt new file mode 100644 index 0000000..5b7951a --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23.txt @@ -0,0 +1,15 @@ +TET no. 0: +0.5, 0.0, 0.5 +0.0, 0.0, 1.0 +0.0, 0.0, 0.5 +0.0, 1.0, 0.0 +TET no. 1: +0.0, 0.0, 0.5 +1.0, 0.0, 0.0 +0.5, 0.0, 0.5 +0.0, 1.0, 0.0 +TET no. 2: +1.0, 0.0, 0.0 +0.0, 0.0, 0.5 +0.0, 0.0, 0.0 +0.0, 1.0, 0.0 diff --git a/doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23.vtk b/doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23.vtk new file mode 100644 index 0000000..79b1cc4 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23.vtk @@ -0,0 +1,29 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 6 DOUBLE +0.5 0.0 0.5 +0.0 0.0 1.0 +0.0 0.0 0.5 +0.0 1.0 0.0 +1.0 0.0 0.0 +0.0 0.0 0.0 + +CELLS 3 15 +4 0 1 2 3 +4 2 4 0 3 +4 4 2 5 3 + +CELL_TYPES 3 +10 +10 +10 + +CELL_DATA 3 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 diff --git a/doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23_small.png b/doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23_small.png new file mode 100644 index 0000000..160c2fc Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_20-23_refined/20-23_small.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30.png b/doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30.png new file mode 100644 index 0000000..d3a3f63 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30.pvsm b/doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30.pvsm new file mode 100644 index 0000000..199faf5 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30.txt b/doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30.txt new file mode 100644 index 0000000..bfcdd46 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30.txt @@ -0,0 +1,15 @@ +TET no. 0: +0.5, 0.0, 0.0 +1.0, 0.0, 0.0 +0.5, 0.0, 0.5 +0.0, 1.0, 0.0 +TET no. 1: +0.5, 0.0, 0.5 +0.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.0, 1.0, 0.0 +TET no. 2: +0.0, 0.0, 0.0 +0.5, 0.0, 0.5 +0.0, 0.0, 1.0 +0.0, 1.0, 0.0 diff --git a/doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30.vtk b/doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30.vtk new file mode 100644 index 0000000..0b90708 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30.vtk @@ -0,0 +1,29 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 6 DOUBLE +0.5 0.0 0.0 +1.0 0.0 0.0 +0.5 0.0 0.5 +0.0 1.0 0.0 +0.0 0.0 0.0 +0.0 0.0 1.0 + +CELLS 3 15 +4 0 1 2 3 +4 2 4 0 3 +4 4 2 5 3 + +CELL_TYPES 3 +10 +10 +10 + +CELL_DATA 3 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 diff --git a/doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30_small.png b/doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30_small.png new file mode 100644 index 0000000..3b68099 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_20-30_refined/20-30_small.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31.png b/doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31.png new file mode 100644 index 0000000..d708203 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31.pvsm b/doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31.pvsm new file mode 100644 index 0000000..fe53d8b --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31.txt b/doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31.txt new file mode 100644 index 0000000..4d7864b --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31.txt @@ -0,0 +1,20 @@ +TET no. 0: +1.0, 0.0, 0.0 +0.0, 0.5, 0.0 +0.5, 0.0, 0.5 +0.0, 0.0, 0.0 +TET no. 1: +1.0, 0.0, 0.0 +0.0, 1.0, 0.0 +0.5, 0.0, 0.5 +0.0, 0.5, 0.0 +TET no. 2: +0.5, 0.0, 0.5 +0.0, 1.0, 0.0 +0.0, 0.0, 1.0 +0.0, 0.5, 0.0 +TET no. 3: +0.5, 0.0, 0.5 +0.0, 0.5, 0.0 +0.0, 0.0, 1.0 +0.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31.vtk b/doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31.vtk new file mode 100644 index 0000000..01a6012 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31.vtk @@ -0,0 +1,32 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 6 DOUBLE +1.0 0.0 0.0 +0.0 0.5 0.0 +0.5 0.0 0.5 +0.0 0.0 0.0 +0.0 1.0 0.0 +0.0 0.0 1.0 + +CELLS 4 20 +4 0 1 2 3 +4 0 4 2 1 +4 2 4 5 1 +4 2 1 5 3 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31_small.png b/doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31_small.png new file mode 100644 index 0000000..9936656 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_20-31_refined/20-31_small.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30.png b/doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30.png new file mode 100644 index 0000000..8750354 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30.pvsm b/doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30.pvsm new file mode 100644 index 0000000..25f7b58 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30.txt b/doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30.txt new file mode 100644 index 0000000..5659a72 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30.txt @@ -0,0 +1,15 @@ +TET no. 0: +0.0, 0.0, 0.5 +0.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.0, 1.0, 0.0 +TET no. 1: +0.5, 0.0, 0.0 +0.0, 0.0, 1.0 +0.0, 0.0, 0.5 +0.0, 1.0, 0.0 +TET no. 2: +0.0, 0.0, 1.0 +0.5, 0.0, 0.0 +1.0, 0.0, 0.0 +0.0, 1.0, 0.0 diff --git a/doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30.vtk b/doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30.vtk new file mode 100644 index 0000000..49fc7c6 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30.vtk @@ -0,0 +1,29 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 6 DOUBLE +0.0 0.0 0.5 +0.0 0.0 0.0 +0.5 0.0 0.0 +0.0 1.0 0.0 +0.0 0.0 1.0 +1.0 0.0 0.0 + +CELLS 3 15 +4 0 1 2 3 +4 2 4 0 3 +4 4 2 5 3 + +CELL_TYPES 3 +10 +10 +10 + +CELL_DATA 3 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 diff --git a/doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30_small.png b/doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30_small.png new file mode 100644 index 0000000..4aa0d7e Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_23-30_refined/23-30_small.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31.png b/doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31.png new file mode 100644 index 0000000..62d761a Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31.pvsm b/doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31.pvsm new file mode 100644 index 0000000..ae8c9f9 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31.txt b/doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31.txt new file mode 100644 index 0000000..651464c --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31.txt @@ -0,0 +1,15 @@ +TET no. 0: +0.0, 0.5, 0.0 +0.0, 0.0, 0.0 +0.0, 0.0, 0.5 +1.0, 0.0, 0.0 +TET no. 1: +0.0, 0.0, 0.5 +0.0, 1.0, 0.0 +0.0, 0.5, 0.0 +1.0, 0.0, 0.0 +TET no. 2: +0.0, 1.0, 0.0 +0.0, 0.0, 0.5 +0.0, 0.0, 1.0 +1.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31.vtk b/doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31.vtk new file mode 100644 index 0000000..cb3887e --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31.vtk @@ -0,0 +1,29 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 6 DOUBLE +0.0 0.5 0.0 +0.0 0.0 0.0 +0.0 0.0 0.5 +1.0 0.0 0.0 +0.0 1.0 0.0 +0.0 0.0 1.0 + +CELLS 3 15 +4 0 1 2 3 +4 2 4 0 3 +4 4 2 5 3 + +CELL_TYPES 3 +10 +10 +10 + +CELL_DATA 3 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 diff --git a/doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31_small.png b/doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31_small.png new file mode 100644 index 0000000..00beed5 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_23-31_refined/23-31_small.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31.png b/doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31.png new file mode 100644 index 0000000..5e51819 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31.png differ diff --git a/doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31.pvsm b/doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31.pvsm new file mode 100644 index 0000000..25016fe --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31.txt b/doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31.txt new file mode 100644 index 0000000..d79c1dd --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31.txt @@ -0,0 +1,15 @@ +TET no. 0: +0.5, 0.0, 0.0 +0.0, 0.0, 0.0 +0.0, 0.5, 0.0 +0.0, 0.0, 1.0 +TET no. 1: +0.0, 0.5, 0.0 +1.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 1.0 +TET no. 2: +1.0, 0.0, 0.0 +0.0, 0.5, 0.0 +0.0, 1.0, 0.0 +0.0, 0.0, 1.0 diff --git a/doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31.vtk b/doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31.vtk new file mode 100644 index 0000000..fbcba62 --- /dev/null +++ b/doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31.vtk @@ -0,0 +1,29 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 6 DOUBLE +0.5 0.0 0.0 +0.0 0.0 0.0 +0.0 0.5 0.0 +0.0 0.0 1.0 +1.0 0.0 0.0 +0.0 1.0 0.0 + +CELLS 3 15 +4 0 1 2 3 +4 2 4 0 3 +4 4 2 5 3 + +CELL_TYPES 3 +10 +10 +10 + +CELL_DATA 3 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 diff --git a/doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31_small.png b/doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31_small.png new file mode 100644 index 0000000..26ae5a5 Binary files /dev/null and b/doc/tetrahedron_refinements/2-edges/edge_30-31_refined/30-31_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20.png b/doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20.png new file mode 100644 index 0000000..defbaa5 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20.pvsm b/doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20.pvsm new file mode 100644 index 0000000..d210c9e --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20.txt b/doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20.txt new file mode 100644 index 0000000..46b1210 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20.txt @@ -0,0 +1,20 @@ +TET no. 0: +0.0, 0.5, 0.5 +0.5, 0.5, 0.0 +0.0, 1.0, 0.0 +0.0, 0.0, 0.0 +TET no. 1: +0.0, 0.0, 1.0 +0.5, 0.0, 0.5 +0.0, 0.5, 0.5 +0.0, 0.0, 0.0 +TET no. 2: +0.5, 0.0, 0.5 +1.0, 0.0, 0.0 +0.5, 0.5, 0.0 +0.0, 0.0, 0.0 +TET no. 3: +0.5, 0.5, 0.0 +0.0, 0.5, 0.5 +0.5, 0.0, 0.5 +0.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20.vtk b/doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20.vtk new file mode 100644 index 0000000..919e005 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20.vtk @@ -0,0 +1,33 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 7 DOUBLE +0.0 0.5 0.5 +0.5 0.5 0.0 +0.0 1.0 0.0 +0.0 0.0 0.0 +0.0 0.0 1.0 +0.5 0.0 0.5 +1.0 0.0 0.0 + +CELLS 4 20 +4 0 1 2 3 +4 4 5 0 3 +4 5 6 1 3 +4 1 0 5 3 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20_small.png b/doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20_small.png new file mode 100644 index 0000000..251a077 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-12-20_refined/01-12-20_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23.png b/doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23.png new file mode 100644 index 0000000..18fb8b6 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23.pvsm b/doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23.pvsm new file mode 100644 index 0000000..8761dd0 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23.txt b/doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23.txt new file mode 100644 index 0000000..7cbdea3 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23.txt @@ -0,0 +1,20 @@ +TET no. 0: +0.0, 0.5, 0.5 +0.5, 0.5, 0.0 +0.0, 1.0, 0.0 +0.0, 0.0, 0.0 +TET no. 1: +0.0, 0.5, 0.5 +1.0, 0.0, 0.0 +0.5, 0.5, 0.0 +0.0, 0.0, 0.0 +TET no. 2: +0.0, 0.5, 0.5 +0.0, 0.0, 0.0 +0.0, 0.0, 0.5 +1.0, 0.0, 0.0 +TET no. 3: +0.0, 0.5, 0.5 +0.0, 0.0, 0.5 +0.0, 0.0, 1.0 +1.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23.vtk b/doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23.vtk new file mode 100644 index 0000000..5c81fc6 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23.vtk @@ -0,0 +1,33 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 7 DOUBLE +0.0 0.5 0.5 +0.5 0.5 0.0 +0.0 1.0 0.0 +0.0 0.0 0.0 +1.0 0.0 0.0 +0.0 0.0 0.5 +0.0 0.0 1.0 + +CELLS 4 20 +4 0 1 2 3 +4 0 4 1 3 +4 0 3 5 4 +4 0 5 6 4 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23_small.png b/doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23_small.png new file mode 100644 index 0000000..2c3538d Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-12-23_refined/01-12-23_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30.png b/doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30.png new file mode 100644 index 0000000..9a8e369 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30.pvsm b/doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30.pvsm new file mode 100644 index 0000000..379fdad --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30.txt b/doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30.txt new file mode 100644 index 0000000..e762bb7 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30.txt @@ -0,0 +1,20 @@ +TET no. 0: +0.5, 0.5, 0.0 +0.0, 1.0, 0.0 +0.0, 0.5, 0.5 +0.0, 0.0, 0.0 +TET no. 1: +0.5, 0.5, 0.0 +0.0, 0.5, 0.5 +0.0, 0.0, 1.0 +0.0, 0.0, 0.0 +TET no. 2: +0.5, 0.5, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 0.0 +0.0, 0.0, 1.0 +TET no. 3: +0.5, 0.5, 0.0 +1.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 1.0 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30.vtk b/doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30.vtk new file mode 100644 index 0000000..08e4f75 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30.vtk @@ -0,0 +1,33 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 7 DOUBLE +0.5 0.5 0.0 +0.0 1.0 0.0 +0.0 0.5 0.5 +0.0 0.0 0.0 +0.0 0.0 1.0 +0.5 0.0 0.0 +1.0 0.0 0.0 + +CELLS 4 20 +4 0 1 2 3 +4 0 2 4 3 +4 0 5 3 4 +4 0 6 5 4 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30_small.png b/doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30_small.png new file mode 100644 index 0000000..e24ad11 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-12-30_refined/01-12-30_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31.png b/doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31.png new file mode 100644 index 0000000..0542c67 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31.pvsm b/doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31.pvsm new file mode 100644 index 0000000..fc5ca34 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31.pvsm @@ -0,0 +1,1697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31.txt b/doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31.txt new file mode 100644 index 0000000..c6b8104 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31.txt @@ -0,0 +1,45 @@ +TET no. 0: +0.5, 0.5, 0.0 +0.0, 0.5, 0.5 +0.0, 0.5, 0.0 +0.0, 1.0, 0.0 +TET no. 1: +0.0, 0.5, 0.0 +0.0, 0.5, 0.5 +0.5, 0.5, 0.0 +0.25, 0.25, 0.25 +TET no. 2: +0.0, 0.0, 1.0 +0.0, 0.0, 0.0 +1.0, 0.0, 0.0 +0.25, 0.25, 0.25 +TET no. 3: +0.5, 0.5, 0.0 +0.0, 0.0, 1.0 +1.0, 0.0, 0.0 +0.25, 0.25, 0.25 +TET no. 4: +0.5, 0.5, 0.0 +0.0, 0.5, 0.5 +0.0, 0.0, 1.0 +0.25, 0.25, 0.25 +TET no. 5: +0.0, 0.5, 0.5 +0.0, 0.0, 0.0 +0.0, 0.0, 1.0 +0.25, 0.25, 0.25 +TET no. 6: +0.0, 0.5, 0.5 +0.0, 0.5, 0.0 +0.0, 0.0, 0.0 +0.25, 0.25, 0.25 +TET no. 7: +0.0, 0.5, 0.0 +1.0, 0.0, 0.0 +0.0, 0.0, 0.0 +0.25, 0.25, 0.25 +TET no. 8: +0.5, 0.5, 0.0 +1.0, 0.0, 0.0 +0.0, 0.5, 0.0 +0.25, 0.25, 0.25 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31.vtk b/doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31.vtk new file mode 100644 index 0000000..2ba707d --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31.vtk @@ -0,0 +1,49 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +0.5 0.5 0.0 +0.0 0.5 0.5 +0.0 0.5 0.0 +0.0 1.0 0.0 +0.25 0.25 0.25 +0.0 0.0 1.0 +0.0 0.0 0.0 +1.0 0.0 0.0 + +CELLS 9 45 +4 0 1 2 3 +4 2 1 0 4 +4 5 6 7 4 +4 0 5 7 4 +4 0 1 5 4 +4 1 6 5 4 +4 1 2 6 4 +4 2 7 6 4 +4 0 7 2 4 + +CELL_TYPES 9 +10 +10 +10 +10 +10 +10 +10 +10 +10 + +CELL_DATA 9 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 +7 +8 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31_small.png b/doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31_small.png new file mode 100644 index 0000000..978be5b Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-12-31_refined/01-12-31_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23.png b/doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23.png new file mode 100644 index 0000000..f707772 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23.pvsm b/doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23.pvsm new file mode 100644 index 0000000..300361d --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23.txt b/doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23.txt new file mode 100644 index 0000000..b34f94d --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23.txt @@ -0,0 +1,20 @@ +TET no. 0: +0.5, 0.0, 0.5 +1.0, 0.0, 0.0 +0.5, 0.5, 0.0 +0.0, 0.0, 0.0 +TET no. 1: +0.5, 0.0, 0.5 +0.5, 0.5, 0.0 +0.0, 1.0, 0.0 +0.0, 0.0, 0.0 +TET no. 2: +0.5, 0.0, 0.5 +0.0, 0.0, 0.5 +0.0, 0.0, 0.0 +0.0, 1.0, 0.0 +TET no. 3: +0.5, 0.0, 0.5 +0.0, 0.0, 1.0 +0.0, 0.0, 0.5 +0.0, 1.0, 0.0 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23.vtk b/doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23.vtk new file mode 100644 index 0000000..21c3f5f --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23.vtk @@ -0,0 +1,33 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 7 DOUBLE +0.5 0.0 0.5 +1.0 0.0 0.0 +0.5 0.5 0.0 +0.0 0.0 0.0 +0.0 1.0 0.0 +0.0 0.0 0.5 +0.0 0.0 1.0 + +CELLS 4 20 +4 0 1 2 3 +4 0 2 4 3 +4 0 5 3 4 +4 0 6 5 4 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23_small.png b/doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23_small.png new file mode 100644 index 0000000..42ed226 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-20-23_refined/01-20-23_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30.png b/doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30.png new file mode 100644 index 0000000..457159f Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30.pvsm b/doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30.pvsm new file mode 100644 index 0000000..9519779 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30.txt b/doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30.txt new file mode 100644 index 0000000..14f5eb3 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30.txt @@ -0,0 +1,45 @@ +TET no. 0: +0.5, 0.0, 0.5 +0.5, 0.5, 0.0 +0.5, 0.0, 0.0 +1.0, 0.0, 0.0 +TET no. 1: +0.5, 0.0, 0.0 +0.5, 0.5, 0.0 +0.5, 0.0, 0.5 +0.25, 0.25, 0.25 +TET no. 2: +0.0, 1.0, 0.0 +0.0, 0.0, 0.0 +0.0, 0.0, 1.0 +0.25, 0.25, 0.25 +TET no. 3: +0.5, 0.0, 0.5 +0.0, 1.0, 0.0 +0.0, 0.0, 1.0 +0.25, 0.25, 0.25 +TET no. 4: +0.5, 0.0, 0.5 +0.5, 0.5, 0.0 +0.0, 1.0, 0.0 +0.25, 0.25, 0.25 +TET no. 5: +0.5, 0.5, 0.0 +0.0, 0.0, 0.0 +0.0, 1.0, 0.0 +0.25, 0.25, 0.25 +TET no. 6: +0.5, 0.5, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 0.0 +0.25, 0.25, 0.25 +TET no. 7: +0.5, 0.0, 0.0 +0.0, 0.0, 1.0 +0.0, 0.0, 0.0 +0.25, 0.25, 0.25 +TET no. 8: +0.5, 0.0, 0.5 +0.0, 0.0, 1.0 +0.5, 0.0, 0.0 +0.25, 0.25, 0.25 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30.vtk b/doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30.vtk new file mode 100644 index 0000000..bcb761a --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30.vtk @@ -0,0 +1,49 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +0.5 0.0 0.5 +0.5 0.5 0.0 +0.5 0.0 0.0 +1.0 0.0 0.0 +0.25 0.25 0.25 +0.0 1.0 0.0 +0.0 0.0 0.0 +0.0 0.0 1.0 + +CELLS 9 45 +4 0 1 2 3 +4 2 1 0 4 +4 5 6 7 4 +4 0 5 7 4 +4 0 1 5 4 +4 1 6 5 4 +4 1 2 6 4 +4 2 7 6 4 +4 0 7 2 4 + +CELL_TYPES 9 +10 +10 +10 +10 +10 +10 +10 +10 +10 + +CELL_DATA 9 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 +7 +8 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30_small.png b/doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30_small.png new file mode 100644 index 0000000..185cc0b Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-20-30_refined/01-20-30_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31.png b/doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31.png new file mode 100644 index 0000000..2820b18 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31.pvsm b/doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31.pvsm new file mode 100644 index 0000000..b079d3b --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31.txt b/doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31.txt new file mode 100644 index 0000000..3b3fd70 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31.txt @@ -0,0 +1,20 @@ +TET no. 0: +0.5, 0.5, 0.0 +0.0, 0.5, 0.0 +0.0, 1.0, 0.0 +0.0, 0.0, 1.0 +TET no. 1: +0.5, 0.5, 0.0 +0.0, 0.0, 0.0 +0.0, 0.5, 0.0 +0.0, 0.0, 1.0 +TET no. 2: +0.5, 0.5, 0.0 +0.0, 0.0, 1.0 +0.5, 0.0, 0.5 +0.0, 0.0, 0.0 +TET no. 3: +0.5, 0.5, 0.0 +0.5, 0.0, 0.5 +1.0, 0.0, 0.0 +0.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31.vtk b/doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31.vtk new file mode 100644 index 0000000..9acf5c3 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31.vtk @@ -0,0 +1,33 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 7 DOUBLE +0.5 0.5 0.0 +0.0 0.5 0.0 +0.0 1.0 0.0 +0.0 0.0 1.0 +0.0 0.0 0.0 +0.5 0.0 0.5 +1.0 0.0 0.0 + +CELLS 4 20 +4 0 1 2 3 +4 0 4 1 3 +4 0 3 5 4 +4 0 5 6 4 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31_small.png b/doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31_small.png new file mode 100644 index 0000000..74e9cc9 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-20-31_refined/01-20-31_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30.png b/doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30.png new file mode 100644 index 0000000..4933c89 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30.pvsm b/doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30.pvsm new file mode 100644 index 0000000..dd638e9 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30.txt b/doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30.txt new file mode 100644 index 0000000..95ea0be --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30.txt @@ -0,0 +1,20 @@ +TET no. 0: +0.5, 0.0, 0.0 +0.0, 0.0, 0.5 +0.0, 0.0, 0.0 +0.0, 1.0, 0.0 +TET no. 1: +0.5, 0.0, 0.0 +0.0, 0.0, 1.0 +0.0, 0.0, 0.5 +0.0, 1.0, 0.0 +TET no. 2: +0.5, 0.0, 0.0 +0.0, 1.0, 0.0 +0.5, 0.5, 0.0 +0.0, 0.0, 1.0 +TET no. 3: +0.5, 0.0, 0.0 +0.5, 0.5, 0.0 +1.0, 0.0, 0.0 +0.0, 0.0, 1.0 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30.vtk b/doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30.vtk new file mode 100644 index 0000000..84985ee --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30.vtk @@ -0,0 +1,33 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 7 DOUBLE +0.5 0.0 0.0 +0.0 0.0 0.5 +0.0 0.0 0.0 +0.0 1.0 0.0 +0.0 0.0 1.0 +0.5 0.5 0.0 +1.0 0.0 0.0 + +CELLS 4 20 +4 0 1 2 3 +4 0 4 1 3 +4 0 3 5 4 +4 0 5 6 4 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30_small.png b/doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30_small.png new file mode 100644 index 0000000..6cdac2a Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-23-30_refined/01-23-30_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31.png b/doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31.png new file mode 100644 index 0000000..605c579 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31.pvsm b/doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31.pvsm new file mode 100644 index 0000000..12811cb --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31.txt b/doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31.txt new file mode 100644 index 0000000..be41cc0 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31.txt @@ -0,0 +1,20 @@ +TET no. 0: +0.0, 0.5, 0.0 +0.0, 0.0, 0.0 +0.0, 0.0, 0.5 +1.0, 0.0, 0.0 +TET no. 1: +0.0, 0.5, 0.0 +0.0, 0.0, 0.5 +0.0, 0.0, 1.0 +1.0, 0.0, 0.0 +TET no. 2: +0.0, 0.5, 0.0 +0.5, 0.5, 0.0 +1.0, 0.0, 0.0 +0.0, 0.0, 1.0 +TET no. 3: +0.0, 0.5, 0.0 +0.0, 1.0, 0.0 +0.5, 0.5, 0.0 +0.0, 0.0, 1.0 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31.vtk b/doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31.vtk new file mode 100644 index 0000000..e052b9c --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31.vtk @@ -0,0 +1,33 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 7 DOUBLE +0.0 0.5 0.0 +0.0 0.0 0.0 +0.0 0.0 0.5 +1.0 0.0 0.0 +0.0 0.0 1.0 +0.5 0.5 0.0 +0.0 1.0 0.0 + +CELLS 4 20 +4 0 1 2 3 +4 0 2 4 3 +4 0 5 3 4 +4 0 6 5 4 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31_small.png b/doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31_small.png new file mode 100644 index 0000000..d2d5180 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-23-31_refined/01-23-31_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31.png b/doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31.png new file mode 100644 index 0000000..bb21646 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31.pvsm b/doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31.pvsm new file mode 100644 index 0000000..2324de4 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31.txt b/doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31.txt new file mode 100644 index 0000000..4b56be1 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31.txt @@ -0,0 +1,20 @@ +TET no. 0: +0.0, 0.5, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 0.0 +0.0, 0.0, 1.0 +TET no. 1: +0.0, 1.0, 0.0 +0.5, 0.5, 0.0 +0.0, 0.5, 0.0 +0.0, 0.0, 1.0 +TET no. 2: +0.5, 0.5, 0.0 +1.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 1.0 +TET no. 3: +0.5, 0.5, 0.0 +0.5, 0.0, 0.0 +0.0, 0.5, 0.0 +0.0, 0.0, 1.0 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31.vtk b/doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31.vtk new file mode 100644 index 0000000..6698bee --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31.vtk @@ -0,0 +1,33 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 7 DOUBLE +0.0 0.5 0.0 +0.5 0.0 0.0 +0.0 0.0 0.0 +0.0 0.0 1.0 +0.0 1.0 0.0 +0.5 0.5 0.0 +1.0 0.0 0.0 + +CELLS 4 20 +4 0 1 2 3 +4 4 5 0 3 +4 5 6 1 3 +4 5 1 0 3 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31_small.png b/doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31_small.png new file mode 100644 index 0000000..536c03e Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_01-30-31_refined/01-30-31_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23.png b/doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23.png new file mode 100644 index 0000000..e64063a Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23.pvsm b/doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23.pvsm new file mode 100644 index 0000000..c912c83 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23.txt b/doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23.txt new file mode 100644 index 0000000..737fbb4 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23.txt @@ -0,0 +1,45 @@ +TET no. 0: +0.0, 0.0, 0.5 +0.0, 0.5, 0.5 +0.5, 0.0, 0.5 +0.0, 0.0, 1.0 +TET no. 1: +0.5, 0.0, 0.5 +0.0, 0.5, 0.5 +0.0, 0.0, 0.5 +0.25, 0.25, 0.25 +TET no. 2: +0.0, 1.0, 0.0 +1.0, 0.0, 0.0 +0.0, 0.0, 0.0 +0.25, 0.25, 0.25 +TET no. 3: +0.0, 0.0, 0.5 +0.0, 1.0, 0.0 +0.0, 0.0, 0.0 +0.25, 0.25, 0.25 +TET no. 4: +0.0, 0.0, 0.5 +0.0, 0.5, 0.5 +0.0, 1.0, 0.0 +0.25, 0.25, 0.25 +TET no. 5: +0.0, 0.5, 0.5 +1.0, 0.0, 0.0 +0.0, 1.0, 0.0 +0.25, 0.25, 0.25 +TET no. 6: +0.0, 0.5, 0.5 +0.5, 0.0, 0.5 +1.0, 0.0, 0.0 +0.25, 0.25, 0.25 +TET no. 7: +0.5, 0.0, 0.5 +0.0, 0.0, 0.0 +1.0, 0.0, 0.0 +0.25, 0.25, 0.25 +TET no. 8: +0.0, 0.0, 0.5 +0.0, 0.0, 0.0 +0.5, 0.0, 0.5 +0.25, 0.25, 0.25 diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23.vtk b/doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23.vtk new file mode 100644 index 0000000..2acbfb1 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23.vtk @@ -0,0 +1,49 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +0.0 0.0 0.5 +0.0 0.5 0.5 +0.5 0.0 0.5 +0.0 0.0 1.0 +0.25 0.25 0.25 +0.0 1.0 0.0 +1.0 0.0 0.0 +0.0 0.0 0.0 + +CELLS 9 45 +4 0 1 2 3 +4 2 1 0 4 +4 5 6 7 4 +4 0 5 7 4 +4 0 1 5 4 +4 1 6 5 4 +4 1 2 6 4 +4 2 7 6 4 +4 0 7 2 4 + +CELL_TYPES 9 +10 +10 +10 +10 +10 +10 +10 +10 +10 + +CELL_DATA 9 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 +7 +8 diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23_small.png b/doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23_small.png new file mode 100644 index 0000000..f766e81 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_12-20-23_refined/12-20-23_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30.png b/doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30.png new file mode 100644 index 0000000..68596c3 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30.pvsm b/doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30.pvsm new file mode 100644 index 0000000..1e5c1b5 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30.txt b/doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30.txt new file mode 100644 index 0000000..c93ac84 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30.txt @@ -0,0 +1,20 @@ +TET no. 0: +0.5, 0.0, 0.5 +0.5, 0.0, 0.0 +1.0, 0.0, 0.0 +0.0, 1.0, 0.0 +TET no. 1: +0.5, 0.0, 0.5 +0.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.0, 1.0, 0.0 +TET no. 2: +0.5, 0.0, 0.5 +0.0, 1.0, 0.0 +0.0, 0.5, 0.5 +0.0, 0.0, 0.0 +TET no. 3: +0.5, 0.0, 0.5 +0.0, 0.5, 0.5 +0.0, 0.0, 1.0 +0.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30.vtk b/doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30.vtk new file mode 100644 index 0000000..c16175c --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30.vtk @@ -0,0 +1,33 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 7 DOUBLE +0.5 0.0 0.5 +0.5 0.0 0.0 +1.0 0.0 0.0 +0.0 1.0 0.0 +0.0 0.0 0.0 +0.0 0.5 0.5 +0.0 0.0 1.0 + +CELLS 4 20 +4 0 1 2 3 +4 0 4 1 3 +4 0 3 5 4 +4 0 5 6 4 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30_small.png b/doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30_small.png new file mode 100644 index 0000000..a05c998 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_12-20-30_refined/12-20-30_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31.png b/doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31.png new file mode 100644 index 0000000..ab0e094 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31.pvsm b/doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31.pvsm new file mode 100644 index 0000000..5985b94 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31.txt b/doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31.txt new file mode 100644 index 0000000..5e4e669 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31.txt @@ -0,0 +1,20 @@ +TET no. 0: +0.0, 0.5, 0.5 +0.0, 1.0, 0.0 +0.0, 0.5, 0.0 +1.0, 0.0, 0.0 +TET no. 1: +0.0, 0.5, 0.5 +0.0, 0.5, 0.0 +0.0, 0.0, 0.0 +1.0, 0.0, 0.0 +TET no. 2: +0.0, 0.5, 0.5 +0.5, 0.0, 0.5 +1.0, 0.0, 0.0 +0.0, 0.0, 0.0 +TET no. 3: +0.0, 0.5, 0.5 +0.0, 0.0, 1.0 +0.5, 0.0, 0.5 +0.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31.vtk b/doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31.vtk new file mode 100644 index 0000000..1cd26c7 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31.vtk @@ -0,0 +1,33 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 7 DOUBLE +0.0 0.5 0.5 +0.0 1.0 0.0 +0.0 0.5 0.0 +1.0 0.0 0.0 +0.0 0.0 0.0 +0.5 0.0 0.5 +0.0 0.0 1.0 + +CELLS 4 20 +4 0 1 2 3 +4 0 2 4 3 +4 0 5 3 4 +4 0 6 5 4 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31_small.png b/doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31_small.png new file mode 100644 index 0000000..0618bca Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_12-20-31_refined/12-20-31_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30.png b/doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30.png new file mode 100644 index 0000000..5fba02a Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30.pvsm b/doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30.pvsm new file mode 100644 index 0000000..89a6097 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30.txt b/doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30.txt new file mode 100644 index 0000000..10cc56f --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30.txt @@ -0,0 +1,20 @@ +TET no. 0: +0.0, 0.0, 0.5 +0.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.0, 1.0, 0.0 +TET no. 1: +0.0, 0.0, 0.5 +0.5, 0.0, 0.0 +1.0, 0.0, 0.0 +0.0, 1.0, 0.0 +TET no. 2: +0.0, 0.0, 0.5 +0.0, 0.5, 0.5 +0.0, 1.0, 0.0 +1.0, 0.0, 0.0 +TET no. 3: +0.0, 0.0, 0.5 +0.0, 0.0, 1.0 +0.0, 0.5, 0.5 +1.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30.vtk b/doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30.vtk new file mode 100644 index 0000000..c503c80 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30.vtk @@ -0,0 +1,33 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 7 DOUBLE +0.0 0.0 0.5 +0.0 0.0 0.0 +0.5 0.0 0.0 +0.0 1.0 0.0 +1.0 0.0 0.0 +0.0 0.5 0.5 +0.0 0.0 1.0 + +CELLS 4 20 +4 0 1 2 3 +4 0 2 4 3 +4 0 5 3 4 +4 0 6 5 4 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30_small.png b/doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30_small.png new file mode 100644 index 0000000..bd8ce69 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_12-23-30_refined/12-23-30_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31.png b/doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31.png new file mode 100644 index 0000000..ff80ac9 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31.pvsm b/doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31.pvsm new file mode 100644 index 0000000..2038386 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31.txt b/doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31.txt new file mode 100644 index 0000000..976d23c --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31.txt @@ -0,0 +1,20 @@ +TET no. 0: +0.0, 0.0, 0.5 +0.0, 0.5, 0.0 +0.0, 0.0, 0.0 +1.0, 0.0, 0.0 +TET no. 1: +0.0, 0.0, 1.0 +0.0, 0.5, 0.5 +0.0, 0.0, 0.5 +1.0, 0.0, 0.0 +TET no. 2: +0.0, 0.5, 0.5 +0.0, 1.0, 0.0 +0.0, 0.5, 0.0 +1.0, 0.0, 0.0 +TET no. 3: +0.0, 0.5, 0.5 +0.0, 0.5, 0.0 +0.0, 0.0, 0.5 +1.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31.vtk b/doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31.vtk new file mode 100644 index 0000000..44e12a3 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31.vtk @@ -0,0 +1,33 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 7 DOUBLE +0.0 0.0 0.5 +0.0 0.5 0.0 +0.0 0.0 0.0 +1.0 0.0 0.0 +0.0 0.0 1.0 +0.0 0.5 0.5 +0.0 1.0 0.0 + +CELLS 4 20 +4 0 1 2 3 +4 4 5 0 3 +4 5 6 1 3 +4 5 1 0 3 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31_small.png b/doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31_small.png new file mode 100644 index 0000000..814f05a Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_12-23-31_refined/12-23-31_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31.png b/doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31.png new file mode 100644 index 0000000..2279f61 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31.pvsm b/doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31.pvsm new file mode 100644 index 0000000..a449295 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31.txt b/doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31.txt new file mode 100644 index 0000000..94b209a --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31.txt @@ -0,0 +1,20 @@ +TET no. 0: +0.0, 0.5, 0.0 +0.0, 0.5, 0.5 +0.0, 1.0, 0.0 +1.0, 0.0, 0.0 +TET no. 1: +0.0, 0.5, 0.0 +0.0, 0.0, 1.0 +0.0, 0.5, 0.5 +1.0, 0.0, 0.0 +TET no. 2: +0.0, 0.5, 0.0 +1.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 1.0 +TET no. 3: +0.0, 0.5, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 0.0 +0.0, 0.0, 1.0 diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31.vtk b/doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31.vtk new file mode 100644 index 0000000..f730169 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31.vtk @@ -0,0 +1,33 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 7 DOUBLE +0.0 0.5 0.0 +0.0 0.5 0.5 +0.0 1.0 0.0 +1.0 0.0 0.0 +0.0 0.0 1.0 +0.5 0.0 0.0 +0.0 0.0 0.0 + +CELLS 4 20 +4 0 1 2 3 +4 0 4 1 3 +4 0 3 5 4 +4 0 5 6 4 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31_small.png b/doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31_small.png new file mode 100644 index 0000000..4b3727f Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_12-30-31_refined/12-30-31_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30.png b/doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30.png new file mode 100644 index 0000000..745babc Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30.pvsm b/doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30.pvsm new file mode 100644 index 0000000..67ea187 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30.txt b/doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30.txt new file mode 100644 index 0000000..b256914 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30.txt @@ -0,0 +1,20 @@ +TET no. 0: +0.5, 0.0, 0.5 +0.5, 0.0, 0.0 +1.0, 0.0, 0.0 +0.0, 1.0, 0.0 +TET no. 1: +0.0, 0.0, 1.0 +0.0, 0.0, 0.5 +0.5, 0.0, 0.5 +0.0, 1.0, 0.0 +TET no. 2: +0.0, 0.0, 0.5 +0.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.0, 1.0, 0.0 +TET no. 3: +0.5, 0.0, 0.5 +0.0, 0.0, 0.5 +0.5, 0.0, 0.0 +0.0, 1.0, 0.0 diff --git a/doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30.vtk b/doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30.vtk new file mode 100644 index 0000000..6145dac --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30.vtk @@ -0,0 +1,33 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 7 DOUBLE +0.5 0.0 0.5 +0.5 0.0 0.0 +1.0 0.0 0.0 +0.0 1.0 0.0 +0.0 0.0 1.0 +0.0 0.0 0.5 +0.0 0.0 0.0 + +CELLS 4 20 +4 0 1 2 3 +4 4 5 0 3 +4 5 6 1 3 +4 0 5 1 3 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30_small.png b/doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30_small.png new file mode 100644 index 0000000..724d701 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_20-23-30_refined/20-23-30_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31.png b/doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31.png new file mode 100644 index 0000000..0a65637 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31.pvsm b/doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31.pvsm new file mode 100644 index 0000000..ee586d4 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31.txt b/doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31.txt new file mode 100644 index 0000000..4af572d --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31.txt @@ -0,0 +1,20 @@ +TET no. 0: +0.0, 0.0, 0.5 +0.5, 0.0, 0.5 +0.0, 0.0, 1.0 +0.0, 1.0, 0.0 +TET no. 1: +0.0, 0.0, 0.5 +1.0, 0.0, 0.0 +0.5, 0.0, 0.5 +0.0, 1.0, 0.0 +TET no. 2: +0.0, 0.0, 0.5 +0.0, 1.0, 0.0 +0.0, 0.5, 0.0 +1.0, 0.0, 0.0 +TET no. 3: +0.0, 0.0, 0.5 +0.0, 0.5, 0.0 +0.0, 0.0, 0.0 +1.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31.vtk b/doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31.vtk new file mode 100644 index 0000000..fd10588 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31.vtk @@ -0,0 +1,33 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 7 DOUBLE +0.0 0.0 0.5 +0.5 0.0 0.5 +0.0 0.0 1.0 +0.0 1.0 0.0 +1.0 0.0 0.0 +0.0 0.5 0.0 +0.0 0.0 0.0 + +CELLS 4 20 +4 0 1 2 3 +4 0 4 1 3 +4 0 3 5 4 +4 0 5 6 4 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31_small.png b/doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31_small.png new file mode 100644 index 0000000..aef9241 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_20-23-31_refined/20-23-31_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31.png b/doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31.png new file mode 100644 index 0000000..83a458d Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31.pvsm b/doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31.pvsm new file mode 100644 index 0000000..539bb6a --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31.txt b/doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31.txt new file mode 100644 index 0000000..8b5ea47 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31.txt @@ -0,0 +1,20 @@ +TET no. 0: +0.5, 0.0, 0.0 +1.0, 0.0, 0.0 +0.5, 0.0, 0.5 +0.0, 1.0, 0.0 +TET no. 1: +0.5, 0.0, 0.0 +0.5, 0.0, 0.5 +0.0, 0.0, 1.0 +0.0, 1.0, 0.0 +TET no. 2: +0.5, 0.0, 0.0 +0.0, 0.5, 0.0 +0.0, 1.0, 0.0 +0.0, 0.0, 1.0 +TET no. 3: +0.5, 0.0, 0.0 +0.0, 0.0, 0.0 +0.0, 0.5, 0.0 +0.0, 0.0, 1.0 diff --git a/doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31.vtk b/doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31.vtk new file mode 100644 index 0000000..e6fb10c --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31.vtk @@ -0,0 +1,33 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 7 DOUBLE +0.5 0.0 0.0 +1.0 0.0 0.0 +0.5 0.0 0.5 +0.0 1.0 0.0 +0.0 0.0 1.0 +0.0 0.5 0.0 +0.0 0.0 0.0 + +CELLS 4 20 +4 0 1 2 3 +4 0 2 4 3 +4 0 5 3 4 +4 0 6 5 4 + +CELL_TYPES 4 +10 +10 +10 +10 + +CELL_DATA 4 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 diff --git a/doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31_small.png b/doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31_small.png new file mode 100644 index 0000000..ecde568 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_20-30-31_refined/20-30-31_small.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31.png b/doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31.png new file mode 100644 index 0000000..bb06a64 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31.png differ diff --git a/doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31.pvsm b/doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31.pvsm new file mode 100644 index 0000000..e36de7f --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31.pvsm @@ -0,0 +1,1839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31.txt b/doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31.txt new file mode 100644 index 0000000..0d99541 --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31.txt @@ -0,0 +1,45 @@ +TET no. 0: +0.0, 0.5, 0.0 +0.0, 0.0, 0.5 +0.5, 0.0, 0.0 +0.0, 0.0, 0.0 +TET no. 1: +0.5, 0.0, 0.0 +0.0, 0.0, 0.5 +0.0, 0.5, 0.0 +0.25, 0.25, 0.25 +TET no. 2: +0.0, 0.0, 1.0 +1.0, 0.0, 0.0 +0.0, 1.0, 0.0 +0.25, 0.25, 0.25 +TET no. 3: +0.0, 0.5, 0.0 +0.0, 0.0, 1.0 +0.0, 1.0, 0.0 +0.25, 0.25, 0.25 +TET no. 4: +0.0, 0.5, 0.0 +0.0, 0.0, 0.5 +0.0, 0.0, 1.0 +0.25, 0.25, 0.25 +TET no. 5: +0.0, 0.0, 0.5 +1.0, 0.0, 0.0 +0.0, 0.0, 1.0 +0.25, 0.25, 0.25 +TET no. 6: +0.0, 0.0, 0.5 +0.5, 0.0, 0.0 +1.0, 0.0, 0.0 +0.25, 0.25, 0.25 +TET no. 7: +0.5, 0.0, 0.0 +0.0, 1.0, 0.0 +1.0, 0.0, 0.0 +0.25, 0.25, 0.25 +TET no. 8: +0.0, 0.5, 0.0 +0.0, 1.0, 0.0 +0.5, 0.0, 0.0 +0.25, 0.25, 0.25 diff --git a/doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31.vtk b/doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31.vtk new file mode 100644 index 0000000..3b7024b --- /dev/null +++ b/doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31.vtk @@ -0,0 +1,49 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +0.0 0.5 0.0 +0.0 0.0 0.5 +0.5 0.0 0.0 +0.0 0.0 0.0 +0.25 0.25 0.25 +0.0 0.0 1.0 +1.0 0.0 0.0 +0.0 1.0 0.0 + +CELLS 9 45 +4 0 1 2 3 +4 2 1 0 4 +4 5 6 7 4 +4 0 5 7 4 +4 0 1 5 4 +4 1 6 5 4 +4 1 2 6 4 +4 2 7 6 4 +4 0 7 2 4 + +CELL_TYPES 9 +10 +10 +10 +10 +10 +10 +10 +10 +10 + +CELL_DATA 9 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 +7 +8 diff --git a/doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31_small.png b/doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31_small.png new file mode 100644 index 0000000..90359d8 Binary files /dev/null and b/doc/tetrahedron_refinements/3-edges/edge_23-30-31_refined/23-30-31_small.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23.png b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23.png new file mode 100644 index 0000000..66192be Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23.pvsm b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23.pvsm new file mode 100644 index 0000000..54ea31f --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23.pvsm @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23.txt b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23.txt new file mode 100644 index 0000000..90a7c8a --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23.txt @@ -0,0 +1,25 @@ +TET no. 0: +0.0, 0.0, 0.0 +0.5, 0.5, 0.0 +1.0, 0.0, 0.0 +0.5, 0.0, 0.5 +TET no. 1: +0.0, 0.0, 0.0 +0.0, 1.0, 0.0 +0.5, 0.5, 0.0 +0.0, 0.5, 0.5 +TET no. 2: +0.0, 0.0, 0.0 +0.0, 0.5, 0.5 +0.5, 0.5, 0.0 +0.5, 0.0, 0.5 +TET no. 3: +0.0, 0.0, 0.0 +0.0, 0.0, 0.5 +0.0, 0.5, 0.5 +0.5, 0.0, 0.5 +TET no. 4: +0.0, 0.0, 0.5 +0.0, 0.5, 0.5 +0.5, 0.0, 0.5 +0.0, 0.0, 1.0 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23.vtk b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23.vtk new file mode 100644 index 0000000..ac0b1d9 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23.vtk @@ -0,0 +1,37 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +0.0 0.0 0.0 +0.5 0.5 0.0 +1.0 0.0 0.0 +0.5 0.0 0.5 +0.0 1.0 0.0 +0.0 0.5 0.5 +0.0 0.0 0.5 +0.0 0.0 1.0 + +CELLS 5 25 +4 0 1 2 3 +4 0 4 1 5 +4 0 5 1 3 +4 0 6 5 3 +4 6 5 3 7 + +CELL_TYPES 5 +10 +10 +10 +10 +10 + +CELL_DATA 5 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23_small.png b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23_small.png new file mode 100644 index 0000000..095cadb Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-23_refined/01-12-20-23_small.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30.png b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30.png new file mode 100644 index 0000000..c38eadc Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30.pvsm b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30.pvsm new file mode 100644 index 0000000..d57155f --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30.pvsm @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30.txt b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30.txt new file mode 100644 index 0000000..73fe4d8 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30.txt @@ -0,0 +1,25 @@ +TET no. 0: +0.0, 0.0, 0.0 +0.0, 0.5, 0.5 +0.0, 1.0, 0.0 +0.5, 0.5, 0.0 +TET no. 1: +0.0, 0.0, 0.0 +0.0, 0.0, 1.0 +0.0, 0.5, 0.5 +0.5, 0.0, 0.5 +TET no. 2: +0.0, 0.0, 0.0 +0.5, 0.0, 0.5 +0.0, 0.5, 0.5 +0.5, 0.5, 0.0 +TET no. 3: +0.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.5, 0.0, 0.5 +0.5, 0.5, 0.0 +TET no. 4: +0.5, 0.0, 0.0 +0.5, 0.0, 0.5 +0.5, 0.5, 0.0 +1.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30.vtk b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30.vtk new file mode 100644 index 0000000..dd352ee --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30.vtk @@ -0,0 +1,37 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +0.0 0.0 0.0 +0.0 0.5 0.5 +0.0 1.0 0.0 +0.5 0.5 0.0 +0.0 0.0 1.0 +0.5 0.0 0.5 +0.5 0.0 0.0 +1.0 0.0 0.0 + +CELLS 5 25 +4 0 1 2 3 +4 0 4 1 5 +4 0 5 1 3 +4 0 6 5 3 +4 6 5 3 7 + +CELL_TYPES 5 +10 +10 +10 +10 +10 + +CELL_DATA 5 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30_small.png b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30_small.png new file mode 100644 index 0000000..7013cb4 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-30_refined/01-12-20-30_small.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31.png b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31.png new file mode 100644 index 0000000..fb173dc Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31.pvsm b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31.pvsm new file mode 100644 index 0000000..adedabe --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31.pvsm @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31.txt b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31.txt new file mode 100644 index 0000000..dbf6c22 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31.txt @@ -0,0 +1,25 @@ +TET no. 0: +0.0, 0.0, 0.0 +0.5, 0.0, 0.5 +0.0, 0.0, 1.0 +0.0, 0.5, 0.5 +TET no. 1: +0.0, 0.0, 0.0 +1.0, 0.0, 0.0 +0.5, 0.0, 0.5 +0.5, 0.5, 0.0 +TET no. 2: +0.0, 0.0, 0.0 +0.5, 0.5, 0.0 +0.5, 0.0, 0.5 +0.0, 0.5, 0.5 +TET no. 3: +0.0, 0.0, 0.0 +0.0, 0.5, 0.0 +0.5, 0.5, 0.0 +0.0, 0.5, 0.5 +TET no. 4: +0.0, 0.5, 0.0 +0.5, 0.5, 0.0 +0.0, 0.5, 0.5 +0.0, 1.0, 0.0 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31.vtk b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31.vtk new file mode 100644 index 0000000..79c8ce1 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31.vtk @@ -0,0 +1,37 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +0.0 0.0 0.0 +0.5 0.0 0.5 +0.0 0.0 1.0 +0.0 0.5 0.5 +1.0 0.0 0.0 +0.5 0.5 0.0 +0.0 0.5 0.0 +0.0 1.0 0.0 + +CELLS 5 25 +4 0 1 2 3 +4 0 4 1 5 +4 0 5 1 3 +4 0 6 5 3 +4 6 5 3 7 + +CELL_TYPES 5 +10 +10 +10 +10 +10 + +CELL_DATA 5 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31_small.png b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31_small.png new file mode 100644 index 0000000..fc06bc8 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-12-20-31_refined/01-12-20-31_small.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30.png b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30.png new file mode 100644 index 0000000..2a253b3 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30.pvsm b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30.pvsm new file mode 100644 index 0000000..0b415d4 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30.pvsm @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30.txt b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30.txt new file mode 100644 index 0000000..dd59055 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30.txt @@ -0,0 +1,30 @@ +TET no. 0: +0.5, 0.5, 0.0 +1.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 1.0 +TET no. 1: +0.5, 0.5, 0.0 +0.0, 0.0, 0.5 +0.0, 0.5, 0.5 +0.0, 0.0, 1.0 +TET no. 2: +0.5, 0.5, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 0.5 +0.0, 0.0, 1.0 +TET no. 3: +0.0, 1.0, 0.0 +0.0, 0.5, 0.5 +0.5, 0.5, 0.0 +0.0, 0.0, 0.5 +TET no. 4: +0.0, 1.0, 0.0 +0.5, 0.5, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 0.5 +TET no. 5: +0.0, 1.0, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 0.0 +0.0, 0.0, 0.5 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30.vtk b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30.vtk new file mode 100644 index 0000000..cbbd55e --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30.vtk @@ -0,0 +1,40 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +0.5 0.5 0.0 +1.0 0.0 0.0 +0.5 0.0 0.0 +0.0 0.0 1.0 +0.0 0.0 0.5 +0.0 0.5 0.5 +0.0 1.0 0.0 +0.0 0.0 0.0 + +CELLS 6 30 +4 0 1 2 3 +4 0 4 5 3 +4 0 2 4 3 +4 6 5 0 4 +4 6 0 2 4 +4 6 2 7 4 + +CELL_TYPES 6 +10 +10 +10 +10 +10 +10 + +CELL_DATA 6 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30_small.png b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30_small.png new file mode 100644 index 0000000..87bbc76 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-30_refined/01-12-23-30_small.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31.png b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31.png new file mode 100644 index 0000000..011e516 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31.pvsm b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31.pvsm new file mode 100644 index 0000000..f70eb2b --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31.pvsm @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31.txt b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31.txt new file mode 100644 index 0000000..7250207 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31.txt @@ -0,0 +1,25 @@ +TET no. 0: +1.0, 0.0, 0.0 +0.0, 0.0, 0.5 +0.0, 0.0, 0.0 +0.0, 0.5, 0.0 +TET no. 1: +1.0, 0.0, 0.0 +0.0, 0.0, 1.0 +0.0, 0.0, 0.5 +0.0, 0.5, 0.5 +TET no. 2: +1.0, 0.0, 0.0 +0.0, 0.5, 0.5 +0.0, 0.0, 0.5 +0.0, 0.5, 0.0 +TET no. 3: +1.0, 0.0, 0.0 +0.5, 0.5, 0.0 +0.0, 0.5, 0.5 +0.0, 0.5, 0.0 +TET no. 4: +0.5, 0.5, 0.0 +0.0, 0.5, 0.5 +0.0, 0.5, 0.0 +0.0, 1.0, 0.0 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31.vtk b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31.vtk new file mode 100644 index 0000000..a0c5d67 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31.vtk @@ -0,0 +1,37 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +1.0 0.0 0.0 +0.0 0.0 0.5 +0.0 0.0 0.0 +0.0 0.5 0.0 +0.0 0.0 1.0 +0.0 0.5 0.5 +0.5 0.5 0.0 +0.0 1.0 0.0 + +CELLS 5 25 +4 0 1 2 3 +4 0 4 1 5 +4 0 5 1 3 +4 0 6 5 3 +4 6 5 3 7 + +CELL_TYPES 5 +10 +10 +10 +10 +10 + +CELL_DATA 5 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31_small.png b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31_small.png new file mode 100644 index 0000000..e7ef911 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-12-23-31_refined/01-12-23-31_small.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31.png b/doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31.png new file mode 100644 index 0000000..d366891 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31.pvsm b/doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31.pvsm new file mode 100644 index 0000000..cd78cc0 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31.pvsm @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31.txt b/doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31.txt new file mode 100644 index 0000000..0e2f72f --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31.txt @@ -0,0 +1,25 @@ +TET no. 0: +0.0, 0.0, 1.0 +0.5, 0.0, 0.0 +1.0, 0.0, 0.0 +0.5, 0.5, 0.0 +TET no. 1: +0.0, 0.0, 1.0 +0.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.0, 0.5, 0.0 +TET no. 2: +0.0, 0.0, 1.0 +0.0, 0.5, 0.0 +0.5, 0.0, 0.0 +0.5, 0.5, 0.0 +TET no. 3: +0.0, 0.0, 1.0 +0.0, 0.5, 0.5 +0.0, 0.5, 0.0 +0.5, 0.5, 0.0 +TET no. 4: +0.0, 0.5, 0.5 +0.0, 0.5, 0.0 +0.5, 0.5, 0.0 +0.0, 1.0, 0.0 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31.vtk b/doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31.vtk new file mode 100644 index 0000000..2fde230 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31.vtk @@ -0,0 +1,37 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +0.0 0.0 1.0 +0.5 0.0 0.0 +1.0 0.0 0.0 +0.5 0.5 0.0 +0.0 0.0 0.0 +0.0 0.5 0.0 +0.0 0.5 0.5 +0.0 1.0 0.0 + +CELLS 5 25 +4 0 1 2 3 +4 0 4 1 5 +4 0 5 1 3 +4 0 6 5 3 +4 6 5 3 7 + +CELL_TYPES 5 +10 +10 +10 +10 +10 + +CELL_DATA 5 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31_small.png b/doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31_small.png new file mode 100644 index 0000000..e18841e Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-12-30-31_refined/01-12-30-31_small.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30.png b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30.png new file mode 100644 index 0000000..400523e Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30.pvsm b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30.pvsm new file mode 100644 index 0000000..5007341 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30.pvsm @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30.txt b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30.txt new file mode 100644 index 0000000..75ac129 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30.txt @@ -0,0 +1,25 @@ +TET no. 0: +0.0, 1.0, 0.0 +0.0, 0.0, 0.5 +0.0, 0.0, 1.0 +0.5, 0.0, 0.5 +TET no. 1: +0.0, 1.0, 0.0 +0.0, 0.0, 0.0 +0.0, 0.0, 0.5 +0.5, 0.0, 0.0 +TET no. 2: +0.0, 1.0, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 0.5 +0.5, 0.0, 0.5 +TET no. 3: +0.0, 1.0, 0.0 +0.5, 0.5, 0.0 +0.5, 0.0, 0.0 +0.5, 0.0, 0.5 +TET no. 4: +0.5, 0.5, 0.0 +0.5, 0.0, 0.0 +0.5, 0.0, 0.5 +1.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30.vtk b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30.vtk new file mode 100644 index 0000000..548d77d --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30.vtk @@ -0,0 +1,37 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +0.0 1.0 0.0 +0.0 0.0 0.5 +0.0 0.0 1.0 +0.5 0.0 0.5 +0.0 0.0 0.0 +0.5 0.0 0.0 +0.5 0.5 0.0 +1.0 0.0 0.0 + +CELLS 5 25 +4 0 1 2 3 +4 0 4 1 5 +4 0 5 1 3 +4 0 6 5 3 +4 6 5 3 7 + +CELL_TYPES 5 +10 +10 +10 +10 +10 + +CELL_DATA 5 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30_small.png b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30_small.png new file mode 100644 index 0000000..a68929a Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-30_refined/01-20-23-30_small.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31.png b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31.png new file mode 100644 index 0000000..d5f96ba Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31.pvsm b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31.pvsm new file mode 100644 index 0000000..239189a --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31.pvsm @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31.txt b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31.txt new file mode 100644 index 0000000..1018f2e --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31.txt @@ -0,0 +1,30 @@ +TET no. 0: +0.0, 0.5, 0.0 +0.0, 1.0, 0.0 +0.5, 0.5, 0.0 +0.0, 0.0, 1.0 +TET no. 1: +0.0, 0.5, 0.0 +0.5, 0.0, 0.5 +0.0, 0.0, 0.5 +0.0, 0.0, 1.0 +TET no. 2: +0.0, 0.5, 0.0 +0.5, 0.5, 0.0 +0.5, 0.0, 0.5 +0.0, 0.0, 1.0 +TET no. 3: +0.0, 0.0, 0.0 +0.0, 0.0, 0.5 +0.0, 0.5, 0.0 +0.5, 0.0, 0.5 +TET no. 4: +0.0, 0.0, 0.0 +0.0, 0.5, 0.0 +0.5, 0.5, 0.0 +0.5, 0.0, 0.5 +TET no. 5: +0.0, 0.0, 0.0 +0.5, 0.5, 0.0 +1.0, 0.0, 0.0 +0.5, 0.0, 0.5 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31.vtk b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31.vtk new file mode 100644 index 0000000..c797e30 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31.vtk @@ -0,0 +1,40 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +0.0 0.5 0.0 +0.0 1.0 0.0 +0.5 0.5 0.0 +0.0 0.0 1.0 +0.5 0.0 0.5 +0.0 0.0 0.5 +0.0 0.0 0.0 +1.0 0.0 0.0 + +CELLS 6 30 +4 0 1 2 3 +4 0 4 5 3 +4 0 2 4 3 +4 6 5 0 4 +4 6 0 2 4 +4 6 2 7 4 + +CELL_TYPES 6 +10 +10 +10 +10 +10 +10 + +CELL_DATA 6 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31_small.png b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31_small.png new file mode 100644 index 0000000..c8022af Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-20-23-31_refined/01-20-23-31_small.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31.png b/doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31.png new file mode 100644 index 0000000..de84a6e Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31.pvsm b/doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31.pvsm new file mode 100644 index 0000000..fc4acae --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31.pvsm @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31.txt b/doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31.txt new file mode 100644 index 0000000..ee5f2ee --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31.txt @@ -0,0 +1,25 @@ +TET no. 0: +0.0, 0.0, 1.0 +0.0, 0.5, 0.0 +0.0, 0.0, 0.0 +0.5, 0.0, 0.0 +TET no. 1: +0.0, 0.0, 1.0 +0.0, 1.0, 0.0 +0.0, 0.5, 0.0 +0.5, 0.5, 0.0 +TET no. 2: +0.0, 0.0, 1.0 +0.5, 0.5, 0.0 +0.0, 0.5, 0.0 +0.5, 0.0, 0.0 +TET no. 3: +0.0, 0.0, 1.0 +0.5, 0.0, 0.5 +0.5, 0.5, 0.0 +0.5, 0.0, 0.0 +TET no. 4: +0.5, 0.0, 0.5 +0.5, 0.5, 0.0 +0.5, 0.0, 0.0 +1.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31.vtk b/doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31.vtk new file mode 100644 index 0000000..607d115 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31.vtk @@ -0,0 +1,37 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +0.0 0.0 1.0 +0.0 0.5 0.0 +0.0 0.0 0.0 +0.5 0.0 0.0 +0.0 1.0 0.0 +0.5 0.5 0.0 +0.5 0.0 0.5 +1.0 0.0 0.0 + +CELLS 5 25 +4 0 1 2 3 +4 0 4 1 5 +4 0 5 1 3 +4 0 6 5 3 +4 6 5 3 7 + +CELL_TYPES 5 +10 +10 +10 +10 +10 + +CELL_DATA 5 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31_small.png b/doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31_small.png new file mode 100644 index 0000000..79fa9c1 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-20-30-31_refined/01-20-30-31_small.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31.png b/doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31.png new file mode 100644 index 0000000..10dffa4 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31.pvsm b/doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31.pvsm new file mode 100644 index 0000000..ebd092c --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31.pvsm @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31.txt b/doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31.txt new file mode 100644 index 0000000..3d333dc --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31.txt @@ -0,0 +1,25 @@ +TET no. 0: +0.0, 0.0, 1.0 +0.5, 0.5, 0.0 +0.0, 1.0, 0.0 +0.0, 0.5, 0.0 +TET no. 1: +0.0, 0.0, 1.0 +1.0, 0.0, 0.0 +0.5, 0.5, 0.0 +0.5, 0.0, 0.0 +TET no. 2: +0.0, 0.0, 1.0 +0.5, 0.0, 0.0 +0.5, 0.5, 0.0 +0.0, 0.5, 0.0 +TET no. 3: +0.0, 0.0, 1.0 +0.0, 0.0, 0.5 +0.5, 0.0, 0.0 +0.0, 0.5, 0.0 +TET no. 4: +0.0, 0.0, 0.5 +0.5, 0.0, 0.0 +0.0, 0.5, 0.0 +0.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31.vtk b/doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31.vtk new file mode 100644 index 0000000..bec2f00 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31.vtk @@ -0,0 +1,37 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +0.0 0.0 1.0 +0.5 0.5 0.0 +0.0 1.0 0.0 +0.0 0.5 0.0 +1.0 0.0 0.0 +0.5 0.0 0.0 +0.0 0.0 0.5 +0.0 0.0 0.0 + +CELLS 5 25 +4 0 1 2 3 +4 0 4 1 5 +4 0 5 1 3 +4 0 6 5 3 +4 6 5 3 7 + +CELL_TYPES 5 +10 +10 +10 +10 +10 + +CELL_DATA 5 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 diff --git a/doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31_small.png b/doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31_small.png new file mode 100644 index 0000000..4ab6004 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_01-23-30-31_refined/01-23-30-31_small.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30.png b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30.png new file mode 100644 index 0000000..8e96592 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30.pvsm b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30.pvsm new file mode 100644 index 0000000..e77bb21 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30.pvsm @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30.txt b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30.txt new file mode 100644 index 0000000..0bb6c1b --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30.txt @@ -0,0 +1,25 @@ +TET no. 0: +0.0, 1.0, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 0.0 +0.0, 0.0, 0.5 +TET no. 1: +0.0, 1.0, 0.0 +1.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.5, 0.0, 0.5 +TET no. 2: +0.0, 1.0, 0.0 +0.5, 0.0, 0.5 +0.5, 0.0, 0.0 +0.0, 0.0, 0.5 +TET no. 3: +0.0, 1.0, 0.0 +0.0, 0.5, 0.5 +0.5, 0.0, 0.5 +0.0, 0.0, 0.5 +TET no. 4: +0.0, 0.5, 0.5 +0.5, 0.0, 0.5 +0.0, 0.0, 0.5 +0.0, 0.0, 1.0 diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30.vtk b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30.vtk new file mode 100644 index 0000000..56cc70f --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30.vtk @@ -0,0 +1,37 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +0.0 1.0 0.0 +0.5 0.0 0.0 +0.0 0.0 0.0 +0.0 0.0 0.5 +1.0 0.0 0.0 +0.5 0.0 0.5 +0.0 0.5 0.5 +0.0 0.0 1.0 + +CELLS 5 25 +4 0 1 2 3 +4 0 4 1 5 +4 0 5 1 3 +4 0 6 5 3 +4 6 5 3 7 + +CELL_TYPES 5 +10 +10 +10 +10 +10 + +CELL_DATA 5 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30_small.png b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30_small.png new file mode 100644 index 0000000..b7a97f8 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-30_refined/12-20-23-30_small.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31.png b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31.png new file mode 100644 index 0000000..88a7c19 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31.pvsm b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31.pvsm new file mode 100644 index 0000000..b1442db --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31.pvsm @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31.txt b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31.txt new file mode 100644 index 0000000..ef98ac1 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31.txt @@ -0,0 +1,25 @@ +TET no. 0: +1.0, 0.0, 0.0 +0.0, 0.5, 0.0 +0.0, 1.0, 0.0 +0.0, 0.5, 0.5 +TET no. 1: +1.0, 0.0, 0.0 +0.0, 0.0, 0.0 +0.0, 0.5, 0.0 +0.0, 0.0, 0.5 +TET no. 2: +1.0, 0.0, 0.0 +0.0, 0.0, 0.5 +0.0, 0.5, 0.0 +0.0, 0.5, 0.5 +TET no. 3: +1.0, 0.0, 0.0 +0.5, 0.0, 0.5 +0.0, 0.0, 0.5 +0.0, 0.5, 0.5 +TET no. 4: +0.5, 0.0, 0.5 +0.0, 0.0, 0.5 +0.0, 0.5, 0.5 +0.0, 0.0, 1.0 diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31.vtk b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31.vtk new file mode 100644 index 0000000..17fdb4d --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31.vtk @@ -0,0 +1,37 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +1.0 0.0 0.0 +0.0 0.5 0.0 +0.0 1.0 0.0 +0.0 0.5 0.5 +0.0 0.0 0.0 +0.0 0.0 0.5 +0.5 0.0 0.5 +0.0 0.0 1.0 + +CELLS 5 25 +4 0 1 2 3 +4 0 4 1 5 +4 0 5 1 3 +4 0 6 5 3 +4 6 5 3 7 + +CELL_TYPES 5 +10 +10 +10 +10 +10 + +CELL_DATA 5 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31_small.png b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31_small.png new file mode 100644 index 0000000..e52951a Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_12-20-23-31_refined/12-20-23-31_small.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31.png b/doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31.png new file mode 100644 index 0000000..d22d824 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31.pvsm b/doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31.pvsm new file mode 100644 index 0000000..acc0f01 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31.pvsm @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31.txt b/doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31.txt new file mode 100644 index 0000000..8a9007b --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31.txt @@ -0,0 +1,30 @@ +TET no. 0: +0.0, 0.5, 0.5 +0.0, 1.0, 0.0 +0.0, 0.5, 0.0 +1.0, 0.0, 0.0 +TET no. 1: +0.0, 0.5, 0.5 +0.5, 0.0, 0.0 +0.5, 0.0, 0.5 +1.0, 0.0, 0.0 +TET no. 2: +0.0, 0.5, 0.5 +0.0, 0.5, 0.0 +0.5, 0.0, 0.0 +1.0, 0.0, 0.0 +TET no. 3: +0.0, 0.0, 1.0 +0.5, 0.0, 0.5 +0.0, 0.5, 0.5 +0.5, 0.0, 0.0 +TET no. 4: +0.0, 0.0, 1.0 +0.0, 0.5, 0.5 +0.0, 0.5, 0.0 +0.5, 0.0, 0.0 +TET no. 5: +0.0, 0.0, 1.0 +0.0, 0.5, 0.0 +0.0, 0.0, 0.0 +0.5, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31.vtk b/doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31.vtk new file mode 100644 index 0000000..d79f570 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31.vtk @@ -0,0 +1,40 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +0.0 0.5 0.5 +0.0 1.0 0.0 +0.0 0.5 0.0 +1.0 0.0 0.0 +0.5 0.0 0.0 +0.5 0.0 0.5 +0.0 0.0 1.0 +0.0 0.0 0.0 + +CELLS 6 30 +4 0 1 2 3 +4 0 4 5 3 +4 0 2 4 3 +4 6 5 0 4 +4 6 0 2 4 +4 6 2 7 4 + +CELL_TYPES 6 +10 +10 +10 +10 +10 +10 + +CELL_DATA 6 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31_small.png b/doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31_small.png new file mode 100644 index 0000000..687e110 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_12-20-30-31_refined/12-20-30-31_small.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31.png b/doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31.png new file mode 100644 index 0000000..a1b0724 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31.pvsm b/doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31.pvsm new file mode 100644 index 0000000..5b19faa --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31.pvsm @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31.txt b/doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31.txt new file mode 100644 index 0000000..efdbbde --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31.txt @@ -0,0 +1,25 @@ +TET no. 0: +1.0, 0.0, 0.0 +0.0, 0.5, 0.5 +0.0, 0.0, 1.0 +0.0, 0.0, 0.5 +TET no. 1: +1.0, 0.0, 0.0 +0.0, 1.0, 0.0 +0.0, 0.5, 0.5 +0.0, 0.5, 0.0 +TET no. 2: +1.0, 0.0, 0.0 +0.0, 0.5, 0.0 +0.0, 0.5, 0.5 +0.0, 0.0, 0.5 +TET no. 3: +1.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.0, 0.5, 0.0 +0.0, 0.0, 0.5 +TET no. 4: +0.5, 0.0, 0.0 +0.0, 0.5, 0.0 +0.0, 0.0, 0.5 +0.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31.vtk b/doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31.vtk new file mode 100644 index 0000000..0ed6fb8 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31.vtk @@ -0,0 +1,37 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +1.0 0.0 0.0 +0.0 0.5 0.5 +0.0 0.0 1.0 +0.0 0.0 0.5 +0.0 1.0 0.0 +0.0 0.5 0.0 +0.5 0.0 0.0 +0.0 0.0 0.0 + +CELLS 5 25 +4 0 1 2 3 +4 0 4 1 5 +4 0 5 1 3 +4 0 6 5 3 +4 6 5 3 7 + +CELL_TYPES 5 +10 +10 +10 +10 +10 + +CELL_DATA 5 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 diff --git a/doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31_small.png b/doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31_small.png new file mode 100644 index 0000000..9c964ed Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_12-23-30-31_refined/12-23-30-31_small.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31.png b/doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31.png new file mode 100644 index 0000000..0ee7b91 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31.png differ diff --git a/doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31.pvsm b/doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31.pvsm new file mode 100644 index 0000000..a1d1d01 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31.pvsm @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31.txt b/doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31.txt new file mode 100644 index 0000000..ad141b9 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31.txt @@ -0,0 +1,25 @@ +TET no. 0: +0.0, 1.0, 0.0 +0.5, 0.0, 0.5 +1.0, 0.0, 0.0 +0.5, 0.0, 0.0 +TET no. 1: +0.0, 1.0, 0.0 +0.0, 0.0, 1.0 +0.5, 0.0, 0.5 +0.0, 0.0, 0.5 +TET no. 2: +0.0, 1.0, 0.0 +0.0, 0.0, 0.5 +0.5, 0.0, 0.5 +0.5, 0.0, 0.0 +TET no. 3: +0.0, 1.0, 0.0 +0.0, 0.5, 0.0 +0.0, 0.0, 0.5 +0.5, 0.0, 0.0 +TET no. 4: +0.0, 0.5, 0.0 +0.0, 0.0, 0.5 +0.5, 0.0, 0.0 +0.0, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31.vtk b/doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31.vtk new file mode 100644 index 0000000..08449f0 --- /dev/null +++ b/doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31.vtk @@ -0,0 +1,37 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 8 DOUBLE +0.0 1.0 0.0 +0.5 0.0 0.5 +1.0 0.0 0.0 +0.5 0.0 0.0 +0.0 0.0 1.0 +0.0 0.0 0.5 +0.0 0.5 0.0 +0.0 0.0 0.0 + +CELLS 5 25 +4 0 1 2 3 +4 0 4 1 5 +4 0 5 1 3 +4 0 6 5 3 +4 6 5 3 7 + +CELL_TYPES 5 +10 +10 +10 +10 +10 + +CELL_DATA 5 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 diff --git a/doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31_small.png b/doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31_small.png new file mode 100644 index 0000000..4de4f12 Binary files /dev/null and b/doc/tetrahedron_refinements/4-edges/edge_20-23-30-31_refined/20-23-30-31_small.png differ diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30.png b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30.png new file mode 100644 index 0000000..1ecc4f3 Binary files /dev/null and b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30.png differ diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30.pvsm b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30.pvsm new file mode 100644 index 0000000..4380e2a --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30.pvsm @@ -0,0 +1,2021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30.txt b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30.txt new file mode 100644 index 0000000..1f68f4c --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30.txt @@ -0,0 +1,35 @@ +TET no. 0: +0.0, 0.0, 0.0 +0.0, 0.0, 0.5 +0.0, 1.0, 0.0 +0.5, 0.0, 0.0 +TET no. 1: +0.0, 1.0, 0.0 +0.0, 0.0, 0.5 +0.0, 0.5, 0.5 +0.5, 0.0, 0.0 +TET no. 2: +0.0, 1.0, 0.0 +0.5, 0.0, 0.0 +0.0, 0.5, 0.5 +0.5, 0.5, 0.0 +TET no. 3: +0.5, 0.5, 0.0 +0.5, 0.0, 0.0 +0.0, 0.5, 0.5 +0.5, 0.0, 0.5 +TET no. 4: +0.5, 0.0, 0.0 +0.0, 0.0, 0.5 +0.0, 0.5, 0.5 +0.5, 0.0, 0.5 +TET no. 5: +0.0, 0.0, 0.5 +0.5, 0.0, 0.5 +0.0, 0.0, 1.0 +0.0, 0.5, 0.5 +TET no. 6: +0.5, 0.0, 0.0 +1.0, 0.0, 0.0 +0.5, 0.0, 0.5 +0.5, 0.5, 0.0 diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30.vtk b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30.vtk new file mode 100644 index 0000000..753fae0 --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30.vtk @@ -0,0 +1,44 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 9 DOUBLE +0.0 0.0 0.0 +0.0 0.0 0.5 +0.0 1.0 0.0 +0.5 0.0 0.0 +0.0 0.5 0.5 +0.5 0.5 0.0 +0.5 0.0 0.5 +0.0 0.0 1.0 +1.0 0.0 0.0 + +CELLS 7 35 +4 0 1 2 3 +4 2 1 4 3 +4 2 3 4 5 +4 5 3 4 6 +4 3 1 4 6 +4 1 6 7 4 +4 3 8 6 5 + +CELL_TYPES 7 +10 +10 +10 +10 +10 +10 +10 + +CELL_DATA 7 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30_small.png b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30_small.png new file mode 100644 index 0000000..a197e67 Binary files /dev/null and b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-30_refined/01-12-20-23-30_small.png differ diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31.png b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31.png new file mode 100644 index 0000000..52e40ee Binary files /dev/null and b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31.png differ diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31.pvsm b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31.pvsm new file mode 100644 index 0000000..d4b18cb --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31.pvsm @@ -0,0 +1,2225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31.txt b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31.txt new file mode 100644 index 0000000..dd4781c --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31.txt @@ -0,0 +1,35 @@ +TET no. 0: +1.0, 0.0, 0.0 +0.5, 0.0, 0.5 +0.0, 0.0, 0.0 +0.5, 0.5, 0.0 +TET no. 1: +0.0, 0.0, 0.0 +0.5, 0.0, 0.5 +0.0, 0.0, 0.5 +0.5, 0.5, 0.0 +TET no. 2: +0.0, 0.0, 0.0 +0.5, 0.5, 0.0 +0.0, 0.0, 0.5 +0.0, 0.5, 0.0 +TET no. 3: +0.0, 0.5, 0.0 +0.5, 0.5, 0.0 +0.0, 0.0, 0.5 +0.0, 0.5, 0.5 +TET no. 4: +0.5, 0.5, 0.0 +0.5, 0.0, 0.5 +0.0, 0.0, 0.5 +0.0, 0.5, 0.5 +TET no. 5: +0.5, 0.0, 0.5 +0.0, 0.5, 0.5 +0.0, 0.0, 1.0 +0.0, 0.0, 0.5 +TET no. 6: +0.5, 0.5, 0.0 +0.0, 1.0, 0.0 +0.0, 0.5, 0.5 +0.0, 0.5, 0.0 diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31.vtk b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31.vtk new file mode 100644 index 0000000..806886e --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31.vtk @@ -0,0 +1,44 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 9 DOUBLE +1.0 0.0 0.0 +0.5 0.0 0.5 +0.0 0.0 0.0 +0.5 0.5 0.0 +0.0 0.0 0.5 +0.0 0.5 0.0 +0.0 0.5 0.5 +0.0 0.0 1.0 +0.0 1.0 0.0 + +CELLS 7 35 +4 0 1 2 3 +4 2 1 4 3 +4 2 3 4 5 +4 5 3 4 6 +4 3 1 4 6 +4 1 6 7 4 +4 3 8 6 5 + +CELL_TYPES 7 +10 +10 +10 +10 +10 +10 +10 + +CELL_DATA 7 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31_small.png b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31_small.png new file mode 100644 index 0000000..2ed0e94 Binary files /dev/null and b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-23-31_refined/01-12-20-23-31_small.png differ diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31.png b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31.png new file mode 100644 index 0000000..94e0da3 Binary files /dev/null and b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31.png differ diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31.pvsm b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31.pvsm new file mode 100644 index 0000000..033f00e --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31.pvsm @@ -0,0 +1,2225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31.txt b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31.txt new file mode 100644 index 0000000..de7e133 --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31.txt @@ -0,0 +1,35 @@ +TET no. 0: +0.0, 0.0, 1.0 +0.0, 0.5, 0.5 +0.0, 0.0, 0.0 +0.5, 0.0, 0.5 +TET no. 1: +0.0, 0.0, 0.0 +0.0, 0.5, 0.5 +0.0, 0.5, 0.0 +0.5, 0.0, 0.5 +TET no. 2: +0.0, 0.0, 0.0 +0.5, 0.0, 0.5 +0.0, 0.5, 0.0 +0.5, 0.0, 0.0 +TET no. 3: +0.5, 0.0, 0.0 +0.5, 0.0, 0.5 +0.0, 0.5, 0.0 +0.5, 0.5, 0.0 +TET no. 4: +0.5, 0.0, 0.5 +0.0, 0.5, 0.5 +0.0, 0.5, 0.0 +0.5, 0.5, 0.0 +TET no. 5: +0.0, 0.5, 0.5 +0.5, 0.5, 0.0 +0.0, 1.0, 0.0 +0.0, 0.5, 0.0 +TET no. 6: +0.5, 0.0, 0.5 +1.0, 0.0, 0.0 +0.5, 0.5, 0.0 +0.5, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31.vtk b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31.vtk new file mode 100644 index 0000000..cd1d15b --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31.vtk @@ -0,0 +1,44 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 9 DOUBLE +0.0 0.0 1.0 +0.0 0.5 0.5 +0.0 0.0 0.0 +0.5 0.0 0.5 +0.0 0.5 0.0 +0.5 0.0 0.0 +0.5 0.5 0.0 +0.0 1.0 0.0 +1.0 0.0 0.0 + +CELLS 7 35 +4 0 1 2 3 +4 2 1 4 3 +4 2 3 4 5 +4 5 3 4 6 +4 3 1 4 6 +4 1 6 7 4 +4 3 8 6 5 + +CELL_TYPES 7 +10 +10 +10 +10 +10 +10 +10 + +CELL_DATA 7 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31_small.png b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31_small.png new file mode 100644 index 0000000..8db8ca8 Binary files /dev/null and b/doc/tetrahedron_refinements/5-edges/edge_01-12-20-30-31_refined/01-12-20-30-31_small.png differ diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31.png b/doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31.png new file mode 100644 index 0000000..f12dd4a Binary files /dev/null and b/doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31.png differ diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31.pvsm b/doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31.pvsm new file mode 100644 index 0000000..d5f0d5c --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31.pvsm @@ -0,0 +1,2225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31.txt b/doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31.txt new file mode 100644 index 0000000..8cb4b7a --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31.txt @@ -0,0 +1,35 @@ +TET no. 0: +0.0, 0.0, 1.0 +0.0, 0.0, 0.5 +1.0, 0.0, 0.0 +0.0, 0.5, 0.5 +TET no. 1: +1.0, 0.0, 0.0 +0.0, 0.0, 0.5 +0.5, 0.0, 0.0 +0.0, 0.5, 0.5 +TET no. 2: +1.0, 0.0, 0.0 +0.0, 0.5, 0.5 +0.5, 0.0, 0.0 +0.5, 0.5, 0.0 +TET no. 3: +0.5, 0.5, 0.0 +0.0, 0.5, 0.5 +0.5, 0.0, 0.0 +0.0, 0.5, 0.0 +TET no. 4: +0.0, 0.5, 0.5 +0.0, 0.0, 0.5 +0.5, 0.0, 0.0 +0.0, 0.5, 0.0 +TET no. 5: +0.0, 0.0, 0.5 +0.0, 0.5, 0.0 +0.0, 0.0, 0.0 +0.5, 0.0, 0.0 +TET no. 6: +0.0, 0.5, 0.5 +0.0, 1.0, 0.0 +0.0, 0.5, 0.0 +0.5, 0.5, 0.0 diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31.vtk b/doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31.vtk new file mode 100644 index 0000000..6434881 --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31.vtk @@ -0,0 +1,44 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 9 DOUBLE +0.0 0.0 1.0 +0.0 0.0 0.5 +1.0 0.0 0.0 +0.0 0.5 0.5 +0.5 0.0 0.0 +0.5 0.5 0.0 +0.0 0.5 0.0 +0.0 0.0 0.0 +0.0 1.0 0.0 + +CELLS 7 35 +4 0 1 2 3 +4 2 1 4 3 +4 2 3 4 5 +4 5 3 4 6 +4 3 1 4 6 +4 1 6 7 4 +4 3 8 6 5 + +CELL_TYPES 7 +10 +10 +10 +10 +10 +10 +10 + +CELL_DATA 7 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31_small.png b/doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31_small.png new file mode 100644 index 0000000..f8f78f7 Binary files /dev/null and b/doc/tetrahedron_refinements/5-edges/edge_01-12-23-30-31_refined/01-12-23-30-31_small.png differ diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31.png b/doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31.png new file mode 100644 index 0000000..4682b53 Binary files /dev/null and b/doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31.png differ diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31.pvsm b/doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31.pvsm new file mode 100644 index 0000000..aabb801 --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31.pvsm @@ -0,0 +1,2225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31.txt b/doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31.txt new file mode 100644 index 0000000..e3c5d37 --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31.txt @@ -0,0 +1,35 @@ +TET no. 0: +0.0, 1.0, 0.0 +0.0, 0.5, 0.0 +0.0, 0.0, 1.0 +0.5, 0.5, 0.0 +TET no. 1: +0.0, 0.0, 1.0 +0.0, 0.5, 0.0 +0.0, 0.0, 0.5 +0.5, 0.5, 0.0 +TET no. 2: +0.0, 0.0, 1.0 +0.5, 0.5, 0.0 +0.0, 0.0, 0.5 +0.5, 0.0, 0.5 +TET no. 3: +0.5, 0.0, 0.5 +0.5, 0.5, 0.0 +0.0, 0.0, 0.5 +0.5, 0.0, 0.0 +TET no. 4: +0.5, 0.5, 0.0 +0.0, 0.5, 0.0 +0.0, 0.0, 0.5 +0.5, 0.0, 0.0 +TET no. 5: +0.0, 0.5, 0.0 +0.5, 0.0, 0.0 +0.0, 0.0, 0.0 +0.0, 0.0, 0.5 +TET no. 6: +0.5, 0.5, 0.0 +1.0, 0.0, 0.0 +0.5, 0.0, 0.0 +0.5, 0.0, 0.5 diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31.vtk b/doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31.vtk new file mode 100644 index 0000000..cda05ff --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31.vtk @@ -0,0 +1,44 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 9 DOUBLE +0.0 1.0 0.0 +0.0 0.5 0.0 +0.0 0.0 1.0 +0.5 0.5 0.0 +0.0 0.0 0.5 +0.5 0.0 0.5 +0.5 0.0 0.0 +0.0 0.0 0.0 +1.0 0.0 0.0 + +CELLS 7 35 +4 0 1 2 3 +4 2 1 4 3 +4 2 3 4 5 +4 5 3 4 6 +4 3 1 4 6 +4 1 6 7 4 +4 3 8 6 5 + +CELL_TYPES 7 +10 +10 +10 +10 +10 +10 +10 + +CELL_DATA 7 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 diff --git a/doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31_small.png b/doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31_small.png new file mode 100644 index 0000000..78c874e Binary files /dev/null and b/doc/tetrahedron_refinements/5-edges/edge_01-20-23-30-31_refined/01-20-23-30-31_small.png differ diff --git a/doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31.png b/doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31.png new file mode 100644 index 0000000..f1b0d7d Binary files /dev/null and b/doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31.png differ diff --git a/doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31.pvsm b/doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31.pvsm new file mode 100644 index 0000000..dc3b819 --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31.pvsm @@ -0,0 +1,2225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31.txt b/doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31.txt new file mode 100644 index 0000000..59c2432 --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31.txt @@ -0,0 +1,35 @@ +TET no. 0: +0.0, 1.0, 0.0 +0.0, 0.5, 0.5 +1.0, 0.0, 0.0 +0.0, 0.5, 0.0 +TET no. 1: +1.0, 0.0, 0.0 +0.0, 0.5, 0.5 +0.5, 0.0, 0.5 +0.0, 0.5, 0.0 +TET no. 2: +1.0, 0.0, 0.0 +0.0, 0.5, 0.0 +0.5, 0.0, 0.5 +0.5, 0.0, 0.0 +TET no. 3: +0.5, 0.0, 0.0 +0.0, 0.5, 0.0 +0.5, 0.0, 0.5 +0.0, 0.0, 0.5 +TET no. 4: +0.0, 0.5, 0.0 +0.0, 0.5, 0.5 +0.5, 0.0, 0.5 +0.0, 0.0, 0.5 +TET no. 5: +0.0, 0.5, 0.5 +0.0, 0.0, 0.5 +0.0, 0.0, 1.0 +0.5, 0.0, 0.5 +TET no. 6: +0.0, 0.5, 0.0 +0.0, 0.0, 0.0 +0.0, 0.0, 0.5 +0.5, 0.0, 0.0 diff --git a/doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31.vtk b/doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31.vtk new file mode 100644 index 0000000..a00d37d --- /dev/null +++ b/doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31.vtk @@ -0,0 +1,44 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 9 DOUBLE +0.0 1.0 0.0 +0.0 0.5 0.5 +1.0 0.0 0.0 +0.0 0.5 0.0 +0.5 0.0 0.5 +0.5 0.0 0.0 +0.0 0.0 0.5 +0.0 0.0 1.0 +0.0 0.0 0.0 + +CELLS 7 35 +4 0 1 2 3 +4 2 1 4 3 +4 2 3 4 5 +4 5 3 4 6 +4 3 1 4 6 +4 1 6 7 4 +4 3 8 6 5 + +CELL_TYPES 7 +10 +10 +10 +10 +10 +10 +10 + +CELL_DATA 7 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 diff --git a/doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31_small.png b/doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31_small.png new file mode 100644 index 0000000..0fee2a6 Binary files /dev/null and b/doc/tetrahedron_refinements/5-edges/edge_12-20-23-30-31_refined/12-20-23-30-31_small.png differ diff --git a/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.aux b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.aux new file mode 100644 index 0000000..f23e546 --- /dev/null +++ b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.aux @@ -0,0 +1 @@ +\relax diff --git a/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.log b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.log new file mode 100644 index 0000000..1ed57a0 --- /dev/null +++ b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.log @@ -0,0 +1,172 @@ +This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=pdflatex 2007.12.27) 11 APR 2008 16:25 +entering extended mode +**tets.tex +(./tets.tex +LaTeX2e <2003/12/01> +Babel and hyphenation patterns for american, french, german, ngerman, b +ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e +stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis +h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur +kish, ukrainian, nohyphenation, loaded. +(/sw/share/texmf-dist/tex/latex/base/article.cls +Document Class: article 2004/02/16 v1.4f Standard LaTeX document class +(/sw/share/texmf-dist/tex/latex/base/size12.clo +File: size12.clo 2004/02/16 v1.4f Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) +(/sw/share/texmf-dist/tex/latex/graphics/graphicx.sty +Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR) + +(/sw/share/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 1999/03/16 v1.13 key=value parser (DPC) +\KV@toks@=\toks14 +) +(/sw/share/texmf-dist/tex/latex/graphics/graphics.sty +Package: graphics 2001/07/07 v1.0n Standard LaTeX Graphics (DPC,SPQR) + +(/sw/share/texmf-dist/tex/latex/graphics/trig.sty +Package: trig 1999/03/16 v1.09 sin cos tan (DPC) +) +(/sw/share/texmf-dist/tex/latex/graphics/graphics.cfg +File: graphics.cfg 2005/02/03 v1.3 graphics configuration of teTeX/TeXLive +) +Package graphics Info: Driver file: pdftex.def on input line 80. + +(/sw/share/texmf-dist/tex/latex/graphics/pdftex.def +File: pdftex.def 2002/06/19 v0.03k graphics/color for pdftex +\Gread@gobject=\count87 +)) +\Gin@req@height=\dimen103 +\Gin@req@width=\dimen104 +) +(/sw/share/texmf-dist/tex/latex/geometry/geometry.sty +Package: geometry 2002/07/08 v3.2 Page Geometry +\Gm@cnth=\count88 +\Gm@cntv=\count89 +\c@Gm@tempcnt=\count90 +\Gm@bindingoffset=\dimen105 +\Gm@wd@mp=\dimen106 +\Gm@odd@mp=\dimen107 +\Gm@even@mp=\dimen108 +\Gm@dimlist=\toks15 + +(/sw/share/texmf-dist/tex/latex/geometry/geometry.cfg)) (./tets.aux) +\openout1 = `tets.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 7. +LaTeX Font Info: ... okay on input line 7. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 7. +LaTeX Font Info: ... okay on input line 7. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 7. +LaTeX Font Info: ... okay on input line 7. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 7. +LaTeX Font Info: ... okay on input line 7. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 7. +LaTeX Font Info: ... okay on input line 7. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 7. +LaTeX Font Info: ... okay on input line 7. + +(/sw/share/texmf-dist/tex/context/base/supp-pdf.tex +(/sw/share/texmf-dist/tex/context/base/supp-mis.tex +loading : Context Support Macros / Miscellaneous (2004.10.26) +\protectiondepth=\count91 +\scratchcounter=\count92 +\scratchtoks=\toks16 +\scratchdimen=\dimen109 +\scratchskip=\skip43 +\scratchmuskip=\muskip10 +\scratchbox=\box26 +\scratchread=\read1 +\scratchwrite=\write3 +\zeropoint=\dimen110 +\onepoint=\dimen111 +\onebasepoint=\dimen112 +\minusone=\count93 +\thousandpoint=\dimen113 +\onerealpoint=\dimen114 +\emptytoks=\toks17 +\nextbox=\box27 +\nextdepth=\dimen115 +\everyline=\toks18 +\!!counta=\count94 +\!!countb=\count95 +\recursecounter=\count96 +) +loading : Context Support Macros / PDF (2004.03.26) +\nofMPsegments=\count97 +\nofMParguments=\count98 +\MPscratchCnt=\count99 +\MPscratchDim=\dimen116 +\MPnumerator=\count100 +\everyMPtoPDFconversion=\toks19 +) +-------------------- Geometry parameters +paper: a4paper +landscape: -- +twocolumn: -- +twoside: -- +asymmetric: -- +h-parts: 28.45274pt, 540.60239pt, 28.45274pt +v-parts: 28.45274pt, 773.915pt, 42.67911pt +hmarginratio: -- +vmarginratio: 2:3 +lines: -- +heightrounded: -- +bindingoffset: 0.0pt +truedimen: -- +includehead: -- +includefoot: -- +includemp: -- +driver: pdftex +-------------------- Page layout dimensions and switches +\paperwidth 597.50787pt +\paperheight 845.04684pt +\textwidth 540.60239pt +\textheight 773.915pt +\oddsidemargin -43.81725pt +\evensidemargin -43.81725pt +\topmargin -43.81725pt +\headheight 0.0pt +\headsep 0.0pt +\footskip 0.0pt +\marginparwidth 35.0pt +\marginparsep 10.0pt +\columnsep 10.0pt +\skip\footins 10.8pt plus 4.0pt minus 2.0pt +\hoffset 0.0pt +\voffset 0.0pt +\mag 1000 + +(1in=72.27pt, 1cm=28.45pt) +----------------------- + +File: tets.png Graphic file (type png) + [1 + +{/sw/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map} <./tets.png>] (./tets.au +x) ) +Here is how much of TeX's memory you used: + 1200 strings out of 94500 + 15321 string characters out of 1176113 + 65163 words of memory out of 1500000 + 4420 multiletter control sequences out of 10000+50000 + 3938 words of font info for 15 fonts, out of 1200000 for 2000 + 580 hyphenation exceptions out of 8191 + 25i,4n,19p,220b,105s stack positions out of 5000i,500n,6000p,200000b,5000s +PDF statistics: + 8 PDF objects out of 65536 + 0 named destinations out of 20000 + 6 words of extra memory for PDF output out of 65536 + +Output written on tets.pdf (1 page, 15748 bytes). diff --git a/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.pdf b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.pdf new file mode 100644 index 0000000..ce36532 Binary files /dev/null and b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.pdf differ diff --git a/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.png b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.png new file mode 100644 index 0000000..39e69e2 Binary files /dev/null and b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.png differ diff --git a/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.pvsm b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.pvsm new file mode 100644 index 0000000..d5c68bb --- /dev/null +++ b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.pvsm @@ -0,0 +1,2225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.tex b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.tex new file mode 100644 index 0000000..1080b60 --- /dev/null +++ b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.tex @@ -0,0 +1,11 @@ +\documentclass[a4paper,12pt]{article} + +\usepackage{graphicx} +\thispagestyle{empty} +\textwidth 190mm +\usepackage[left=10mm,top=10mm,right=10mm,nohead,nofoot]{geometry} +\begin{document} +\includegraphics[width=180mm]{tets.png} + +Refined edges: 01 12 20 23 30 31 +\end{document} diff --git a/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.tex.orig b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.tex.orig new file mode 100644 index 0000000..1080b60 --- /dev/null +++ b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.tex.orig @@ -0,0 +1,11 @@ +\documentclass[a4paper,12pt]{article} + +\usepackage{graphicx} +\thispagestyle{empty} +\textwidth 190mm +\usepackage[left=10mm,top=10mm,right=10mm,nohead,nofoot]{geometry} +\begin{document} +\includegraphics[width=180mm]{tets.png} + +Refined edges: 01 12 20 23 30 31 +\end{document} diff --git a/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.txt b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.txt new file mode 100644 index 0000000..0a450ad --- /dev/null +++ b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.txt @@ -0,0 +1,40 @@ +TET no. 0: +0.0, 1.0, 0.0 +0.0, 0.5, 0.5 +0.5, 0.5, 0.0 +0.0, 0.5, 0.0 +TET no. 1: +1.0, 0.0, 0.0 +0.5, 0.5, 0.0 +0.5, 0.0, 0.5 +0.5, 0.0, 0.0 +TET no. 2: +0.0, 0.0, 1.0 +0.5, 0.0, 0.5 +0.0, 0.5, 0.5 +0.0, 0.0, 0.5 +TET no. 3: +0.0, 0.5, 0.0 +0.0, 0.0, 0.5 +0.5, 0.0, 0.0 +0.0, 0.0, 0.0 +TET no. 4: +0.5, 0.5, 0.0 +0.0, 0.5, 0.5 +0.5, 0.0, 0.5 +0.0, 0.5, 0.0 +TET no. 5: +0.0, 0.5, 0.0 +0.0, 0.0, 0.5 +0.0, 0.5, 0.5 +0.5, 0.0, 0.5 +TET no. 6: +0.5, 0.0, 0.0 +0.5, 0.0, 0.5 +0.0, 0.0, 0.5 +0.0, 0.5, 0.0 +TET no. 7: +0.5, 0.5, 0.0 +0.5, 0.0, 0.0 +0.0, 0.5, 0.0 +0.5, 0.0, 0.5 diff --git a/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.vtk b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.vtk new file mode 100644 index 0000000..5d70914 --- /dev/null +++ b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31.vtk @@ -0,0 +1,48 @@ +# vtk DataFile Version 2.0 +VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 10 DOUBLE +0.0 1.0 0.0 +0.0 0.5 0.5 +0.5 0.5 0.0 +0.0 0.5 0.0 +1.0 0.0 0.0 +0.5 0.0 0.5 +0.5 0.0 0.0 +0.0 0.0 1.0 +0.0 0.0 0.5 +0.0 0.0 0.0 + +CELLS 8 40 +4 0 1 2 3 +4 4 2 5 6 +4 7 5 1 8 +4 3 8 6 9 +4 2 1 5 3 +4 3 8 1 5 +4 6 5 8 3 +4 2 6 3 5 + +CELL_TYPES 8 +10 +10 +10 +10 +10 +10 +10 +10 + +CELL_DATA 8 +SCALARS cell_attribute_data float 1 +LOOKUP_TABLE default +0 +1 +2 +3 +4 +5 +6 +7 diff --git a/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31_small.png b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31_small.png new file mode 100644 index 0000000..53be1d1 Binary files /dev/null and b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/01-12-20-23-30-31_small.png differ diff --git a/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/buildlatex.bash b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/buildlatex.bash new file mode 100755 index 0000000..91fe9e9 --- /dev/null +++ b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/buildlatex.bash @@ -0,0 +1,36 @@ +#!/bin/bash + +function write_file() { + local -r fname_texfile=$1 + local -r fname_image=$2 + local -r annotation=$3 + + cat > "${fname_texfile}" <<-EOF +\documentclass[a4paper,12pt]{article} + +\usepackage{graphicx} +\thispagestyle{empty} +\textwidth 190mm +\usepackage[left=10mm,top=10mm,right=10mm,nohead,nofoot]{geometry} +\begin{document} +\includegraphics[width=180mm]{${fname_image}} + +${annotation} +\end{document} +EOF +} + +function compile_texfile() { + local -r fname_texfile=$1 + + pdflatex "${fname_texfile}" +} + +fname_image="tets.png" +fname_texfile=${fname_image%.*}.tex +annotation=${PWD##*/} +annotation=${annotation//[a-z_]} +annotation="Refined edges: ${annotation//-/ }" + +write_file "${fname_texfile}" "${fname_image}" "${annotation}" +compile_texfile "${fname_texfile}" diff --git a/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/output_file.jpg b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/output_file.jpg new file mode 100644 index 0000000..7b9e33a Binary files /dev/null and b/doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/output_file.jpg differ diff --git a/doc/tetrahedron_refinements/README b/doc/tetrahedron_refinements/README new file mode 100644 index 0000000..879eaea --- /dev/null +++ b/doc/tetrahedron_refinements/README @@ -0,0 +1,5 @@ +Add annotation to image: + +$ convert -font helvetica -fill black -pointsize 24 \ + -draw "text 10,30 'Refined edges: 01 12 20 23 30 31'" \ + tets.png output_file.jpg diff --git a/doc/tetrahedron_refinements/text2vtk.py b/doc/tetrahedron_refinements/text2vtk.py new file mode 100755 index 0000000..f4f4285 --- /dev/null +++ b/doc/tetrahedron_refinements/text2vtk.py @@ -0,0 +1,76 @@ +#!/usr/bin/python + +import sys +import re + +pts = [] +tet = [] +tets = [] +tet_no = 0 +fh = open ( sys.argv[1] ) + +def append_tet ( tet ): + if tet == []: + return + if len(tet) != 4: + print tet + print ( "Wrong number of points in tet %d!" % len ( tets ) ) + sys.exit ( 1 ) + tets.append ( tet ) + +def write_vtk_header (): + print "# vtk DataFile Version 2.0" + print "VTK LEGACY FILE FORMAT ASCII - tetrahedral sample file for H5FED test" + print "ASCII" + print "DATASET UNSTRUCTURED_GRID" + print + +def write_vtk_points_double ( pts ): + print "POINTS %d DOUBLE" % ( len(pts) ) + for pt in pts: + print "%s %s %s" % ( pt[0], pt[1], pt[2] ) + print + +def write_vtk_cells ( cells ): + num_cells = len ( cells ) + size = num_cells + for cell in cells: + size += len ( cell ) + print "CELLS %d %d" % ( num_cells, size ) + for cell in cells: + print "%d\t" % (len(cell)), + for el in cell: + print "%d " % (el), + print + print + +def write_vtk_cell_types ( cells ): + print "CELL_TYPES %d" % ( len(cells) ) + for cell in cells: + print "10" + print + +def write_vtk_fooder ( cells ): + print "CELL_DATA %d" % ( len(cells) ) + print "SCALARS cell_attribute_data float 1" + print "LOOKUP_TABLE default" + for i in range(len(cells)): + print "%d" % (i) + +for line in fh: + line = line.rstrip('\n') + if line[0:3] == "TET": + append_tet ( tet ) + tet = [] + else: + pt = re.sub ( ' ', '', line).split(',') + if not pt in pts: + pts.append ( pt ) + tet.append ( pts.index ( pt ) ) + +append_tet ( tet ) +write_vtk_header() +write_vtk_points_double ( pts ) +write_vtk_cells ( tets ) +write_vtk_cell_types ( tets ) +write_vtk_fooder ( tets ) diff --git a/examples/H5/Makefile.am b/examples/H5/Makefile.am new file mode 100644 index 0000000..4ec6e1a --- /dev/null +++ b/examples/H5/Makefile.am @@ -0,0 +1,28 @@ +AM_CPPFLAGS += -I${abs_top_builddir}/src/include +FFLAGS += -cpp $(AM_CPPFLAGS) +LDFLAGS += -L${abs_top_builddir}/src/lib + +LDADD = + +if ENABLE_FORTRAN +LDADD += -lH5hutF +endif + +LDADD += -lH5hut + +noinst_PROGRAMS = + +if ENABLE_C +noinst_PROGRAMS += openclose +endif + +if ENABLE_FORTRAN +noinst_PROGRAMS += +endif + +EXTRA_PROGRAMS = openclose + +openclose_SOURCES = openclose.c + +%.o : %.f90 + $(FC) $(FFLAGS) -c $< diff --git a/examples/H5/openclose.c b/examples/H5/openclose.c new file mode 100644 index 0000000..8717166 --- /dev/null +++ b/examples/H5/openclose.c @@ -0,0 +1,34 @@ +#include "H5hut.h" + +#if !defined (PARALLEL_IO) +#define MPI_Init(argc, argv) +#define MPI_Comm_size(comm, nprocs) { *nprocs = 1; } +#define MPI_Comm_rank(comm, myproc) { *myproc = 0; } +#define MPI_Finalize() +#define MPI_COMM_WORLD (0) +#endif + +int +main ( + int argc, + char** argv + ) { + MPI_Comm comm = MPI_COMM_WORLD; + + int myproc; + int nprocs; + MPI_Init (&argc, &argv); + MPI_Comm_size (comm, &nprocs); + MPI_Comm_rank (comm, &myproc); + + h5_file_t f = H5OpenFile ("testfile.h5", H5_O_WRONLY, comm); + H5CloseFile (f); + + h5_prop_t prop = H5CreateFileProp (); + H5SetPropFileMPIO (prop, &comm); + f = H5OpenFile2 ("testfile.h5", H5_O_WRONLY, prop); + H5CloseProp (prop); + + MPI_Finalize (); + return 0; +} diff --git a/examples/H5Block/H5BlockExample.pbs b/examples/H5Block/H5BlockExample.pbs new file mode 100644 index 0000000..a11d34c --- /dev/null +++ b/examples/H5Block/H5BlockExample.pbs @@ -0,0 +1,7 @@ +#!/bin/bash +#PBS -l size=16 +#PBS -j oe + +cd /scratch/agsell/H5Part/test +yod -np 16 ./H5BlockParTestScalarField -w -g + diff --git a/examples/H5Block/H5BlockExampleF.f90 b/examples/H5Block/H5BlockExampleF.f90 new file mode 100644 index 0000000..d748bab --- /dev/null +++ b/examples/H5Block/H5BlockExampleF.f90 @@ -0,0 +1,624 @@ +Program H5BlockParTestScalarFieldF + IMPLICIT NONE +#ifdef PARALLEL_IO + INCLUDE 'mpif.h' +#endif + INCLUDE 'H5hutF.h' + + INTEGER :: nargs = 0 + INTEGER :: myproc = 0 + INTEGER :: nprocs = 1 + INTEGER :: comm = 0 + INTEGER :: mpi_err + INTEGER*8 :: h5_err + INTEGER :: i + CHARACTER(LEN=32) :: arg_str + INTEGER :: opt_read = 0 + INTEGER :: opt_write = 0 + INTEGER :: opt_with_ghosts = 0 + CHARACTER(LEN=128) :: fname + INTEGER*8 :: layout (6) + INTEGER*8 :: layout1 (6,1) + INTEGER*8 :: layout8 (6,8) + INTEGER*8 :: layout8g (6,8) + INTEGER*8 :: layout16 (6,16) + INTEGER*8 :: layout16g(6,16) + INTEGER*8 :: layout32 (6,32) + INTEGER*8 :: layout32g(6,32) + + DATA layout1 / 1,64, 1,64, 1,512 / + + DATA layout8 / 1,64, 1,64, 1, 64, & + 1,64, 1,64, 65,128, & + 1,64, 1,64, 129,192, & + 1,64, 1,64, 193,256, & + 1,64, 1,64, 257,320, & + 1,64, 1,64, 321,384, & + 1,64, 1,64, 385,448, & + 1,64, 1,64, 449,512 / + + DATA layout8g / 1,64, 1,64, 1, 65, & + 1,64, 1,64, 64,129, & + 1,64, 1,64, 128,193, & + 1,64, 1,64, 192,257, & + 1,64, 1,64, 256,321, & + 1,64, 1,64, 320,385, & + 1,64, 1,64, 384,449, & + 1,64, 1,64, 448,512 / + + DATA layout16 / 1,64, 1,32, 1, 64, & + 1,64, 33,64, 1, 64, & + 1,64, 1,32, 65,128, & + 1,64, 33,64, 65,128, & + 1,64, 1,32, 129,192, & + 1,64, 33,64, 129,192, & + 1,64, 1,32, 193,256, & + 1,64, 33,64, 193,256, & + 1,64, 1,32, 257,320, & + 1,64, 33,64, 257,320, & + 1,64, 1,32, 321,384, & + 1,64, 33,64, 321,384, & + 1,64, 1,32, 385,448, & + 1,64, 33,64, 385,448, & + 1,64, 1,32, 449,512, & + 1,64, 33,64, 449,512 / + + DATA layout16g/ 1,64, 1,33, 1, 65, & + 1,64, 32,64, 1, 65, & + 1,64, 1,33, 64,129, & + 1,64, 32,64, 64,129, & + 1,64, 1,33, 128,193, & + 1,64, 32,64, 128,193, & + 1,64, 1,33, 192,257, & + 1,64, 32,64, 192,257, & + 1,64, 1,33, 256,321, & + 1,64, 32,64, 256,321, & + 1,64, 1,33, 320,385, & + 1,64, 32,64, 320,385, & + 1,64, 1,33, 384,449, & + 1,64, 32,64, 384,449, & + 1,64, 1,33, 448,512, & + 1,64, 32,64, 448,512 / + + DATA layout32 / 1,32, 1,32, 1, 64, & + 1,32, 33,64, 1, 64, & + 33,64, 1,32, 1, 64, & + 33,64, 33,64, 1, 64, & + 1,32, 1,32, 65,128, & + 1,32, 33,64, 65,128, & + 33,64, 1,32, 65,128, & + 33,64, 33,64, 65,128, & + 1,32, 1,32, 129,192, & + 1,32, 33,64, 129,192, & + 33,64, 1,32, 129,192, & + 33,64, 33,64, 129,192, & + 1,32, 1,32, 193,256, & + 1,32, 33,64, 193,256, & + 33,64, 1,32, 193,256, & + 33,64, 33,64, 193,256, & + 1,32, 1,32, 257,320, & + 1,32, 33,64, 257,320, & + 33,64, 1,32, 257,320, & + 33,64, 33,64, 257,320, & + 1,32, 1,32, 321,384, & + 1,32, 33,64, 321,384, & + 33,64, 1,32, 321,384, & + 33,64, 33,64, 321,384, & + 1,32, 1,32, 385,448, & + 1,32, 33,64, 385,448, & + 33,64, 1,32, 385,448, & + 33,64, 33,64, 385,448, & + 1,32, 1,32, 449,512, & + 1,32, 33,64, 449,512, & + 33,64, 1,32, 449,512, & + 33,64, 33,64, 449,512 / + + DATA layout32G/ 1,33, 1,33, 1, 65, & + 1,33, 32,64, 1, 65, & + 32,64, 1,33, 1, 65, & + 32,64, 32,64, 1, 65, & + 1,33, 1,33, 64,129, & + 1,33, 32,64, 64,129, & + 32,64, 1,33, 64,129, & + 32,64, 32,64, 64,129, & + 1,33, 1,33, 128,193, & + 1,33, 32,64, 128,193, & + 32,64, 1,33, 128,193, & + 32,64, 32,64, 128,193, & + 1,33, 1,33, 192,257, & + 1,33, 32,64, 192,257, & + 32,64, 1,33, 192,257, & + 32,64, 32,64, 192,257, & + 1,33, 1,33, 256,321, & + 1,33, 32,64, 256,321, & + 32,64, 1,33, 256,321, & + 32,64, 32,64, 256,321, & + 1,33, 1,33, 320,385, & + 1,33, 32,64, 320,385, & + 32,64, 1,33, 320,385, & + 32,64, 32,64, 320,385, & + 1,33, 1,33, 384,449, & + 1,33, 32,64, 384,449, & + 32,64, 1,33, 384,449, & + 32,64, 32,64, 384,449, & + 1,33, 1,33, 448,512, & + 1,33, 32,64, 448,512, & + 32,64, 1,33, 448,512, & + 32,64, 32,64, 448,512 / + nargs = IARGC () + IF (nargs == 0) THEN + PRINT *, "Usage: H5BlockExampleF -w | -r [-g]" + CALL EXIT (1) + END IF + DO i = 1, nargs + CALL GETARG ( i, arg_str ) + IF ( arg_str == "-r" ) THEN + opt_read = 1 + ELSE IF ( arg_str == "-w" ) THEN + opt_write = 1 + ELSE IF ( arg_str == "-g" ) THEN + opt_with_ghosts = 1 + ELSE + PRINT *, "Illegal option ", arg_str, "\n" + PRINT *, "Usage: H5BlockExampleF -w | -r [-g]" + CALL EXIT (1) + END IF + END DO + +#ifdef PARALLEL_IO + comm = MPI_COMM_WORLD + CALL MPI_Init ( mpi_err ) + comm = MPI_COMM_WORLD + CALL MPI_Comm_rank ( comm, myproc, mpi_err) + CALL MPI_Comm_size ( comm, nprocs, mpi_err) +#endif + SELECTCASE ( nprocs ) + CASE ( 1 ) + fname = "blockfile1.h5" + layout = layout1 ( :, myproc+1 ) + + CASE ( 8 ) + IF ( opt_with_ghosts == 1 ) THEN + fname = "blockfile8G.h5" + layout = layout8g ( :, myproc+1 ) + ELSE + fname = "blockfile8.h5" + layout = layout8 ( :, myproc+1 ) + END IF + + CASE ( 16 ) + IF ( opt_with_ghosts == 1 ) THEN + fname = "blockfile16G.h5" + layout = layout16g ( :, myproc+1 ) + ELSE + fname = "blockfile16.h5" + layout = layout16 ( :, myproc+1 ) + END IF + + CASE ( 32 ) + IF ( opt_with_ghosts == 1 ) THEN + fname = "blockfile32G.h5" + layout = layout32g ( :, myproc+1 ) + ELSE + fname = "blockfile32.h5" + layout = layout32 ( :, myproc+1 ) + END IF + + CASE DEFAULT + PRINT *, "Run this test on 1, 8, 16 or 32 cores!" +#ifdef PARALLEL_IO + CALL MPI_Finalize +#endif + CALL EXIT (1) + END SELECT + + h5_err = h5_set_verbosity_level ( 511_8 ) + + IF ( opt_write == 1 ) THEN + h5_err = write_file ( fname, myproc, comm, layout ) + IF ( h5_err < 0 ) THEN + PRINT "('[proc ', I3, ']: Faild to write file ', A, '!')", myproc, fname + END IF + + ELSE IF ( opt_read == 1 ) THEN + h5_err = read_file ( fname, myproc, comm, layout ) + IF ( h5_err < 0 ) THEN + PRINT "('[proc ', I3, ']: Faild to read file ', A, '!')", myproc, fname + END IF + + ENDIF +#ifdef PARALLEL_IO + PRINT "('[proc ', I3, ']: Cleanup.')", myproc + CALL MPI_Finalize +#endif + PRINT "('[proc ', I3, ']: Done.')", myproc + CALL EXIT (0) + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! + CONTAINS + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! + INTEGER*8 FUNCTION write_file ( fname, myproc, comm, layout ) + IMPLICIT NONE + + CHARACTER(LEN=*), INTENT(IN) :: fname + INTEGER, INTENT(IN) :: myproc + INTEGER, INTENT(IN) :: comm + INTEGER*8, INTENT(IN) :: layout(6) + + INCLUDE 'H5hutF.h' + + INTEGER*8 :: file + INTEGER*8 :: timestep = 1 + + PRINT "('[proc ', I3, ']: Open file for writing ...')", myproc +#ifdef PARALLEL_IO + file = h5_openw_par (fname, comm) +#else + file = h5_openw_par (fname) +#endif + IF ( file == 0 ) THEN + write_file = -1 + RETURN + ENDIF + + h5_err = h5_setstep ( file, timestep ) + IF ( h5_err < 0 ) THEN + write_file = h5_err + RETURN + ENDIF + + h5_err = write_field ( file, myproc, layout ) + IF ( h5_err < 0 ) THEN + write_file = h5_err + RETURN + ENDIF + + h5_err = write_attributes ( file ) + IF ( h5_err < 0 ) THEN + write_file = h5_err + RETURN + ENDIF + + h5_err = h5_close ( file ) + IF ( h5_err < 0 ) THEN + write_file = h5_err + RETURN + ENDIF + + write_file = 0 + END FUNCTION write_file + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! + INTEGER*8 FUNCTION write_field ( file, myproc, layout ) + IMPLICIT NONE + + INTEGER*8, INTENT(IN) :: file + INTEGER, INTENT(IN) :: myproc + INTEGER*8, INTENT(IN) :: layout(6) + + INCLUDE 'H5hutF.h' + + INTEGER*8 :: i, j, k + INTEGER*8 :: i_start + INTEGER*8 :: i_end + INTEGER*8 :: j_start + INTEGER*8 :: j_end + INTEGER*8 :: k_start + INTEGER*8 :: k_end + INTEGER*8 :: i_dims + INTEGER*8 :: j_dims + INTEGER*8 :: k_dims + REAL*8 :: value + + REAL*8, DIMENSION(:,:,:), ALLOCATABLE :: data + + i_start = layout(1) + i_end = layout(2) + j_start = layout(3) + j_end = layout(4) + k_start = layout(5) + k_end = layout(6) + i_dims = i_end - i_start + 1 + j_dims = j_end - j_start + 1 + k_dims = k_end - k_start + 1 + + ALLOCATE ( data (i_dims,j_dims, k_dims) ) + + PRINT "('[proc ', I3, ']: Defining layout for writing ...')", myproc + PRINT "('[proc ', I3, ']: ', I3, ':', I3, ', ', I3, ':', I3,', ', I3, ':', I3)", & + myproc, & + i_start, i_end, & + j_start, j_end, & + k_start, k_end + + h5_err = h5bl_3d_setview ( file, i_start, i_end, j_start, j_end, k_start, k_end ) + IF ( h5_err < 0 ) THEN + write_field = h5_err + RETURN + END IF + + DO i = 1, i_dims + DO j = 1, j_dims + DO k = 1, k_dims + value = (k-1) + 1000*(j-1) + 100000*(i-1) + 10000000*myproc + data(i,j,k) = value + END DO + END DO + END DO + + PRINT "('[proc ', I3, ']: Writing field ...')", myproc + h5_err = h5bl_3d_write_scalar_field_r8 ( file, "TestField", data ) + IF ( h5_err < 0 ) THEN + write_field = h5_err + RETURN + END IF + + write_field = 0 + END FUNCTION write_field + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! + INTEGER*8 FUNCTION write_attributes ( file ) + IMPLICIT NONE + INTEGER*8, INTENT(IN) :: file + + INCLUDE 'H5hutF.h' + + INTEGER*8 :: h5_err = 0 + CHARACTER(LEN=128) :: s_val + INTEGER*8 :: i8_val(1) + INTEGER*4 :: i4_val(1) + REAL*8 :: r8_val(1) + REAL*4 :: r4_val(1) + + PRINT "('[proc ', I3, ']: Writing string attribute ...')", myproc + s_val = "42" + h5_err = h5bl_writefieldattrib_string ( file, "TestField", "TestString", s_val ) + IF ( h5_err < 0 ) THEN + write_attributes = h5_err + RETURN + END IF + + PRINT "('[proc ', I3, ']: Writing int64 attribute ...')", myproc + i8_val(1) = 42 + h5_err = h5bl_writefieldattrib_i8 ( file, "TestField", "TestInt64", i8_val, 1_8 ) + IF ( h5_err < 0 ) THEN + write_attributes = h5_err + RETURN + END IF + + PRINT "('[proc ', I3, ']: Writing int32 attribute ...')", myproc + i4_val(1) = 42 + h5_err = h5bl_writefieldattrib_i4 ( file, "TestField", "TestInt32", i4_val, 1_8 ) + IF ( h5_err < 0 ) THEN + write_attributes = h5_err + RETURN + END IF + + PRINT "('[proc ', I3, ']: Writing float64 attribute ...')", myproc + r8_val(1) = 42.0 + h5_err = h5bl_writefieldattrib_r8 ( file, "TestField", "TestFloat64", r8_val, 1_8 ) + IF ( h5_err < 0 ) THEN + write_attributes = h5_err + RETURN + END IF + + PRINT "('[proc ', I3, ']: Writing float32 attribute ...')", myproc + r4_val(1) = 42.0 + h5_err = h5bl_writefieldattrib_r4 ( file, "TestField", "TestFloat32", r4_val, 1_8 ) + IF ( h5_err < 0 ) THEN + write_attributes = h5_err + RETURN + END IF + + write_attributes = 0 + END FUNCTION write_attributes + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! + INTEGER*8 FUNCTION read_file ( fname, myproc, comm, layout ) + IMPLICIT NONE + + CHARACTER(LEN=*), INTENT(IN) :: fname + INTEGER, INTENT(IN) :: myproc + INTEGER, INTENT(IN) :: comm + INTEGER*8, INTENT(IN) :: layout(6) + + INCLUDE 'H5hutF.h' + + INTEGER*8 :: file + INTEGER*8 :: timestep = 1 + + PRINT "('[proc ', I3, ']: Open file for reading ...')", myproc +#ifdef PARALLEL_IO + file = h5_openr_par ( fname, comm ) +#else + file = h5_openr (fname +#endif + if ( file == 0 ) THEN + read_file = -1 + RETURN + ENDIF + + h5_err = h5_setstep ( file, timestep ) + IF ( h5_err < 0 ) THEN + read_file = -1 + RETURN + ENDIF + + h5_err = read_field ( file, myproc, layout ) + IF ( h5_err < 0 ) THEN + read_file = -1 + RETURN + ENDIF + + h5_err = read_attributes ( file ) + IF ( h5_err < 0 ) THEN + read_file = -1 + RETURN + ENDIF + + h5_err = h5_close ( file ) + IF ( h5_err < 0 ) THEN + read_file = -1 + RETURN + ENDIF + + read_file = 0 + END FUNCTION read_file + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! + INTEGER*8 FUNCTION read_field ( file, myproc, layout ) + IMPLICIT NONE + + INTEGER*8, INTENT(IN) :: file + INTEGER, INTENT(IN) :: myproc + INTEGER*8, INTENT(IN) :: layout(6) + + INCLUDE 'H5hutF.h' + + INTEGER*8 :: i, j, k + INTEGER*8 :: i_start, i_start2 + INTEGER*8 :: i_end, i_end2 + INTEGER*8 :: j_start, j_start2 + INTEGER*8 :: j_end, j_end2 + INTEGER*8 :: k_start, k_start2 + INTEGER*8 :: k_end, k_end2 + INTEGER*8 :: i_dims + INTEGER*8 :: j_dims + INTEGER*8 :: k_dims + INTEGER*8 :: ri, rj, rk, proc + REAL*8 :: value + + REAL*8, DIMENSION(:,:,:), ALLOCATABLE :: data + + i_start = layout(1) + i_end = layout(2) + j_start = layout(3) + j_end = layout(4) + k_start = layout(5) + k_end = layout(6) + i_dims = i_end - i_start + 1 + j_dims = j_end - j_start + 1 + k_dims = k_end - k_start + 1 + + ALLOCATE ( data (i_dims, j_dims, k_dims) ) + + PRINT "('[proc ', I3, ']: Defining layout for reading ...')", myproc + PRINT "('[proc ', I3, ']: ', I3, ':', I3, ', ', I3, ':', I3,', ', I3, ':', I3)", & + myproc, & + i_start, i_end, & + j_start, j_end, & + k_start, k_end + + h5_err = h5bl_3d_setview ( file, i_start, i_end, j_start, j_end, k_start, k_end ) + IF ( h5_err < 0 ) THEN + read_field = -1 + RETURN + END IF + + PRINT "('[proc ', I3, ']: Reading field ...')", myproc + h5_err = h5bl_3d_read_scalar_field_r8 ( file, "TestField", data ) + IF ( h5_err < 0 ) THEN + read_field = -1 + RETURN + END IF + + DO i = 1, i_dims + DO j = 1, j_dims + DO k = 1, k_dims + value = (k-1) + 1000*(j-1) + 100000*(i-1) + 10000000*myproc + if ( data(i,j,k) /= value ) THEN + PRINT "('[proc ', I3, ']: error: data(',I4,',',I4,',',I4,') = ',F10.2,' /= ',F10.2)", & + i, j, k, data(i,j,k), value + read_field = -2 + RETURN + END IF + END DO + END DO + END DO + read_field = 0 + END FUNCTION read_field + + INTEGER*8 FUNCTION read_attributes ( file ) + IMPLICIT NONE + INTEGER*8, INTENT(IN) :: file + + INCLUDE 'H5hutF.h' + + INTEGER*8 :: h5_err = 0 + CHARACTER(LEN=128) :: s_val + INTEGER*8 :: i8_val(1) + INTEGER*4 :: i4_val(1) + REAL*8 :: r8_val(1) + REAL*4 :: r4_val(1) + + PRINT "('[proc ', I3, ']: Reading string attribute ...')", myproc + h5_err = h5bl_readfieldattrib_string ( file, "TestField", "TestString", s_val ) + IF ( h5_err < 0 ) THEN + PRINT "('[proc ', I3, ']: Oops ...')", myproc + read_attributes = h5_err + RETURN + END IF + IF ( s_val /= "42" ) THEN + PRINT "('[proc ', I3, ']: Error reading string attribute: Value is ', A, ' but should be 42')", & + myproc, s_val + END IF + + PRINT "('[proc ', I3, ']: Reading int64 attribute ...')", myproc + h5_err = h5bl_readfieldattrib_i8 ( file, "TestField", "TestInt64", i8_val ) + IF ( h5_err < 0 ) THEN + PRINT "('[proc ', I3, ']: Oops ...')", myproc + read_attributes = h5_err + RETURN + END IF + IF ( i8_val(1) /= 42 ) THEN + PRINT "('[proc ', I3, ']: Error reading int64 attribute: Value is ', I8, ' but should be 42')", & + myproc, i8_val(1) + END IF + + PRINT "('[proc ', I3, ']: Reading int32 attribute ...')", myproc + h5_err = h5bl_readfieldattrib_i4 ( file, "TestField", "TestInt32", i4_val ) + IF ( h5_err < 0 ) THEN + PRINT "('[proc ', I3, ']: Oops ...')", myproc + read_attributes = h5_err + RETURN + END IF + IF ( i4_val(1) /= 42 ) THEN + PRINT "('[proc ', I3, ']: Error reading int32 attribute: Value is ', I8, ' but should be 42')", & + myproc, i4_val(1) + END IF + + PRINT "('[proc ', I3, ']: Reading float64 attribute ...')", myproc + h5_err = h5bl_readfieldattrib_r8 ( file, "TestField", "TestFloat64", r8_val ) + IF ( h5_err < 0 ) THEN + PRINT "('[proc ', I3, ']: Oops ...')", myproc + read_attributes = h5_err + RETURN + END IF + IF ( r8_val(1) /= 42.0 ) THEN + PRINT "('[proc ', I3, ']: Error reading float64 attribute: Value is ', F10.2, ' but should be 42.0')", & + myproc, r8_val(1) + END IF + + PRINT "('[proc ', I3, ']: Reading float32 attribute ...')", myproc + h5_err = h5bl_readfieldattrib_r4 ( file, "TestField", "TestFloat32", r4_val ) + IF ( h5_err < 0 ) THEN + PRINT "('[proc ', I3, ']: Oops ...')", myproc + read_attributes = h5_err + RETURN + END IF + IF ( r4_val(1) /= 42.0 ) THEN + PRINT "('[proc ', I3, ']: Error reading float32 attribute: Value is ', F10.2, ' but should be 42.0')", & + myproc, r4_val(1) + END IF + + read_attributes = h5_err + END FUNCTION read_attributes + + END PROGRAM diff --git a/examples/H5Block/Makefile.am b/examples/H5Block/Makefile.am new file mode 100644 index 0000000..062d420 --- /dev/null +++ b/examples/H5Block/Makefile.am @@ -0,0 +1,35 @@ +AM_CPPFLAGS += -I${abs_top_builddir}/src/include +FFLAGS += -cpp $(AM_CPPFLAGS) +LDFLAGS += -L${abs_top_builddir}/src/lib + +LDADD = + +if ENABLE_C +LDADD += +endif + +if ENABLE_FORTRAN +LDADD += -lH5hutF +endif + +LDADD += -lH5hut + +noinst_PROGRAMS = + +if ENABLE_C +noinst_PROGRAMS += read_write +endif + +if ENABLE_FORTRAN +noinst_PROGRAMS += H5BlockExampleF +endif + +read_write_SOURCES = read_write.c +H5BlockExampleF_SOURCES = H5BlockExampleF.f90 + +%.o : %.f90 + $(FC) $(FFLAGS) -c $< + + +distclean-local: + $(RM) *~ diff --git a/examples/H5Block/README b/examples/H5Block/README new file mode 100644 index 0000000..64faa5a --- /dev/null +++ b/examples/H5Block/README @@ -0,0 +1,189 @@ +Since we have no different version for serial and parallel system, +all tests are compiled for "parallel" systems (which may have only +one processor). + +Only one time-step! + +* H5BlockWriteScalarField1Proc + - 1 processor + - Write field data "TestField" with dimension sizes + (64, 64, 512) and scalar values: + data[i,j,k] = k + 1000*j + 100000*i + - Set field attribute "TestString" to "42" + - Set field attribute "TestInt64" to 42 + - Set field attribute "TestFloat64" to 42.0 + - filename: blockfile1.h5 + +* H5BlockReadScalarField1Proc + - 1 processor + - read file "blockfile1.h5" + - check values of field data + - check values of attributes + +* H5BlockWriteScalarField8Procs + - 8 processors + - Write field data "TestField" with dimension sizes + (64, 64, 512) and scalar values: + data[i,j,k] = k + 1000*j + 100000*i + 10000000*proc + - layout: + proc 0: ( 0:63, 0:63, 0: 63) + proc 1: ( 0:63, 0:63, 64:127) + proc 2: ( 0:63, 0:63, 128:191) + proc 3: ( 0:63, 0:63, 192,255) + proc 4: ( 0:63, 0:63, 256:319) + proc 5: ( 0:63, 0:63, 320:383) + proc 6: ( 0:63, 0:63, 384:447) + proc 7: ( 0:63, 0:63, 448:511) + - filename = blockfile2.h5 + +* H5BlockReadScalarField8Procs + - 8 processors + - read file "blockfile2.h5" + - check values of field data + - layout as above + +* H5BlockWriteScalarField8ProcsWithGosts + - 8 processors + - Write field data "TestField" with dimension sizes + (64, 64, 512) and scalar values: + data[i,j,k] = k + 1000*j + 100000*i + 10000000*proc + - layout: + proc 0: ( 0:63, 0:63, 0: 64) + proc 1: ( 0:63, 0:63, 63:128) + proc 2: ( 0:63, 0:63, 127:192) + proc 3: ( 0:63, 0:63, 191,256) + proc 4: ( 0:63, 0:63, 255:320) + proc 5: ( 0:63, 0:63, 319:384) + proc 6: ( 0:63, 0:63, 383:448) + proc 7: ( 0:63, 0:63, 447:511) + - filename: blockfile3.h5 + +* H5BlockReadScalarField8ProcsWithGostZones + - 8 processors + - read file "blockfile3.h5" + - check values of field data + - layout as above + +* H5BlockWriteScalarField16ProcsWithGostZones + - 16 processors + - Write field data "TestField" with dimension sizes + (64, 64, 512) and scalar values: + data[i,j,k] = k + 1000*j + 100000*i + 10000000*proc + - layout: + proc 0: ( 0:63, 0:32, 0: 64) + proc 1: ( 0:63, 31:63, 0: 64) + proc 2: ( 0:63, 0:32, 63:128) + proc 3: ( 0:63, 31:63, 63:128) + proc 4: ( 0:63, 0:32, 127:192) + proc 5: ( 0:63, 31:63, 127:192) + proc 6: ( 0:63, 0:32, 191,256) + proc 7: ( 0:63, 31:63, 191,256) + proc 8: ( 0:63, 0:32, 255:320) + proc 9: ( 0:63, 31:63, 255:320) + proc 10: ( 0:63, 0:32, 319:384) + proc 11: ( 0:63, 31:63, 319:384) + proc 12: ( 0:63, 0:32, 383:448) + proc 13: ( 0:63, 31:63, 383:448) + proc 14: ( 0:63, 0:32, 447:511) + proc 15: ( 0:63, 31:63, 447:511) + - filename: blockfile4.h5 + +* H5BlockReadScalarField16ProcsWithGosts + - 16 processors + - read file "blockfile4.h5" + - check values of field data + - layout as above + + + +* H5BlockWriteScalarField32Procs + - 32 processors + - Write field data "TestField" with dimension sizes + (64, 64, 512) and scalar values: + data[i,j,k] = k + 1000*j + 100000*i + 10000000*proc + - layout: + proc 0: ( 0:31, 0:31, 0: 63) + proc 1: ( 0:31, 32:63, 0: 63) + proc 2: ( 32:63, 0:31, 0: 63) + proc 3: ( 32:63, 32:63, 0: 63) + proc 4: ( 0:31, 0:31, 64:127) + proc 5: ( 0:31, 32:63, 64:127) + proc 6: ( 32:63, 0:31, 64:127) + proc 7: ( 32:63, 32:63, 64:127) + proc 8: ( 0:31, 0:31, 128:191) + proc 9: ( 0:31, 32:63, 128:191) + proc 10: ( 32:63, 0:31, 128:191) + proc 11: ( 32:63, 32:63, 128:191) + proc 12: ( 0:31, 0:31, 192:255) + proc 13: ( 0:31, 32:63, 192:255) + proc 14: ( 32:63, 0:31, 192:255) + proc 15: ( 32:63, 32:63, 192:255) + proc 16: ( 0:31, 0:31, 256:319) + proc 17: ( 0:31, 32:63, 256:319) + proc 18: ( 32:63, 0:31, 256:319) + proc 19: ( 32:63, 32:63, 256:319) + proc 20: ( 0:31, 0:31, 320:383) + proc 21: ( 0:31, 32:63, 320:383) + proc 22: ( 32:63, 0:31, 320:383) + proc 23: ( 32:63, 32:63, 320:383) + proc 24: ( 0:31, 0:31, 384:447) + proc 25: ( 0:31, 32:63, 384:447) + proc 26: ( 32:63, 0:31, 384:447) + proc 27: ( 32:63, 32:63, 384:447) + proc 28: ( 0:31, 0:31, 448:511) + proc 29: ( 0:31, 32:63, 448:511) + proc 30: ( 32:63, 0:31, 448:511) + proc 31: ( 32:63, 32:63, 448:511) + - filename: blockfile5.h5 + +* H5BlockReadScalarField32Procs + - 32 processors + - read file "blockfile4.h5" + - check values of field data + - layout as above + +* H5BlockWriteScalarField32ProcsWithGosts + - 32 processors + - Write field data "TestField" with dimension sizes + (64, 64, 512) and scalar values: + data[i,j,k] = k + 1000*j + 100000*i + 10000000*proc + - layout: + proc 0: ( 0:32, 0:32, 0: 64) + proc 1: ( 0:32, 31:63, 0: 64) + proc 2: ( 31:63, 0:32, 0: 64) + proc 3: ( 31:63, 31:63, 0: 64) + proc 4: ( 0:32, 0:32, 63:128) + proc 5: ( 0:32, 31:63, 63:128) + proc 6: ( 31:63, 0:32, 63:128) + proc 7: ( 31:63, 31:63, 63:128) + proc 8: ( 0:32, 0:32, 127:192) + proc 9: ( 0:32, 31:63, 127:192) + proc 10: ( 31:63, 0:32, 127:192) + proc 11: ( 31:63, 31:63, 127:192) + proc 12: ( 0:32, 0:32, 191:256) + proc 13: ( 0:32, 31:63, 191:256) + proc 14: ( 31:63, 0:32, 191:256) + proc 15: ( 31:63, 31:63, 191:256) + proc 16: ( 0:32, 0:32, 255:320) + proc 17: ( 0:32, 31:63, 255:320) + proc 18: ( 31:63, 0:32, 255:320) + proc 19: ( 31:63, 31:63, 255:320) + proc 20: ( 0:32, 0:32, 319:384) + proc 21: ( 0:32, 31:63, 319:384) + proc 22: ( 31:63, 0:32, 319:384) + proc 23: ( 31:63, 31:63, 319:384) + proc 24: ( 0:31, 0:31, 383:448) + proc 25: ( 0:31, 31:63, 383:448) + proc 26: ( 31:63, 0:31, 383:448) + proc 27: ( 31:63, 31:63, 383:448) + proc 28: ( 0:32, 0:32, 447:511) + proc 29: ( 0:32, 31:63, 447:511) + proc 30: ( 31:63, 0:32, 447:511) + proc 31: ( 31:63, 31:63, 447:511) + filename: blockfile6.h5 + +* H5BlockReadScalarField32ProcsWithGhosts + - 32 processors + - read file "blockfile6.h5" + - check values of field data + - layout as above diff --git a/examples/H5Block/fields.c b/examples/H5Block/fields.c new file mode 100644 index 0000000..eab49a1 --- /dev/null +++ b/examples/H5Block/fields.c @@ -0,0 +1,45 @@ +#include +#include +#include +#include + +#define XSIZE 8 +#define YSIZE 8 +#define ZSIZE 8 +#define DATASIZE XSIZE*YSIZE*ZSIZE +#define H5OpenFileParallel H5PartOpenFileParallel +#define H5SetStep H5PartSetStep +#define H5Block3dSetLayout H5BlockDefine3DFieldLayout +#define H5CloseFile H5PartCloseFile + +int main(int argc, char** argv) +{ + int rank, nprocs; + h5part_float64_t ex[DATASIZE]; + h5part_float64_t ey[DATASIZE]; + h5part_float64_t ez[DATASIZE]; + h5part_float64_t q[DATASIZE]; + h5part_int64_t nparticles = DATASIZE; + H5PartFile *file; + + // initialize MPI + MPI_Init (&argc, &argv); + MPI_Comm_rank (MPI_COMM_WORLD, &rank); + MPI_Comm_size (MPI_COMM_WORLD, &nprocs); + + H5PartSetVerbosityLevel(H5PART_VERB_DEBUG); + + file = H5OpenFileParallel("fields.h5", H5PART_WRITE, MPI_COMM_WORLD); + H5SetStep(file, 0); + H5Block3dSetLayout(file, + rank*XSIZE, (rank+1)*XSIZE - 1, + 0, YSIZE - 1, + 0, ZSIZE - 1); + H5Block3dWriteScalarFieldFloat64(file, "Q", q); + H5Block3dWrite3dVectorFieldFloat64(file, "E", ex, ez, ey); + H5CloseFile(file); + + MPI_Finalize(); + return EXIT_SUCCESS; +} + diff --git a/examples/H5Block/read_write.c b/examples/H5Block/read_write.c new file mode 100644 index 0000000..46f188b --- /dev/null +++ b/examples/H5Block/read_write.c @@ -0,0 +1,568 @@ +#include +#include +#include + +#include +#include "H5hut.h" + +#define NPROCS 8 + +struct H5BlockPartition { + h5_int64_t i_start; + h5_int64_t i_end; + h5_int64_t j_start; + h5_int64_t j_end; + h5_int64_t k_start; + h5_int64_t k_end; +}; + +struct H5BlockPartition Layout1[1] = { + { 0, 63, 0, 63, 0, 511 } +}; + +struct H5BlockPartition Layout8[8] = { + { 0,63, 0,63, 0, 63}, + { 0,63, 0,63, 64,127}, + { 0,63, 0,63, 128,191}, + { 0,63, 0,63, 192,255}, + { 0,63, 0,63, 256,319}, + { 0,63, 0,63, 320,383}, + { 0,63, 0,63, 384,447}, + { 0,63, 0,63, 448,511} +}; + +struct H5BlockPartition Layout8G[8] = { + { 0,63, 0,63, 0, 64}, + { 0,63, 0,63, 63,128}, + { 0,63, 0,63, 127,192}, + { 0,63, 0,63, 191,256}, + { 0,63, 0,63, 255,320}, + { 0,63, 0,63, 319,384}, + { 0,63, 0,63, 383,448}, + { 0,63, 0,63, 447,511} +}; + +struct H5BlockPartition Layout16[16] = { + { 0,63, 0,31, 0, 63}, + { 0,63, 32,63, 0, 63}, + { 0,63, 0,31, 64,127}, + { 0,63, 32,63, 64,127}, + { 0,63, 0,31, 128,191}, + { 0,63, 32,63, 128,191}, + { 0,63, 0,31, 192,255}, + { 0,63, 32,63, 192,255}, + { 0,63, 0,31, 256,319}, + { 0,63, 32,63, 256,319}, + { 0,63, 0,31, 320,383}, + { 0,63, 32,63, 320,383}, + { 0,63, 0,31, 384,447}, + { 0,63, 32,63, 384,447}, + { 0,63, 0,31, 448,511}, + { 0,63, 32,63, 448,511} +}; + +struct H5BlockPartition Layout16G[16] = { + { 0,63, 0,32, 0, 64}, + { 0,63, 31,63, 0, 64}, + { 0,63, 0,32, 63,128}, + { 0,63, 31,63, 63,128}, + { 0,63, 0,32, 127,192}, + { 0,63, 31,63, 127,192}, + { 0,63, 0,32, 191,256}, + { 0,63, 31,63, 191,256}, + { 0,63, 0,32, 255,320}, + { 0,63, 31,63, 255,320}, + { 0,63, 0,32, 319,384}, + { 0,63, 31,63, 319,384}, + { 0,63, 0,32, 383,448}, + { 0,63, 31,63, 383,448}, + { 0,63, 0,32, 447,511}, + { 0,63, 31,63, 447,511} +}; + + +struct H5BlockPartition Layout32[32] = { + { 0,31, 0,31, 0, 63}, + { 0,31, 32,63, 0, 63}, + { 32,63, 0,31, 0, 63}, + { 32,63, 32,63, 0, 63}, + { 0,31, 0,31, 64,127}, + { 0,31, 32,63, 64,127}, + { 32,63, 0,31, 64,127}, + { 32,63, 32,63, 64,127}, + { 0,31, 0,31, 128,191}, + { 0,31, 32,63, 128,191}, + { 32,63, 0,31, 128,191}, + { 32,63, 32,63, 128,191}, + { 0,31, 0,31, 192,255}, + { 0,31, 32,63, 192,255}, + { 32,63, 0,31, 192,255}, + { 32,63, 32,63, 192,255}, + { 0,31, 0,31, 256,319}, + { 0,31, 32,63, 256,319}, + { 32,63, 0,31, 256,319}, + { 32,63, 32,63, 256,319}, + { 0,31, 0,31, 320,383}, + { 0,31, 32,63, 320,383}, + { 32,63, 0,31, 320,383}, + { 32,63, 32,63, 320,383}, + { 0,31, 0,31, 384,447}, + { 0,31, 32,63, 384,447}, + { 32,63, 0,31, 384,447}, + { 32,63, 32,63, 384,447}, + { 0,31, 0,31, 448,511}, + { 0,31, 32,63, 448,511}, + { 32,63, 0,31, 448,511}, + { 32,63, 32,63, 448,511} +}; + +struct H5BlockPartition Layout32G[32] = { + { 0,32, 0,32, 0, 64}, + { 0,32, 31,63, 0, 64}, + { 31,63, 0,32, 0, 64}, + { 31,63, 31,63, 0, 64}, + { 0,32, 0,32, 63,128}, + { 0,32, 31,63, 63,128}, + { 31,63, 0,32, 63,128}, + { 31,63, 31,63, 63,128}, + { 0,32, 0,32, 127,192}, + { 0,32, 31,63, 127,192}, + { 31,63, 0,32, 127,192}, + { 31,63, 31,63, 127,192}, + { 0,32, 0,32, 191,256}, + { 0,32, 31,63, 191,256}, + { 31,63, 0,32, 191,256}, + { 31,63, 31,63, 191,256}, + { 0,32, 0,32, 255,320}, + { 0,32, 31,63, 255,320}, + { 31,63, 0,32, 255,320}, + { 31,63, 31,63, 255,320}, + { 0,32, 0,32, 319,384}, + { 0,32, 31,63, 319,384}, + { 31,63, 0,32, 319,384}, + { 31,63, 31,63, 319,384}, + { 0,31, 0,31, 383,448}, + { 0,31, 31,63, 383,448}, + { 31,63, 0,31, 383,448}, + { 31,63, 31,63, 383,448}, + { 0,32, 0,32, 447,511}, + { 0,32, 31,63, 447,511}, + { 31,63, 0,32, 447,511}, + { 31,63, 31,63, 447,511} +}; + +#if 0 +static h5_int64_t +_calc_index_KJI ( + int myproc, + h5_int64_t i, + h5_int64_t i_dims, + h5_int64_t j, + h5_int64_t j_dims, + h5_int64_t k, + h5_int64_t k_dims + ) { + + return i + j*i_dims + k*i_dims*j_dims; +} +#endif + +#define _calc_index( i, i_dims, j, j_dims, k, k_dims ) \ + (i + j*i_dims + k*i_dims*j_dims) + +static h5_int64_t +_write_data ( + h5_file_t f, + int myproc, + struct H5BlockPartition* view + ) { + + h5_int64_t i, j, k, idx; + h5_int64_t herr; + h5_float64_t *data; + h5_int64_t i_dims = view->i_end - view->i_start + 1; + h5_int64_t j_dims = view->j_end - view->j_start + 1; + h5_int64_t k_dims = view->k_end - view->k_start + 1; + + printf ( "Writing scalar field data to step #%lld\n", (long long)H5GetStep (f)); + + data = malloc ( i_dims * j_dims * k_dims * sizeof ( *data ) ); + for ( i = 0; i < i_dims; i++ ) { + for ( j = 0; j < j_dims; j++ ) { + for ( k = 0; k < k_dims; k++ ) { + idx = _calc_index ( + i, i_dims, + j, j_dims, + k, k_dims ); + *(data + idx) = k + + 1000*j + + 100000*i + + 10000000*myproc; + } + } + } + + herr = H5Block3dSetView ( + f, + view->i_start, view->i_end, + view->j_start, view->j_end, + view->k_start, view->k_end ); + if ( herr < 0 ) return herr; + + herr = H5Block3dWriteScalarFieldFloat64 ( f, "TestField", data ); + if ( herr < 0 ) return herr; + + free ( data ); + + return 1; +} + +static h5_int64_t +_write_attributes ( + h5_file_t f, + const int myproc + ) { + printf ("Writing attributes to field '%s' in step #%lld\n", "TestField", (long long)H5GetStep (f)); + h5_int64_t herr = H5BlockWriteFieldAttribString ( + f, + "TestField", + "TestString", + "42" ); + if ( herr < 0 ) return -1; + + h5_int64_t ival[1] = { 42 }; + h5_float64_t rval[1] = { 42.0 }; + herr = H5BlockWriteFieldAttribInt64 ( + f, + "TestField", + "TestInt64", + ival, 1 ); + if ( herr < 0 ) return -1; + + herr = H5BlockWriteFieldAttribFloat64 ( + f, + "TestField", + "TestFloat64", + rval, 1 ); + if ( herr < 0 ) return -1; + + herr = H5Block3dSetFieldOrigin ( f, "TestField", 1.0, 2.0, 3.0 ); + if ( herr < 0 ) return -1; + + herr = H5Block3dSetFieldSpacing ( f, "TestField", 2.0, 3.0, 4.0 ); + if ( herr < 0 ) return -1; + + return H5_SUCCESS; +} + +static h5_int64_t +_write_file ( + const char *fname, + const int myproc, + MPI_Comm comm, + struct H5BlockPartition *layout + ) { + + h5_file_t f; + h5_int64_t timestep = 0; + h5_int64_t herr; + + printf ("PROC[%d]: Open file \"%s\" for writing ...\n", + myproc, fname ); + + f = H5OpenFile ( fname, H5_O_WRONLY, comm ); + if ( f == H5_FAILURE ) return -1; + + herr = H5SetStep ( f, timestep ); + if ( herr < 0 ) return herr; + + if ( _write_data ( f, myproc, layout ) < 0 ) { + printf ("Failed to write file \"%s\"\n", fname ); + return 2; + } + + if ( _write_attributes ( f, myproc ) < 0 ) { + printf ("Failed to write attributes \"%s\"\n", fname ); + return 2; + } + + herr = H5CloseFile (f); + if ( herr < 0 ) return -1; + + return 0; +} + +static h5_int64_t +_read_data ( + h5_file_t f, + int myproc, + struct H5BlockPartition *layout + ) { + + h5_int64_t i, j, k, idx; + h5_int64_t herr; + h5_float64_t *data; + h5_int64_t i_dims = layout->i_end - layout->i_start + 1; + h5_int64_t j_dims = layout->j_end - layout->j_start + 1; + h5_int64_t k_dims = layout->k_end - layout->k_start + 1; + + printf ( "Reading Step #%lld\n", (long long)H5GetStep (f) ); + + data = malloc ( i_dims * j_dims * k_dims * sizeof ( *data ) ); + + herr = H5Block3dSetView ( + f, + layout->i_start, layout->i_end, + layout->j_start, layout->j_end, + layout->k_start, layout->k_end ); + if ( herr < 0 ) return herr; + + herr = H5Block3dReadScalarFieldFloat64 ( f, "TestField", data ); + if ( herr < 0 ) return herr; + + for ( i = 0; i < i_dims; i++ ) { + for ( j = 0; j < j_dims; j++ ) { + for ( k = 0; k < k_dims; k++ ) { + idx = _calc_index ( + i, i_dims, + j, j_dims, + k, k_dims ); + + h5_float64_t value = k + + 1000 * j + + 100000 * i + + 10000000 * myproc; + if ( *(data + idx) != value ) { + printf ( + "PROC[%d]: " + "value missmatch for (%lld,%lld,%lld); is: %f;" + " should be: %f\n", + myproc, + (long long)i, (long long)j, (long long)k, + *( data + idx ), value ); + return -1; + } + } + } + } + + free ( data ); + + return 0; +} + +static h5_int64_t +_read_attributes ( + h5_file_t f, + const int myproc, + MPI_Comm comm + ) { + h5_int64_t timestep = 0; + + h5_int64_t herr = H5SetStep ( f, timestep ); + if ( herr < 0 ) return herr; + + char sval[16]; + herr = H5BlockReadFieldAttribString ( + f, + "TestField", + "TestString", + sval ); + if ( herr < 0 ) return -1; + if ( strcmp ( sval, "42" ) != 0 ) { + printf ( "Error reading string attribute: " + "Value is \"%s\" and should be \"42\"\n", sval ); + } + + h5_int64_t ival[1]; + h5_float64_t rval[1]; + herr = H5BlockReadFieldAttribInt64 ( + f, + "TestField", + "TestInt64", + ival ); + if ( herr < 0 ) return -1; + if ( ival[0] != 42 ) { + printf ( "Error reading int64 attribute: " + "Value is %lld and should be 42\n", + (long long) ival[0] ); + } + + herr = H5BlockReadFieldAttribFloat64 ( + f, + "TestField", + "TestFloat64", + rval ); + if ( herr < 0 ) return -1; + if ( rval[0] != 42.0 ) { + printf ( "Error reading float64 attribute: " + "Value is %f and should be 42.0\n", + rval[0] ); + } + + h5_float64_t x_origin; + h5_float64_t y_origin; + h5_float64_t z_origin; + h5_float64_t x_spacing; + h5_float64_t y_spacing; + h5_float64_t z_spacing; + + herr = H5Block3dGetFieldOrigin ( + f, "TestField", + &x_origin, + &y_origin, + &z_origin ); + if ( herr < 0 ) return -1; + + if ( x_origin != 1.0 || y_origin != 2.0 || z_origin != 3.0 ) { + printf ( + "Error reading field origin: Read values (%f,%f,%f)\n", + x_origin, y_origin, z_origin ); + } + herr = H5Block3dGetFieldSpacing ( + f, "TestField", + &x_spacing, + &y_spacing, + &z_spacing ); + if ( herr < 0 ) return -1; + if ( x_spacing != 2.0 || y_spacing != 3.0 || z_spacing != 4.0 ) { + printf ( + "Error reading field spacing: Read values (%f,%f,%f)\n", + x_spacing, y_spacing, z_spacing ); + } + + return 0; +} + +static h5_int64_t +_read_file ( + const char *fname, + const int myproc, + MPI_Comm comm, + struct H5BlockPartition *layout + ) { + + h5_file_t f; + h5_int64_t timestep = 0; + h5_int64_t herr; + + printf ("PROC[%d]: Open file \"%s\" for reading ...\n", + myproc, fname ); + + f = H5OpenFile ( fname, H5_O_RDONLY, comm ); + if ( f == H5_FAILURE ) return -1; + + herr = H5SetStep ( f, timestep ); + if ( herr < 0 ) return herr; + + if ( _read_data ( f, myproc, layout ) < 0 ) { + printf ("Failed to read file \"%s\"\n", fname ); + return 2; + } + if ( _read_attributes ( f, myproc, comm ) < 0 ) { + printf ("Failed to read attributes \"%s\"\n", fname ); + return 3; + } + + herr = H5CloseFile ( f ); + if ( herr < 0 ) return -1; + + return 0; +} + +int +main ( + int argc, + char **argv + ) { + char *fname; + int myproc; + int nprocs; + int opt_with_ghosts = 0; + int opt_read = 0; + int opt_write = 0; + struct H5BlockPartition *layout; + MPI_Comm comm = MPI_COMM_WORLD; + + if (argc == 1) { + fprintf ( stderr, + "Usage: %s -w|-r [-g]\n", + argv[0] ); + return 1; + } + while ( --argc ) { + if ( strcmp ( argv[argc], "-r" ) == 0 ) + opt_read = 1; + else if ( strcmp ( argv[argc], "-w" ) == 0 ) + opt_write = 1; + else if ( strcmp ( argv[argc], "-g" ) == 0 ) + opt_with_ghosts = 1; + else { + fprintf ( stderr, + "Illegal option %s\n\n" + "Usage: %s -w -r -g\n", + argv[argc], argv[0] ); + return 1; + } + } + + MPI_Init( &argc, &argv ); + MPI_Comm_size ( comm, &nprocs ); + MPI_Comm_rank( comm, &myproc ); + switch ( nprocs ) { + case 1: + fname = "blockfile1.h5"; + layout = &Layout1[myproc]; + break; + case 8: + if ( opt_with_ghosts ) { + fname = "blockfile8G.h5"; + layout = &Layout8G[myproc]; + } else { + fname = "blockfile8.h5"; + layout = &Layout8[myproc]; + } + break; + case 16: + if ( opt_with_ghosts ) { + fname = "blockfile16G.h5"; + layout = &Layout16G[myproc]; + } else { + fname = "blockfile16.h5"; + layout = &Layout16[myproc]; + } + break; + case 32: + if ( opt_with_ghosts ) { + fname = "blockfile32G.h5"; + layout = &Layout32G[myproc]; + } else { + fname = "blockfile32.h5"; + layout = &Layout32[myproc]; + } + break; + default: + printf ( "Run this test on %d, %d, %d or %d processor(s)!\n", 1, 8, 16, 32); + return 1; + } + + H5SetVerbosityLevel ( 4 ); + + if ( opt_write ) { + if ( _write_file ( fname, myproc, comm, layout ) < 0 ) { + printf ("Failed to write file \"%s\"\n", fname ); + goto cleanup; + } + } else if ( opt_read ) { + if ( _read_file ( fname, myproc, comm, layout ) < 0 ) { + printf ("Failed to read file \"%s\"\n", fname ); + goto cleanup; + } + } + printf ("Done.\n"); + +cleanup: + MPI_Finalize(); + + return 0; +} diff --git a/examples/H5Fed/Makefile.am b/examples/H5Fed/Makefile.am new file mode 100644 index 0000000..012958f --- /dev/null +++ b/examples/H5Fed/Makefile.am @@ -0,0 +1,47 @@ +# test level Makefile.am + +OBJEXT = o + +AM_LDFLAGS = -L../../src/lib @LDFLAGS@ +LIBS = -lH5hut @LIBS@ +AM_CPPFLAGS = -I../../src/include @AM_CPPFLAGS@ + +noinst_PROGRAMS = \ + tetmesh_write \ + tetmesh_write1 \ + tetmesh_write2 \ + tetmesh_read \ + tetmesh_adjacencies \ + tetmesh_write_tags \ + tetmesh_read_tags \ + trimesh_read \ + trimesh_write \ + trimesh_2gnuplot \ + trimesh_adjacencies \ + trimesh_write_dunetest + +# map_tet2globalid \ +# map_triangle2globalid + +# Extra files that I wish to include in the dist tar ball. +EXTRA_DIST = \ + tetmesh_adjacencies.c \ + tetmesh_read.c \ + tetmesh_read_tags.c \ + tetmesh_write.c \ + tetmesh_write1.c \ + tetmesh_write2.c \ + tetmesh_write_tags.c \ + trimesh_adjacencies.c \ + trimesh_read.c \ + trimesh_write.c \ + trimesh_2gnuplot.c \ + trimesh_write_dunetest.c + +# map_tet2globalid.c \ +# map_triangle2globalid.c \ +# $(bin_SCRIPTS) + +clean-local: + $(RM) *.h5 *~ + diff --git a/examples/H5Fed/map_tet2globalid.c b/examples/H5Fed/map_tet2globalid.c new file mode 100644 index 0000000..65a16c1 --- /dev/null +++ b/examples/H5Fed/map_tet2globalid.c @@ -0,0 +1,63 @@ +#include +#include + +#include "H5hut.h" + +#ifndef PARALLEL_IO +#ifndef MPI_COMM_WORLD +#define MPI_COMM_WORLD 0 +#endif +#endif + +struct vertex { + h5_float64_t P[3]; +}; + +typedef struct vertex vertex_t; + +struct tet { + h5_glb_id_t global_id; + h5_glb_id_t parent_id; + h5_glb_id_t vids[4]; +}; +typedef struct tet tet_t; + +int +main ( + int argc, + char *argv[] + ) { + + H5PartSetVerbosityLevel ( 4 ); + + h5_file *f = H5OpenFile ( "simple_tet.h5", 0 ); + if ( f == NULL ) { + fprintf ( stderr, "!!! Can't open file.\n" ); + return -1; + } + + h5_size_t num_meshes = H5FedGetNumMeshes ( f, TETRAHEDRAL_MESH ); + printf ( " Number of meshes: %d\n", num_meshes ); + + h5_id_t mesh_id = 0; + + h5_err_t h5err = H5FedOpenMesh ( f, mesh_id, TETRAHEDRAL_MESH ); + if ( h5err < 0 ) { + fprintf ( stderr, "!!! Can't open mesh %d\n", mesh_id ); + return -1; + } + h5_glb_id_t global_vids[4] = { 0, 3, 4, 5 }; + h5_glb_id_t global_tid = H5FedMapTet2GlobalID ( f, global_vids ); + if ( global_tid < 0 ) { + fprintf ( stderr, "!!! Oops ...\n" ); + return 1; + } + printf ( " Global entity ID: %d\n", global_tid ); + + h5err = H5CloseFile ( f ); + if ( h5err < 0 ) { + fprintf ( stderr, "!!! Can't close file.\n" ); + return -1; + } + return 0; +} diff --git a/examples/H5Fed/map_triangle2globalid.c b/examples/H5Fed/map_triangle2globalid.c new file mode 100644 index 0000000..aa33f7b --- /dev/null +++ b/examples/H5Fed/map_triangle2globalid.c @@ -0,0 +1,63 @@ +#include +#include + +#include "H5hut.h" + +#ifndef PARALLEL_IO +#ifndef MPI_COMM_WORLD +#define MPI_COMM_WORLD 0 +#endif +#endif + +struct vertex { + h5_float64_t P[3]; +}; + +typedef struct vertex vertex_t; + +struct tet { + h5_glb_id_t global_id; + h5_glb_id_t parent_id; + h5_glb_id_t vids[4]; +}; +typedef struct tet tet_t; + +int +main ( + int argc, + char *argv[] + ) { + + H5PartSetVerbosityLevel ( 4 ); + + h5_file *f = H5OpenFile ( "simple_tet.h5", 0 ); + if ( f == NULL ) { + fprintf ( stderr, "!!! Can't open file.\n" ); + return -1; + } + + h5_size_t num_meshes = H5FedGetNumMeshes ( f, TETRAHEDRAL_MESH ); + printf ( " Number of meshes: %d\n", num_meshes ); + + h5_id_t mesh_id = 0; + + h5_err_t h5err = H5FedOpenMesh ( f, mesh_id, TETRAHEDRAL_MESH ); + if ( h5err < 0 ) { + fprintf ( stderr, "!!! Can't open mesh %d\n", mesh_id ); + return -1; + } + h5_glb_id_t global_vids[3] = { 3, 4, 5 }; // sorted 4, 5, 3 + h5_glb_id_t global_tid = H5FedMapTriangle2GlobalID ( f, global_vids ); + if ( global_tid < 0 ) { + fprintf ( stderr, "!!! Oops ...\n" ); + return 1; + } + printf ( " Global triangle ID: 0x%08x\n", (unsigned int)global_tid ); + + h5err = H5CloseFile ( f ); + if ( h5err < 0 ) { + fprintf ( stderr, "!!! Can't close file.\n" ); + return -1; + } + return 0; +} diff --git a/examples/H5Fed/tetmesh_adjacencies.c b/examples/H5Fed/tetmesh_adjacencies.c new file mode 100644 index 0000000..768782c --- /dev/null +++ b/examples/H5Fed/tetmesh_adjacencies.c @@ -0,0 +1,566 @@ +#include +#include +#include + +#include "H5hut.h" + +#define PRINT_UPADJACENCIES 1 +#define PRINT_DOWNADJACENCIES 0 + +const h5_oid_t MESH_TYPE = H5_TETRAHEDRAL_MESH; +const char* FNAME = "simple_tet.h5"; + +typedef struct timer { + clock_t _start; + clock_t _end; + clock_t _elapsed; + struct timer* (*new)(void); + void (*delete)(struct timer*); + void (*start)(struct timer*); + void (*stop)(struct timer*); + void (*reset)(struct timer*); + double (*elapsed)(struct timer*); +} Timer; + +extern Timer Timer_; +static Timer* +new ( + void + ) { + Timer* this = malloc (sizeof (Timer)); + *this = Timer_; + return this; +} + +static void +delete (Timer* this) { + free (this); +} + +static void +start (Timer* this) { + this->_start = clock(); +} + +static void +stop (Timer* this) { + this->_end = clock(); + this->_elapsed += this->_end - this->_start; + this->_start = this->_end; +} + +static void +reset (Timer* this) { + this->_start = this->_end = this->_elapsed = 0; +} + +static double +elapsed (Timer* this) { + return (double)(this->_elapsed)/CLOCKS_PER_SEC; +} + +Timer Timer_ = { + 0, + 0, + 0, + new, + delete, + start, + stop, + reset, + elapsed +}; + +static h5_err_t +print_adjacencies_of_vertex ( + h5t_mesh_t* const m, + h5_loc_id_t local_id, + int dumpit, + Timer* timer + ) { + h5_loc_idlist_t* uadj_edges; + h5_loc_idlist_t* uadj_triangles; + h5_loc_idlist_t* uadj_tets; + timer->reset(timer); + timer->start(timer); + H5FedGetAdjacencies (m, local_id, 1, &uadj_edges); + H5FedGetAdjacencies (m, local_id, 2, &uadj_triangles); + H5FedGetAdjacencies (m, local_id, 3, &uadj_tets); + timer->stop(timer); + int n = uadj_tets->num_items; + if (uadj_triangles->num_items > n) n = uadj_triangles->num_items; + if (uadj_edges->num_items > n) n = uadj_edges->num_items; + if (dumpit) { + for (int i = 0; i < n; i++) { + char v[256]; + char k[256]; + char d[256]; + char t[256]; + h5_loc_id_t local_vids[4]; + if (i == 0) { + H5FedGetVertexIndicesOfEntity ( + m, local_id, local_vids); + snprintf (v, sizeof(v), "=[%lld]=", + (long long)local_vids[0]); + } else { + *v = '\0'; + } + if (i < uadj_edges->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, uadj_edges->items[i], local_vids); + snprintf (k, sizeof(k), "=[%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1]); + } else { + *k = '\0'; + } + if (i < uadj_triangles->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, uadj_triangles->items[i], local_vids); + snprintf (d, sizeof(d), "=[%lld,%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1], + (long long)local_vids[2]); + } else { + *d = '\0'; + } + if (i < uadj_tets->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, uadj_tets->items[i], local_vids); + snprintf (t, sizeof(t), "=[%lld,%lld,%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1], + (long long)local_vids[2], + (long long)local_vids[3]); + } else { + *t = '\0'; + } + printf ("| %-18s | %-18s | %-18s | %-18s |\n", v, k, d, t); + } + } + H5FedReleaseListOfAdjacencies (m, &uadj_edges); + H5FedReleaseListOfAdjacencies (m, &uadj_triangles); + H5FedReleaseListOfAdjacencies (m, &uadj_tets); + return H5_SUCCESS; +} + +static h5_err_t +print_adjacencies_of_edge ( + h5t_mesh_t* const m, + h5_loc_id_t local_id, + int dumpit, + Timer* timer + ) { + h5_loc_idlist_t* dadj_vertices; + h5_loc_idlist_t* uadj_triangles; + h5_loc_idlist_t* uadj_tets; + timer->reset(timer); + timer->start(timer); + H5FedGetAdjacencies (m, local_id, 0, &dadj_vertices); + H5FedGetAdjacencies (m, local_id, 2, &uadj_triangles); + H5FedGetAdjacencies (m, local_id, 3, &uadj_tets); + timer->stop(timer); + int n = dadj_vertices->num_items; + if (uadj_triangles->num_items > n) n = uadj_triangles->num_items; + if (uadj_tets->num_items > n) n = uadj_tets->num_items; + + if (dumpit) { + for (int i = 0; i < n; i++) { + char v[256]; + char k[256]; + char d[256]; + char t[256]; + h5_loc_id_t local_vids[4]; + if (i < dadj_vertices->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, dadj_vertices->items[i], local_vids); + snprintf (v, sizeof(v), "=[%lld]=", + (long long)local_vids[0]); + } else { + *v = '\0'; + } + if (i == 0) { + H5FedGetVertexIndicesOfEntity ( + m, local_id, local_vids); + snprintf (k, sizeof(k), "=[%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1]); + } else { + *k = '\0'; + } + if (i < uadj_triangles->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, uadj_triangles->items[i], local_vids); + snprintf (d, sizeof(d), "=[%lld,%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1], + (long long)local_vids[2]); + } else { + *d = '\0'; + } + if (i < uadj_tets->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, uadj_tets->items[i], local_vids); + snprintf (t, sizeof(t), "=[%lld,%lld,%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1], + (long long)local_vids[2], + (long long)local_vids[3]); + } else { + *t = '\0'; + } + printf ("| %-18s | %-18s | %-18s | %-18s |\n", v, k, d, t); + } + } + H5FedReleaseListOfAdjacencies (m, &dadj_vertices); + H5FedReleaseListOfAdjacencies (m, &uadj_triangles); + H5FedReleaseListOfAdjacencies (m, &uadj_tets); + return H5_SUCCESS; +} + +static h5_err_t +print_adjacencies_of_triangle ( + h5t_mesh_t* const m, + h5_loc_id_t local_id, + int dumpit, + Timer* timer + ) { + h5_loc_idlist_t* dadj_vertices; + h5_loc_idlist_t* dadj_edges; + h5_loc_idlist_t* uadj_tets; + timer->reset(timer); + timer->start(timer); + H5FedGetAdjacencies (m, local_id, 0, &dadj_vertices); + H5FedGetAdjacencies (m, local_id, 1, &dadj_edges); + H5FedGetAdjacencies (m, local_id, 3, &uadj_tets); + timer->stop(timer); + int n = dadj_vertices->num_items; + if (dadj_edges->num_items > n) n = dadj_edges->num_items; + if (uadj_tets->num_items > n) n = uadj_tets->num_items; + if (dumpit) { + for (int i = 0; i < n; i++) { + char v[256]; + char k[256]; + char d[256]; + char t[256]; + h5_loc_id_t local_vids[4]; + if (i < dadj_vertices->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, dadj_vertices->items[i], local_vids); + snprintf (v, sizeof(v), "=[%lld]=", + (long long)local_vids[0]); + } else { + *v = '\0'; + } + if (i < dadj_edges->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, dadj_edges->items[i], local_vids); + snprintf (k, sizeof(k), "=[%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1]); + } else { + *k = '\0'; + } + if (i == 0) { + H5FedGetVertexIndicesOfEntity ( + m, local_id, local_vids); + snprintf (d, sizeof(k), "=[%lld,%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1], + (long long)local_vids[2]); + } else { + *d = '\0'; + } + if (i < uadj_tets->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, uadj_tets->items[i], local_vids); + snprintf (t, sizeof(t), "=[%lld,%lld,%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1], + (long long)local_vids[2], + (long long)local_vids[3]); + } else { + *t = '\0'; + } + printf ( "| %-18s | %-18s | %-18s | %-18s |\n", v, k, d, t ); + } + } + H5FedReleaseListOfAdjacencies (m, &dadj_vertices); + H5FedReleaseListOfAdjacencies (m, &dadj_edges); + H5FedReleaseListOfAdjacencies (m, &uadj_tets); + return H5_SUCCESS; +} + +static h5_err_t +print_adjacencies_of_tet ( + h5t_mesh_t* const m, + h5_loc_id_t local_id, + int dumpit, + Timer* timer + ) { + h5_loc_idlist_t* dadj_vertices; + h5_loc_idlist_t* dadj_edges; + h5_loc_idlist_t* dadj_triangles; + timer->reset(timer); + timer->start(timer); + H5FedGetAdjacencies (m, local_id, 0, &dadj_vertices); + H5FedGetAdjacencies (m, local_id, 1, &dadj_edges); + H5FedGetAdjacencies (m, local_id, 2, &dadj_triangles); + timer->stop(timer); + int n = dadj_vertices->num_items; + if (dadj_edges->num_items > n) n = dadj_edges->num_items; + if (dadj_triangles->num_items > n) n = dadj_triangles->num_items; + if (dumpit) { + for (int i = 0; i < n; i++) { + char v[256]; + char k[256]; + char d[256]; + char t[256]; + h5_loc_id_t local_vids[4]; + if (i < dadj_vertices->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, dadj_vertices->items[i], local_vids); + snprintf (v, sizeof(v), "=[%lld]=", + (long long)local_vids[0]); + } else { + *v = '\0'; + } + if (i < dadj_edges->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, dadj_edges->items[i], local_vids); + snprintf (k, sizeof(k), "=[%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1]); + } else { + *k = '\0'; + } + if (i < dadj_triangles->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, dadj_triangles->items[i], local_vids); + snprintf (d, sizeof(d), "=[%lld,%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1], + (long long)local_vids[2]); + } else { + *d = '\0'; + } + if (i == 0) { + H5FedGetVertexIndicesOfEntity ( + m, local_id, local_vids); + snprintf (d, sizeof(k), "=[%lld,%lld,%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1], + (long long)local_vids[2], + (long long)local_vids[2]); + } else { + *t = '\0'; + } + printf ("| %-18s | %-18s | %-18s | %-18s |\n", v, k, d, t); + } + } + H5FedReleaseListOfAdjacencies (m, &dadj_vertices); + H5FedReleaseListOfAdjacencies (m, &dadj_edges); + H5FedReleaseListOfAdjacencies (m, &dadj_triangles); + return H5_SUCCESS; +} + +static h5_err_t +traverse_vertices ( + h5t_mesh_t* const m, + int dumpit, + Timer* timer + ) { + h5_loc_id_t local_id; + h5_loc_idx_t num = 0; + double t_total = 0.0; + double t_min = CLOCKS_PER_SEC; + double t_max = 0.0; + double t = 0.0; + + printf ("\nAdjacencies to vertices\n"); + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 3); + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + print_adjacencies_of_vertex (m, local_id, dumpit, timer); + num++; + t = timer->elapsed(timer); + t_total += t; + if (t < t_min) t_min = t; + if (t > t_max) t_max = t; + } + fprintf ( + stderr, + "%lld\ttotal: %f\tmin: %f\tavg: %f\tmax: %f\n", + (long long)num, + t_total, + t_min, + t_total / (double)num, + t_max); + return H5FedEndTraverseEntities (iter); +} + +static h5_err_t +traverse_edges ( + h5t_mesh_t* const m, + int dumpit, + Timer* timer + ) { + h5_loc_id_t local_id; + h5_loc_idx_t num = 0; + double t_total = 0.0; + double t_min = CLOCKS_PER_SEC; + double t_max = 0.0; + double t = 0.0; + printf ("\nAdjacencies to edges\n"); + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 2); + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + print_adjacencies_of_edge (m, local_id, dumpit, timer); + num++; + t = timer->elapsed(timer); + t_total += t; + if (t < t_min) t_min = t; + if (t > t_max) t_max = t; + } + fprintf ( + stderr, + "%lld\ttotal: %f\tmin: %f\tavg: %f\tmax: %f\n", + (long long)num, + t_total, + t_min, + t_total / (double)num, + t_max); + return H5FedEndTraverseEntities (iter); +} + +static h5_err_t +traverse_triangles ( + h5t_mesh_t* const m, + int dumpit, + Timer* timer + ) { + h5_loc_id_t local_id; + h5_loc_idx_t num = 0; + double t_min = CLOCKS_PER_SEC; + double t_max = 0.0; + double t_total = 0.0; + double t = 0.0; + printf ("\nAdjacencies to triangle\n"); + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 1); + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + print_adjacencies_of_triangle (m, local_id, dumpit, timer); + num++; + t = timer->elapsed(timer); + t_total += t; + if (t < t_min) t_min = t; + if (t > t_max) t_max = t; + } + fprintf ( + stderr, + "%lld\ttotal: %f\tmin: %f\tavg: %f\tmax: %f\n", + (long long)num, + t_total, + t_min, + t_total / (double)num, + t_max); + return H5FedEndTraverseEntities (iter); +} + +static h5_err_t +traverse_elems ( + h5t_mesh_t* const m, + int dumpit, + Timer* timer + ) { + h5_loc_id_t local_id; + h5_loc_idx_t num = 0; + double t_total = 0.0; + double t_min = CLOCKS_PER_SEC; + double t_max = 0.0; + double t = 0.0; + printf ("\nAdjacencies to tetrahedra\n"); + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 0); + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + print_adjacencies_of_tet (m, local_id, dumpit, timer); + num++; + t = timer->elapsed(timer); + t_total += t; + if (t < t_min) t_min = t; + if (t > t_max) t_max = t; + } + fprintf ( + stderr, + "%lld\ttotal: %f\tmin: %f\tavg: %f\tmax: %f\n", + (long long)num, + t_total, + t_min, + t_total / (double)num, + t_max); + return H5FedEndTraverseEntities (iter); +} + +static h5_err_t +traverse_level ( + h5t_mesh_t* const m, + const h5t_lvl_idx_t level_id, + int dumpit, + Timer* timer + ) { + printf (" Setting level to %d\n", level_id); + H5FedSetLevel (m, level_id); + traverse_vertices (m, dumpit, timer); + traverse_edges (m, dumpit, timer); + traverse_triangles (m, dumpit, timer); + traverse_elems (m, dumpit, timer); + return H5_SUCCESS; +} + +static h5_err_t +traverse_mesh ( + h5_file_t const f, + const h5_id_t mesh_id + ) { + h5t_mesh_t* mesh; + int dumpit = 0; + Timer* timer = Timer_.new(); + + /* open mesh and get number of levels */ + printf (" Opening mesh with id %lld\n", mesh_id); + H5FedOpenTetrahedralMeshByIndex (f, mesh_id, &mesh); + h5_size_t num_levels = H5FedGetNumLevels (mesh); + printf (" Number of levels in mesh: %lld\n", (long long)num_levels); + + /* loop over all levels */ + h5t_lvl_idx_t level_id; + for (level_id = 0; level_id < num_levels; level_id++) { + traverse_level (mesh, level_id, dumpit, timer); + } + /* done */ + H5FedCloseMesh (mesh); + timer->delete(timer); + return H5_SUCCESS; +} + +int +main ( + int argc, + char* argv[] + ) { + + /* abort program on error, so we don't have to handle them */ + H5SetErrorHandler (H5AbortErrorhandler); + H5SetVerbosityLevel (2); + + /* open file and get number of meshes */ + h5_file_t f = H5OpenFile (FNAME, H5_O_RDONLY, 0); + h5_size_t num_meshes = H5FedGetNumTetrahedralMeshes (f); + printf (" Number of meshes: %lld\n", (long long)num_meshes); + + /* loop over all meshes */ + h5_id_t mesh_id; + for (mesh_id = 0; mesh_id < num_meshes; mesh_id++) { + traverse_mesh (f, mesh_id); + } + + /* done */ + H5CloseFile (f); + return 0; +} diff --git a/examples/H5Fed/tetmesh_read.c b/examples/H5Fed/tetmesh_read.c new file mode 100644 index 0000000..019f822 --- /dev/null +++ b/examples/H5Fed/tetmesh_read.c @@ -0,0 +1,350 @@ +#include +#include +#include + +#include + +#include "H5hut.h" + +const char* FNAME = "simple_tet.h5"; + + +typedef struct timer { + clock_t _start; + clock_t _end; + struct timer* (*new)(void); + void (*delete)(struct timer*); + void (*start)(struct timer*); + void (*stop)(struct timer*); + double (*elapsed)(struct timer*); +} Timer; + +extern Timer Timer_; +static Timer* +new ( + void + ) { + Timer* this = malloc (sizeof (Timer)); + *this = Timer_; + return this; +} + +static void +delete (Timer* this) { + free (this); +} + +static void +start (Timer* this) { + this->_start = clock(); +} + +static void +stop (Timer* this) { + this->_end = clock(); +} + +static double +elapsed (Timer* this) { + return (double)(this->_end - this->_start)/CLOCKS_PER_SEC; +} + +Timer Timer_ = { + 0, + 0, + new, + delete, + start, + stop, + elapsed +}; + +static h5_err_t +traverse_vertices ( + h5t_mesh_t* const m, + int dumpit, + Timer* timer + ) { + printf ( " %-32s", "Traversing vertices: "); + + /* get number of vertices we have to expect */ + h5_size_t num_vertices_expect = H5FedGetNumVerticesTotal (m); + + /* get iterator for co-dim 3 entities, i.e vertices */ + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 3); + + /* iterate */ + h5_loc_id_t local_id; + h5_size_t num_vertices = 0; + timer->start(timer); + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + if (dumpit) { + printf ("\n"); + h5_float64_t P[3]; + H5FedGetVertexCoordsByID (m, local_id, P); + char v[256]; + snprintf (v, sizeof(v), "=%llx=", (long long)local_id); + printf ("| %-18s | (%f, %f, %f) |\n", + v, P[0], P[1], P[2]); + } + num_vertices++; + } + + /* done */ + H5FedEndTraverseEntities (iter); + timer->stop(timer); + + /* report error if we got a different number then expected */ + if (num_vertices != num_vertices_expect) { + fprintf (stderr, "!!! Got %lud vertices, but expected %lud.\n", + (unsigned long)num_vertices, + (unsigned long)num_vertices_expect); + } + + printf (" %fsec, number of vertices: %lu\n", + timer->elapsed(timer), + (unsigned long)num_vertices); + return H5_SUCCESS; +} + +static h5_err_t +traverse_edges ( + h5t_mesh_t* const m, + int dumpit, + Timer* timer + ) { + printf ( " %-32s", "Traversing edges: "); + timer->start(timer); + /* get iterator for co-dim 2 entities, i.e. edges */ + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 2); + + /* iterate */ + h5_loc_id_t local_id; + h5_size_t num_edges = 0; + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + if (dumpit) { + printf ("\n"); + char v[256]; + char k[256]; + h5_loc_id_t local_vids[4]; + snprintf ( k, sizeof(k), "=%llx=", (long long)local_id ); + H5FedGetVertexIndicesOfEntity ( m, local_id, local_vids ); + snprintf ( v, sizeof(v), "=[%lld,%lld]=", + (long long)local_vids[0], (long long)local_vids[1] ); + printf ( "| %-18s | %-18s |\n", k, v ); + } + num_edges++; + } + + /* done */ + H5FedEndTraverseEntities (iter); + timer->stop(timer); + printf (" %fsec, number of edges: %lu\n", + timer->elapsed(timer), + (unsigned long)num_edges); + return H5_SUCCESS; +} + +static h5_err_t +traverse_triangles ( + h5t_mesh_t* const m, + int dumpit, + Timer* timer + ) { + printf ( " %-32s", "Traversing triangles: "); + + timer->start (timer); + /* get iterator for co-dim 1 entities, i.e. triangles */ + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 1); + + /* iterate */ + h5_loc_id_t local_id; + h5_size_t num_triangles = 0; + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + if (dumpit) { + printf ("\n"); + char v[256]; + char d[256]; + h5_loc_id_t local_vids[4]; + snprintf ( d, sizeof(d), "=%llx=", (long long)local_id ); + H5FedGetVertexIndicesOfEntity ( m, local_id, local_vids ); + snprintf ( v, sizeof(v), "=[%lld,%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1], + (long long)local_vids[2] ); + printf ( "| %-18s | %-18s |\n", d, v ); + } + num_triangles++; + } + + /* done */ + H5FedEndTraverseEntities (iter); + timer->stop(timer); + printf (" %fsec, number of triangles: %lu\n", + timer->elapsed(timer), + (unsigned long)num_triangles); + return H5_SUCCESS; +} + +static h5_err_t +traverse_boundary_triangles ( + h5t_mesh_t* const m, + int dumpit, + Timer* timer + ) { + printf ( " %-32s", "Traversing boundary triangles: "); + + timer->start(timer); + /* get iterator for co-dim 1 entities, i.e. triangles */ + h5t_iterator_t* iter = H5FedBeginTraverseBoundaryFaces (m, 1); + + /* iterate */ + h5_loc_id_t local_id; + h5_size_t num_triangles = 0; + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + if (dumpit) { + printf ("\n"); + char v[256]; + char d[256]; + h5_loc_id_t local_vids[4]; + snprintf ( d, sizeof(d), "=%llx=", (long long)local_id ); + H5FedGetVertexIndicesOfEntity ( m, local_id, local_vids ); + snprintf ( v, sizeof(v), "=[%lld,%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1], + (long long)local_vids[2] ); + printf ( "| %-18s | %-18s |\n", d, v ); + } + num_triangles++; + } + + /* done */ + H5FedEndTraverseEntities (iter); + timer->stop(timer); + printf (" %fsec, number of boundary triangles: %lu\n", + timer->elapsed(timer), + (unsigned long)num_triangles); + return H5_SUCCESS; +} + +static h5_err_t +traverse_elems ( + h5t_mesh_t* const m, + int dumpit, + Timer* timer + ) { + printf ( " %-32s", "Traversing elements: "); + timer->start(timer); + /* get number of elements we have to expect */ + h5_size_t num_elems_expect = H5FedGetNumElementsTotal (m); + + /* get iterator for co-dim 0 */ + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 0); + + /* iterate over all co-dim 0 entities, i.e. elements */ + h5_loc_id_t local_id; + h5_size_t num_elems = 0; + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + if (dumpit) { + printf ("\n"); + char v[256]; + char t[256]; + h5_loc_id_t local_vids[4]; + snprintf ( t, sizeof(t), "=%llx=", (long long)local_id ); + H5FedGetVertexIndicesOfEntity (m, local_id, local_vids); + snprintf ( v, sizeof(v), "=[%lld,%lld,%lld,%lld]=", + (long long)local_vids[0], (long long)local_vids[1], + (long long)local_vids[2], (long long)local_vids[3] ); + printf ( "| %-18s | %-18s |\n", t, v ); + } + num_elems++; + } + + /* done */ + H5FedEndTraverseEntities (iter); + timer->stop(timer); + /* report error if we got a different number then expected */ + if (num_elems != num_elems_expect) { + fprintf (stderr, "!!! Got %lld elements, but expected %lld.\n", + (long long)num_elems, (long long)num_elems_expect); + exit(1); + } + + printf (" %fsec, number of elements: %lld\n", + timer->elapsed(timer), + (long long)num_elems); + return H5_SUCCESS; +} + + +static h5_err_t +traverse_level ( + h5t_mesh_t* const m, + const h5t_lvl_idx_t level_id, + int dumpit, + Timer* timer + ) { + printf ("Setting level to %d\n", level_id); + H5FedSetLevel (m, level_id); + traverse_vertices (m, dumpit, timer); + traverse_edges (m, dumpit, timer); + traverse_triangles (m, dumpit, timer); + traverse_boundary_triangles (m, dumpit, timer); + traverse_elems (m, dumpit, timer); + return H5_SUCCESS; +} + +static h5_err_t +traverse_mesh ( + h5_file_t const f, + const h5_id_t mesh_id, + int dumpit + ) { + h5t_mesh_t* mesh; + Timer* timer = Timer_.new(); + + timer->start(timer); + /* open mesh and get number of levels */ + printf (" Opening mesh with id %lld\n", mesh_id); + H5FedOpenTetrahedralMeshByIndex (f, mesh_id, &mesh); + timer->stop(timer); + printf (" %fsec\n", timer->elapsed(timer)); + h5_size_t num_levels = H5FedGetNumLevels (mesh); + printf (" Number of levels in mesh: %lld\n", (long long)num_levels); + + /* loop over all levels */ + h5t_lvl_idx_t level_id; + for (level_id = 0; level_id < num_levels; level_id++) { + traverse_level (mesh, level_id, dumpit, timer); + } + /* done */ + H5FedCloseMesh (mesh); + timer->delete(timer); + return H5_SUCCESS; +} + +int +main ( + int argc, + char* argv[] + ) { + /* abort program on error, so we don't have to handle them */ + H5SetErrorHandler (H5AbortErrorhandler); + H5SetVerbosityLevel (2); + + /* open file and get number of meshes */ + h5_file_t f = H5OpenFile (FNAME, H5_O_RDONLY, 0); + h5_size_t num_meshes = H5FedGetNumTetrahedralMeshes (f); + printf (" Number of meshes: %lld\n", (long long)num_meshes); + + /* loop over all meshes */ + h5_id_t mesh_id; + int dumpit = 0; + for (mesh_id = 0; mesh_id < num_meshes; mesh_id++) { + traverse_mesh (f, mesh_id, dumpit); + } + + /* done */ + H5CloseFile (f); + return 0; +} diff --git a/examples/H5Fed/tetmesh_read_tags.c b/examples/H5Fed/tetmesh_read_tags.c new file mode 100644 index 0000000..a5dca7f --- /dev/null +++ b/examples/H5Fed/tetmesh_read_tags.c @@ -0,0 +1,400 @@ +#include +#include +#include + +#include "H5hut.h" + +const char* FNAME = "simple_tet.h5"; + +#ifndef PARALLEL_IO +#ifndef MPI_COMM_WORLD +#define MPI_COMM_WORLD 0 +#endif +#endif + +typedef struct timer { + clock_t _start; + clock_t _end; + struct timer* (*new)(void); + void (*delete)(struct timer*); + void (*start)(struct timer*); + void (*stop)(struct timer*); + double (*elapsed)(struct timer*); +} Timer; + +extern Timer Timer_; +static Timer* +new ( + void + ) { + Timer* self = malloc (sizeof (Timer)); + *self = Timer_; + return self; +} + +static void +delete (Timer* self) { + free (self); +} + +static void +start (Timer* self) { + self->_start = clock(); +} + +static void +stop (Timer* self) { + self->_end = clock(); +} + +static double +elapsed (Timer* self) { + return (double)(self->_end - self->_start)/CLOCKS_PER_SEC; +} + +Timer Timer_ = { + 0, + 0, + new, + delete, + start, + stop, + elapsed +}; + +struct vertex { + h5_float64_t P[3]; +}; + +typedef struct vertex vertex_t; + +struct tet { + h5_glb_id_t global_id; + h5_glb_id_t parent_id; + h5_glb_id_t vids[4]; +}; +typedef struct tet tet_t; + +static h5_err_t +traverse_vertices ( + h5t_mesh_t* const m, + h5t_tagset_t* tagset, + int dumpit, + Timer* timer + ) { + printf ( " %-32s", "Traversing vertices: "); + + /* get iterator for co-dim 3 entities, i.e vertices */ + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 3); + + /* iterate */ + h5_loc_id_t local_id; + h5_size_t num_entities = 0; + h5_size_t num_entities_tagged = 0; + timer->start(timer); + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + num_entities++; + if (dumpit) { + printf ("\n"); + h5_float64_t P[3]; + H5FedGetVertexCoordsByID (m, local_id, P); + char v[256]; + snprintf (v, sizeof(v), "=%llx=", (long long)local_id); + printf ("| %-18s | (%f, %f, %f) |", + v, P[0], P[1], P[2]); + } + + h5_size_t size = 3; + h5_int64_t tval[3]; + if ((local_id = H5FedGetTag (tagset, local_id, &size, tval)) < 0) { + continue; // not tagged + } + if (dumpit) { + printf (" (%llx, %llx, %llx) |", + tval[0], tval[1], tval[2]); + } + num_entities_tagged++; + if (tval[0] != local_id || + tval[1] != local_id+1 || + tval[2] != local_id+2) { + fprintf (stderr, + "!!! Wrong tag values for entity %lld\n", + (long long)local_id); + exit (1); + } + } + /* done */ + H5FedEndTraverseEntities (iter); + timer->stop(timer); + + if (dumpit) { + printf ("\n\nTime elapsed:"); + } + printf (" %fsec, total number of entities: %lu; tagged: %lu\n", + timer->elapsed(timer), + (unsigned long)num_entities, (unsigned long)num_entities_tagged); + return H5_SUCCESS; +} + +static h5_err_t +traverse_edges ( + h5t_mesh_t* const m, + h5t_tagset_t* tagset, + int dumpit, + Timer* timer + ) { + printf ( " %-32s", "Traversing edges: "); + timer->start(timer); + + /* get iterator for co-dim 2 entities, i.e. edges */ + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 2); + + /* iterate */ + h5_loc_id_t local_id; + h5_size_t num_entities = 0; + h5_size_t num_entities_tagged = 0; + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + num_entities++; + if (dumpit) { + printf ("\n"); + char v[256]; + char k[256]; + h5_loc_id_t local_vids[4]; + snprintf ( k, sizeof(k), "=%llx=", (long long)local_id ); + H5FedGetVertexIndicesOfEntity ( m, local_id, local_vids ); + snprintf ( v, sizeof(v), "=[%lld,%lld]=", + (long long)local_vids[0], (long long)local_vids[1] ); + printf ( "| %-18s | %-18s |", k, v ); + } + h5_size_t size = 3; + h5_int64_t tval[3]; + if ((local_id = H5FedGetTag (tagset, local_id, &size, tval)) < 0) + continue; // not tagged + if (dumpit) { + printf (" (%llx, %llx, %llx) |", + tval[0], tval[1], tval[2]); + } + num_entities_tagged++; + + if (tval[0] != local_id || + tval[1] != local_id+1 || + tval[2] != local_id+2) { + fprintf (stderr, + "!!! Wrong tag values for entity %lld\n", + (long long)local_id); + exit (1); + } + } + + /* done */ + H5FedEndTraverseEntities (iter); + timer->stop(timer); + + if (dumpit) { + printf ("\n\nTime elapsed:"); + } + printf (" %fsec, total number of entities: %lu; tagged: %lu\n", + timer->elapsed(timer), + (unsigned long)num_entities, (unsigned long)num_entities_tagged); + return H5_SUCCESS; +} + +static h5_err_t +traverse_triangles ( + h5t_mesh_t* const m, + h5t_tagset_t* tagset, + int dumpit, + Timer* timer + ) { + printf ( " %-32s", "Traversing triangles: "); + timer->start(timer); + /* get iterator for co-dim 1 entities, i.e. triangles */ + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 1); + + /* iterate */ + h5_loc_id_t local_id; + h5_size_t num_entities = 0; + h5_size_t num_entities_tagged = 0; + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + num_entities++; + if (dumpit) { + printf ("\n"); + char v[256]; + char k[256]; + h5_loc_id_t local_vids[4]; + snprintf ( k, sizeof(k), "=%llx=", (long long)local_id ); + H5FedGetVertexIndicesOfEntity ( m, local_id, local_vids ); + snprintf ( v, sizeof(v), "=[%lld,%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1], + (long long)local_vids[2] ); + printf ( "| %-18s | %-18s |", k, v ); + } + h5_size_t size = 3; + h5_int64_t tval[3]; + if ((local_id = H5FedGetTag (tagset, local_id, &size, tval)) < 0) + continue; // not tagged + if (dumpit) { + printf (" (%llx, %llx, %llx) |", + tval[0], tval[1], tval[2]); + } + num_entities_tagged++; + + if (tval[0] != local_id || tval[1] != local_id+1 || tval[2] != local_id+2) { + fprintf (stderr, + "!!! Wrong tag values for entity %lld\n", + (long long)local_id); + exit (1); + } + } + + /* done */ + H5FedEndTraverseEntities (iter); + timer->stop(timer); + + if (dumpit) { + printf ("\n\nTime elapsed:"); + } + printf (" %fsec, total number of entities: %lu; tagged: %lu\n", + timer->elapsed(timer), + (unsigned long)num_entities, (unsigned long)num_entities_tagged); + return H5_SUCCESS; +} + +static h5_err_t +traverse_tets ( + h5t_mesh_t* const m, + h5t_tagset_t* tagset, + int dumpit, + Timer* timer + ) { + printf ( " %-32s", "Traversing tetrahedra: "); + timer->start(timer); + /* get iterator for co-dim 0 entities, i.e. tetrahedra */ + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 0); + /* iterate */ + h5_loc_id_t local_id; + h5_size_t num_entities = 0; + h5_size_t num_entities_tagged = 0; + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + num_entities++; + if (dumpit) { + printf ("\n"); + char v[256]; + char k[256]; + h5_loc_id_t local_vids[4]; + snprintf ( k, sizeof(k), "=%llx=", (long long)local_id ); + H5FedGetVertexIndicesOfEntity ( m, local_id, local_vids ); + snprintf ( v, sizeof(v), "=[%lld,%lld,%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1], + (long long)local_vids[2], + (long long)local_vids[3] ); + printf ( "| %-18s | %-18s |", k, v ); + } + h5_size_t size = 3; + h5_int64_t tval[3]; + if ((local_id = H5FedGetTag (tagset, local_id, &size, tval)) < 0) + continue; // not tagged + if (dumpit) { + printf (" (%llx, %llx, %llx) |", + tval[0], tval[1], tval[2]); + } + num_entities_tagged++; + + if (tval[0] != local_id || tval[1] != local_id+1 || tval[2] != local_id+2) { + fprintf (stderr, + "!!! Wrong tag values for entity %lld\n", + (long long)local_id); + exit (1); + } + } + + /* done */ + H5FedEndTraverseEntities (iter); + timer->stop(timer); + + if (dumpit) { + printf ("\n\nTime elapsed:"); + } + printf (" %fsec, total number of entities: %lu; tagged: %lu\n", + timer->elapsed(timer), + (unsigned long)num_entities, (unsigned long)num_entities_tagged); + return H5_SUCCESS; +} + +static h5_err_t +traverse_level ( + h5t_mesh_t* const m, + h5t_tagset_t* tagset, + const h5t_lvl_idx_t level_id, + int dumpit, + Timer* timer + ) { + printf ("Setting level to %d\n", level_id); + H5FedSetLevel (m, level_id); + traverse_vertices (m, tagset, dumpit, timer); + traverse_edges (m, tagset, dumpit, timer); + traverse_triangles (m, tagset, dumpit, timer); + traverse_tets (m, tagset, dumpit, timer); + return H5_SUCCESS; +} + +static h5_err_t +traverse_mesh ( + const h5_file_t f, + const h5_id_t mesh_id, + int dumpit + ) { + h5t_mesh_t* mesh; + Timer* timer = Timer_.new(); + timer->start(timer); + /* open mesh and get number of levels */ + printf (" Opening mesh with id %lld\n", mesh_id); + H5FedOpenTetrahedralMeshByIndex (f, mesh_id, &mesh); + timer->stop(timer); + printf (" %fsec\n", timer->elapsed(timer)); + + h5t_tagset_t* tagset; + H5FedOpenMTagset (mesh, "testtag", &tagset); + + h5_size_t num_levels = H5FedGetNumLevels (mesh); + printf (" Number of levels in mesh: %lld\n", (long long)num_levels); + + /* loop over all levels */ + h5t_lvl_idx_t level_id; + for (level_id = 0; level_id < num_levels; level_id++) { + traverse_level (mesh, tagset, level_id, dumpit, timer); + } + /* done */ + H5FedCloseMTagset (tagset); + H5FedCloseMesh (mesh); + timer->delete(timer); + return H5_SUCCESS; +} + +int +main ( + int argc, + char* argv[] + ) { + /* abort program on error, so we don't have to handle them */ + H5SetErrorHandler (H5AbortErrorhandler); + H5SetVerbosityLevel (2); + + /* open file and get number of meshes */ + h5_file_t f = H5OpenFile (FNAME, H5_O_RDONLY, 0); + h5_size_t num_meshes = H5FedGetNumTetrahedralMeshes (f); + printf (" Number of meshes: %lld\n", (long long)num_meshes); + + /* loop over all meshes */ + h5_id_t mesh_id; + int dumpit = 1; + for (mesh_id = 0; mesh_id < num_meshes; mesh_id++) { + traverse_mesh (f, mesh_id, dumpit); + } + + /* done */ + H5CloseFile (f); + return 0; +} diff --git a/examples/H5Fed/tetmesh_write.c b/examples/H5Fed/tetmesh_write.c new file mode 100644 index 0000000..e009745 --- /dev/null +++ b/examples/H5Fed/tetmesh_write.c @@ -0,0 +1,83 @@ +#include +#include +#include + +#include "H5hut.h" + +#ifndef PARALLEL_IO +#ifndef MPI_COMM_WORLD +#define MPI_COMM_WORLD 0 +#endif +#endif + +const char* FNAME = "simple_tet.h5"; + +typedef struct vertex { + h5_float64_t P[3]; +} vertex_t; + +typedef struct elem { + h5_loc_idx_t vids[4]; +} elem_t; + +vertex_t Vertices[] = { + {{-1.0, 0.0, 0.0}}, + {{ 1.0, 0.0, 0.0}}, + {{ 0.0, 1.0, 0.0}}, + {{ 0.0, 0.0, 1.0}}, + {{ 0.0, -1.0, 0.0}} +}; + +elem_t Elems[] = { + {{ 0, 1, 2, 3 }}, // 0, 3, 2, 1 + {{ 0, 1, 3, 4 }} // 0, 4, 3, 1 +}; + +const int num_vertices = sizeof (Vertices) / sizeof (Vertices[0]); +const int num_elems = sizeof (Elems) / sizeof (Elems[0]); + +int +main ( + int argc, + char* argv[] + ) { + /* abort program on errors in library */ + H5SetErrorHandler (H5AbortErrorhandler); + H5SetVerbosityLevel (5); + + /* open file and add mesh */ + h5_file_t const f = H5OpenFile (FNAME, H5_O_WRONLY, 0); + h5t_mesh_t* mesh; + H5FedAddTetrahedralMesh (f, "0", &mesh); + + /* store vertices */ + H5FedBeginStoreVertices (mesh, num_vertices); + int i; + for (i = 0; i < num_vertices; i++) { + H5FedStoreVertex (mesh, -1, Vertices[i].P); + } + H5FedEndStoreVertices (mesh); + + /* store elements */ + H5FedBeginStoreElements (mesh, num_elems); + for (i = 0; i < num_elems; i++) { + H5FedStoreElement (mesh, Elems[i].vids); + } + H5FedEndStoreElements (mesh); + + /* add 1. Level */ + H5FedAddLevel(mesh); + H5FedBeginRefineElements (mesh); + H5FedRefineElement (mesh, 0); + H5FedEndRefineElements (mesh); + + /* add 2. Level */ + H5FedAddLevel(mesh); + H5FedBeginRefineElements (mesh); + H5FedRefineElement (mesh, 2); + H5FedEndRefineElements (mesh); + + H5FedCloseMesh (mesh); + H5CloseFile (f); + return 0; +} diff --git a/examples/H5Fed/tetmesh_write1.c b/examples/H5Fed/tetmesh_write1.c new file mode 100644 index 0000000..62ac1d2 --- /dev/null +++ b/examples/H5Fed/tetmesh_write1.c @@ -0,0 +1,75 @@ +#include +#include +#include + +#include "H5hut.h" + +#ifndef PARALLEL_IO +#ifndef MPI_COMM_WORLD +#define MPI_COMM_WORLD 0 +#endif +#endif + +const char* FNAME = "simple_tet1.h5"; + +typedef struct vertex { + h5_float64_t P[3]; +} vertex_t; + +typedef struct elem { + h5_loc_idx_t vids[4]; +} elem_t; + +vertex_t Vertices[] = { + {{-1.0, 0.0, 0.0}}, + {{ 0.0, 0.0, 1.0}}, + {{ 0.0, 1.0, 0.0}}, + {{ 1.0, 0.0, 0.0}}, +}; + +elem_t Elems[] = { + {{ 0, 1, 2, 3 }}, +}; + +const int num_vertices = sizeof (Vertices) / sizeof (Vertices[0]); +const int num_elems = sizeof (Elems) / sizeof (Elems[0]); + +int +main ( + int argc, + char* argv[] + ) { + /* abort program on errors in library */ + H5SetErrorHandler (H5AbortErrorhandler); + H5SetVerbosityLevel (H5_DEBUG_ALL); + + /* open file and add mesh */ + h5_file_t const f = H5OpenFile (FNAME, H5_O_WRONLY, 0); + h5t_mesh_t* mesh; + H5FedAddTetrahedralMesh (f, "0", &mesh); + + /* store vertices */ + H5FedBeginStoreVertices (mesh, num_vertices); + int i; + for (i = 0; i < num_vertices; i++) { + H5FedStoreVertex (mesh, -1, Vertices[i].P); + } + H5FedEndStoreVertices (mesh); + + /* store elements */ + H5FedBeginStoreElements (mesh, num_elems); + for (i = 0; i < num_elems; i++) { + H5FedStoreElement (mesh, Elems[i].vids); + } + H5FedEndStoreElements (mesh); + + /* add 1. Level */ + H5FedAddLevel(mesh); + H5FedBeginRefineElements (mesh); + H5FedRefineElement (mesh, 0); + H5FedEndRefineElements (mesh); + + H5FedCloseMesh (mesh); + H5CloseFile (f); + return 0; +} diff --git a/examples/H5Fed/tetmesh_write2.c b/examples/H5Fed/tetmesh_write2.c new file mode 100644 index 0000000..2b3c066 --- /dev/null +++ b/examples/H5Fed/tetmesh_write2.c @@ -0,0 +1,109 @@ +#include +#include +#include + +#include "H5hut.h" + +const char* FNAME = "large_tet.h5"; +const h5_int32_t num_levels = 11; + + +typedef struct vertex { + h5_float64_t P[3]; +} vertex_t; + +typedef struct elem { + h5_loc_idx_t vids[4]; +} elem_t; + +vertex_t Vertices[] = { + {{-1.0, 0.0, 0.0}}, + {{ 1.0, 0.0, 0.0}}, + {{ 0.0, 1.0, 0.0}}, + {{ 0.0, 0.0, 1.0}} +}; + +elem_t Elems[] = { + {{ 0, 1, 2, 3 }} +}; + +const int num_vertices = sizeof (Vertices) / sizeof (Vertices[0]); +const int num_elems = sizeof (Elems) / sizeof (Elems[0]); + +static h5_int32_t +power ( + const h5_int32_t x, + const h5_int32_t y + ) { + h5_int32_t p = 1; + h5_int32_t b = y; + // bits in b correspond to values of powerN + // so start with p=1, and for each set bit in b, + // multiply corresponding table entry + h5_int32_t powerN = x; + + while (b != 0) { + if ((b&1) != 0) p *= powerN; + b >>= 1; + powerN = powerN * powerN; + } + return p; +} + +int +main ( + int argc, + char* argv[] + ) { + /* abort program on errors in library */ + H5SetErrorHandler (H5AbortErrorhandler); + H5SetVerbosityLevel (2); + // H5SetVerbosityLevel (H5_DEBUG_ALL); + + /* open file and add mesh */ + h5_file_t const f = H5OpenFile (FNAME, H5_O_WRONLY, 0); + h5t_mesh_t* mesh; + H5FedAddTetrahedralMesh (f, "0", &mesh); + + /* store vertices */ + H5FedBeginStoreVertices (mesh, num_vertices); + int i; + for (i = 0; i < num_vertices; i++) { + H5FedStoreVertex (mesh, -1, Vertices[i].P); + } + H5FedEndStoreVertices (mesh); + + /* store elements */ + H5FedBeginStoreElements (mesh, num_elems); + for (i = 0; i < num_elems; i++) { + H5FedStoreElement (mesh, Elems[i].vids); + } + H5FedEndStoreElements (mesh); + + /* add 1. Level */ + H5FedAddLevel(mesh); + H5FedBeginRefineElements (mesh); + H5FedRefineElement (mesh, 0); + H5FedEndRefineElements (mesh); + + /* add levels 2 to num_levels-1 */ + h5_int32_t num_elems_last_level = 1; + h5_int32_t level_id; + for (level_id = 2; level_id < num_levels; level_id++) { + + /* refine 4 to the power of level_id-1 elems */ + H5FedAddLevel(mesh); + h5_int32_t num_elems2refine = power (4, level_id-1); + H5FedBeginRefineElements (mesh); + for (i = num_elems_last_level; + i < num_elems_last_level+num_elems2refine; + i++) { + H5FedRefineElement (mesh, i); + } + H5FedEndRefineElements (mesh); + num_elems_last_level += 2 * num_elems2refine; + } + H5FedCloseMesh (mesh); + H5CloseFile (f); + return 0; +} diff --git a/examples/H5Fed/tetmesh_write_tags.c b/examples/H5Fed/tetmesh_write_tags.c new file mode 100644 index 0000000..56ebed0 --- /dev/null +++ b/examples/H5Fed/tetmesh_write_tags.c @@ -0,0 +1,230 @@ +#include +#include +#include +#include + +#include "H5hut.h" + +const h5_oid_t MESH_TYPE = H5_TETRAHEDRAL_MESH; +const char* FNAME = "simple_tet.h5"; + +typedef struct timer { + clock_t _start; + clock_t _end; + struct timer* (*new)(void); + void (*delete)(struct timer*); + void (*start)(struct timer*); + void (*stop)(struct timer*); + double (*elapsed)(struct timer*); +} Timer; + +extern Timer Timer_; +static Timer* +new ( + void + ) { + Timer* this = malloc (sizeof (Timer)); + *this = Timer_; + return this; +} + +static void +delete (Timer* this) { + free (this); +} + +static void +start (Timer* this) { + this->_start = clock(); +} + +static void +stop (Timer* this) { + this->_end = clock(); +} + +static double +elapsed (Timer* this) { + return (double)(this->_end - this->_start)/CLOCKS_PER_SEC; +} + +Timer Timer_ = { + 0, + 0, + new, + delete, + start, + stop, + elapsed +}; + +static h5_err_t +set_vertex_tags ( + h5t_mesh_t* m, + h5t_tagset_t* const tagset, + int verify, + Timer* timer + ) { + h5_loc_id_t local_id; + h5_int64_t val[3]; + h5_info ("Tagging all vertices ..."); + timer->start(timer); + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 3); + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + val[0] = local_id; + val[1] = local_id+1; + val[2] = local_id+2; + H5FedSetTag (tagset, local_id, 3, val); + if (verify) { + h5_int64_t retval[3]; + h5_size_t dim = 3; + H5FedGetTag (tagset, local_id, &dim, retval); + if (memcmp (val, retval, sizeof(val))) { + h5_warn ("Oops on entity %llx!", (long long)local_id); + } + } + h5_debug ("Tagging %llx", (long long)local_id); + } + timer->stop(timer); + h5_info (" Time to tag to all vertices: %fsec", timer->elapsed(timer)); + return H5FedEndTraverseEntities (iter); +} + +static h5_err_t +set_edge_tags ( + h5t_mesh_t* const m, + h5t_tagset_t* tagset, + int dumpit, + Timer* timer + ) { + h5_loc_id_t local_id; + h5_int64_t val[3]; + h5_info ("Tagging all edges ..."); + timer->start(timer); + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 2); + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + val[0] = local_id; + val[1] = local_id+1; + val[2] = local_id+2; + H5FedSetTag (tagset, local_id, 3, val); + h5_int64_t retval[3]; + h5_size_t dims; + H5FedGetTag (tagset, local_id, &dims, retval); + if (memcmp ( val, retval, sizeof(val))) { + h5_warn ("Oops on entity %llx!", (long long)local_id); + } + } + timer->stop(timer); + h5_info (" Time to tag all edges: %fsec", timer->elapsed(timer)); + return H5FedEndTraverseEntities (iter); +} + +static h5_err_t +set_tri_tags ( + h5t_mesh_t* const m, + h5t_tagset_t* tagset, + int dumpit, + Timer* timer + ) { + h5_loc_id_t local_id; + h5_int64_t val[3]; + h5_info ("Tagging all triangles ..."); + timer->start(timer); + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 1); + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + val[0] = local_id; + val[1] = local_id+1; + val[2] = local_id+2; + H5FedSetTag (tagset, local_id, 3, val); + h5_int64_t retval[3]; + h5_size_t dims; + H5FedGetTag (tagset, local_id, &dims, retval); + if (memcmp (val, retval, sizeof(val))) { + h5_warn ("Oops on entity %llx!", (long long)local_id); + } + } + timer->stop(timer); + h5_info (" Time to tag all triangles: %fsec", timer->elapsed(timer)); + return H5FedEndTraverseEntities (iter); +} + +static h5_err_t +set_tet_tags ( + h5t_mesh_t* const m, + h5t_tagset_t* tagset, + int dumpit, + Timer* timer + ) { + h5_loc_id_t local_id; + h5_int64_t val[3]; + h5_info ("Tagging all tetrahedra ..."); + timer->start(timer); + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 0); + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + val[0] = local_id; + val[1] = local_id+1; + val[2] = local_id+2; + H5FedSetTag (tagset, local_id, 3, val); + h5_int64_t retval[3]; + h5_size_t dims; + H5FedGetTag (tagset, local_id, &dims, retval); + if (memcmp (val, retval, sizeof(val))) { + h5_warn ("Oops on entity %llx!", (long long)local_id); + } + } + timer->stop(timer); + h5_info (" Time to tag to all tetrahedra: %fsec", timer->elapsed(timer)); + return H5FedEndTraverseEntities (iter); +} + +int +main ( + int argc, + char* argv[] + ) { + int verify = 1; + /* abort program on error, so we don't have to handle them */ + H5SetErrorHandler (H5AbortErrorhandler); + H5SetVerbosityLevel (3); + + /* open file and get number of meshes */ + h5_file_t f = H5OpenFile (FNAME, H5_O_RDWR, 0); + h5t_mesh_t* mesh; + Timer* timer = Timer_.new(); + timer->start(timer); + H5FedOpenTetrahedralMesh (f, "0", &mesh); + timer->stop(timer); + h5_info (" Time to open mesh %fsec", timer->elapsed(timer)); + + /* open last level */ + h5_size_t num_levels = H5FedGetNumLevels (mesh); + //H5FedSetLevel (mesh, num_levels-1); + H5FedSetLevel (mesh, 0); + + /* add new tagset and write some data to it */ + h5t_tagset_t* tagset = NULL; + H5FedAddMTagset (mesh, "testtag", H5_INT64_T, &tagset); + set_vertex_tags (mesh, tagset, verify, timer); + set_edge_tags (mesh, tagset, verify, timer); + set_tri_tags (mesh, tagset, verify, timer); + set_tet_tags (mesh, tagset, verify, timer); + + // close tagset + timer->start(timer); + H5FedCloseMTagset (tagset); + timer->stop(timer); + h5_info (" Time to write tagset to disk %fsec", timer->elapsed(timer)); + + // close mesh + timer->start(timer); + H5FedCloseMesh (mesh); + timer->stop(timer); + h5_info (" Time to close mesh %fsec", timer->elapsed(timer)); + + // close file + timer->start(timer); + H5CloseFile (f); + timer->stop(timer); + h5_info (" Time to close file %fsec", timer->elapsed(timer)); + return 0; +} diff --git a/examples/H5Fed/trimesh_2gnuplot.c b/examples/H5Fed/trimesh_2gnuplot.c new file mode 100644 index 0000000..37ae6ec --- /dev/null +++ b/examples/H5Fed/trimesh_2gnuplot.c @@ -0,0 +1,101 @@ +#include +#include + +#include "H5hut.h" +#if defined (PARALLEL_IO) +#include +#endif + +#define H5FedGetNumLeafElementsTotal H5FedGetNumElementsTotal +/* + Traverse elements and output coordinates + */ +static h5_err_t +traverse_elems ( + h5t_mesh_t* const m + ) { + /* get number of elements we have to expect */ + h5_size_t num_elems_expect = H5FedGetNumLeafElementsTotal (m); + + /* get iterator for co-dim 0 */ + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 0); + + /* iterate over all co-dim 0 entities, i.e. elements */ + h5_loc_id_t local_id; + h5_size_t num_elems = 0; + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + h5_loc_id_t local_vids[4]; + H5FedGetVertexIndicesOfEntity (m, local_id, local_vids); + + printf ("# cell %llx\n", (long long unsigned)local_id ); + h5_float64_t P[3]; + for (int i = 0; i < 3; i++) { + H5FedGetVertexCoordsByIndex (m, local_vids[i], P); + printf (" %8.6f %8.6f\n", P[0], P[1]); + } + H5FedGetVertexCoordsByIndex (m, local_vids[0], P); + printf (" %8.6f %8.6f\n", P[0], P[1]); + printf ("\n"); + num_elems++; + } + + /* done */ + H5FedEndTraverseEntities (iter); + + /* report error if we got a different number then expected */ + if (num_elems != num_elems_expect) { + fprintf (stderr, "!!! Got %lld elements, but expected %lld.\n", + (long long)num_elems, (long long)num_elems_expect); + exit(1); + } + return H5_SUCCESS; +} + +int +main ( + int argc, + char* argv[] + ) { + +#if defined (PARALLEL_IO) + MPI_Comm comm = MPI_COMM_WORLD; + MPI_Init (&argc, &argv); +#else + MPI_Comm comm = 0; +#endif + if (argc < 2 || argc > 3) { + fprintf (stderr, "Usage: %s FILE [LEVEL]\n", argv[0]); + exit (42); + } + + /* abort program on error, so we don't have to handle them */ + H5SetErrorHandler (H5AbortErrorhandler); + H5SetVerbosityLevel (0); + + /* open file and get number of meshes */ + h5_file_t f = H5OpenFile (argv[1], H5_O_RDONLY, comm); + h5t_mesh_t* m; + H5FedOpenTriangleMeshByIndex (f, 0, &m); + int num_levels = H5FedGetNumLevels (m); + int level = num_levels-1; + if (argc >= 3) { + level = atoi (argv[2]); + } + if (level >= num_levels || level < 0) { + fprintf (stderr, "level %d out of range\n", level); + goto done; + } + H5FedSetLevel (m, level); + traverse_elems (m); + + +done: + H5FedCloseMesh (m); + H5CloseFile (f); + +#if defined (PARALLEL_IO) + MPI_Finalize (); +#endif + + return 0; +} diff --git a/examples/H5Fed/trimesh_adjacencies.c b/examples/H5Fed/trimesh_adjacencies.c new file mode 100644 index 0000000..e44146b --- /dev/null +++ b/examples/H5Fed/trimesh_adjacencies.c @@ -0,0 +1,326 @@ +#include +#include +#include + +#include "H5hut.h" + +#define PRINT_UPADJACENCIES 1 +#define PRINT_DOWNADJACENCIES 0 + +const h5_oid_t MESH_TYPE = H5_TRIANGLE_MESH; +const char* FNAME = "simple_triangle.h5"; + +static h5_err_t +print_adjacencies_of_vertex ( + h5t_mesh_t* const m, + h5_loc_id_t local_id, + clock_t* time_used + ) { + h5_loc_idlist_t* uadj_edges; + h5_loc_idlist_t* uadj_triangles; + clock_t time_used_before = clock(); + H5FedGetAdjacencies (m, local_id, 1, &uadj_edges); + H5FedGetAdjacencies (m, local_id, 2, &uadj_triangles); + *time_used = clock() - time_used_before; + int n = 0; + if (uadj_triangles->num_items > n) n = uadj_triangles->num_items; + if (uadj_edges->num_items > n) n = uadj_edges->num_items; + int i; + for (i = 0; i < n; i++) { + char v[256]; + char k[256]; + char d[256]; + h5_loc_id_t local_vids[4]; + if (i == 0) { + H5FedGetVertexIndicesOfEntity ( + m, local_id, local_vids); + snprintf (v, sizeof(v), "=[%lld]=", + (long long)local_vids[0]); + } else { + *v = '\0'; + } + if (i < uadj_edges->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, uadj_edges->items[i], local_vids); + snprintf (k, sizeof(k), "=[%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1]); + } else { + *k = '\0'; + } + if (i < uadj_triangles->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, uadj_triangles->items[i], local_vids); + snprintf (d, sizeof(d), "=[%lld,%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1], + (long long)local_vids[2]); + } else { + *d = '\0'; + } + printf ("| %-18s | %-18s | %-18s |\n", v, k, d); + } + H5FedReleaseListOfAdjacencies (m, &uadj_edges); + H5FedReleaseListOfAdjacencies (m, &uadj_triangles); + return H5_SUCCESS; +} + +static h5_err_t +print_adjacencies_of_edge ( + h5t_mesh_t* const m, + h5_loc_id_t local_id, + clock_t* time_used + ) { + h5_loc_idlist_t* dadj_vertices; + h5_loc_idlist_t* uadj_triangles; + clock_t time_used_before = clock(); + H5FedGetAdjacencies (m, local_id, 0, &dadj_vertices); + H5FedGetAdjacencies (m, local_id, 2, &uadj_triangles); + *time_used = clock() - time_used_before; + int n = dadj_vertices->num_items; + if (uadj_triangles->num_items > n) n = uadj_triangles->num_items; + + int i; + for (i = 0; i < n; i++) { + char v[256]; + char k[256]; + char d[256]; + h5_loc_id_t local_vids[4]; + if (i < dadj_vertices->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, dadj_vertices->items[i], local_vids); + snprintf (v, sizeof(v), "=[%lld]=", + (long long)local_vids[0]); + } else { + *v = '\0'; + } + if (i == 0) { + H5FedGetVertexIndicesOfEntity ( + m, local_id, local_vids); + snprintf (k, sizeof(k), "=[%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1]); + } else { + *k = '\0'; + } + if (i < uadj_triangles->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, uadj_triangles->items[i], local_vids); + snprintf (d, sizeof(d), "=[%lld,%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1], + (long long)local_vids[2]); + } else { + *d = '\0'; + } + printf ("| %-18s | %-18s | %-18s |\n", v, k, d); + } + H5FedReleaseListOfAdjacencies (m, &dadj_vertices); + H5FedReleaseListOfAdjacencies (m, &uadj_triangles); + return H5_SUCCESS; +} + +static h5_err_t +print_adjacencies_of_elem ( + h5t_mesh_t* const m, + h5_loc_id_t local_id, + clock_t* time_used + ) { + h5_loc_idlist_t* dadj_vertices; + h5_loc_idlist_t* dadj_edges; + clock_t time_used_before = clock(); + H5FedGetAdjacencies (m, local_id, 0, &dadj_vertices); + H5FedGetAdjacencies (m, local_id, 1, &dadj_edges); + *time_used = clock() - time_used_before; + int n = dadj_vertices->num_items; + if (dadj_edges->num_items > n) n = dadj_edges->num_items; + int i; + for (i = 0; i < n; i++) { + char v[256]; + char k[256]; + char d[256]; + h5_loc_id_t local_vids[4]; + if (i < dadj_vertices->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, dadj_vertices->items[i], local_vids); + snprintf (v, sizeof(v), "=[%lld]=", + (long long)local_vids[0]); + } else { + *v = '\0'; + } + if (i < dadj_edges->num_items) { + H5FedGetVertexIndicesOfEntity ( + m, dadj_edges->items[i], local_vids); + snprintf (k, sizeof(k), "=[%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1]); + } else { + *k = '\0'; + } + if (i == 0) { + H5FedGetVertexIndicesOfEntity ( + m, local_id, local_vids); + snprintf (d, sizeof(k), "=[%lld,%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1], + (long long)local_vids[2]); + } else { + *d = '\0'; + } + printf ( "| %-18s | %-18s | %-18s |\n", v, k, d ); + } + H5FedReleaseListOfAdjacencies (m, &dadj_vertices); + H5FedReleaseListOfAdjacencies (m, &dadj_edges); + return H5_SUCCESS; +} + +static h5_err_t +traverse_vertices ( + h5t_mesh_t* const m + ) { + h5_loc_id_t local_id; + h5_loc_idx_t num = 0; + clock_t t_total = 0; + clock_t t_min = CLOCKS_PER_SEC; + clock_t t_max = 0; + clock_t t = 0; + printf ("\nAdjacencies to vertices\n"); + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 2); + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + print_adjacencies_of_vertex (m, local_id, &t); + num++; + t_total += t; + if (t < t_min) t_min = t; + if (t > t_max) t_max = t; + } + fprintf ( + stderr, + "%lld\ttotal: %f\tmin: %f\tavg: %f\tmax: %f\n", + (long long)num, + (double)t_total / (double)CLOCKS_PER_SEC, + (double)t_min / (double)CLOCKS_PER_SEC, + (double)t_total / (double)CLOCKS_PER_SEC / (double)num, + (double)t_max / (double)CLOCKS_PER_SEC ); + return H5FedEndTraverseEntities (iter); +} + +static h5_err_t +traverse_edges ( + h5t_mesh_t* const m + ) { + h5_loc_id_t local_id; + h5_loc_idx_t num = 0; + clock_t t_total = 0; + clock_t t_min = CLOCKS_PER_SEC; + clock_t t_max = 0; + clock_t t = 0; + printf ("\nAdjacencies to edges\n"); + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 1); + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + print_adjacencies_of_edge (m, local_id, &t); + num++; + t_total += t; + if (t < t_min) t_min = t; + if (t > t_max) t_max = t; + } + fprintf ( + stderr, + "%lld\ttotal: %f\tmin: %f\tavg: %f\tmax: %f\n", + (long long)num, + (double)t_total / (double)CLOCKS_PER_SEC, + (double)t_min / (double)CLOCKS_PER_SEC, + (double)t_total / (double)CLOCKS_PER_SEC / (double)num, + (double)t_max / (double)CLOCKS_PER_SEC ); + return H5FedEndTraverseEntities (iter); +} + +static h5_err_t +traverse_elems ( + h5t_mesh_t* const m + ) { + h5_loc_id_t local_id; + h5_loc_idx_t num = 0; + clock_t t_total = 0; + clock_t t_min = CLOCKS_PER_SEC; + clock_t t_max = 0; + clock_t t = 0; + printf ("\nAdjacencies to tetrahedra\n"); + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 0); + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + print_adjacencies_of_elem (m, local_id, &t); + num++; + t_total += t; + if (t < t_min) t_min = t; + if (t > t_max) t_max = t; + } + fprintf ( + stderr, + "%lld\ttotal: %f\tmin: %f\tavg: %f\tmax: %f\n", + (long long)num, + (double)t_total / (double)CLOCKS_PER_SEC, + (double)t_min / (double)CLOCKS_PER_SEC, + (double)t_total / (double)CLOCKS_PER_SEC / (double)num, + (double)t_max / (double)CLOCKS_PER_SEC); + return H5FedEndTraverseEntities (iter); +} + +static h5_err_t +traverse_level ( + h5t_mesh_t* const m, + const h5t_lvl_idx_t level_id + ) { + printf (" Setting level to %d\n", level_id); + H5FedSetLevel (m, level_id); + traverse_vertices (m); + traverse_edges (m); + traverse_elems (m); + return H5_SUCCESS; +} + +static h5_err_t +traverse_mesh ( + const h5_file_t f, + const h5_id_t mesh_id + ) { + h5t_mesh_t* m; + /* open mesh and get number of levels */ + printf (" Opening mesh with id %lld\n", mesh_id); + H5FedOpenTriangleMeshByIndex (f, mesh_id, &m); + h5_size_t num_levels = H5FedGetNumLevels (m); + printf (" Number of levels in mesh: %lld\n", (long long)num_levels); + + /* loop over all levels */ + h5t_lvl_idx_t level_id; + for (level_id = 0; level_id < num_levels; level_id++) { + traverse_level (m, level_id); + } + /* done */ + H5FedCloseMesh (m); + return H5_SUCCESS; +} + +int +main ( + int argc, + char* argv[] + ) { + + /* abort program on error, so we don't have to handle them */ + H5SetErrorHandler (H5AbortErrorhandler); + H5SetVerbosityLevel (2); + + /* open file and get number of meshes */ + h5_file_t f = H5OpenFile (FNAME, H5_O_RDONLY, 0); + h5_size_t num_meshes = H5FedGetNumTriangleMeshes (f); + printf (" Number of meshes: %lld\n", (long long)num_meshes); + + /* loop over all meshes */ + h5_id_t mesh_id; + for (mesh_id = 0; mesh_id < num_meshes; mesh_id++) { + traverse_mesh (f, mesh_id); + } + + /* done */ + H5CloseFile (f); + return 0; +} diff --git a/examples/H5Fed/trimesh_read.c b/examples/H5Fed/trimesh_read.c new file mode 100644 index 0000000..f2899fe --- /dev/null +++ b/examples/H5Fed/trimesh_read.c @@ -0,0 +1,268 @@ +#include +#include + +#include "H5hut.h" +#if defined (PARALLEL_IO) +#include +#endif + +const char* FNAME = "simple_triangle.h5"; + +static h5_err_t +traverse_vertices ( + h5t_mesh_t* const m + ) { + /* get number of vertices we have to expect */ + h5_size_t num_vertices_expect = H5FedGetNumVerticesTotal (m); + + /* get iterator for co-dim 2 entities, i.e. vertices */ + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 2); + + /* iterate */ + h5_loc_id_t local_id; + h5_size_t num_vertices = 0; + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + h5_float64_t P[3]; + H5FedGetVertexCoordsByID (m, local_id, P); + char v[256]; + snprintf (v, sizeof(v), "=%llx=", (long long)local_id); + printf ("| %-18s | (%f, %f, %f) |\n", + v, P[0], P[1], P[2]); + num_vertices++; + } + + /* done */ + H5FedEndTraverseEntities (iter); + + /* report error if we got a different number then expected */ + if (num_vertices != num_vertices_expect) { + fprintf (stderr, "!!! Got %lld vertices, but expected %lld.\n", + (long long)num_vertices, (long long)num_vertices_expect); + exit (1); + } + + printf (" Number of vertices on level: %lld\n", (long long)num_vertices); + return H5_SUCCESS; +} + +static h5_err_t +traverse_edges ( + h5t_mesh_t* const m + ) { + printf ( "Travering edges on level %lld:\n", (long long)H5FedGetLevel(m) ); + + /* get iterator for co-dim 1 entities, i.e. edges */ + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 1); + + /* iterate */ + h5_loc_id_t local_id; + h5_size_t num_edges = 0; + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + char v[256]; + char k[256]; + h5_loc_id_t local_vids[4]; + snprintf ( k, sizeof(k), "=%llx=", (long long)local_id ); + H5FedGetVertexIndicesOfEntity ( m, local_id, local_vids ); + snprintf ( v, sizeof(v), "=[%lld,%lld]=", + (long long)local_vids[0], (long long)local_vids[1] ); + printf ( "| %-18s | %-18s |\n", k, v ); + num_edges++; + } + + /* done */ + H5FedEndTraverseEntities (iter); + + printf (" Number of edges: %lld\n", (long long)num_edges); + return H5_SUCCESS; +} + +static h5_err_t +traverse_boundary_edges ( + h5t_mesh_t* const m + ) { + printf ("Travering boundary edges on level %lld:\n", (long long)H5FedGetLevel(m)); + + /* get iterator for co-dim 1 entities, i.e. edges */ + h5t_iterator_t* iter = H5FedBeginTraverseBoundaryFaces (m, 1); + + /* iterate */ + h5_loc_id_t local_id; + h5_size_t num_edges = 0; + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + char v[256]; + char k[256]; + h5_loc_id_t local_vids[4]; + snprintf ( k, sizeof(k), "=%llx=", (long long)local_id); + H5FedGetVertexIndicesOfEntity (m, local_id, local_vids); + snprintf ( v, sizeof(v), "=[%lld,%lld]=", + (long long)local_vids[0], (long long)local_vids[1] ); + printf ( "| %-18s | %-18s |\n", k, v ); + num_edges++; + } + + /* done */ + H5FedEndTraverseEntities (iter); + + printf (" Number of edges: %lld\n", (long long)num_edges); + return H5_SUCCESS; +} + +static h5_err_t +traverse_elems ( + h5t_mesh_t* const m + ) { + /* get number of elements we have to expect */ + h5_size_t num_elems_expect = H5FedGetNumElementsTotal (m); + + /* get iterator for co-dim 0 */ + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 0); + + /* iterate over all co-dim 0 entities, i.e. elements */ + h5_loc_id_t local_id; + h5_size_t num_elems = 0; + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + char v[256]; + char t[256]; + h5_loc_id_t local_vids[4]; + snprintf (t, sizeof(t), "=%llx=", (long long)local_id); + H5FedGetVertexIndicesOfEntity (m, local_id, local_vids); + snprintf (v, sizeof(v), "=[%lld,%lld,%lld]=", + (long long)local_vids[0], + (long long)local_vids[1], + (long long)local_vids[2]); + printf ("| %-18s | %-18s |\n", t, v); + num_elems++; + } + + /* done */ + H5FedEndTraverseEntities (iter); + + /* report error if we got a different number then expected */ + if (num_elems != num_elems_expect) { + fprintf (stderr, "!!! Got %lld elements, but expected %lld.\n", + (long long)num_elems, (long long)num_elems_expect); + exit(1); + + + } + + printf (" Number of elements on level: %lld\n", (long long)num_elems); + return H5_SUCCESS; +} + +/* + Traverse elements and output coordinates + */ +static h5_err_t +traverse_elems2 ( + h5t_mesh_t* const m + ) { + /* get number of elements we have to expect */ + h5_size_t num_elems_expect = H5FedGetNumElementsTotal (m); + + /* get iterator for co-dim 0 */ + h5t_iterator_t* iter = H5FedBeginTraverseEntities (m, 0); + + /* iterate over all co-dim 0 entities, i.e. elements */ + h5_loc_id_t local_id; + h5_size_t num_elems = 0; + while ((local_id = H5FedTraverseEntities (iter)) >= 0) { + printf ("%05llu", (unsigned long long)num_elems); + h5_loc_id_t local_vids[4]; + H5FedGetVertexIndicesOfEntity (m, local_id, local_vids); + int i; + for (i = 0; i < 3; i++) { + h5_float64_t P[3]; + H5FedGetVertexCoordsByIndex (m, local_vids[i], P); + printf (" %8.6f %8.6f %8.6f", P[0], P[1], P[2]); + } + printf ("\n"); + num_elems++; + } + + /* done */ + H5FedEndTraverseEntities (iter); + + /* report error if we got a different number then expected */ + if (num_elems != num_elems_expect) { + fprintf (stderr, "!!! Got %lld elements, but expected %lld.\n", + (long long)num_elems, (long long)num_elems_expect); + exit(1); + } + return H5_SUCCESS; +} + +static h5_err_t +traverse_level ( + h5t_mesh_t* const m, + const h5_loc_id_t level_id + ) { + printf (" Setting level to %d\n", level_id); + H5FedSetLevel (m, level_id); + traverse_vertices (m); + traverse_edges (m); + traverse_boundary_edges (m); + traverse_elems (m); + traverse_elems2 (m); + return H5_SUCCESS; +} + +static h5_err_t +traverse_mesh ( + const h5_file_t f, + const h5_id_t mesh_id + ) { + h5t_mesh_t* m; + /* open mesh and get number of levels */ + printf (" Opening mesh with id %lld\n", mesh_id); + H5FedOpenTriangleMeshByIndex (f, mesh_id, &m); + h5_size_t num_levels = H5FedGetNumLevels (m); + printf (" Number of levels in mesh: %lld\n", (long long)num_levels); + + /* loop over all levels */ + h5t_lvl_idx_t level_id; + for (level_id = 0; level_id < num_levels; level_id++) { + traverse_level (m, level_id); + } + /* done */ + H5FedCloseMesh (m); + return H5_SUCCESS; +} + + +int +main ( + int argc, + char* argv[] + ) { + +#if defined (PARALLEL_IO) + MPI_Comm comm = MPI_COMM_WORLD; + MPI_Init (&argc, &argv); +#else + MPI_Comm comm = 0; +#endif + + /* abort program on error, so we don't have to handle them */ + H5SetErrorHandler (H5AbortErrorhandler); + H5SetVerbosityLevel (0); + + /* open file and get number of meshes */ + h5_file_t f = H5OpenFile (FNAME, H5_O_RDONLY, comm); + h5_size_t num_meshes = H5FedGetNumTriangleMeshes (f); + printf (" Number of meshes: %lld\n", (long long)num_meshes); + + /* loop over all meshes */ + h5_id_t mesh_id; + for (mesh_id = 0; mesh_id < num_meshes; mesh_id++) { + traverse_mesh (f, mesh_id); + } + + /* done */ + H5CloseFile (f); +#if defined (PARALLEL_IO) + MPI_Finalize (); +#endif + + return 0; +} diff --git a/examples/H5Fed/trimesh_write.c b/examples/H5Fed/trimesh_write.c new file mode 100644 index 0000000..c53fbc4 --- /dev/null +++ b/examples/H5Fed/trimesh_write.c @@ -0,0 +1,69 @@ +#include +#include + +#include "H5hut.h" + +const char* FNAME = "simple_triangle.h5"; + +typedef struct vertex { + h5_float64_t P[3]; +} vertex_t; + +typedef struct elem { + h5_loc_idx_t vids[3]; +} elem_t; + +vertex_t Vertices[] = { + { {-1.0, 0.0, 0.0} }, + { { 1.0, 0.0, 0.0} }, + { { 0.0, 1.0, 0.0} }, + { { 0.0, -1.0, 0.0} } +}; + +elem_t Elems[] = { + { { 0, 1, 2 } }, + { { 0, 1, 3 } } +}; + +const int num_vertices = sizeof (Vertices) / sizeof (Vertices[0]); +const int num_elems = sizeof (Elems) / sizeof (Elems[0]); + +int +main ( + int argc, + char* argv[] + ) { + /* abort program on errors in library */ + H5SetErrorHandler (H5AbortErrorhandler); + H5SetVerbosityLevel (5); + + /* open file and add mesh */ + const h5_file_t f = H5OpenFile (FNAME, H5_O_WRONLY, 0); + h5t_mesh_t* m; + H5FedAddTriangleMesh (f, "0", &m); + + /* store vertices */ + H5FedBeginStoreVertices (m, num_vertices); + int i; + for (i = 0; i < num_vertices; i++) { + H5FedStoreVertex (m, -1, Vertices[i].P); + } + H5FedEndStoreVertices (m); + + /* store elements */ + H5FedBeginStoreElements (m, num_elems); + for (i = 0; i < num_elems; i++) { + H5FedStoreElement (m, Elems[i].vids); + } + H5FedEndStoreElements (m); + + /* add 1. Level */ + H5FedAddLevel(m); + H5FedBeginRefineElements (m); + H5FedRefineElement (m, 0); + H5FedEndRefineElements (m); + + H5FedCloseMesh (m); + H5CloseFile (f); + return 0; +} diff --git a/examples/H5Fed/trimesh_write_dunetest.c b/examples/H5Fed/trimesh_write_dunetest.c new file mode 100644 index 0000000..8c88fc4 --- /dev/null +++ b/examples/H5Fed/trimesh_write_dunetest.c @@ -0,0 +1,70 @@ +#include +#include + +#include "H5hut.h" + +const char* FNAME = "simple_dunetest.h5"; + +typedef struct vertex { + h5_float64_t P[3]; +} vertex_t; + +typedef struct elem { + h5_loc_idx_t vids[3]; +} elem_t; + +vertex_t Vertices[] = { + { { 0.0, 0.0, 0.0} }, + { {-0.5, 1.0, 0.0} }, + { { 0.5, 1.0, 0.0} }, + { { 1.0, 0.0, 0.0} }, + { { 0.5, -1.0, 0.0} }, + { {-0.5, -1.0, 0.0} }, + { {-1.0, 0.0, 0.0} } +}; + +elem_t Elems[] = { + { { 0, 1, 2 } }, + { { 0, 2, 3 } }, + { { 0, 3, 4 } }, + { { 0, 4, 5 } }, + { { 0, 5, 6 } }, + { { 0, 1, 6 } } +}; + +const int num_vertices = sizeof (Vertices) / sizeof (Vertices[0]); +const int num_elems = sizeof (Elems) / sizeof (Elems[0]); + +int +main ( + int argc, + char* argv[] + ) { + /* abort program on errors in library */ + H5SetErrorHandler (H5AbortErrorhandler); + H5SetVerbosityLevel (2); + + /* open file and add mesh */ + const h5_file_t f = H5OpenFile (FNAME, H5_O_WRONLY, 0); + h5t_mesh_t* m; + H5FedAddTriangleMesh (f, "0", &m); + + /* store vertices */ + H5FedBeginStoreVertices (m, num_vertices); + int i; + for (i = 0; i < num_vertices; i++) { + H5FedStoreVertex (m, -1, Vertices[i].P); + } + H5FedEndStoreVertices (m); + + /* store elements */ + H5FedBeginStoreElements (m, num_elems); + for (i = 0; i < num_elems; i++) { + H5FedStoreElement (m, Elems[i].vids); + } + H5FedEndStoreElements (m); + + H5FedCloseMesh (m); + H5CloseFile (f); + return 0; +} diff --git a/examples/H5Fed/write_boundary.c b/examples/H5Fed/write_boundary.c new file mode 100644 index 0000000..54f8144 --- /dev/null +++ b/examples/H5Fed/write_boundary.c @@ -0,0 +1,100 @@ +#include +#include + +#include "H5hut.h" + +#ifndef PARALLEL_IO +#ifndef MPI_COMM_WORLD +#define MPI_COMM_WORLD 0 +#endif +#endif + +struct vertex { + h5_glb_id_t global_id; + h5_float64_t P[3]; +}; + +typedef struct vertex vertex_t; + +struct tet { + h5_glb_id_t global_id; + h5_glb_id_t parent_id; + h5_glb_id_t vids[4]; +}; +typedef struct tet tet_t; + +struct boundary { + h5_glb_id_t vids[3]; +}; +typedef struct boundary boundary_t; + +vertex_t V0[5] = { + { 0, {-1.0, 0.0, 0.0} }, + { 1, { 1.0, 0.0, 0.0} }, + { 2, { 0.0, 1.0, 0.0} }, + { 3, { 0.0, 0.0, 1.0} }, + { 4, { 0.0, -1.0, 0.0} } +}; + +vertex_t V1[1] = { + { 5, {0.0, 0.0, 0.0 } } +}; + +// sorted vertices: 0, 4, 5, 3, 2, 1 + +tet_t T0[2] = { + { 1, -1, { 0, 1, 2, 3 } }, // 0, 3, 2, 1 + { 0, -1, { 0, 1, 3, 4 } } // 0, 4, 3, 1 +}; + +tet_t T1[2] = { + { 2, 0, { 0, 3, 4, 5 } }, // 0, 4, 5, 3 + { 3, 0, { 1, 3, 4, 5 } } // 4, 5, 3, 1 +}; + +boundary_t boundary[2] = { + {{ 0, 1, 2 }}, + {{ 2, 3, 4 }} +}; + +int +main ( + int argc, + char *argv[] + ) { + H5PartSetVerbosityLevel ( 4 ); + + h5_file_t *f = H5OpenFile ( "simple_tet.h5", 0 ); + if ( f == NULL ) { + fprintf ( stderr, "!!! Can't open file.\n" ); + return -1; + } + + h5_err_t h5err = H5FedOpenMesh ( f, 0, TETRAHEDRAL_MESH ); + if ( h5err < 0 ) { + fprintf ( stderr, "!!! Can't open mesh %d\n", 0 ); + return -1; + } + h5err = H5FedAddBoundary ( f ); + if ( h5err < 0 ) { + fprintf ( stderr, "!!! Can't add boundary.\n" ); + return -1; + } + h5err = H5FedAddNumBoundaryfaces ( f, 1 ); + if ( h5err < 0 ) { + fprintf ( stderr, "!!! Can't add boundary.\n" ); + return -1; + } + h5err = H5FedStoreBoundaryface ( f, boundary[0].vids ); + if ( h5err < 0 ) { + fprintf ( stderr, "!!! Can't write boundary.\n" ); + return -1; + } + + h5err = H5CloseFile ( f ); + if ( h5err < 0 ) { + fprintf ( stderr, "!!! Can't close file.\n" ); + return -1; + } + return 0; +} diff --git a/examples/H5Part/Bench.c b/examples/H5Part/Bench.c new file mode 100644 index 0000000..c5e4499 --- /dev/null +++ b/examples/H5Part/Bench.c @@ -0,0 +1,263 @@ +#include +#include +#include +#include +/* #include */ +#include +#include +#ifndef PARALLEL_IO +#define PARALLEL_IO +#endif + +#ifndef DISABLE_H5PART +#include "H5hut.h" +#endif + +#define FILENAME "testio" +/* normally 64 steps for real benchmark */ +/* #define NSTEPS 5 */ + +/* normally 51e6 for real benchmark */ +#define NPARTICLES 51e4 +#define NTRIALS 3 + +/* + +bench + +*/ + + +int main(int argc,char *argv[]){ + + if (argc < 3) { + printf("Usage: bench \n"); + exit(-1); + } + else { + printf("nparticles: %d, nsteps: %d \n", atoi(argv[1]), atoi(argv[2])); + } + + MPI_Info info; + int nprocs,rank; + int trial; + int i,j,n; /* iteration variables */ + double starttime,curtime, endtime; + + int nparticles = atoi(argv[1]); + int nsteps = atoi(argv[2]); + + double *x,*y,*z,*px,*py,*pz; + typedef double *ddouble; + ddouble data[6]; + MPI_Datatype chunktype; + int offset; + int localnp; + char filename[128]; /*= FILENAME; */ +#ifndef DISABLE_H5PART + h5_file_t f; +#endif + char newfilename[128]; + FILE *fd; + MPI_File file; + MPI_Offset foffset; + + MPI_Comm dcomm = MPI_COMM_WORLD; + + MPI_Init(&argc,&argv); + MPI_Comm_rank(dcomm,&rank); + MPI_Comm_size(dcomm,&nprocs); + + localnp=nparticles/(int64_t)nprocs; + for(offset=0,i=0;i +#include "H5hut.h" + +/* + A simple regression test that shows how you use this API + to write and read multi-timestep files of particle data. +*/ + + +#ifdef PARALLEL_IO + +int main(int argc,char *argv[]){ + int sz=5; + double *x,*y,*z; + h5_int64_t *id; + h5_file_t file; + int i,t,nt,nds; + int nprocs,myproc; + MPI_Comm comm=MPI_COMM_WORLD; + + MPI_Init(&argc,&argv); + MPI_Comm_size(comm,&nprocs); + MPI_Comm_rank(comm,&myproc); + + x=(double*)malloc(sz*nprocs*sizeof(double)); + y=(double*)malloc(sz*nprocs*sizeof(double)); + z=(double*)malloc(sz*nprocs*sizeof(double)); + id=(h5_int64_t*)malloc(sz*nprocs*sizeof(h5_int64_t)); + /* parallel file creation */ + file=H5OpenFile ("parttest.h5",H5_O_WRONLY,comm); + if(!file) { + perror("File open failed: exiting!"); + exit(0); + } + + for(t=0;t<5;t++){ + MPI_Barrier(comm); + for(i=0;i>1); + printf("Set new view = %d:%d\n",(int)idStart,(int)(idEnd>>1)); + H5PartGetView(file,&idStart,&idEnd); + np=H5PartGetNumParticles(file); + printf("steps= %u datasets= %u particles= %d with view %d:%d\n", + nt,nds,(int)np,(int)idStart,(int)idEnd); + H5PartSetStep(file,nt-1); // set to last step + printf("Setting to last step = %u\n",nt-1); + for(i=0;i<10;i++){ x[i]=y[i]=z[i]=0.0; id[i]=0; } /* clear the arrays */ + H5PartReadDataFloat64(file,"x",x); + H5PartReadDataFloat64(file,"y",y); + H5PartReadDataFloat64(file,"z",z); + H5PartReadDataInt64(file,"id",id); + + for(i=0;i>1,(int)idEnd); + H5PartSetView(file,(idEnd>>1),idEnd); + np=H5PartGetNumParticles(file); + printf("Now particles in selection are %d\n",np); + printf("doubleCheck=%lld\n", (long long)H5PartGetView(file,0,0)); + + for(i=0;i<10;i++){ x[i]=y[i]=z[i]=0.0; id[i]=0; } /* clear the arrays */ + + H5PartReadDataFloat64(file,"x",x); + H5PartReadDataFloat64(file,"y",y); + H5PartReadDataFloat64(file,"z",z); + H5PartReadDataInt64(file,"id",id); + for(i=0;i +#include +#include +#include + +#define DATASIZE 32 + +int main( + int argc, char** argv + ) { + int i, rank, nprocs; + h5_int32_t data[DATASIZE]; + h5_int64_t stat; + h5_file_t file; + + // initialize MPI + MPI_Init (&argc, &argv); + MPI_Comm_rank (MPI_COMM_WORLD, &rank); + MPI_Comm_size (MPI_COMM_WORLD, &nprocs); + + H5SetVerbosityLevel (1); + + char filename[8]; + sprintf (filename, "%d.h5", rank); + file = H5OpenFile (filename, H5_O_WRONLY|H5_VFD_CORE, MPI_COMM_SELF); + assert (file != H5_FAILURE); + + stat = H5SetStep (file, 0); + assert (stat == H5_SUCCESS); + + stat = H5PartSetNumParticles(file, DATASIZE); + assert (stat == H5_SUCCESS); + + // create fake data + for (i=0; i +#include +#include +#include + +#define DATASIZE 32 + +int main(int argc, char** argv) +{ + int rank, nprocs; + h5part_float64_t x[DATASIZE]; + h5part_float64_t y[DATASIZE]; + h5part_float64_t z[DATASIZE]; + h5part_float64_t px[DATASIZE]; + h5part_float64_t py[DATASIZE]; + h5part_float64_t pz[DATASIZE]; + h5part_int64_t nparticles = DATASIZE; + H5PartFile *file; + + // initialize MPI + MPI_Init (&argc, &argv); + MPI_Comm_rank (MPI_COMM_WORLD, &rank); + MPI_Comm_size (MPI_COMM_WORLD, &nprocs); + + H5PartSetVerbosityLevel(H5PART_VERB_DEBUG); + + file = H5PartOpenFileParallel("particles.h5", H5PART_WRITE, MPI_COMM_WORLD); + H5PartSetStep(file, 0); + H5PartSetNumParticles(file, nparticles); + H5PartWriteDataFloat64(file, "x", x); + H5PartWriteDataFloat64(file, "y", y); + H5PartWriteDataFloat64(file, "z", z); + H5PartWriteDataFloat64(file, "px", px); + H5PartWriteDataFloat64(file, "py", py); + H5PartWriteDataFloat64(file, "pz", pz); + H5PartCloseFile(file); + + MPI_Finalize(); + return EXIT_SUCCESS; +} + diff --git a/examples/H5Part/read_canonicalview.c b/examples/H5Part/read_canonicalview.c new file mode 100644 index 0000000..bb142a3 --- /dev/null +++ b/examples/H5Part/read_canonicalview.c @@ -0,0 +1,27 @@ + +#include +#include "H5hut.h" + +int +main ( + int argc, char* argv[] + ){ + h5_file_t file; + int nprocs, myproc; + MPI_Comm comm = MPI_COMM_WORLD; + + MPI_Init (&argc, &argv); + MPI_Comm_size (comm, &nprocs); + MPI_Comm_rank (comm, &myproc); + H5SetVerbosityLevel (4); + file = H5OpenFile ("parttest.h5", H5_O_RDONLY, comm); + + H5SetStep (file, 0); + + H5PartSetCanonicalView (file); + h5_int64_t num_particles = H5PartGetNumParticles (file); + printf ("[proc %d]: particles in view: %lld\n", myproc, num_particles); + + H5CloseFile(file); + return MPI_Finalize(); +} diff --git a/examples/H5Part/simplef.f90 b/examples/H5Part/simplef.f90 new file mode 100644 index 0000000..7720dee --- /dev/null +++ b/examples/H5Part/simplef.f90 @@ -0,0 +1,56 @@ +program H5PartTest + implicit none + + include 'mpif.h' + include 'H5PartF.h' + + integer :: comm, rank, ierr + integer*8 :: file_id, status, npoints, i + real*8, allocatable :: particles(:) + integer*8, allocatable :: id(:) + real*8 :: r8val + integer*8 :: i8val + + comm = MPI_COMM_WORLD + call mpi_init(ierr) + call mpi_comm_rank(comm, rank, ierr) + + ! open the a file for parallel writing + file_id = h5pt_set_verbosity_level(5) + file_id = h5pt_openw_par('test.h5', comm) + + ! in the Fortran API, time steps start at 1 + status = h5pt_setstep(file_id, 1_8) + + ! write an attribute to the file + status = h5pt_writefileattrib_string(file_id, 'desc', 'This is a test.') + + r8val = 0.5 + i8val = 1 + status = h5pt_writefileattrib_r8(file_id, 'double', r8val, i8val) + + ! create fake data + npoints = 99 + allocate(particles(npoints), id(npoints)) + do i=1,npoints + particles(i) = real(i+npoints*rank) + id(i) = i+npoints*rank + enddo + + ! set the size of the 1D array + status = h5pt_setnpoints(file_id, npoints) + + ! write the particles + status = h5pt_writedata_r8(file_id, "x", particles) + + ! write the ids + status = h5pt_writedata_i8(file_id, "id", id) + + ! close the file + status = h5pt_close(file_id) + + deallocate(particles, id) + + call mpi_finalize(ierr) + +end program H5PartTest diff --git a/examples/H5Part/stridedf.f90 b/examples/H5Part/stridedf.f90 new file mode 100644 index 0000000..7eb369e --- /dev/null +++ b/examples/H5Part/stridedf.f90 @@ -0,0 +1,61 @@ +program H5PartTest + implicit none + + include 'mpif.h' + include 'H5PartF.h' + + integer :: comm, rank, ierr + integer*8 :: file_id, status, npoints, i + real*8, allocatable :: particles(:) + integer*8, allocatable :: id(:) + + comm = MPI_COMM_WORLD + call mpi_init(ierr) + call mpi_comm_rank(comm, rank, ierr) + + ! open the a file for parallel writing + file_id = h5pt_openw_par('test.h5', comm) + + ! in the Fortran API, steps start at 1 + status = h5pt_setstep(file_id, 1_8) + + ! write an attribute to the file + status = h5pt_writefileattrib_string(file_id, 'desc', 'This is a test.') + + ! create fake data + npoints = 99 + allocate(particles(6*npoints), id(npoints)) + do i=0,npoints-1 + particles(6*i+1) = 0.0 + real(i+npoints*rank) + particles(6*i+2) = 0.1 + real(i+npoints*rank) + particles(6*i+3) = 0.2 + real(i+npoints*rank) + particles(6*i+4) = 0.3 + real(i+npoints*rank) + particles(6*i+5) = 0.4 + real(i+npoints*rank) + particles(6*i+6) = 0.5 + real(i+npoints*rank) + id(i+1) = i+npoints*rank + enddo + + ! set the striding to 6 + status = h5pt_setnpoints_strided(file_id, npoints, 6_8) + + ! write the particles + status = h5pt_writedata_r8(file_id, "x", particles(1)) + status = h5pt_writedata_r8(file_id, "y", particles(2)) + status = h5pt_writedata_r8(file_id, "z", particles(3)) + status = h5pt_writedata_r8(file_id, "px", particles(4)) + status = h5pt_writedata_r8(file_id, "py", particles(5)) + status = h5pt_writedata_r8(file_id, "pz", particles(6)) + + ! disable the striding to write the ids + status = h5pt_setnpoints(file_id, npoints) + status = h5pt_writedata_i8(file_id, "id", id) + + ! close the file + status = h5pt_close(file_id) + + deallocate(particles, id) + + call mpi_finalize(ierr) + +end program H5PartTest + diff --git a/examples/H5Part/write_setnumparticles.c b/examples/H5Part/write_setnumparticles.c new file mode 100644 index 0000000..3694bf2 --- /dev/null +++ b/examples/H5Part/write_setnumparticles.c @@ -0,0 +1,38 @@ + +#include +#include "H5hut.h" + +#define NUM_PARTICLES 3 + +int +main ( + int argc, + char* argv[] + ){ + h5_file_t file; + int nprocs = 0; + int myproc = 0; + int step = 0; + + MPI_Comm comm = MPI_COMM_WORLD; + + MPI_Init (&argc,&argv); + MPI_Comm_size (comm,&nprocs); + MPI_Comm_rank (comm,&myproc); + + h5_int64_t id[NUM_PARTICLES]; + h5_int64_t num_particles = NUM_PARTICLES; + + for (int i = 0; i < num_particles; i++) { + id[i] = i + num_particles * myproc; + } + + + file = H5OpenFile ("parttest.h5", H5_O_WRONLY, comm); + H5SetStep (file, step); + H5PartSetNumParticles (file,num_particles); + H5PartWriteDataInt64 (file, "id", id); + H5CloseFile(file); + + MPI_Finalize (); +} diff --git a/examples/H5Part/write_setview.c b/examples/H5Part/write_setview.c new file mode 100644 index 0000000..a3c8765 --- /dev/null +++ b/examples/H5Part/write_setview.c @@ -0,0 +1,58 @@ +#include +#include +#include +#include + +#define DATASIZE 32 +#define ITERS 4 + +int main ( + int argc, char** argv + ) { + int i, rank, nprocs; + h5_int32_t data[ITERS*DATASIZE]; + h5_int64_t stat; + h5_int64_t offset; + h5_file_t file; + + // initialize MPI + MPI_Init (&argc, &argv); + MPI_Comm_rank (MPI_COMM_WORLD, &rank); + MPI_Comm_size (MPI_COMM_WORLD, &nprocs); + + H5SetVerbosityLevel(1); + + file = H5OpenFile ("test.h5", H5_O_WRONLY, MPI_COMM_WORLD); + assert (file != H5_FAILURE); + + stat = H5SetStep(file, 0); + assert (stat == H5_SUCCESS); + + stat = H5PartSetNumParticles(file, ITERS*DATASIZE); + assert (stat == H5_SUCCESS); + + // create fake data + for (i=0; i +!! \ingroup h5block_model_f +!! See \ref H5Block3dSetView +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_setview ( filehandle, i_start, i_end, j_start, j_end, k_start, k_end ) + INTEGER*8, INTENT(IN) :: filehandle + INTEGER*8, INTENT(IN) :: i_start + INTEGER*8, INTENT(IN) :: i_end + INTEGER*8, INTENT(IN) :: j_start + INTEGER*8, INTENT(IN) :: j_end + INTEGER*8, INTENT(IN) :: k_start + INTEGER*8, INTENT(IN) :: k_end +END FUNCTION + +!> +!! \ingroup h5block_model_f +!! See \ref H5Block3dGetView +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_getview ( filehandle, i_start, i_end, j_start, j_end, k_start, k_end ) + INTEGER*8, INTENT(IN) :: filehandle + INTEGER*8, INTENT(OUT) :: i_start + INTEGER*8, INTENT(OUT) :: i_end + INTEGER*8, INTENT(OUT) :: j_start + INTEGER*8, INTENT(OUT) :: j_end + INTEGER*8, INTENT(OUT) :: k_start + INTEGER*8, INTENT(OUT) :: k_end +END FUNCTION + +!> +!! \ingroup h5block_model_f +!! See \ref H5Block3dGetReducedView +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_getreducedview ( filehandle, i_start, i_end, j_start, j_end, k_start, k_end ) + INTEGER*8, INTENT(IN) :: filehandle + INTEGER*8, INTENT(OUT) :: i_start + INTEGER*8, INTENT(OUT) :: i_end + INTEGER*8, INTENT(OUT) :: j_start + INTEGER*8, INTENT(OUT) :: j_end + INTEGER*8, INTENT(OUT) :: k_start + INTEGER*8, INTENT(OUT) :: k_end +END FUNCTION + +!> +!! \ingroup h5block_model_f +!! See \ref H5Block3dHasView +!! \return rank of processor error code +!< +INTEGER*8 FUNCTION h5bl_3d_hasview ( filehandle ) + INTEGER*8, INTENT(IN) :: filehandle +END FUNCTION + +!> +!! \ingroup h5block_model_f +!! See \ref H5Block3dSetChunk +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_setchunk ( filehandle, i, j, k ) + INTEGER*8, INTENT(IN) :: filehandle + INTEGER*8, INTENT(IN) :: i + INTEGER*8, INTENT(IN) :: j + INTEGER*8, INTENT(IN) :: k +END FUNCTION + +!> +!! \ingroup h5block_model_f +!! See \ref H5BlockGetNumFields +!! \return number of fields or error code +!< +INTEGER*8 FUNCTION h5bl_getnumfields ( filehandle ) + INTEGER*8, INTENT(IN) :: filehandle +END FUNCTION + +!> +!! \ingroup h5block_model_f +!! See \ref H5BlockGetFieldInfo +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_getfieldinfo ( filehandle, idx, field_name, grid_rank, grid_dims, field_dims ) + INTEGER*8, INTENT(IN) :: filehandle + INTEGER*8, INTENT(IN) :: idx + CHARACTER(LEN=*), INTENT(OUT) :: field_name + INTEGER*8, INTENT(OUT) :: grid_rank + INTEGER*8, INTENT(OUT) :: grid_dims(*) + INTEGER*8, INTENT(OUT) :: field_dims + INTEGER*8, INTENT(OUT) :: type +END FUNCTION + diff --git a/src/Fortran/H5Block_F.c b/src/Fortran/H5Block_F.c new file mode 100755 index 0000000..1939d0f --- /dev/null +++ b/src/Fortran/H5Block_F.c @@ -0,0 +1,324 @@ +#include +#include + +#include "h5core/h5_core.h" +#include "Underscore.h" + +#if defined(F77_SINGLE_UNDERSCORE) +#define F77NAME(a,b) a +#elif defined(F77_CRAY_UNDERSCORE) +#define F77NAME(a,b) b +#elif defined(F77_NO_UNDERSCORE) +#else +#error Error, no way to determine how to construct fortran bindings +#endif + +#if !defined(F77_NO_UNDERSCORE) + +#define h5bl_3d_setview F77NAME ( \ + h5bl_3d_setview_, \ + H5BL_3D_SETVIEW ) +#define h5bl_3d_getview F77NAME ( \ + h5bl_3d_getview_, \ + H5BL_3D_GETVIEW ) +#define h5bl_3d_setchunk F77NAME ( \ + h5bl_3d_setchunk_, \ + H5BL_3D_SETCHUNK ) +#define h5bl_3d_getreducedview F77NAME ( \ + h5bl_3d_getreducedview_, \ + H5BL_3D_GETREDUCEDVIEW ) +#define h5bl_3d_hasview F77NAME ( \ + h5bl_hasview_, \ + H5BL_HASVIEW ) +#define h5bl_getnumfields F77NAME ( \ + h5bl_getnumfields_, \ + H5BL_GETNUMFIELDS ) +#define h5bl_getfieldinfo F77NAME ( \ + h5bl_getfieldinfo_, \ + H5BL_GETFIELDINFO ) +#define h5bl_writefieldattrib_string F77NAME ( \ + h5bl_writefieldattrib_string_, \ + H5BL_WRITEFIELDATTRIB_STRING ) +#define h5bl_getnfieldattribs F77NAME ( \ + h5bl_getnfieldattribs_, \ + H5BL_GETNFIELDATTRIBS ) +#define h5bl_getfieldattribinfo F77NAME ( \ + h5bl_getfieldattribinfo_, \ + h5bl_getfieldattribinfo ) +#define h5bl_readfieldattrib_string F77NAME ( \ + h5bl_readfieldattrib_string_, \ + H5BL_READFIELDATTRIB_STRING ) +#endif + +h5_err_t +h5bl_3d_setview ( + h5_int64_t *const f, + const h5_int64_t *i_start, /*!< start index of i */ + const h5_int64_t *i_end, /*!< end index of i */ + const h5_int64_t *j_start, /*!< start index of j */ + const h5_int64_t *j_end, /*!< end index of j */ + const h5_int64_t *k_start, /*!< start index of k */ + const h5_int64_t *k_end /*!< end index of k */ + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, " + "i_start=%lld, i_end=%lld, " + "j_start=%lld, j_end=%lld, " + "k_start=%lld, k_end=%lld", + fh, + (long long)i_start, (long long)i_end, + (long long)j_start, (long long)j_end, + (long long)k_start, (long long)k_end); + H5_API_RETURN(h5b_3d_set_view ( + fh, + *i_start-1, *i_end-1, + *j_start-1, *j_end-1, + *k_start-1, *k_end-1 )); +} + +h5_err_t +h5bl_3d_setchunk ( + h5_int64_t *const f, + const h5_int64_t *i, + const h5_int64_t *j, + const h5_int64_t *k + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, i=%lld, j=%lld, k=%lld", + fh, (long long)i, (long long)j, (long long)k); + H5_API_RETURN(h5b_3d_set_chunk ( fh, *i, *j, *k )); +} + +h5_err_t +h5bl_3d_getview ( + h5_int64_t *const f, + h5_int64_t *const i_start, + h5_int64_t *const i_end, + h5_int64_t *const j_start, + h5_int64_t *const j_end, + h5_int64_t *const k_start, + h5_int64_t *const k_end + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, " + "i_start=%p, i_end=%p, " + "j_start=%p, j_end=%p, " + "k_start=%p, k_end=%p", + fh, + i_start, i_end, + j_start, j_end, + k_start, k_end); + H5_API_RETURN (h5b_3d_get_view ( + fh, + (h5_size_t*)i_start, (h5_size_t*)i_end, + (h5_size_t*)j_start, (h5_size_t*)j_end, + (h5_size_t*)k_start, (h5_size_t*)k_end )); +} + +h5_err_t +h5bl_3d_getreducedview ( + h5_int64_t *const f, + h5_int64_t *const i_start, + h5_int64_t *const i_end, + h5_int64_t *const j_start, + h5_int64_t *const j_end, + h5_int64_t *const k_start, + h5_int64_t *const k_end + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, " + "i_start=%p, i_end=%p, " + "j_start=%p, j_end=%p, " + "k_start=%p, k_end=%p", + fh, + i_start, i_end, + j_start, j_end, + k_start, k_end); + H5_API_RETURN(h5b_3d_get_reduced_view ( + fh, + (h5_size_t*)i_start, (h5_size_t*)i_end, + (h5_size_t*)j_start, (h5_size_t*)j_end, + (h5_size_t*)k_start, (h5_size_t*)k_end )); +} + +h5_int64_t +h5bl_3d_hasview ( + h5_int64_t *const f + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_int64_t, "f=%p", fh); + H5_API_RETURN (h5b_3d_has_view ( fh )); +} + +h5_err_t +h5bl_getnumfields ( + h5_int64_t *const f + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_int64_t, "f=%p", fh); + H5_API_RETURN (h5b_get_num_fields ( fh )); +} + +h5_err_t +h5bl_getfieldinfo ( + h5_int64_t *const f, + const h5_int64_t *idx, + char *name, + h5_size_t *field_rank, + h5_size_t *field_dims, + h5_size_t *elem_rank, + h5_int64_t *type, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, idx=%lld, " + "name=%p," + "field_rank=%p, field_dims=%p, elem_rank=%p, type=%p, l_name=%d", + fh, (long long)*idx, name, + field_rank, field_dims, elem_rank, type, l_name); + h5_err_t herr = h5b_get_field_info ( + fh, *idx, name, (h5_size_t)l_name, + field_rank, field_dims, elem_rank, type ); + h5_strc2for ( name, l_name ); + H5_API_RETURN(herr); +} + +h5_err_t +h5bl_writefieldattrib_string ( + h5_int64_t *const f, + const char *field_name, + const char *attrib_name, + const char *buffer, + const int l_field_name, + const int l_attrib_name, + const int l_buffer + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *field_name2 = h5_strdupfor2c ( field_name, l_field_name ); + char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name ); + char *buffer2 = h5_strdupfor2c ( buffer, l_buffer ); + H5_API_ENTER (h5_err_t, + "f=%p, " + "field_name='%s', " + "attrib_name='%s', " + "buffer='%s', " + "l_field_name=%d, " + "l_attrib_name=%d, " + "l_buffer=%d", + fh, + field_name2, + attrib_name2, + buffer2, l_field_name, l_attrib_name, l_buffer); + h5_err_t herr = h5_write_field_attrib ( + fh, field_name2, attrib_name2, + H5_STRING_T, buffer2, strlen(buffer2)+1 ); + + free ( field_name2 ); + free ( attrib_name2 ); + free ( buffer2 ); + H5_API_RETURN(herr); +} + + +h5_err_t +h5bl_getnfieldattribs ( + h5_int64_t *const f, + const char *name, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', l_name=%d", fh, name2, l_name); + h5_err_t herr = h5b_get_num_field_attribs ( fh, name2 ); + free ( name2 ); + H5_API_RETURN(herr); +} + +h5_err_t +h5bl_getfieldattribinfo ( + h5_int64_t *const f, + const char *field_name, + const h5_int64_t *attrib_idx, + char *attrib_name, + h5_size_t *attrib_nelem, + const int l_field_name, + const int l_attrib_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *field_name2 = h5_strdupfor2c ( field_name, l_field_name ); + H5_API_ENTER (h5_err_t, + "f=%p field_name='%s', " + "attrib_idx=%lld, " + "attrib_name=%p, " + "attrib_nelem=%p, l_field_name=%d, l_attrib_name=%d", + fh, + field_name2, + (long long)*attrib_idx, + attrib_name, attrib_nelem, l_field_name, l_attrib_name); + + h5_int64_t attrib_type; + h5_err_t herr = h5b_get_field_attrib_info ( + fh, field_name2, *attrib_idx, + attrib_name, l_attrib_name, + &attrib_type, + attrib_nelem ); + + h5_strc2for ( attrib_name, l_attrib_name ); + + free ( field_name2 ); + H5_API_RETURN(herr); +} + + +h5_err_t +h5bl_readfieldattrib_string ( + h5_int64_t *const f, + const char *field_name, + const char *attrib_name, + char *buffer, + const int l_field_name, + const int l_attrib_name, + const int l_buffer + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *field_name2 = h5_strdupfor2c ( field_name, l_field_name ); + char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name ); + H5_API_ENTER (h5_err_t, + "f=%p, " + "field_name='%s', " + "attrib_name='%s', " + "buffer=%p, l_field_name=%d, l_attrib_name=%d, l_buffer=%d", + fh, + field_name, + attrib_name, + buffer, l_field_name, l_attrib_name, l_buffer); + + h5_err_t herr = h5_read_field_attrib ( + fh, field_name2, attrib_name2, + H5_STRING_T, buffer ); + + h5_strc2for ( buffer, l_buffer ); + + free ( field_name2 ); + free ( attrib_name2 ); + + H5_API_RETURN(herr); +} + diff --git a/src/Fortran/H5Block_attribs.c b/src/Fortran/H5Block_attribs.c new file mode 100644 index 0000000..bac8064 --- /dev/null +++ b/src/Fortran/H5Block_attribs.c @@ -0,0 +1,455 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5_private.h" +#include "h5core/h5b_attribs.h" + +#define H5_R8_T H5_FLOAT64_T +#define H5_R4_T H5_FLOAT32_T +#define H5_I8_T H5_INT64_T +#define H5_I4_T H5_INT32_T + +/* + __ _ _ _ ___ _ __ _ _ + / _` | | | |/ _ \ '__| | | | + | (_| | |_| | __/ | | |_| | + \__, |\__,_|\___|_| \__, | + |_| |___/ +*/ + +#define h5bl_getnfieldattribs F77_NAME ( \ + h5bl_getnfieldattribs, \ + h5bl_getnfieldattribs_, \ + H5BL_GETNFIELDATTRIBS) +h5_int64_t +h5bl_getnfieldattribs ( + const h5_int64_t* const fh, + const char* const name, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, name='%*s'", + (h5_file_p)f, l_name, name); + char* name2 = h5_strdupfor2c ( name, l_name ); + h5_int64_t herr = h5b_get_num_field_attribs (f, name2); + free (name2); + H5_API_RETURN (herr); +} + +#define h5bl_getfieldattribinfo F77_NAME ( \ + h5bl_getfieldattribinfo, \ + h5bl_getfieldattribinfo_, \ + h5bl_getfieldattribinfo) +h5_int64_t +h5bl_getfieldattribinfo ( + const h5_int64_t* const fh, + const char* const field_name, + const h5_int64_t* const attrib_idx, + char* const attrib_name, + h5_int64_t* const attrib_nelem, + const int l_field_name, + const int l_attrib_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, field_name='%*s', attrib_idx=%lld, " + "attrib_name=%p, attrib_nelem=%p", + (h5_file_p)f, + l_field_name, field_name, + (long long)*attrib_idx, + attrib_name, attrib_nelem); + + char *field_name2 = h5_strdupfor2c ( field_name, l_field_name ); + h5_int64_t attrib_type; + h5_int64_t herr = h5b_get_field_attrib_info ( + f, + field_name2, *attrib_idx - 1, + attrib_name, l_attrib_name, + &attrib_type, + (h5_size_t*)attrib_nelem ); + + h5_strc2for ( attrib_name, l_attrib_name ); + + free (field_name2); + H5_API_RETURN (herr); +} + +/* + _ __ + (_) / /__ + | | / / _ \ + | |/ / (_) | + |_/_/ \___/ +*/ +static inline h5_int64_t +write_field_attrib ( + const h5_file_t fh, + const char* field_name, + const int l_field_name, + const char* attrib_name, + const int l_attrib_name, + const h5_int64_t attrib_type, + const void* attrib_value, + const hsize_t attrib_nelems + ) { + char *field_name2 = h5_strdupfor2c (field_name, l_field_name); + char *attrib_name2 = h5_strdupfor2c (attrib_name, l_attrib_name); + h5_int64_t h5err = h5b_write_field_attrib ( + fh, field_name2, + attrib_name2, attrib_type, + attrib_value, attrib_nelems); + free (field_name2); + free (attrib_name2); + return h5err; +} + +static inline h5_int64_t +read_field_attrib ( + const h5_file_t fh, + const char* field_name, + const int l_field_name, + const char* attrib_name, + const int l_attrib_name, + const hid_t attrib_type, + void* attrib_value + ) { + char *field_name2 = h5_strdupfor2c (field_name, l_field_name); + char *attrib_name2 = h5_strdupfor2c (attrib_name, l_attrib_name); + h5_int64_t h5err = h5b_read_field_attrib ( + fh, field_name2, + attrib_name2, attrib_type, attrib_value); + free (field_name2); + free (attrib_name2); + return h5err; +} + +/* + _ _ + ___| |_ _ __(_)_ __ __ _ + / __| __| '__| | '_ \ / _` | + \__ \ |_| | | | | | | (_| | + |___/\__|_| |_|_| |_|\__, | + |___/ +*/ +#define h5bl_writefieldattrib_string F77_NAME ( \ + h5bl_writefieldattrib_string, \ + h5bl_writefieldattrib_string_, \ + H5BL_WRITEFIELDATTRIB_STRING) +h5_int64_t +h5bl_writefieldattrib_string ( + const h5_int64_t* const fh, + const char* const field_name, + const char* const attrib_name, + const char* const attrib_value, + const int l_field_name, + const int l_attrib_name, + const int l_attrib_value + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, field_name='%.*s', " + "attrib_name='%.*s' attrib_value='%.*s'", + (h5_file_p)f, + l_field_name, field_name, + l_attrib_name, attrib_name, + l_attrib_value, attrib_value); + char* attrib_value2 = h5_strdupfor2c (attrib_value, l_attrib_value); + h5_int64_t h5err = write_field_attrib ( + f, + field_name, l_field_name, + attrib_name, l_attrib_name, + H5_STRING_T, + attrib_value2, strlen(attrib_value2)+1 ); + free (attrib_value2); + H5_API_RETURN (h5err); +} + +#define h5bl_readfieldattrib_string F77_NAME ( \ + h5bl_readfieldattrib_string, \ + h5bl_readfieldattrib_string_, \ + H5BL_READFIELDATTRIB_STRING) +h5_err_t +h5bl_readfieldattrib_string ( + const h5_int64_t* const fh, + const char* const field_name, + const char* const attrib_name, + char* const attrib_value, + const int l_field_name, + const int l_attrib_name, + const int l_attrib_value + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "f=%p, field_name='%.*s', attrib_name='%.*s' attrib_value='%p'", + (h5_file_p)f, + l_field_name, field_name, + l_attrib_name, attrib_name, + attrib_value); + h5_int64_t h5err = read_field_attrib ( + f, + field_name, l_field_name, + attrib_name, l_attrib_name, + H5_STRING_T, attrib_value); + + h5_strc2for (attrib_value, l_attrib_value); + H5_API_RETURN (h5err); +} + +/* + _ + _ __ ___ __ _| | + | '__/ _ \/ _` | | + | | | __/ (_| | | + |_| \___|\__,_|_| +*/ +#define h5bl_writefieldattrib_r8 F77_NAME ( \ + h5bl_writefieldattrib_r8, \ + h5bl_writefieldattrib_r8_, \ + H5BL_WRITEFIELDATTRIB_R8) +h5_int64_t +h5bl_writefieldattrib_r8 ( + const h5_int64_t* const fh, + const char* const field_name, + const char* const attrib_name, + const h5_float64_t* const attrib_value, + const h5_int64_t* const attrib_nelems, + const int l_field_name, + const int l_attrib_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, field_name='%.*s', attrib_name='%.*s', " + "attrib_value=%p, attrib_nelems=%lld", + (h5_file_p)f, + l_field_name, field_name, + l_attrib_name, attrib_name, + attrib_value, *attrib_nelems); + H5_API_RETURN (write_field_attrib ( + f, + field_name, l_field_name, + attrib_name, l_attrib_name, + H5_R8_T, + attrib_value, *attrib_nelems)); +} + +#define h5bl_readfieldattrib_r8 F77_NAME ( \ + h5bl_readfieldattrib_r8, \ + h5bl_readfieldattrib_r8_, \ + H5BL_READFIELDATTRIB_R8) +h5_err_t +h5bl_readfieldattrib_r8 ( + const h5_int64_t* const fh, + const char* const field_name, + const char* const attrib_name, + h5_float64_t* const attrib_value, + const int l_field_name, + const int l_attrib_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, field_name='%.*s', attrib_name='%.*s', " + "attrib_value=%p", + (h5_file_p)f, + l_field_name, field_name, + l_attrib_name, attrib_name, + attrib_value); + H5_API_RETURN (read_field_attrib ( + f, + field_name, l_field_name, + attrib_name, l_attrib_name, + H5_R8_T, + attrib_value)); +} + +#define h5bl_writefieldattrib_r4 F77_NAME ( \ + h5bl_writefieldattrib_r4, \ + h5bl_writefieldattrib_r4_, \ + H5BL_WRITEFIELDATTRIB_R4) +h5_int64_t +h5bl_writefieldattrib_r4 ( + const h5_int64_t* const fh, + const char* const field_name, + const char* const attrib_name, + const h5_float32_t* const attrib_value, + const h5_int64_t* const attrib_nelems, + const int l_field_name, + const int l_attrib_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, field_name='%.*s', attrib_name='%.*s', " + "attrib_value=%p, attrib_nelems=%lld", + (h5_file_p)f, + l_field_name, field_name, + l_attrib_name, attrib_name, + attrib_value, *attrib_nelems); + H5_API_RETURN (write_field_attrib ( + f, + field_name, l_field_name, + attrib_name, l_attrib_name, + H5_R4_T, + attrib_value, *attrib_nelems)); +} + +#define h5bl_readfieldattrib_r4 F77_NAME ( \ + h5bl_readfieldattrib_r4, \ + h5bl_readfieldattrib_r4_, \ + H5BL_READFIELDATTRIB_R4) +h5_err_t +h5bl_readfieldattrib_r4 ( + const h5_int64_t* const fh, + const char* const field_name, + const char* const attrib_name, + h5_float32_t* const attrib_value, + const int l_field_name, + const int l_attrib_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, field_name='%.*s', attrib_name='%.*s', " + "attrib_value=%p", + (h5_file_p)f, + l_field_name, field_name, + l_attrib_name, attrib_name, + attrib_value); + H5_API_RETURN (read_field_attrib ( + f, + field_name, l_field_name, + attrib_name, l_attrib_name, + H5_R4_T, + attrib_value)); +} + +/* + _ _ + (_)_ __ | |_ ___ __ _ ___ _ __ + | | '_ \| __/ _ \/ _` |/ _ \ '__| + | | | | | || __/ (_| | __/ | + |_|_| |_|\__\___|\__, |\___|_| + |___/ +*/ +#define h5bl_writefieldattrib_i8 F77_NAME ( \ + h5bl_writefieldattrib_i8, \ + h5bl_writefieldattrib_i8_, \ + H5BL_WRITEFIELDATTRIB_I8) +h5_int64_t +h5bl_writefieldattrib_i8 ( + const h5_int64_t* const fh, + const char* const field_name, + const char* const attrib_name, + const h5_int64_t* const attrib_value, + const h5_int64_t* const attrib_nelems, + const int l_field_name, + const int l_attrib_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, field_name='%.*s', attrib_name='%.*s', " + "attrib_value=%p, attrib_nelems=%lld", + (h5_file_p)f, + l_field_name, field_name, + l_attrib_name, attrib_name, + attrib_value, *attrib_nelems); + H5_API_RETURN (write_field_attrib ( + f, + field_name, l_field_name, + attrib_name, l_attrib_name, + H5_I8_T, + attrib_value, *attrib_nelems)); +} + +#define h5bl_readfieldattrib_i8 F77_NAME ( \ + h5bl_readfieldattrib_i8, \ + h5bl_readfieldattrib_i8_, \ + H5BL_READFIELDATTRIB_I8) +h5_err_t +h5bl_readfieldattrib_i8 ( + const h5_int64_t* const fh, + const char* const field_name, + const char* const attrib_name, + h5_int64_t* const attrib_value, + const int l_field_name, + const int l_attrib_name, + const int l_attrib_value + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, field_name='%.*s', attrib_name='%.*s', " + "attrib_value=%p", + (h5_file_p)f, + l_field_name, field_name, + l_attrib_name, attrib_name, + attrib_value); + H5_API_RETURN (read_field_attrib ( + f, + field_name, l_field_name, + attrib_name, l_attrib_name, + H5_I8_T, + attrib_value)); +} + +#define h5bl_writefieldattrib_i4 F77_NAME ( \ + h5bl_writefieldattrib_i4, \ + h5bl_writefieldattrib_i4_, \ + H5BL_WRITEFIELDATTRIB_I4 ) +h5_int64_t +h5bl_writefieldattrib_i4 ( + const h5_int64_t* const fh, + const char* const field_name, + const char* const attrib_name, + const h5_int32_t* const attrib_value, + const h5_int64_t* const attrib_nelems, + const int l_field_name, + const int l_attrib_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, field_name='%.*s', attrib_name='%.*s', " + "attrib_value=%p, attrib_nelems=%lld", + (h5_file_p)f, + l_field_name, field_name, + l_attrib_name, attrib_name, + attrib_value, *attrib_nelems); + H5_API_RETURN (write_field_attrib ( + f, + field_name, l_field_name, + attrib_name, l_attrib_name, + H5_I4_T, + attrib_value, *attrib_nelems)); +} + +#define h5bl_readfieldattrib_i4 F77_NAME ( \ + h5bl_readfieldattrib_i4, \ + h5bl_readfieldattrib_i4_, \ + H5BL_READFIELDATTRIB_I4) +h5_err_t +h5bl_readfieldattrib_i4 ( + const h5_int64_t* const fh, + const char* const field_name, + const char* const attrib_name, + h5_int32_t* const attrib_value, + const int l_field_name, + const int l_attrib_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, field_name='%.*s', attrib_name='%.*s', " + "attrib_value=%p", + (h5_file_p)f, + l_field_name, field_name, + l_attrib_name, attrib_name, + attrib_value); + H5_API_RETURN (read_field_attrib ( + f, + field_name, l_field_name, + attrib_name, l_attrib_name, + H5_I4_T, + attrib_value)); +} diff --git a/src/Fortran/H5Block_attribsF.f90 b/src/Fortran/H5Block_attribsF.f90 new file mode 100644 index 0000000..020aa6e --- /dev/null +++ b/src/Fortran/H5Block_attribsF.f90 @@ -0,0 +1,249 @@ + +! __ _ _ _ _ _ _ _ _ +! / _(_) ___| | __| | __ _| |_| |_ _ __(_) |__ _ _| |_ ___ ___ +! | |_| |/ _ \ |/ _` | / _` | __| __| '__| | '_ \| | | | __/ _ \/ __| +! | _| | __/ | (_| | | (_| | |_| |_| | | | |_) | |_| | || __/\__ \ +! |_| |_|\___|_|\__,_| \__,_|\__|\__|_| |_|_.__/ \__,_|\__\___||___/ + +! +! __ _ _ _ ___ _ __ _ _ +! / _` | | | |/ _ \ '__| | | | +! | (_| | |_| | __/ | | |_| | +! \__, |\__,_|\___|_| \__, | +! |_| |___/ + +!> +!! \ingroup h5block_attrib_f +!! See \ref H5BlockGetNumFieldAttribs +!! \return number of attributes or error code +!< +INTEGER*8 FUNCTION h5bl_getnfieldattribs (filehandle, field_name) + INTEGER*8, INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: field_name !< name of field +END FUNCTION + +!> +!! \ingroup h5block_attrib_f +!! See \ref H5BlockGetFieldAttribInfo +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_getfieldattribinfo (filehandle, field_name, idx, attrib_name, attrib_nelems) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: field_name !< name of field + INTEGER*8,INTENT(IN) :: idx !< index of attribute being queried + CHARACTER(LEN=*), INTENT(OUT):: attrib_name !< name of attribute + INTEGER*8,INTENT(OUT):: attrib_nelems !< number of elements in the attrib array +END FUNCTION + +! _ __ _ _ +! (_) / /__ ___| |_ _ __(_)_ __ __ _ +! | | / / _ \ / __| __| '__| | '_ \ / _` | +! | |/ / (_) | \__ \ |_| | | | | | | (_| | +! |_/_/ \___/ |___/\__|_| |_|_| |_|\__, | +! |___/ + +!> +!! \ingroup h5block_attrib_f +!! See \ref H5BlockWriteFieldAttribString +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_writefieldattrib_string (filehandle, field_name, attrib_name, attrib_value, attrib_nelems) + INTEGER*8, INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: field_name !< name of field + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute + CHARACTER(LEN=*), INTENT(IN) :: attrib_value!< attribute data to be written + INTEGER*8, INTENT(IN) :: attrib_nelems !< number of elements in data array +END FUNCTION + +!> +!! \ingroup h5block_attrib_f +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_readfieldattrib_string (filehandle, field_name, attrib_name, attrib_value) + INTEGER*8, INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: field_name !< name of field + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute + CHARACTER(LEN=*), INTENT(IN) :: attrib_value!< attribute data will be read into this array +END FUNCTION + +! _ __ _ +! (_) / /__ _ __ ___ __ _| | +! | | / / _ \ | '__/ _ \/ _` | | +! | |/ / (_) | | | | __/ (_| | | +! |_/_/ \___/ |_| \___|\__,_|_| + +!> +!! \ingroup h5block_attrib_f +!! +!! See \ref H5BlockWriteFieldAttribFloat64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_writefieldattrib_r8 (filehandle, field_name, attrib_name, attrib_value, attrib_nelems) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: field_name !< name of field + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to write + REAL*8, INTENT(OUT):: attrib_value(*) !< attribute data to be written + INTEGER*8, INTENT(IN) :: attrib_nelems !< number of elements in data array +END FUNCTION + +!> +!! \ingroup h5block_attrib_f +!! See \ref H5BlockReadFieldAttribFloat64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_readfieldattrib_r8 ( filehandle, field_name, attrib_name, attrib_value ) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: field_name !< name of field + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to read + REAL*8, INTENT(OUT):: attrib_value(*) !< attribute data will be read into this array +END FUNCTION + +!> +!! \ingroup h5block_attrib_f +!! See \ref H5BlockWriteFieldAttribFloat32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_writefieldattrib_r4 (filehandle, field_name, attrib_name, attrib_value, attrib_nelems) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: field_name !< name of field + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to write + REAL*4, INTENT(OUT):: attrib_value(*) !< attribute datato be written + INTEGER*8, INTENT(IN) :: attrib_nelems !< number of elements in data array +END FUNCTION + +!> +!! \ingroup h5block_attrib_f +!! See \ref H5BlockReadFieldAttribFloat32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_readfieldattrib_r4 (filehandle, field_name, attrib_name, attrib_value) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: field_name !< name of field + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to read + REAL*4, INTENT(OUT):: attrib_value(*) !< attribute data will be read into this array +END FUNCTION + +! _ __ _ _ +! (_) / /__ (_)_ __ | |_ ___ __ _ ___ _ __ +! | | / / _ \ | | '_ \| __/ _ \/ _` |/ _ \ '__| +! | |/ / (_) | | | | | | || __/ (_| | __/ | +! |_/_/ \___/ |_|_| |_|\__\___|\__, |\___|_| +! |___/ + +!> +!! \ingroup h5block_attrib_f +!! See \ref H5BlockWriteFieldAttribInt64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_writefieldattrib_i8 (filehandle, field_name, attrib_name, attrib_value, attrib_nelems) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: field_name !< name of field + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to write + INTEGER*8,INTENT(OUT):: attrib_value(*) !< attribute data to be written + INTEGER*8, INTENT(IN) :: attrib_nelems !< number of elements in data array +END FUNCTION + +!> +!! \ingroup h5block_attrib_f +!! See \ref H5BlockReadFieldAttribInt64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_readfieldattrib_i8 (filehandle, field_name, attrib_name, attrib_value) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: field_name !< name of field + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to read + INTEGER*8,INTENT(OUT):: attrib_value(*) !< attribute data will be read into this array +END FUNCTION + +!> +!! \ingroup h5block_attrib_f +!! See \ref H5BlockWriteFieldAttribInt32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_writefieldattrib_i4 (filehandle, field_name, attrib_name, attrib_value, attrib_nelems) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: field_name !< name of field + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to write + INTEGER*4,INTENT(OUT):: attrib_value(*) !< attribute data to be written + INTEGER*8, INTENT(IN) :: attrib_nelems !< number of elements in data array +END FUNCTION + +!> +!! \ingroup h5block_attrib_f +!! See \ref H5BlockReadFieldAttribInt32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_readfieldattrib_i4 (filehandle, field_name, attrib_name, attrib_value) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: field_name !< name of field + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to read + INTEGER*4,INTENT(OUT):: attrib_value(*) !< attribute data will be read into this array +END FUNCTION + +! __ _ _ _ _ +! / _(_) ___| | __| | ___ _ __ __ _ ___(_)_ __ __ _ +! | |_| |/ _ \ |/ _` | / __| '_ \ / _` |/ __| | '_ \ / _` | +! | _| | __/ | (_| | \__ \ |_) | (_| | (__| | | | | (_| | +! |_| |_|\___|_|\__,_| |___/ .__/ \__,_|\___|_|_| |_|\__, | +! |_| |___/ + +!> +!! \ingroup h5block_attrib_f +!! See \ref H5Block3dGetFieldSpacing +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_get_field_spacing (filehandle, name, x, y, z) + INTEGER*8, INTENT(IN) :: filehandle + CHARACTER(LEN=*), INTENT(IN) :: name + REAL*8, INTENT(OUT) :: x + REAL*8, INTENT(OUT) :: y + REAL*8, INTENT(OUT) :: z +END FUNCTION + +!> +!! \ingroup h5block_attrib_f +!! See \ref H5Block3dSetFieldSpacing +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_set_field_spacing (filehandle, name, x, y, z) + INTEGER*8, INTENT(IN) :: filehandle + CHARACTER(LEN=*), INTENT(IN) :: name + REAL*8, INTENT(IN) :: x + REAL*8, INTENT(IN) :: y + REAL*8, INTENT(IN) :: z +END FUNCTION + +! __ _ _ _ _ _ +! / _(_) ___| | __| | ___ _ __(_) __ _(_)_ __ +! | |_| |/ _ \ |/ _` | / _ \| '__| |/ _` | | '_ \ +! | _| | __/ | (_| | | (_) | | | | (_| | | | | | +! |_| |_|\___|_|\__,_| \___/|_| |_|\__, |_|_| |_| +! |___/ + +!> +!! \ingroup h5block_attrib_f +!! See \ref H5Block3dGetFieldOrigin +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_get_field_origin (filehandle, name, x, y, z) + INTEGER*8, INTENT(IN) :: filehandle + CHARACTER(LEN=*), INTENT(IN) :: name + REAL*8, INTENT(OUT) :: x + REAL*8, INTENT(OUT) :: y + REAL*8, INTENT(OUT) :: z +END FUNCTION + +!> +!! \ingroup h5block_attrib_f +!! See \ref H5Block3dSetFieldOrigin +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_set_field_origin (filehandle, name, x, y, z) + INTEGER*8, INTENT(IN) :: filehandle + CHARACTER(LEN=*), INTENT(IN) :: name + REAL*8, INTENT(IN) :: x + REAL*8, INTENT(IN) :: y + REAL*8, INTENT(IN) :: z +END FUNCTION + +!> @} diff --git a/src/Fortran/H5Block_io.c b/src/Fortran/H5Block_io.c new file mode 100644 index 0000000..3a2c1c7 --- /dev/null +++ b/src/Fortran/H5Block_io.c @@ -0,0 +1,387 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5_private.h" +#include "h5core/h5b_io.h" + +#define h5bl_3d_write_scalar_field_r8 F77_NAME ( \ + h5bl_3d_write_scalar_field_r8, \ + h5bl_3d_write_scalar_field_r8_, \ + H5BL_3D_WRITE_SCALAR_FIELD_R8 ) +h5_err_t +h5bl_3d_write_scalar_field_r8 ( + const h5_int64_t* const fh, + const char* const name, + const h5_float64_t* const buffer, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, name='%*s', buffer=%p", + (h5_file_p)f, l_name, name, buffer); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_write_scalar_data ( + f, name2, (void*)buffer, H5T_NATIVE_DOUBLE ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5bl_3d_read_scalar_field_r8 F77_NAME ( \ + h5bl_3d_read_scalar_field_r8, \ + h5bl_3d_read_scalar_field_r8_, \ + H5BL_3D_READ_SCALAR_FIELD_R8 ) +h5_err_t +h5bl_3d_read_scalar_field_r8 ( + const h5_int64_t* const fh, + const char* const name, + h5_float64_t* const buffer, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, name='%s', buffer=%p, l_name=%d", + (h5_file_p)f, name, buffer, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_read_scalar_data ( + f, name2, buffer, H5T_NATIVE_DOUBLE ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5bl_3d_write_vector3d_field_r8 F77_NAME ( \ + h5bl_3d_write_vector3d_field_r8, \ + h5bl_3d_write_vector3d_field_r8_, \ + H5BL_3D_WRITE_VECTOR3D_FIELD_R8 ) +h5_err_t +h5bl_3d_write_vector3d_field_r8 ( + const h5_int64_t* const fh, + const char* const name, + const h5_float64_t* const x_buf, + const h5_float64_t* const y_buf, + const h5_float64_t* const z_buf, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p, l_name=%d", + (h5_file_p)f, name, x_buf, y_buf, z_buf, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_write_vector3d_data ( + f, name2, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_DOUBLE ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5bl_3d_read_vector3d_field_r8 F77_NAME ( \ + h5bl_3d_read_vector3d_field_r8, \ + h5bl_3d_read_vector3d_field_r8_, \ + H5BL_3D_READ_VECTOR3D_FIELD_R8 ) +h5_err_t +h5bl_3d_read_vector3d_field_r8 ( + const h5_int64_t* const fh, + const char* const name, + h5_float64_t* const x_buf, + h5_float64_t* const y_buf, + h5_float64_t* const z_buf, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p, l_name=%d", + (h5_file_p)f, name, x_buf, y_buf, z_buf, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_read_vector3d_data ( + f, name2, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_DOUBLE ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5bl_3d_write_scalar_field_r4 F77_NAME ( \ + h5bl_3d_write_scalar_field_r4, \ + h5bl_3d_write_scalar_field_r4_, \ + H5BL_3D_WRITE_SCALAR_FIELD_R4 ) +h5_err_t +h5bl_3d_write_scalar_field_r4 ( + const h5_int64_t*const fh, + const char* const name, + const h5_float32_t* const buffer, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, name='%s', buffer=%p, l_name=%d", + (h5_file_p)f, name, buffer, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_write_scalar_data ( + f, name2, (void*)buffer, H5T_NATIVE_FLOAT ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5bl_3d_read_scalar_field_r4 F77_NAME ( \ + h5bl_3d_read_scalar_field_r4, \ + h5bl_3d_read_scalar_field_r4_, \ + H5BL_3D_READ_SCALAR_FIELD_R4 ) +h5_err_t +h5bl_3d_read_scalar_field_r4 ( + const h5_int64_t* const fh, + const char* const name, + h5_float32_t* const buffer, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, name='%s', buffer=%p, l_name=%d", + (h5_file_p)f, name, buffer, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_read_scalar_data ( + f, name2, buffer, H5T_NATIVE_FLOAT ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5bl_3d_write_vector3d_field_r4 F77_NAME ( \ + h5bl_3d_write_vector3d_field_r4, \ + h5bl_3d_write_vector3d_field_r4_, \ + H5BL_3D_WRITE_VECTOR3D_FIELD_R4 ) +h5_err_t +h5bl_3d_write_vector3d_field_r4 ( + const h5_int64_t* const fh, + const char* const name, + const h5_float32_t* const x_buf, + const h5_float32_t* const y_buf, + const h5_float32_t* const z_buf, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p, l_name=%d", + (h5_file_p)f, name, x_buf, y_buf, z_buf, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_write_vector3d_data ( + f, name2, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_FLOAT ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5bl_3d_read_vector3d_field_r4 F77_NAME ( \ + h5bl_3d_read_vector3d_field_r4, \ + h5bl_3d_read_vector3d_field_r4_, \ + H5BL_3D_READ_VECTOR3D_FIELD_R4 ) +h5_err_t +h5bl_3d_read_vector3d_field_r4 ( + const h5_int64_t* const fh, + const char* const name, + h5_float32_t* const x_buf, + h5_float32_t* const y_buf, + h5_float32_t* const z_buf, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p, l_name=%d", + (h5_file_p)f, name, x_buf, y_buf, z_buf, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_read_vector3d_data ( + f, name2, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_FLOAT ); + free ( name2 ); + H5_API_RETURN (herr); +} + +#define h5bl_3d_write_scalar_field_i8 F77_NAME ( \ + h5bl_3d_write_scalar_field_i8, \ + h5bl_3d_write_scalar_field_i8_, \ + H5BL_3D_WRITE_SCALAR_FIELD_I8 ) +h5_err_t +h5bl_3d_write_scalar_field_i8 ( + const h5_int64_t* const fh, + const char* const name, + const h5_int64_t* const buffer, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, name='%s', buffer=%p, l_name=%d", + (h5_file_p)f, name, buffer, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_write_scalar_data ( + f, name2, (void*)buffer, H5T_NATIVE_INT64 ); + free ( name2 ); + H5_API_RETURN (herr); +} + +#define h5bl_3d_read_scalar_field_i8 F77_NAME ( \ + h5bl_3d_read_scalar_field_i8, \ + h5bl_3d_read_scalar_field_i8_, \ + H5BL_3D_READ_SCALAR_FIELD_I8 ) +h5_err_t +h5bl_3d_read_scalar_field_i8 ( + const h5_int64_t* const fh, + const char* const name, + h5_int64_t* const buffer, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, name='%s', buffer=%p, l_name=%d", + (h5_file_p)f, name, buffer, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_read_scalar_data ( + f, name2, buffer, H5T_NATIVE_INT64 ); + free (name2); + H5_API_RETURN (herr); +} + +#define h5bl_3d_write_vector3d_field_i8 F77_NAME ( \ + h5bl_3d_write_vector3d_field_i8, \ + h5bl_3d_write_vector3d_field_i8_, \ + H5BL_3D_WRITE_VECTOR3D_FIELD_I8 ) +h5_err_t +h5bl_3d_write_vector3d_field_i8 ( + const h5_int64_t* const fh, + const char* const name, + const h5_int64_t* const x_buf, + const h5_int64_t* const y_buf, + const h5_int64_t* const z_buf, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p, l_name=%d", + (h5_file_p)f, name, x_buf, y_buf, z_buf, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_write_vector3d_data ( + f, name2, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_INT64 ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5bl_3d_read_vector3d_field_i8 F77_NAME ( \ + h5bl_3d_read_vector3d_field_i8, \ + h5bl_3d_read_vector3d_field_i8_, \ + H5BL_3D_READ_VECTOR3D_FIELD_I8 ) +h5_err_t +h5bl_3d_read_vector3d_field_i8 ( + const h5_int64_t *const fh, + const char* const name, + h5_int64_t* const x_buf, + h5_int64_t* const y_buf, + h5_int64_t* const z_buf, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p, l_name=%d", + (h5_file_p)f, name, x_buf, y_buf, z_buf, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_read_vector3d_data ( + f, name2, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_INT64 ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5bl_3d_write_scalar_field_i4 F77_NAME ( \ + h5bl_3d_write_scalar_field_i4, \ + h5bl_3d_write_scalar_field_i4_, \ + H5BL_3D_WRITE_SCALAR_FIELD_I4 ) +h5_err_t +h5bl_3d_write_scalar_field_i4 ( + const h5_int64_t* const fh, + const char* const name, + const h5_int32_t* const buffer, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, name='%s', buffer=%p, l_name=%d", + (h5_file_p)f, name, buffer, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_write_scalar_data ( + f, name2, (void*)buffer, H5T_NATIVE_INT32 ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5bl_3d_read_scalar_field_i4 F77_NAME ( \ + h5bl_3d_read_scalar_field_i4, \ + h5bl_3d_read_scalar_field_i4_, \ + H5BL_3D_READ_SCALAR_FIELD_I4 ) +h5_err_t +h5bl_3d_read_scalar_field_i4 ( + const h5_int64_t* const fh, + const char* const name, + h5_int32_t* const buffer, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, name='%s', buffer=%p, l_name=%d", + (h5_file_p)f, name, buffer, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_read_scalar_data ( + f, name2, buffer, H5T_NATIVE_INT32 ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5bl_3d_write_vector3d_field_i4 F77_NAME ( \ + h5bl_3d_write_vector3d_field_i4, \ + h5bl_3d_write_vector3d_field_i4_, \ + H5BL_3D_WRITE_VECTOR3D_FIELD_I4 ) +h5_err_t +h5bl_3d_write_vector3d_field_i4 ( + const h5_int64_t* const fh, + const char* const name, + const h5_int32_t* const x_buf, + const h5_int32_t* const y_buf, + const h5_int32_t* const z_buf, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p, l_name=%d", + (h5_file_p)f, name, x_buf, y_buf, z_buf, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_write_vector3d_data ( + f, name2, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_INT32 ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5bl_3d_read_vector3d_field_i4 F77_NAME ( \ + h5bl_3d_read_vector3d_field_i4, \ + h5bl_3d_read_vector3d_field_i4_, \ + H5BL_3D_READ_VECTOR3D_FIELD_I4 ) +h5_err_t +h5bl_3d_read_vector3d_field_i4 ( + const h5_int64_t* const fh, + const char* const name, + h5_int32_t* const x_buf, + h5_int32_t* const y_buf, + h5_int32_t* const z_buf, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_err_t, + "fh=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p, l_name=%d", + (h5_file_p)f, name, x_buf, y_buf, z_buf, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_read_vector3d_data ( + f, name2, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_INT32 ); + free ( name2 ); + H5_API_RETURN(herr); +} diff --git a/src/Fortran/H5Block_ioF.f90 b/src/Fortran/H5Block_ioF.f90 new file mode 100644 index 0000000..12662d6 --- /dev/null +++ b/src/Fortran/H5Block_ioF.f90 @@ -0,0 +1,181 @@ +!> \ingroup h5hut_f90_api +!! \addtogroup h5block_data_f +!! @{ + +!> +!! See \ref H5Block3dWriteScalarFieldFloat64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_write_scalar_field_r8 ( filehandle, name, buffer ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + REAL*8, INTENT(IN) :: buffer(*) !< the array of data +END FUNCTION + +!> +!! See \ref H5Block3dReadScalarFieldFloat64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_read_scalar_field_r8 ( filehandle, name, buffer ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + REAL*8, INTENT(OUT) :: buffer(*) !< buffer to read the data into +END FUNCTION + +!> +!! See \ref H5Block3dWriteVector3dFieldFloat64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_write_vector3d_field_r8 ( filehandle, name, x, y, z ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + REAL*8, INTENT(IN) :: x(*) !< the array of x data to write + REAL*8, INTENT(IN) :: y(*) !< the array of y data to write + REAL*8, INTENT(IN) :: z(*) !< the array of z data to write +END FUNCTION + +!> +!! See \ref H5Block3dReadVector3dFieldFloat64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_read_vector3d_field_r8 ( filehandle, name, x, y, z ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + REAL*8, INTENT(OUT) :: x(*) !< buffer to read the x data into + REAL*8, INTENT(OUT) :: y(*) !< buffer to read the y data into + REAL*8, INTENT(OUT) :: z(*) !< buffer to read the z data into +END FUNCTION + +!> +!! See \ref H5Block3dWriteScalarFieldFloat32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_write_scalar_field_r4 ( filehandle, name, buffer ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + REAL*4, INTENT(IN) :: buffer(*) !< the array of data +END FUNCTION + +!> +!! See \ref H5Block3dReadScalarFieldFloat32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_read_scalar_field_r4 ( filehandle, name, buffer ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + REAL*4, INTENT(OUT) :: buffer(*) !< buffer to read the data into +END FUNCTION + +!> +!! See \ref H5Block3dWriteVector3dFieldFloat32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_write_vector3d_field_r4 ( filehandle, name, x, y, z ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + REAL*4, INTENT(IN) :: x(*) !< the array of x data to write + REAL*4, INTENT(IN) :: y(*) !< the array of y data to write + REAL*4, INTENT(IN) :: z(*) !< the array of z data to write +END FUNCTION + +!> +!! See \ref H5Block3dReadVector3dFieldFloat32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_read_vector3d_field_r4 ( filehandle, name, x, y, z ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + REAL*4, INTENT(OUT) :: x(*) !< buffer to read the x data into + REAL*4, INTENT(OUT) :: y(*) !< buffer to read the y data into + REAL*4, INTENT(OUT) :: z(*) !< buffer to read the z data into +END FUNCTION + +!> +!! See \ref H5Block3dWriteScalarFieldInt64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_write_scalar_field_i8 ( filehandle, name, buffer ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + INTEGER*8, INTENT(IN) :: buffer(*) !< the array of data +END FUNCTION + +!> +!! See \ref H5Block3dReadScalarFieldInt64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_read_scalar_field_i8 ( filehandle, name, buffer ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + INTEGER*8, INTENT(OUT) :: buffer(*) !< buffer to read the data into +END FUNCTION + +!> +!! See \ref H5Block3dWriteVector3dFieldInt64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_write_vector3d_field_i8 ( filehandle, name, x, y, z ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + INTEGER*8, INTENT(IN) :: x(*) !< the array of x data to write + INTEGER*8, INTENT(IN) :: y(*) !< the array of y data to write + INTEGER*8, INTENT(IN) :: z(*) !< the array of z data to write +END FUNCTION + +!> +!! See \ref H5Block3dReadVector3dFieldInt64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_read_vector3d_field_i8 ( filehandle, name, x, y, z ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + INTEGER*8, INTENT(OUT) :: x(*) !< buffer to read the x data into + INTEGER*8, INTENT(OUT) :: y(*) !< buffer to read the y data into + INTEGER*8, INTENT(OUT) :: z(*) !< buffer to read the z data into +END FUNCTION + +!> +!! See \ref H5Block3dWriteScalarFieldInt32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_write_scalar_field_i4 ( filehandle, name, buffer ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + INTEGER*4, INTENT(IN) :: buffer(*) !< the array of data +END FUNCTION + +!> +!! See \ref H5Block3dReadScalarFieldInt32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_read_scalar_field_i4 ( filehandle, name, buffer ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + INTEGER*4, INTENT(OUT) :: buffer(*) !< buffer to read the data into +END FUNCTION + +!> +!! See \ref H5Block3dWriteVector3dFieldInt32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_write_vector3d_field_i4 ( filehandle, name, x, y, z ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + INTEGER*4, INTENT(IN) :: x(*) !< the array of x data to write + INTEGER*4, INTENT(IN) :: y(*) !< the array of y data to write + INTEGER*4, INTENT(IN) :: z(*) !< the array of z data to write +END FUNCTION + +!> +!! See \ref H5Block3dReadVector3dFieldInt32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5bl_3d_read_vector3d_field_i4 ( filehandle, name, x, y, z ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned at file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + INTEGER*4, INTENT(OUT) :: x(*) !< buffer to read the x data into + INTEGER*4, INTENT(OUT) :: y(*) !< buffer to read the y data into + INTEGER*4, INTENT(OUT) :: z(*) !< buffer to read the z data into +END FUNCTION + +!> @} diff --git a/src/Fortran/H5Block_readwrite_F.c b/src/Fortran/H5Block_readwrite_F.c new file mode 100644 index 0000000..33ac9a9 --- /dev/null +++ b/src/Fortran/H5Block_readwrite_F.c @@ -0,0 +1,677 @@ + +#include + +#include "h5core/h5_core.h" +#include "Underscore.h" + +#if defined(F77_SINGLE_UNDERSCORE) +#define F77NAME(a,b) a +#elif defined(F77_CRAY_UNDERSCORE) +#define F77NAME(a,b) b +#elif defined(F77_NO_UNDERSCORE) +#else +#error Error, no way to determine how to construct fortran bindings +#endif + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_3d_write_scalar_field_r8 F77NAME ( \ + h5bl_3d_write_scalar_field_r8_, \ + H5BL_3D_WRITE_SCALAR_FIELD_R8 ) +#endif + +h5_err_t +h5bl_3d_write_scalar_field_r8 ( + h5_int64_t *const f, + const char *name, + const h5_float64_t *buffer, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d", + fh, name, buffer, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_write_scalar_data ( + fh, name2, (void*)buffer, H5T_NATIVE_DOUBLE ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_3d_read_scalar_field_r8 F77NAME ( \ + h5bl_3d_read_scalar_field_r8_, \ + H5BL_3D_READ_SCALAR_FIELD_R8 ) +#endif + +h5_err_t +h5bl_3d_read_scalar_field_r8 ( + h5_int64_t *const f, + const char *name, + h5_float64_t *buffer, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d", + fh, name, buffer, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_read_scalar_data ( + fh, name2, buffer, H5T_NATIVE_DOUBLE ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_3d_write_vector3d_field_r8 F77NAME ( \ + h5bl_3d_write_vector3d_field_r8_, \ + H5BL_3D_WRITE_VECTOR3D_FIELD_R8 ) +#endif + +h5_err_t +h5bl_3d_write_vector3d_field_r8 ( + h5_int64_t *const f, + const char *name, + const h5_float64_t *x_buf, + const h5_float64_t *y_buf, + const h5_float64_t *z_buf, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p, l_name=%d", + fh, name, x_buf, y_buf, z_buf, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_write_vector3d_data ( + fh, name2, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_DOUBLE ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_3d_read_vector3d_field_r8 F77NAME ( \ + h5bl_3d_read_vector3d_field_r8_, \ + H5BL_3D_READ_VECTOR3D_FIELD_R8 ) +#endif + +h5_err_t +h5bl_3d_read_vector3d_field_r8 ( + h5_int64_t *const f, + const char *name, + h5_float64_t *x_buf, + h5_float64_t *y_buf, + h5_float64_t *z_buf, + const int l_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p, l_name=%d", + fh, name, x_buf, y_buf, z_buf, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_read_vector3d_data ( + fh, name2, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_DOUBLE ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_3d_write_scalar_field_r4 F77NAME ( \ + h5bl_3d_write_scalar_field_r4_, \ + H5BL_3D_WRITE_SCALAR_FIELD_R4 ) +#endif + +h5_err_t +h5bl_3d_write_scalar_field_r4 ( + h5_int64_t *const f, + const char *name, + const h5_float32_t *buffer, + const int l_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d", + fh, name, buffer, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_write_scalar_data ( + fh, name2, (void*)buffer, H5T_NATIVE_FLOAT ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_3d_read_scalar_field_r4 F77NAME ( \ + h5bl_3d_read_scalar_field_r4_, \ + H5BL_3D_READ_SCALAR_FIELD_R4 ) +#endif + +h5_err_t +h5bl_3d_read_scalar_field_r4 ( + h5_int64_t *const f, + const char *name, + h5_float32_t *buffer, + const int l_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d", + fh, name, buffer, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_read_scalar_data ( + fh, name2, buffer, H5T_NATIVE_FLOAT ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_3d_write_vector3d_field_r4 F77NAME ( \ + h5bl_3d_write_vector3d_field_r4_, \ + H5BL_3D_WRITE_VECTOR3D_FIELD_R4 ) +#endif + +h5_err_t +h5bl_3d_write_vector3d_field_r4 ( + h5_int64_t *const f, + const char *name, + const h5_float32_t *x_buf, + const h5_float32_t *y_buf, + const h5_float32_t *z_buf, + const int l_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p, l_name=%d", + fh, name, x_buf, y_buf, z_buf, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_write_vector3d_data ( + fh, name2, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_FLOAT ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_3d_read_vector3d_field_r4 F77NAME ( \ + h5bl_3d_read_vector3d_field_r4_, \ + H5BL_3D_READ_VECTOR3D_FIELD_R4 ) +#endif + +h5_err_t +h5bl_3d_read_vector3d_field_r4 ( + h5_int64_t *const f, + const char *name, + h5_float32_t *x_buf, + h5_float32_t *y_buf, + h5_float32_t *z_buf, + const int l_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p, l_name=%d", + fh, name, x_buf, y_buf, z_buf, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_read_vector3d_data ( + fh, name2, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_FLOAT ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_3d_write_scalar_field_i8 F77NAME ( \ + h5bl_3d_write_scalar_field_i8_, \ + H5BL_3D_WRITE_SCALAR_FIELD_I8 ) +#endif + +h5_err_t +h5bl_3d_write_scalar_field_i8 ( + h5_int64_t *const f, + const char *name, + const h5_int64_t *buffer, + const int l_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d", + fh, name, buffer, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_write_scalar_data ( + fh, name2, (void*)buffer, H5T_NATIVE_INT64 ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_3d_read_scalar_field_i8 F77NAME ( \ + h5bl_3d_read_scalar_field_i8_, \ + H5BL_3D_READ_SCALAR_FIELD_I8 ) +#endif + +h5_err_t +h5bl_3d_read_scalar_field_i8 ( + h5_int64_t *const f, + const char *name, + h5_int64_t *buffer, + const int l_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d", + fh, name, buffer, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_read_scalar_data ( + fh, name2, buffer, H5T_NATIVE_INT64 ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_3d_write_vector3d_field_i8 F77NAME ( \ + h5bl_3d_write_vector3d_field_i8_, \ + H5BL_3D_WRITE_VECTOR3D_FIELD_I8 ) +#endif + +h5_err_t +h5bl_3d_write_vector3d_field_i8 ( + h5_int64_t *const f, + const char *name, + const h5_int64_t *x_buf, + const h5_int64_t *y_buf, + const h5_int64_t *z_buf, + const int l_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p, l_name=%d", + fh, name, x_buf, y_buf, z_buf, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_write_vector3d_data ( + fh, name2, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_INT64 ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_3d_read_vector3d_field_i8 F77NAME ( \ + h5bl_3d_read_vector3d_field_i8_, \ + H5BL_3D_READ_VECTOR3D_FIELD_I8 ) +#endif + +h5_err_t +h5bl_3d_read_vector3d_field_i8 ( + h5_int64_t *const f, + const char *name, + h5_int64_t *x_buf, + h5_int64_t *y_buf, + h5_int64_t *z_buf, + const int l_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p, l_name=%d", + fh, name, x_buf, y_buf, z_buf, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_read_vector3d_data ( + fh, name2, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_INT64 ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_3d_write_scalar_field_i4 F77NAME ( \ + h5bl_3d_write_scalar_field_i4_, \ + H5BL_3D_WRITE_SCALAR_FIELD_I4 ) +#endif + +h5_err_t +h5bl_3d_write_scalar_field_i4 ( + h5_int64_t *const f, + const char *name, + const h5_int32_t *buffer, + const int l_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d", + fh, name, buffer, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_write_scalar_data ( + fh, name2, (void*)buffer, H5T_NATIVE_INT32 ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_3d_read_scalar_field_i4 F77NAME ( \ + h5bl_3d_read_scalar_field_i4_, \ + H5BL_3D_READ_SCALAR_FIELD_I4 ) +#endif + +h5_err_t +h5bl_3d_read_scalar_field_i4 ( + h5_int64_t *const f, + const char *name, + h5_int32_t *buffer, + const int l_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d", + fh, name, buffer, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_read_scalar_data ( + fh, name2, buffer, H5T_NATIVE_INT32 ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_3d_write_vector3d_field_i4 F77NAME ( \ + h5bl_3d_write_vector3d_field_i4_, \ + H5BL_3D_WRITE_VECTOR3D_FIELD_I4 ) +#endif + +h5_err_t +h5bl_3d_write_vector3d_field_i4 ( + h5_int64_t *const f, + const char *name, + const h5_int32_t *x_buf, + const h5_int32_t *y_buf, + const h5_int32_t *z_buf, + const int l_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p, l_name=%d", + fh, name, x_buf, y_buf, z_buf, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_write_vector3d_data ( + fh, name2, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_INT32 ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_3d_read_vector3d_field_i4 F77NAME ( \ + h5bl_3d_read_vector3d_field_i4_, \ + H5BL_3D_READ_VECTOR3D_FIELD_I4 ) +#endif + +h5_err_t +h5bl_3d_read_vector3d_field_i4 ( + h5_int64_t *const f, + const char *name, + h5_int32_t *x_buf, + h5_int32_t *y_buf, + h5_int32_t *z_buf, + const int l_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p, l_name=%d", + fh, name, x_buf, y_buf, z_buf, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5b_read_vector3d_data ( + fh, name2, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_INT32 ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_writefieldattrib_r8 F77NAME ( \ + h5bl_writefieldattrib_r8_, \ + H5BL_WRITEFIELDATTRIB_R8 ) +#endif + +h5_err_t +h5bl_writefieldattrib_r8 ( + h5_int64_t *const f, + const char *field_name, + const char *attrib_name, + const h5_float64_t *buffer, + const h5_size_t *nelems, + const int l_field_name, + const int l_attrib_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', attrib_name='%s', " + "buffer=%p, nelems=%lld, l_field_name=%d, l_attrib_name=%d", + fh, field_name, attrib_name, buffer, (long long)*nelems, + l_field_name, l_attrib_name); + char *field_name2 = h5_strdupfor2c ( field_name, l_field_name ); + char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name ); + h5_err_t herr = h5_write_field_attrib ( + fh, field_name2, attrib_name2, + H5T_NATIVE_DOUBLE, buffer, *nelems ); + free ( field_name2 ); + free ( attrib_name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_readfieldattrib_r8 F77NAME ( \ + h5bl_readfieldattrib_r8_, \ + H5BL_READFIELDATTRIB_R8 ) +#endif + +h5_err_t +h5bl_readfieldattrib_r8 ( + h5_int64_t *const f, + const char *field_name, + const char *attrib_name, + h5_float64_t *buffer, + const int l_field_name, + const int l_attrib_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', attrib_name='%s', " + "values=%p, l_field_name=%d, l_attrib_name=%d", + fh, field_name, attrib_name, buffer, + l_field_name, l_attrib_name); + char *field_name2 = h5_strdupfor2c ( field_name, l_field_name ); + char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name ); + h5_err_t herr = h5_read_field_attrib ( + fh, field_name2, attrib_name2, H5T_NATIVE_DOUBLE, buffer ); + free ( field_name2 ); + free ( attrib_name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_writefieldattrib_r4 F77NAME ( \ + h5bl_writefieldattrib_r4_, \ + H5BL_WRITEFIELDATTRIB_R4 ) +#endif + +h5_err_t +h5bl_writefieldattrib_r4 ( + h5_int64_t *const f, + const char *field_name, + const char *attrib_name, + const h5_float32_t *buffer, + const h5_size_t *nelems, + const int l_field_name, + const int l_attrib_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', attrib_name='%s', " + "buffer=%p, nelems=%lld, l_field_name=%d, l_attrib_name=%d", + fh, field_name, attrib_name, buffer, (long long)*nelems, + l_field_name, l_attrib_name); + char *field_name2 = h5_strdupfor2c ( field_name, l_field_name ); + char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name ); + h5_err_t herr = h5_write_field_attrib ( + fh, field_name2, attrib_name2, + H5T_NATIVE_FLOAT, buffer, *nelems ); + free ( field_name2 ); + free ( attrib_name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_readfieldattrib_r4 F77NAME ( \ + h5bl_readfieldattrib_r4_, \ + H5BL_READFIELDATTRIB_R4 ) +#endif + +h5_err_t +h5bl_readfieldattrib_r4 ( + h5_int64_t *const f, + const char *field_name, + const char *attrib_name, + h5_float32_t *buffer, + const int l_field_name, + const int l_attrib_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', attrib_name='%s', " + "values=%p, l_field_name=%d, l_attrib_name=%d", + fh, field_name, attrib_name, buffer, + l_field_name, l_attrib_name); + char *field_name2 = h5_strdupfor2c ( field_name, l_field_name ); + char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name ); + h5_err_t herr = h5_read_field_attrib ( + fh, field_name2, attrib_name2, H5T_NATIVE_FLOAT, buffer ); + free ( field_name2 ); + free ( attrib_name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_writefieldattrib_i8 F77NAME ( \ + h5bl_writefieldattrib_i8_, \ + H5BL_WRITEFIELDATTRIB_I8 ) +#endif + +h5_err_t +h5bl_writefieldattrib_i8 ( + h5_int64_t *const f, + const char *field_name, + const char *attrib_name, + const h5_int64_t *buffer, + const h5_size_t *nelems, + const int l_field_name, + const int l_attrib_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', attrib_name='%s', " + "buffer=%p, nelems=%lld, l_field_name=%d, l_attrib_name=%d", + fh, field_name, attrib_name, buffer, (long long)*nelems, + l_field_name, l_attrib_name); + char *field_name2 = h5_strdupfor2c ( field_name, l_field_name ); + char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name ); + h5_err_t herr = h5_write_field_attrib ( + fh, field_name2, attrib_name2, + H5T_NATIVE_INT64, buffer, *nelems ); + free ( field_name2 ); + free ( attrib_name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_readfieldattrib_i8 F77NAME ( \ + h5bl_readfieldattrib_i8_, \ + H5BL_READFIELDATTRIB_I8 ) +#endif + +h5_err_t +h5bl_readfieldattrib_i8 ( + h5_int64_t *const f, + const char *field_name, + const char *attrib_name, + h5_int64_t *buffer, + const int l_field_name, + const int l_attrib_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', attrib_name='%s', " + "values=%p, l_field_name=%d, l_attrib_name=%d", + fh, field_name, attrib_name, buffer, + l_field_name, l_attrib_name); + char *field_name2 = h5_strdupfor2c ( field_name, l_field_name ); + char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name ); + h5_err_t herr = h5_read_field_attrib ( + fh, field_name2, attrib_name2, H5T_NATIVE_INT64, buffer ); + free ( field_name2 ); + free ( attrib_name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_writefieldattrib_i4 F77NAME ( \ + h5bl_writefieldattrib_i4_, \ + H5BL_WRITEFIELDATTRIB_I4 ) +#endif + +h5_err_t +h5bl_writefieldattrib_i4 ( + h5_int64_t *const f, + const char *field_name, + const char *attrib_name, + const h5_int32_t *buffer, + const h5_size_t *nelems, + const int l_field_name, + const int l_attrib_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', attrib_name='%s', " + "buffer=%p, nelems=%lld, l_field_name=%d, l_attrib_name=%d", + fh, field_name, attrib_name, buffer, (long long)*nelems, + l_field_name, l_attrib_name); + char *field_name2 = h5_strdupfor2c ( field_name, l_field_name ); + char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name ); + h5_err_t herr = h5_write_field_attrib ( + fh, field_name2, attrib_name2, + H5T_NATIVE_INT32, buffer, *nelems ); + free ( field_name2 ); + free ( attrib_name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5bl_readfieldattrib_i4 F77NAME ( \ + h5bl_readfieldattrib_i4_, \ + H5BL_READFIELDATTRIB_I4 ) +#endif + +h5_err_t +h5bl_readfieldattrib_i4 ( + h5_int64_t *const f, + const char *field_name, + const char *attrib_name, + h5_int32_t *buffer, + const int l_field_name, + const int l_attrib_name + ) { + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', attrib_name='%s', " + "values=%p, l_field_name=%d, l_attrib_name=%d", + fh, field_name, attrib_name, buffer, + l_field_name, l_attrib_name); + char *field_name2 = h5_strdupfor2c ( field_name, l_field_name ); + char *attrib_name2 = h5_strdupfor2c ( attrib_name, l_attrib_name ); + h5_err_t herr = h5_read_field_attrib ( + fh, field_name2, attrib_name2, H5T_NATIVE_INT32, buffer ); + free ( field_name2 ); + free ( attrib_name2 ); + H5_API_RETURN(herr); +} diff --git a/src/Fortran/H5F.f90 b/src/Fortran/H5F.f90 new file mode 100644 index 0000000..7c234f2 --- /dev/null +++ b/src/Fortran/H5F.f90 @@ -0,0 +1,215 @@ +! Declaration of subroutines for Fortran Bindings + +!!!!!!!! File Opening and Closing !!!!!!!! + + +!> +!! \ingroup h5hut_file_f +!! Opens a file for reading. See \ref H5OpenFile +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_openr ( filename ) + CHARACTER(LEN=*), INTENT(IN) :: filename !< the filename to open for reading +END FUNCTION + +!> +!! \ingroup h5hut_file_f +!! Opens a file for writing in truncate mode. See \ref H5OpenFile +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_openw ( filename ) + CHARACTER(LEN=*), INTENT(IN) :: filename !< the filename to open for writing +END FUNCTION + +!> +!! \ingroup h5hut_file_f +!! Opens a file for writing in append mode. See \ref H5OpenFile +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_opena ( filename ) + CHARACTER(LEN=*), INTENT(IN) :: filename !< the filename to open for appending +END FUNCTION + +!> +!! \ingroup h5hut_file_f +!! Opens a parallel file for reading. See \ref H5OpenFile +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_openr_par ( filename, mpi_communicator ) + CHARACTER(LEN=*), INTENT(IN) :: filename !< the filename to open for reading + INTEGER, INTENT(IN) :: mpi_communicator !< the MPI communicator used by the program +END FUNCTION + +!> +!! \ingroup h5hut_file_f +!! Opens a parallel file for writing in truncate mode. See \ref H5OpenFile +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_openw_par ( filename, mpi_communicator ) + CHARACTER(LEN=*), INTENT(IN) :: filename !< the filename to open for writing + INTEGER, INTENT(IN) :: mpi_communicator !< the MPI_Communicator used by the program +END FUNCTION + +!> +!! \ingroup h5hut_file_f +!! Opens a parallel file for writing in append mode. See \ref H5OpenFile +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_opena_par ( filename, mpi_communicator ) + CHARACTER(LEN=*), INTENT(IN) :: filename !< the filename to open for appending + INTEGER, INTENT(IN) :: mpi_communicator !< the MPI_Communicator used by the program +END FUNCTION + +!> +!! \ingroup h5hut_file_f +!! Opens a file for reading and specifies an HDF5 alignment. +!! See \ref H5OpenFileAlign +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_openr_align ( filename, align ) + CHARACTER(LEN=*), INTENT(IN) :: filename !< the filename to open for reading + INTEGER*8, INTENT(IN) :: align !< alignment value in bytes +END FUNCTION + +!> +!! \ingroup h5hut_file_f +!! Opens a file for writing in truncate mode and specifies an HDF5 alignment. +!! See \ref H5OpenFileAlign +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_openw_align ( filename, align ) + CHARACTER(LEN=*), INTENT(IN) :: filename !< the filename to open for writing + INTEGER*8, INTENT(IN) :: align !< alignment value in bytes +END FUNCTION + +!> +!! \ingroup h5hut_file_f +!! Opens a file for writing in append mode and specifies an HDF5 alignment. +!! See \ref H5OpenFileAlign +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_opena_align ( filename, align ) + CHARACTER(LEN=*), INTENT(IN) :: filename !< the filename to open for appending + INTEGER*8, INTENT(IN) :: align !< alignment value in bytes +END FUNCTION + +!> +!! \ingroup h5hut_file_f +!! Opens a parallel file for reading and specifies an HDF5 alignment. +!! See \ref H5OpenFileAlign +!! +!! Flags are specified as a comma separated string that can include: +!! +!! - \c fs_lustre - enable optimizations for the Lustre file system +!! - \c vfd_mpiposix - use the HDF5 MPI-POSIX virtual file driver +!! - \c vfd_mpio_ind - use MPI-IO in indepedent mode +!! +!! See \ref H5OpenFileAlign +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_openr_par_align ( filename, mpi_communicator, align, flags ) + CHARACTER(LEN=*), INTENT(IN) :: filename !< the filename to open for reading + INTEGER, INTENT(IN) :: mpi_communicator !< the MPI_Communicator used by the program + INTEGER*8, INTENT(IN) :: align !< alignment value in bytes + CHARACTER(LEN=*), INTENT(IN) :: flags !< additional flags +END FUNCTION + +!> +!! \ingroup h5hut_file_f +!! Opens a parallel file for writing in truncate mode and specifies +!! an HDF5 alignment. +!! +!! Flags are specified as a comma separated string that can include: +!! +!! - \c fs_lustre - enable optimizations for the Lustre file system +!! - \c vfd_mpiposix - use the HDF5 MPI-POSIX virtual file driver +!! - \c vfd_mpio_ind - use MPI-IO in indepedent mode +!! +!! See \ref H5OpenFileAlign +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_openw_par_align ( filename, mpi_communicator, align, flags ) + CHARACTER(LEN=*), INTENT(IN) :: filename !< the filename to open for writing + INTEGER, INTENT(IN) :: mpi_communicator !< the MPI_Communicator used by the program + INTEGER*8, INTENT(IN) :: align !< alignment value in bytes + CHARACTER(LEN=*), INTENT(IN) :: flags !< additional flags +END FUNCTION + +!> +!! \ingroup h5hut_file_f +!! Opens a parallel file for writing in append mode and specifies +!! an HDF5 alignment. +!! +!! Flags are specified as a comma separated string that can include: +!! +!! - \c fs_lustre - enable optimizations for the Lustre file system +!! - \c vfd_mpiposix - use the HDF5 MPI-POSIX virtual file driver +!! - \c vfd_mpio_ind - use MPI-IO in indepedent mode +!! +!! See \ref H5OpenFileAlign +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_opena_par_align ( filename, mpi_communicator, align, flags ) + CHARACTER(LEN=*), INTENT(IN) :: filename !< the filename to open for appending + INTEGER, INTENT(IN) :: mpi_communicator !< the MPI_Communicator used by the program + INTEGER*8, INTENT(IN) :: align !< alignment value in bytes + CHARACTER(LEN=*), INTENT(IN) :: flags !< additional flags +END FUNCTION + +!> +!! \ingroup h5hut_file_f +!! Closes a file. See \ref H5CloseFile +!! \return 0 on success or error code +INTEGER*8 FUNCTION h5_close ( filehandle ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open +END FUNCTION + +!> +!! \ingroup h5hut_file_f +!! Close HDF5 library. See \ref H5Finalize +!! \return \c H5_SUCCESS or \c H5_FAILURE +INTEGER*8 FUNCTION h5_finalize () +END FUNCTION + +!> +!! \ingroup h5hut_file_f +!! Checks that a file is valid. See \ref H5CheckFile +!! \return 0 on success or error code +INTEGER*8 FUNCTION h5_check ( filehandle ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open +END FUNCTION + + +!> +!! \ingroup h5hut_model_f +!! See \ref H5SetStep +!! \return 0 on success or error code +INTEGER*8 FUNCTION h5_setstep (filehandle,step) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open + INTEGER*8, INTENT(IN) :: step !< a timestep value >= 1 +END FUNCTION + +!> +!! \ingroup h5hut_model_f +!! See \ref H5GetStep +!! \return the the current step or \c H5_FAILURE +INTEGER*8 FUNCTION h5_getstep (filehandle) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open +END FUNCTION + +!> +!! \ingroup h5hut_model_f +!! See \ref H5GetNumSteps +!! \return the number of steps or error code +INTEGER*8 FUNCTION h5_getnsteps (filehandle) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open +END FUNCTION + +!> +!! \ingroup h5hut_error_f +!! See \ref H5SetVerbosityLevel +!! \return 0 on success or error code +INTEGER*8 FUNCTION h5_set_verbosity_level ( level ) + INTEGER*8, INTENT(IN) :: level !< the level from 0 (no output) to 5 (most detailed) +END FUNCTION + diff --git a/src/Fortran/H5Part.c b/src/Fortran/H5Part.c new file mode 100755 index 0000000..4beabba --- /dev/null +++ b/src/Fortran/H5Part.c @@ -0,0 +1,219 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5_private.h" +#include "h5core/h5u_model.h" + +/*==============Reading Data Characteristics============*/ + +#define h5pt_getndatasets F77_NAME ( \ + h5pt_getndatasets, \ + h5pt_getndatasets_, \ + H5PT_GETNDATASETS ) +h5_int64_t +h5pt_getndatasets ( + const h5_int64_t* const fh + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, "fh=%p", (h5_file_p)f); + H5_API_RETURN(h5u_get_num_datasets (f)); +} + +#define h5pt_getnpoints F77_NAME ( \ + h5pt_getnpoints, \ + h5pt_getnpoints_, \ + H5PT_GETNPOINTS ) +h5_int64_t +h5pt_getnpoints ( + const h5_int64_t* const fh + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, "fh=%p", (h5_file_p)f); + H5_API_RETURN (h5u_get_num_particles (f)); +} + +#define h5pt_getdatasetname F77_NAME ( \ + h5pt_getdatasetname, \ + h5pt_getdatasetname_, \ + H5PT_GETDATASETNAME ) +h5_int64_t +h5pt_getdatasetname ( + const h5_int64_t* const fh, + const h5_int64_t* index, + char* name, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, index=%lld, name='%s', l_name=%d", + (h5_file_p)f, (long long)*index, name, l_name); + h5_int64_t herr = h5u_get_dataset_info ( + f, *index - 1, name, l_name, NULL, NULL ); + h5_strc2for (name, l_name); + H5_API_RETURN (herr); +} + +#define h5pt_getdatasetinfo F77_NAME( \ + h5pt_getdatasetinfo, \ + h5pt_getdatasetinfo_, \ + H5PT_GETDATASETINFO) +h5_int64_t +h5pt_getdatasetinfo ( + const h5_int64_t* const fh, + const h5_int64_t* dataset_idx, + char* dataset_name, + h5_int64_t* dataset_type, + h5_int64_t* dataset_nelem, + const int l_dataset_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, " + "dataset_idx=%lld, " + "dataset_name=%p, " + "dataset_type=%p, " + "dataset_nelem=%p", + (h5_file_p)f, + (long long)*dataset_idx, + dataset_name, dataset_type, dataset_nelem); + h5_int64_t h5err = h5u_get_dataset_info ( + f, + *dataset_idx - 1, + dataset_name, l_dataset_name, + dataset_type, + (h5_size_t*)dataset_nelem); + h5_strc2for (dataset_name, l_dataset_name); + convert_type2for (dataset_type); + H5_API_RETURN (h5err); +} + +/*=============Setting and getting views================*/ + +#define h5pt_setview F77_NAME ( \ + h5pt_setview, \ + h5pt_setview_, \ + H5PT_SETVIEW ) +h5_int64_t +h5pt_setview ( + const h5_int64_t* const fh, + const h5_int64_t* const start, + const h5_int64_t* const end + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, start=%lld, end=%lld", + (h5_file_p)f, (long long)*start, (long long)*end); + H5_API_RETURN (h5u_set_view (f, (*start)-1, (*end)-1)); +} + +#define h5pt_setview_indices F77_NAME ( \ + h5pt_setview_indices, \ + h5pt_setview_indices_, \ + H5PT_SETVIEW_INDICES ) +h5_int64_t +h5pt_setview_indices ( + const h5_int64_t* const fh, + const h5_int64_t* const indices, + const h5_int64_t* const nelem + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, indices=%p, nelem=%lld", + (h5_file_p)f, indices, (long long)*nelem); + h5_size_t* findices; + TRY (findices = h5_calloc (*nelem, sizeof (*indices))); + for (size_t i = 0; i < *nelem; i++) + findices[i] = indices[i] - 1; + TRY (h5u_set_view_indices (f, findices, *nelem)); + TRY (h5_free (findices)); + H5_API_RETURN (H5_SUCCESS); +} + +#define h5pt_setnpoints F77_NAME ( \ + h5pt_setnpoints, \ + h5pt_setnpoints_, \ + H5PT_SETNPOINTS ) +h5_int64_t +h5pt_setnpoints ( + const h5_int64_t* const fh, + const h5_int64_t* const npoints + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, npoints=%lld", + (h5_file_p)f, (long long)*npoints); + H5_API_RETURN (h5u_set_num_particles (f, *npoints, 1)); +} + +#define h5pt_setnpoints_strided F77_NAME ( \ + h5pt_setnpoints_strided, \ + h5pt_setnpoints_strided_, \ + H5PT_SETNPOINTS_STRIDED ) +h5_int64_t +h5pt_setnpoints_strided ( + const h5_int64_t* const fh, + const h5_int64_t* const npoints, + const h5_int64_t* const stride + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, npoints=%lld, stride=%lld", + (h5_file_p)f, (long long)*npoints, (long long)*stride); + H5_API_RETURN (h5u_set_num_particles (f, *npoints, *stride)); +} + +#define h5pt_resetview F77_NAME ( \ + h5pt_resetview, \ + h5pt_resetview_, \ + H5PT_RESETVIEW ) +h5_int64_t +h5pt_resetview ( + const h5_int64_t* const fh + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p", + (h5_file_p)f); + H5_API_RETURN (h5u_reset_view (f)); +} + +#define h5pt_hasview F77_NAME ( \ + h5pt_hasview, \ + h5pt_hasview_, \ + H5PT_HASVIEW ) +h5_int64_t +h5pt_hasview ( + const h5_int64_t* const fh + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p", + (h5_file_p)f); + H5_API_RETURN (h5u_has_view (f)); +} + +#define h5pt_getview F77_NAME ( \ + h5pt_getview, \ + h5pt_getview_, \ + H5PT_GETVIEW ) +h5_int64_t +h5pt_getview ( + const h5_int64_t* const fh, + h5_int64_t* const start, + h5_int64_t* const end + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, start=%p, end=%p", + (h5_file_p)f, start, end); + TRY (h5u_get_view (f, start, end)); + *start += 1; + *end += 1; + H5_API_RETURN (H5_SUCCESS); +} diff --git a/src/Fortran/H5PartF.f90 b/src/Fortran/H5PartF.f90 new file mode 100644 index 0000000..d75ece9 --- /dev/null +++ b/src/Fortran/H5PartF.f90 @@ -0,0 +1,127 @@ +!!!!!!!! Setting up the Data Model !!!!!!!! + + +!> +!! \ingroup h5part_model_f +!! +!! See \ref H5PartSetNumParticles +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5pt_setnpoints ( filehandle, npoints ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open + INTEGER*8, INTENT(IN) :: npoints !< the number of particles on *this* processor +END FUNCTION + +!> +!! \ingroup h5part_model_f +!! +!! See \ref H5PartSetNumParticlesStrided +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5pt_setnpoints_strided ( filehandle, npoints, stride ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open + INTEGER*8, INTENT(IN) :: npoints !< the number of particles on *this* processor + INTEGER*8, INTENT(IN) :: stride !< the stride value (e.g. the number of fields in the particle data array) +END FUNCTION + +!> +!! \ingroup h5part_model_f +!! +!! See \ref H5PartGetNumDatasets +!! \return the number of datasets or error code +!< +INTEGER*8 FUNCTION h5pt_getndatasets (filehandle) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open +END FUNCTION + +!> +!! \ingroup h5part_model_f +!! +!! See \ref H5PartGetNumParticles +!! \return the number of particles or error code +!< +INTEGER*8 FUNCTION h5pt_getnpoints (filehandle) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open +END FUNCTION + +!> +!! \ingroup h5part_model_f +!! +!! See \ref H5PartGetDatasetName +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5pt_getdatasetname (filehandle,index,name) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open + INTEGER*8, INTENT(IN) :: index !< index of dataset to query (starting from 0) + CHARACTER(LEN=*), INTENT(OUT) :: name !< buffer to read the dataset name into +END FUNCTION + +!> +!! \ingroup h5part_model_f +!! +!! See \ref H5PartGetDatasetInfo +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5pt_getdatasetinfo (filehandle, idx, name, type, num_elems) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + INTEGER*8,INTENT(IN) :: idx !< index of dataset being queried + CHARACTER(LEN=*), INTENT(OUT):: name !< name of datset + INTEGER*8,INTENT(OUT):: type !< type of datset + INTEGER*8,INTENT(OUT):: num_elems !< number of elements in the dataset +END FUNCTION + +!> +!! \ingroup h5part_model_f +!! +!! See \ref H5PartSetView +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5pt_setview (filehandle,start,end) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open + INTEGER*8, INTENT(IN) :: start !< offset of the first particle in the view + INTEGER*8, INTENT(IN) :: end !< offset of the last particle in the view (inclusive) +END FUNCTION + +!> +!! \ingroup h5part_model_f +!! +!! See \ref H5PartSetViewIndices +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5pt_setview_indices (filehandle,indices,nelem) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open + INTEGER*8, INTENT(IN) :: indices(*) !< list of indicies to select in this view + INTEGER*8, INTENT(IN) :: nelem !< number of particles in the list +END FUNCTION + +!> +!! \ingroup h5part_model_f +!! +!! See \ref H5PartResetView +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5pt_resetview (filehandle) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open +END FUNCTION + +!> +!! \ingroup h5part_model_f +!! +!! See \ref H5PartResetView +!! \return 1 if true, 0 if false, or error code +!< +INTEGER*8 FUNCTION h5pt_hasview (filehandle) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open +END FUNCTION + +!> +!! \ingroup h5part_model_f +!! +!! See \ref H5PartGetView +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5pt_getview (filehandle,start,end) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open + INTEGER*8, INTENT(OUT) :: start !< buffer to store the offset of the first particle in the view + INTEGER*8, INTENT(OUT) :: end !< buffer to store the offset of the last particle in the view (inclusive) +END FUNCTION diff --git a/src/Fortran/H5Part_F.c b/src/Fortran/H5Part_F.c new file mode 100755 index 0000000..83c623a --- /dev/null +++ b/src/Fortran/H5Part_F.c @@ -0,0 +1,345 @@ +#include + +#include "h5core/h5_core.h" +#include "Underscore.h" + +#if defined(F77_SINGLE_UNDERSCORE) +#define F77NAME(a,b) a +#elif defined(F77_CRAY_UNDERSCORE) +#define F77NAME(a,b) b +#elif defined(F77_NO_UNDERSCORE) +#else +#error Error, no way to determine how to construct fortran bindings +#endif + +#if !defined(F77_NO_UNDERSCORE) + +#define h5pt_setnpoints F77NAME ( \ + h5pt_setnpoints_, \ + H5PT_SETNPOINTS ) +#define h5pt_setnpoints_strided F77NAME ( \ + h5pt_setnpoints_strided_, \ + H5PT_SETNPOINTS_STRIDED ) +#define h5pt_getnsteps F77NAME ( \ + h5pt_getnsteps_, \ + H5PT_GETNSTEPS ) +#define h5pt_getndatasets F77NAME ( \ + h5pt_getndatasets_, \ + H5PT_GETNDATASETS ) +#define h5pt_getnpoints F77NAME ( \ + h5pt_getnpoints_, \ + H5PT_GETNPOINTS ) +#define h5pt_getdatasetname F77NAME ( \ + h5pt_getdatasetname_, \ + H5PT_GETDATASETNAME ) +#define h5pt_setview F77NAME ( \ + h5pt_setview_, \ + H5PT_SETVIEW ) +#define h5pt_setview_indices F77NAME ( \ + h5pt_setview_indices_, \ + H5PT_SETVIEW_INDICES ) +#define h5pt_resetview F77NAME ( \ + h5pt_resetview_, \ + H5PT_RESETVIEW ) +#define h5pt_hasview F77NAME ( \ + h5pt_hasview_, \ + H5PT_HASVIEW ) +#define h5pt_getview F77NAME ( \ + h5pt_getview_, \ + H5PT_GETVIEW ) +#define h5pt_writedata_r8 F77NAME ( \ + h5pt_writedata_r8_, \ + H5PT_WRITEDATA_R8 ) +#define h5pt_writedata_r4 F77NAME ( \ + h5pt_writedata_r4_, \ + H5PT_WRITEDATA_R4 ) +#define h5pt_writedata_i8 F77NAME ( \ + h5pt_writedata_i8_, \ + H5PT_WRITEDATA_I8 ) +#define h5pt_writedata_i4 F77NAME ( \ + h5pt_writedata_i4_, \ + H5PT_WRITEDATA_I4 ) +#define h5pt_readdata_r8 F77NAME ( \ + h5pt_readdata_r8_, \ + H5PT_READDATA_R8 ) +#define h5pt_readdata_r4 F77NAME ( \ + h5pt_readdata_r4_, \ + H5PT_READDATA_R4 ) +#define h5pt_readdata_i8 F77NAME ( \ + h5pt_readdata_i8_, \ + H5PT_READDATA_I8 ) +#define h5pt_readdata_i4 F77NAME ( \ + h5pt_readdata_i4_, \ + H5PT_READDATA_I4 ) + +#endif + +h5_err_t +h5pt_setnpoints ( + const h5_int64_t *f, + h5_int64_t *n + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p, n=%lld", fh, (long long)*n); + H5_API_RETURN(h5u_set_num_particles ( fh, *n, 1 )); +} + +h5_err_t +h5pt_setnpoints_strided ( + const h5_int64_t *f, + h5_int64_t *n, + h5_int64_t *stride + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p, n=%lld, stride=%lld", + fh, (long long)*n, (long long)*stride); + H5_API_RETURN(h5u_set_num_particles ( fh, *n, *stride )); +} + +/*==============Reading Data Characteristics============*/ + +h5_int64_t +h5pt_getndatasets ( + const h5_int64_t *f + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_int64_t, "f=%p", fh); + H5_API_RETURN(h5u_get_num_datasets ( fh )); +} + +h5_int64_t +h5pt_getnpoints ( + const h5_int64_t *f + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_int64_t, "f=%p", fh); + H5_API_RETURN(h5u_get_num_particles ( fh )); +} + +h5_err_t +h5pt_getdatasetname ( + const h5_int64_t *f, + const h5_int64_t *index, + char *name, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p, index=%lld, name='%s', l_name=%d", + fh, (long long)*index, name, l_name); + h5_err_t herr = h5u_get_dataset_info ( + fh, *index, name, l_name, NULL, NULL ); + h5_strc2for ( name, l_name ); + H5_API_RETURN(herr); +} + +/*=============Setting and getting views================*/ + +h5_err_t +h5pt_setview ( + const h5_int64_t *f, + const h5_int64_t *start, + const h5_int64_t *end + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p, start=%lld, end=%lld", + fh, (long long)*start, (long long)*end); + H5_API_RETURN(h5u_set_view ( fh, (*start)-1, (*end)-1 )); +} + +h5_err_t +h5pt_setview_indices ( + const h5_int64_t *f, + const h5_int64_t * const indices, + const h5_int64_t *nelem + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p, indices=%p, nelem=%lld", + fh, indices, (long long)*nelem); + H5_API_RETURN(h5u_set_view_indices ( fh, (const h5_size_t*const)indices, *nelem )); +} + +h5_err_t +h5pt_resetview ( + const h5_int64_t *f + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p", fh); + H5_API_RETURN(h5u_reset_view ( fh )); +} + +h5_err_t +h5pt_hasview ( + const h5_int64_t *f + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p", fh); + H5_API_RETURN(h5u_has_view ( fh )); +} + +h5_err_t +h5pt_getview ( + const h5_int64_t *f, + h5_int64_t *start, + h5_int64_t *end + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p, start=%p, end=%p", + fh, start, end); + H5_API_RETURN(h5u_get_view ( fh, start, end)); +} + + +/*==================Writing data ============*/ +h5_err_t +h5pt_writedata_r8 ( + const h5_int64_t *f, + const char *name, + const h5_float64_t *data, + const int l_name ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p, name='%s', data=%p, l_name=%d", + fh, name, data, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5u_write_data ( + fh, name2, (void*)data, H5T_NATIVE_DOUBLE ); + free ( name2 ); + H5_API_RETURN(herr); +} + +h5_err_t +h5pt_writedata_r4 ( + const h5_int64_t *f, + const char *name, + const h5_float32_t *data, + const int l_name ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p, name='%s', data=%p, l_name=%d", + fh, name, data, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5u_write_data ( + fh, name2, (void*)data, H5T_NATIVE_FLOAT ); + free ( name2 ); + H5_API_RETURN(herr); +} + +h5_err_t +h5pt_writedata_i8 ( + const h5_int64_t *f, + const char *name, + const h5_int64_t *data, + const int l_name ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p, name='%s', data=%p, l_name=%d", + fh, name, data, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5u_write_data ( + fh, name2, (void*)data, H5T_NATIVE_INT64 ); + free ( name2 ); + H5_API_RETURN(herr); +} + +h5_err_t +h5pt_writedata_i4 ( + const h5_int64_t *f, + const char *name, + const h5_int32_t *data, + const int l_name ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p, name='%s', data=%p, l_name=%d", + fh, name, data, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5u_write_data ( + fh, name2, (void*)data, H5T_NATIVE_INT32 ); + free ( name2 ); + H5_API_RETURN(herr); +} + + +/*==================Reading data ============*/ +h5_err_t +h5pt_readdata_r8 ( + const h5_int64_t *f, + const char *name, + h5_float64_t *data, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p, name='%s', data=%p, l_name=%d", + fh, name, data, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5u_read_data ( + fh, name2, data, H5T_NATIVE_DOUBLE ); + free ( name2 ); + H5_API_RETURN(herr); +} + +h5_err_t +h5pt_readdata_r4 ( + const h5_int64_t *f, + const char *name, + h5_float32_t *data, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p, name='%s', data=%p, l_name=%d", + fh, name, data, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5u_read_data ( + fh, name2, data, H5T_NATIVE_FLOAT ); + free ( name2 ); + H5_API_RETURN(herr); +} + +h5_err_t +h5pt_readdata_i8 ( + const h5_int64_t *f, + const char *name, + h5_int64_t *data, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p, name='%s', data=%p, l_name=%d", + fh, name, data, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5u_read_data ( + fh, name2, data, H5T_NATIVE_INT64 ); + + free ( name2 ); + H5_API_RETURN(herr); +} + +h5_err_t +h5pt_readdata_i4 ( + const h5_int64_t *f, + const char *name, + h5_int32_t *data, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p, name='%s', data=%p, l_name=%d", + fh, name, data, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_err_t herr = h5u_read_data ( + fh, name2, data, H5T_NATIVE_INT32 ); + free ( name2 ); + H5_API_RETURN(herr); +} + diff --git a/src/Fortran/H5Part_io.c b/src/Fortran/H5Part_io.c new file mode 100644 index 0000000..b5d7c3b --- /dev/null +++ b/src/Fortran/H5Part_io.c @@ -0,0 +1,191 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5_private.h" +#include "h5core/h5u_io.h" + +/*==================Writing data ============*/ +#define h5pt_writedata_r8 F77_NAME ( \ + h5pt_writedata_r8, \ + h5pt_writedata_r8_, \ + H5PT_WRITEDATA_R8 ) +h5_int64_t +h5pt_writedata_r8 ( + const h5_int64_t* const fh, + const char* const name, + const h5_float64_t* const data, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, name='%s', data=%p, l_name=%d", + (h5_file_p)f, name, data, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_int64_t herr = h5u_write_data ( + f, name2, (void*)data, H5T_NATIVE_DOUBLE ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5pt_writedata_r4 F77_NAME ( \ + h5pt_writedata_r4, \ + h5pt_writedata_r4_, \ + H5PT_WRITEDATA_R4 ) +h5_int64_t +h5pt_writedata_r4 ( + const h5_int64_t* const fh, + const char* const name, + const h5_float32_t* const data, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, name='%s', data=%p, l_name=%d", + (h5_file_p)f, name, data, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_int64_t herr = h5u_write_data ( + f, name2, (void*)data, H5T_NATIVE_FLOAT ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5pt_writedata_i8 F77_NAME ( \ + h5pt_writedata_i8, \ + h5pt_writedata_i8_, \ + H5PT_WRITEDATA_I8 ) +h5_int64_t +h5pt_writedata_i8 ( + const h5_int64_t* const fh, + const char* const name, + const h5_int64_t* const data, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, name='%s', data=%p, l_name=%d", + (h5_file_p)f, name, data, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_int64_t herr = h5u_write_data ( + f, name2, (void*)data, H5T_NATIVE_INT64 ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5pt_writedata_i4 F77_NAME ( \ + h5pt_writedata_i4, \ + h5pt_writedata_i4_, \ + H5PT_WRITEDATA_I4 ) +h5_int64_t +h5pt_writedata_i4 ( + const h5_int64_t* const fh, + const char* const name, + const h5_int32_t* const data, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, name='%s', data=%p, l_name=%d", + (h5_file_p)f, name, data, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_int64_t herr = h5u_write_data ( + f, name2, (void*)data, H5T_NATIVE_INT32 ); + free ( name2 ); + H5_API_RETURN(herr); +} + + +/*==================Reading data ============*/ +#define h5pt_readdata_r8 F77_NAME ( \ + h5pt_readdata_r8, \ + h5pt_readdata_r8_, \ + H5PT_READDATA_R8 ) +h5_int64_t +h5pt_readdata_r8 ( + const h5_int64_t* const fh, + const char* const name, + h5_float64_t* const data, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, name='%s', data=%p, l_name=%d", + (h5_file_p)f, name, data, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_int64_t herr = h5u_read_data ( + f, name2, data, H5T_NATIVE_DOUBLE ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5pt_readdata_r4 F77_NAME ( \ + h5pt_readdata_r4, \ + h5pt_readdata_r4_, \ + H5PT_READDATA_R4 ) +h5_int64_t +h5pt_readdata_r4 ( + const h5_int64_t* const fh, + const char* const name, + h5_float32_t* const data, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, name='%s', data=%p, l_name=%d", + (h5_file_p)f, name, data, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_int64_t herr = h5u_read_data ( + f, name2, data, H5T_NATIVE_FLOAT ); + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5pt_readdata_i8 F77_NAME ( \ + h5pt_readdata_i8, \ + h5pt_readdata_i8_, \ + H5PT_READDATA_I8 ) +h5_int64_t +h5pt_readdata_i8 ( + const h5_int64_t* const fh, + const char* const name, + h5_int64_t* const data, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, name='%s', data=%p, l_name=%d", + (h5_file_p)f, name, data, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_int64_t herr = h5u_read_data ( + f, name2, data, H5T_NATIVE_INT64 ); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#define h5pt_readdata_i4 F77_NAME ( \ + h5pt_readdata_i4, \ + h5pt_readdata_i4_, \ + H5PT_READDATA_I4 ) +h5_int64_t +h5pt_readdata_i4 ( + const h5_int64_t* const fh, + const char* const name, + h5_int32_t* const data, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c (fh); + H5_API_ENTER (h5_int64_t, + "hf=%p, name='%s', data=%p, l_name=%d", + (h5_file_p)f, name, data, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_int64_t herr = h5u_read_data ( + f, name2, data, H5T_NATIVE_INT32 ); + free ( name2 ); + H5_API_RETURN(herr); +} diff --git a/src/Fortran/H5Part_ioF.f90 b/src/Fortran/H5Part_ioF.f90 new file mode 100644 index 0000000..6535284 --- /dev/null +++ b/src/Fortran/H5Part_ioF.f90 @@ -0,0 +1,83 @@ +!!!!!!!! Reading and Writing Datasets !!!!!!!! + +!> +!! \ingroup h5part_data_f +!! See \ref H5PartWriteDataFloat64 +!! \return 0 on success or error code +INTEGER*8 FUNCTION h5pt_writedata_r8 ( filehandle, name, data ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + REAL*8, INTENT(IN) :: data(*) !< the array of float64 data to write +END FUNCTION + +!> +!! \ingroup h5part_data_f +!! See \ref H5PartWriteDataFloat32 +!! \return 0 on success or error code +INTEGER*8 FUNCTION h5pt_writedata_r4 ( filehandle, name, data ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + REAL, INTENT(IN) :: data(*) !< the array of float32 data to write +END FUNCTION + +!> +!! \ingroup h5part_data_f +!! See \ref H5PartWriteDataInt64 +!! \return 0 on success or error code +INTEGER*8 FUNCTION h5pt_writedata_i8 ( filehandle, name, data ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + INTEGER*8, INTENT(IN) :: data(*) !< the array of int64 data to write +END FUNCTION + +!> +!! \ingroup h5part_data_f +!! See \ref H5PartWriteDataInt32 +!! \return 0 on success or error code +INTEGER*8 FUNCTION h5pt_writedata_i4 ( filehandle, name, data ) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + INTEGER, INTENT(IN) :: data(*) !< the array of int32 data to write +END FUNCTION + + +!> +!! \ingroup h5part_data_f +!! See \ref H5PartReadDataFloat64 +!! \return 0 on success or error code +INTEGER*8 FUNCTION h5pt_readdata_r8 (filehandle,name,data) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + REAL*8, INTENT(OUT) :: data(*) !< array to read float64 data into +END FUNCTION + +!> +!! \ingroup h5part_data_f +!! See \ref H5PartReadDataFloat32 +!! \return 0 on success or error code +INTEGER*8 FUNCTION h5pt_readdata_r4 (filehandle,name,data) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + REAL, INTENT(OUT) :: data(*) !< array to read float32 data into +END FUNCTION + +!> +!! \ingroup h5part_data_f +!! See \ref H5PartReadDataInt64 +!! \return 0 on success or error code +INTEGER*8 FUNCTION h5pt_readdata_i8 (filehandle,name,data) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + INTEGER*8, INTENT(OUT) :: data(*) !< array to read int64 data into +END FUNCTION + +!> +!! \ingroup h5part_data_f +!! See \ref H5PartReadDataInt32 +!! \return 0 on success or error code +INTEGER*8 FUNCTION h5pt_readdata_i4 (filehandle,name,data) + INTEGER*8, INTENT(IN) :: filehandle !< the handle returned during file open + CHARACTER(LEN=*), INTENT(IN) :: name !< the name of the dataset + INTEGER, INTENT(OUT) :: data(*) !< array to read int32 data into +END FUNCTION + diff --git a/src/Fortran/H5_F.c b/src/Fortran/H5_F.c new file mode 100644 index 0000000..ffbda20 --- /dev/null +++ b/src/Fortran/H5_F.c @@ -0,0 +1,216 @@ +#include +#include + +#include "h5core/h5_core.h" +#include "Underscore.h" + +#if defined(F77_SINGLE_UNDERSCORE) +#define F77NAME(a,b) a +#elif defined(F77_CRAY_UNDERSCORE) +#define F77NAME(a,b) b +#elif defined(F77_NO_UNDERSCORE) +#else +#error Error, no way to determine how to construct fortran bindings +#endif + +#if !defined(F77_NO_UNDERSCORE) + +#define h5_openr F77NAME ( \ + h5_openr_, \ + H5_OPENR ) +#define h5_openw F77NAME ( \ + h5_openw_, \ + H5_OPENW ) +#define h5_opena F77NAME ( \ + h5_opena_, \ + H5_OPENA ) +#define h5_openr_par_align F77NAME ( \ + h5_openr_par_align_, \ + H5_OPENR_PAR_ALIGN ) +#define h5_openw_par_align F77NAME ( \ + h5_openw_par_align_, \ + H5_OPENW_PAR_ALIGN ) +#define h5_opena_par_align F77NAME ( \ + h5_opena_par_align_, \ + H5_OPENA_PA_ALIGNR ) +#define h5_close F77NAME ( \ + h5_close_, \ + H5_CLOSE) +#define h5_check F77NAME ( \ + h5_check_, \ + H5_CHECK) +#define h5_setstep F77NAME ( \ + h5_setstep_, \ + H5_SETSTEP ) +#define h5_getnsteps F77NAME ( \ + h5_getnsteps_, \ + H5_GETNSTEPS ) +#define h5_set_verbosity_level F77NAME ( \ + h5_set_verbosity_level_, \ + H5_SET_VERBOSITY_LEVEL ) + +#endif + +/* open/close interface */ +h5_err_t +h5_openr ( + const char *name, + const int l_name + ) { + + H5_API_ENTER (h5_err_t, "name='%s', l_name=%d", name, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_file_t* f = h5_open_file ( name2, H5_O_RDONLY, 0, 0 ); + free ( name2 ); + H5_API_RETURN((h5_int64_t)(size_t)f); +} + +h5_err_t +h5_openw ( + const char *name, + const int l_name + ) { + + H5_API_ENTER (h5_err_t, "name='%s', l_name=%d", name, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_file_t* f = h5_open_file ( name2, H5_O_WRONLY, 0, 0 ); + free ( name2 ); + H5_API_RETURN((h5_int64_t)(size_t)f); +} + +h5_err_t +h5_opena ( + const char *name, + const int l_name + ) { + + H5_API_ENTER (h5_err_t, "name='%s', l_name=%d", name, l_name); + char *name2 = h5_strdupfor2c ( name, l_name ); + h5_file_t* f = h5_open_file ( name2, H5_O_APPEND, 0, 0 ); + free ( name2 ); + H5_API_RETURN((h5_int64_t)(size_t)f); +} + +#ifdef PARALLEL_IO +h5_err_t +h5_openr_par_align ( + const char *name, + MPI_Fint *fcomm, + const h5_int64_t *align, + const char *flags, + const int l_name, + const int l_flags + ) { + + H5_API_ENTER (h5_err_t, "name='%s', fcomm=%d, align=%lld, flags=%s, " + "l_name=%d, l_flags=%d", + name, *fcomm, (long long)*align, + flags, l_name, l_flags); + MPI_Comm ccomm = MPI_Comm_f2c (*fcomm); + char *name2 = h5_strdupfor2c ( name, l_name ); + char *flags2 = h5_strdupfor2c ( flags, l_flags ); + h5_int32_t fbits = H5_O_RDONLY | _flagsfor2c ( flags2 ); + h5_file_t* f = h5_open_file ( name2, fbits, ccomm, 0 ); + free ( name2 ); + free ( flags2 ); + H5_API_RETURN((h5_int64_t)(size_t)f); +} + +h5_err_t +h5_openw_par_align ( + const char *name, + MPI_Fint *fcomm, + const h5_int64_t *align, + const char *flags, + const int l_name, + const int l_flags + ) { + + H5_API_ENTER (h5_err_t, "name='%s', fcomm=%d, align=%lld, flags=%s, " + "l_name=%d, l_flags=%d", + name, *fcomm, (long long)*align, + flags, l_name, l_flags); + MPI_Comm ccomm = MPI_Comm_f2c (*fcomm); + char *name2 = h5_strdupfor2c ( name, l_name ); + char *flags2 = h5_strdupfor2c ( flags, l_flags ); + h5_int32_t fbits = H5_O_WRONLY | _flagsfor2c ( flags2 ); + h5_file_t* f = h5_open_file ( name2, fbits, ccomm, 0 ); + free ( name2 ); + free ( flags2 ); + H5_API_RETURN((h5_int64_t)(size_t)f); +} + +h5_err_t +h5_opena_par_align ( + const char *name, + MPI_Fint *fcomm, + const h5_int64_t *align, + const char *flags, + const int l_name, + const int l_flags + ) { + + H5_API_ENTER (h5_err_t, "name='%s', fcomm=%d, align=%lld, flags=%s, " + "l_name=%d, l_flags=%d", + name, *fcomm, (long long)*align, + flags, l_name, l_flags); + MPI_Comm ccomm = MPI_Comm_f2c (*fcomm); + char *name2 = h5_strdupfor2c ( name, l_name ); + char *flags2 = h5_strdupfor2c ( flags, l_flags ); + h5_int32_t fbits = H5_O_APPEND | _flagsfor2c ( flags2 ); + h5_file_t* f = h5_open_file ( name2, fbits, ccomm, *align ); + free ( name2 ); + free ( flags2 ); + H5_API_RETURN((h5_int64_t)(size_t)f); +} +#endif + +h5_err_t +h5_close ( + const h5_int64_t *f + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p", fh); + H5_API_RETURN(h5_close_file ( fh )); +} + +h5_err_t +h5_check ( + const h5_int64_t *f + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p", fh); + H5_API_RETURN(h5_check_filehandle ( fh )); +} + +h5_err_t +h5_setstep ( + const h5_int64_t *f, + h5_int64_t *step ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_err_t, "f=%p, step=%lld", fh, (long long)*step); + H5_API_RETURN(h5_set_step ( fh, (*step)-1 )); +} + +h5_ssize_t +h5_getnsteps ( + const h5_int64_t *f + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + H5_API_ENTER (h5_ssize_t, "f=%p", fh); + H5_API_RETURN(h5_get_num_steps ( fh )); +} + +h5_err_t +h5_set_verbosity_level ( + const h5_int64_t *level + ) { + + H5_API_ENTER (h5_err_t, "level=%lld", (long long)*level); + H5_API_RETURN(h5_set_debuglevel ( *level )); +} + diff --git a/src/Fortran/H5_attribs.c b/src/Fortran/H5_attribs.c new file mode 100644 index 0000000..57bedca --- /dev/null +++ b/src/Fortran/H5_attribs.c @@ -0,0 +1,649 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5_private.h" +#include "h5core/h5_attribs.h" + +/* + __ _ _ _ _ _ _ _ + / _(_) | ___ __ _| |_| |_ _ __(_) |__ _ _| |_ ___ ___ + | |_| | |/ _ \ / _` | __| __| '__| | '_ \| | | | __/ _ \/ __| + | _| | | __/ | (_| | |_| |_| | | | |_) | |_| | || __/\__ \ + |_| |_|_|\___| \__,_|\__|\__|_| |_|_.__/ \__,_|\__\___||___/ + __ _ _ _ ___ _ __ _ _ + / _` | | | |/ _ \ '__| | | | + | (_| | |_| | __/ | | |_| | + \__, |\__,_|\___|_| \__, | + |_| |___/ +*/ + +#define h5_getnfileattribs F77_NAME( \ + h5_getnfileattribs, \ + h5_getnfileattribs_, \ + H5_GETNFILEATTRIBS) +h5_int64_t +h5_getnfileattribs ( + const h5_int64_t* const fh + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, "fh=%p", (h5_file_p)f); + H5_API_RETURN (h5_get_num_file_attribs (f)); +} + +#define h5_getfileattribinfo F77_NAME( \ + h5_getfileattribinfo, \ + h5_getfileattribinfo_, \ + H5_GETFILEATTRIBINFO) +h5_int64_t +h5_getfileattribinfo ( + const h5_int64_t* const fh, + const h5_int64_t* attrib_idx, + char* attrib_name, + h5_int64_t* attrib_type, + h5_int64_t* attrib_nelem, + const int l_attrib_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, " + "attrib_idx=%lld, " + "attrib_name=%p, " + "attrib_type=%p, " + "attrib_nelem=%p", + (h5_file_p)fh, + (long long)*attrib_idx, + attrib_name, attrib_type, attrib_nelem); + h5_int64_t h5err = h5_get_file_attrib_info ( + f, + *attrib_idx - 1, + attrib_name, l_attrib_name, + attrib_type, + (h5_size_t*)attrib_nelem); + h5_strc2for (attrib_name, l_attrib_name); + convert_type2for (attrib_type); + H5_API_RETURN (h5err); +} + +/* + _ __ + (_) / /__ + | | / / _ \ + | |/ / (_) | + |_/_/ \___/ +*/ +static inline h5_int64_t +write_file_attrib ( + const h5_file_t f, + const char* name, + const int l_name, + const hid_t type, + const void* buffer, + const hsize_t l_buffer + ) { + char *name2 = h5_strdupfor2c (name, l_name); + h5_int64_t herr = h5_write_file_attrib (f, name2, type, buffer, l_buffer ); + free (name2); + return herr; +} + +static inline h5_int64_t +read_file_attrib ( + const h5_file_t f, + const char* name, + const int l_name, + const hid_t type, + void* const buffer + ) { + char* name2 = h5_strdupfor2c ( name, l_name ); + h5_int64_t herr = h5_read_file_attrib (f, name2, type, buffer); + free (name2); + return herr; +} + +/* + _ _ + ___| |_ _ __(_)_ __ __ _ + / __| __| '__| | '_ \ / _` | + \__ \ |_| | | | | | | (_| | + |___/\__|_| |_|_| |_|\__, | + |___/ +*/ +#define h5_writefileattrib_string F77_NAME ( \ + h5_writefileattrib_string, \ + h5_writefileattrib_string_, \ + H5_WRITEFILEATTRIB_STRING) +h5_int64_t +h5_writefileattrib_string ( + h5_int64_t *const fh, + const char *name, + const char *buffer, + const int l_name, + const int l_buffer + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, name='%.*s', buffer='%.*s'", + (h5_file_p)f, l_name, name, l_buffer, buffer); + char *buffer2 = h5_strdupfor2c (buffer, l_buffer); + h5_int64_t herr = write_file_attrib ( + f, name, l_name, H5_STRING_T, buffer2, strlen(buffer2)+1 ); + free (buffer2); + H5_API_RETURN (herr); +} + +#define h5_readfileattrib_string F77_NAME ( \ + h5_readfileattrib_string, \ + h5_readfileattrib_string_, \ + H5_READFILEATTRIB_STRING) +h5_int64_t +h5_readfileattrib_string ( + h5_int64_t *const fh, + const char *name, + char *buffer, + const int l_name, + const int l_buffer + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, name='%.*s', buffer='%.*s'", + (h5_file_p)f, l_name, name, l_buffer, buffer); + h5_int64_t herr = read_file_attrib (f, name, l_name, H5_STRING_T, buffer); + h5_strc2for (buffer, l_buffer); + H5_API_RETURN (herr); +} + +#define h5_writefileattrib_r8 F77_NAME ( \ + h5_writefileattrib_r8, \ + h5_writefileattrib_r8_, \ + H5_WRITEFILEATTRIB_R8) +h5_int64_t +h5_writefileattrib_r8 ( + const h5_int64_t *const fh, + const char *name, + const h5_int64_t *buffer, + const h5_int64_t *nelem, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, name='%.*s', buffer=%p, nelem=%lld", + (h5_file_p)f, l_name, name, buffer, (long long)*nelem); + H5_API_RETURN (write_file_attrib( + f, + name, l_name, + H5_FLOAT64_T, + buffer, (hsize_t)*nelem)); +} + +#define h5_readfileattrib_r8 F77_NAME ( \ + h5_readfileattrib_r8, \ + h5_readfileattrib_r8_, \ + H5_READFILEATTRIB_R8 ) +h5_int64_t +h5_readfileattrib_r8 ( + h5_int64_t *const fh, + const char *name, + h5_int64_t *buffer, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "(h5_file_p)fh=%p, name='%.*s', buffer=%p", + (h5_file_p)f, l_name, name, buffer); + H5_API_RETURN (read_file_attrib( + f, + name, l_name, + H5_FLOAT64_T, + (void*)buffer)); +} + +#define h5_writefileattrib_r4 F77_NAME ( \ + h5_writefileattrib_r4, \ + h5_writefileattrib_r4_, \ + H5_WRITEFILEATTRIB_R4 ) +h5_int64_t +h5_writefileattrib_r4 ( + const h5_int64_t *const fh, + const char *name, + const h5_int32_t *buffer, + const h5_int64_t *nelem, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, name='%.*s', buffer=%p, nelem=%lld", + (h5_file_p)f, l_name, name, buffer, (long long)*nelem); + H5_API_RETURN (write_file_attrib( + f, + name, l_name, + H5_FLOAT32_T, + buffer, (hsize_t)*nelem)); +} + +#define h5_readfileattrib_r4 F77_NAME ( \ + h5_readfileattrib_r4, \ + h5_readfileattrib_r4_, \ + H5_READFILEATTRIB_R4 ) +h5_int64_t +h5_readfileattrib_r4 ( + const h5_int64_t *const fh, + const char *name, + h5_int32_t *buffer, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "f=%p, name='%.*s', buffer=%p", + (h5_file_p)f, l_name, name, buffer); + H5_API_RETURN (read_file_attrib( + f, + name, l_name, + H5_FLOAT32_T, + buffer)); +} + +#define h5_writefileattrib_i8 F77_NAME ( \ + h5_writefileattrib_i8, \ + h5_writefileattrib_i8_, \ + H5_WRITEFILEATTRIB_I8) +h5_int64_t +h5_writefileattrib_i8 ( + const h5_int64_t *const fh, + const char *name, + const h5_int64_t *buffer, + const h5_int64_t *nelem, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, name='%.*s', buffer=%p, nelem=%lld", + (h5_file_p)f, l_name, name, buffer, (long long)*nelem); + H5_API_RETURN (write_file_attrib( + f, + name, l_name, + H5_INT64_T, + buffer, (hsize_t)*nelem)); +} + +#define h5_readfileattrib_i8 F77_NAME ( \ + h5_readfileattrib_i8, \ + h5_readfileattrib_i8_, \ + H5_READFILEATTRIB_I8 ) +h5_int64_t +h5_readfileattrib_i8 ( + const h5_int64_t *const fh, + const char *name, + h5_int64_t *buffer, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, name='%.*s', buffer=%p", + (h5_file_p)f, l_name, name, buffer); + H5_API_RETURN (read_file_attrib( + f, + name, l_name, + H5_INT64_T, + buffer)); +} + +#define h5_writefileattrib_i4 F77_NAME ( \ + h5_writefileattrib_i4, \ + h5_writefileattrib_i4_, \ + H5_WRITEFILEATTRIB_I4 ) +h5_int64_t +h5_writefileattrib_i4 ( + h5_int64_t *const fh, + const char *name, + const h5_int32_t *buffer, + const h5_int64_t *nelem, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, name='%.*s', buffer=%p, nelem=%lld", + (h5_file_p)f, l_name, name, buffer, (long long)*nelem); + H5_API_RETURN (write_file_attrib( + f, + name, l_name, + H5_INT32_T, + buffer, (hsize_t)*nelem)); +} + +#define h5_readfileattrib_i4 F77_NAME ( \ + h5_readfileattrib_i4, \ + h5_readfileattrib_i4_, \ + H5_READFILEATTRIB_I4 ) +h5_int64_t +h5_readfileattrib_i4 ( + h5_int64_t *const fh, + const char *name, + h5_int32_t *buffer, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "fh=%p, name='%.*s', buffer=%p", + (h5_file_p)f, l_name, name, buffer); + H5_API_RETURN (read_file_attrib( + f, + name, l_name, + H5_INT32_T, + buffer)); +} + +/* + _ _ _ _ _ _ + ___| |_ ___ _ __ __ _| |_| |_ _ __(_) |__ _ _| |_ ___ ___ + / __| __/ _ \ '_ \ / _` | __| __| '__| | '_ \| | | | __/ _ \/ __| + \__ \ || __/ |_) | | (_| | |_| |_| | | | |_) | |_| | || __/\__ \ + |___/\__\___| .__/ \__,_|\__|\__|_| |_|_.__/ \__,_|\__\___||___/ + |_| + */ +#define h5_getnstepattribs F77_NAME( \ + h5_getnstepattribs, \ + h5_getnstepattribs_, \ + H5_GETNSTEPATTRIBS) +h5_int64_t +h5_getnstepattribs ( + const h5_int64_t* fh + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "fh=%p", + (h5_file_p)f); + H5_API_RETURN (h5_get_num_step_attribs (f)); +} + +#define h5_getstepattribinfo F77_NAME( \ + h5_getstepattribinfo, \ + h5_getstepattribinfo_, \ + H5_GETSTEPATTRIBINFO) +h5_int64_t +h5_getstepattribinfo ( + const h5_int64_t* fh, + const h5_int64_t* attrib_idx, + char* attrib_name, + h5_int64_t* attrib_type, + h5_int64_t* attrib_nelem, + const int l_attrib_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "f=%p, " + "attrib_idx=%lld, " + "attrib_name=%p, " + "attrib_type=%p, " + "attrib_nelem=%p", + (h5_file_p)f, + (long long)*attrib_idx, + attrib_name, attrib_type, attrib_nelem); + h5_int64_t h5err = h5_get_step_attrib_info ( + f, + *attrib_idx - 1, + attrib_name, l_attrib_name, + attrib_type, + (h5_size_t*)attrib_nelem); + h5_strc2for (attrib_name, l_attrib_name); + convert_type2for (attrib_type); + H5_API_RETURN (h5err); +} + +static inline h5_int64_t +write_step_attrib ( + const h5_file_t fh, + const char* name, + const int l_name, + const hid_t type, + const void* buffer, + const hsize_t l_buffer + ) { + char *name2 = h5_strdupfor2c (name, l_name); + h5_int64_t herr = h5_write_step_attrib (fh, name2, type, buffer, l_buffer ); + free (name2); + return herr; +} + +static inline h5_int64_t +read_step_attrib ( + const h5_file_t fh, + const char* name, + const int l_name, + const hid_t type, + void* const buffer + ) { + char* name2 = h5_strdupfor2c ( name, l_name ); + h5_int64_t herr = h5_read_step_attrib (fh, name2, type, buffer); + free (name2); + return herr; +} + +#define h5_writestepattrib_string F77_NAME ( \ + h5_writestepattrib_string, \ + h5_writestepattrib_string_, \ + H5_WRITESTEPATTRIB_STRING) +h5_int64_t +h5_writestepattrib_string ( + const h5_int64_t *const fh, + const char *name, + const char *buffer, + const int l_name, + const int l_buffer + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "f=%p, name='%.*s', buffer='%.*s'", + (h5_file_p)f, l_name, name, l_buffer, buffer); + char *buffer2 = h5_strdupfor2c (buffer, l_buffer); + h5_int64_t herr = write_step_attrib ( + f, name, l_name, H5_STRING_T, buffer2, strlen(buffer2)+1 ); + free (buffer2); + H5_API_RETURN (herr); +} + +#define h5_readstepattrib_string F77_NAME ( \ + h5_readstepattrib_string, \ + h5_readstepattrib_string_, \ + H5_READSTEPATTRIB_STRING) +h5_int64_t +h5_readstepattrib_string ( + const h5_int64_t *const fh, + const char *name, + char *buffer, + const int l_name, + const int l_buffer + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "f=%p, name='%.*s', buffer='%.*s'", + (h5_file_p)f, l_name, name, l_buffer, buffer); + h5_int64_t herr = read_step_attrib (f, name, l_name, H5_STRING_T, buffer); + h5_strc2for (buffer, l_buffer); + H5_API_RETURN (herr); +} + +#define h5_writestepattrib_r8 F77_NAME ( \ + h5_writestepattrib_r8, \ + h5_writestepattrib_r8_, \ + H5_WRITESTEPATTRIB_R8) +h5_int64_t +h5_writestepattrib_r8 ( + const h5_int64_t *const fh, + const char *name, + const h5_float64_t *buffer, + const h5_int64_t *nelem, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "f=%p, name='%.*s', buffer=%p, nelem=%lld", + (h5_file_p)f, l_name, name, buffer, (long long)*nelem); + H5_API_RETURN (write_step_attrib( + f, + name, l_name, + H5_FLOAT64_T, + buffer, (hsize_t)*nelem)); +} + +#define h5_readstepattrib_r8 F77_NAME ( \ + h5_readstepattrib_r8, \ + h5_readstepattrib_r8_, \ + H5_READSTEPATTRIB_R8 ) +h5_int64_t +h5_readstepattrib_r8 ( + const h5_int64_t *const fh, + const char *name, + h5_float64_t *buffer, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "f=%p, name='%.*s', buffer=%p", + (h5_file_p)f, l_name, name, buffer); + H5_API_RETURN (read_step_attrib( + f, + name, l_name, + H5_FLOAT64_T, + (void*)buffer)); +} + +#define h5_writestepattrib_r4 F77_NAME ( \ + h5_writestepattrib_r4, \ + h5_writestepattrib_r4_, \ + H5_WRITESTEPATTRIB_R4 ) +h5_int64_t +h5_writestepattrib_r4 ( + h5_int64_t *const fh, + const char *name, + const h5_float64_t *buffer, + const h5_int64_t *nelem, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "f=%p, name='%.*s', buffer=%p, nelem=%lld", + (h5_file_p)f, l_name, name, buffer, (long long)*nelem); + H5_API_RETURN (write_step_attrib( + f, + name, l_name, + H5_FLOAT32_T, + buffer, (hsize_t)*nelem)); +} + +#define h5_readstepattrib_r4 F77_NAME ( \ + h5_readstepattrib_r4, \ + h5_readstepattrib_r4_, \ + H5_READSTEPATTRIB_R4 ) +h5_int64_t +h5_readstepattrib_r4 ( + const h5_int64_t *const fh, + const char *name, + h5_float64_t *buffer, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "f=%p, name='%.*s', buffer=%p", + (h5_file_p)f, l_name, name, buffer); + H5_API_RETURN (read_step_attrib( + f, + name, l_name, + H5_FLOAT32_T, + buffer)); +} + +#define h5_writestepattrib_i8 F77_NAME ( \ + h5_writestepattrib_i8, \ + h5_writestepattrib_i8_, \ + H5_WRITESTEPATTRIB_I8) +h5_int64_t +h5_writestepattrib_i8 ( + h5_int64_t *const fh, + const char *name, + const h5_float64_t *buffer, + const h5_int64_t *nelem, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "f=%p, name='%.*s', buffer=%p, nelem=%lld", + (h5_file_p)f, l_name, name, buffer, (long long)*nelem); + H5_API_RETURN (write_step_attrib( + f, + name, l_name, + H5_INT64_T, + buffer, (hsize_t)*nelem)); +} + +#define h5_readstepattrib_i8 F77_NAME ( \ + h5_readstepattrib_i8, \ + h5_readstepattrib_i8_, \ + H5_READSTEPATTRIB_I8 ) +h5_int64_t +h5_readstepattrib_i8 ( + const h5_int64_t *const fh, + const char *name, + h5_float64_t *buffer, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "f=%p, name='%.*s', buffer=%p", + (h5_file_p)f, l_name, name, buffer); + H5_API_RETURN (read_step_attrib( + f, + name, l_name, + H5_INT64_T, + buffer)); +} + +#define h5_writestepattrib_i4 F77_NAME ( \ + h5_writestepattrib_i4, \ + h5_writestepattrib_i4_, \ + H5_WRITESTEPATTRIB_I4 ) +h5_int64_t +h5_writestepattrib_i4 ( + const h5_int64_t *const fh, + const char *name, + const h5_float64_t *buffer, + const h5_int64_t *nelem, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "f=%p, name='%.*s', buffer=%p, nelem=%lld", + (h5_file_p)f, l_name, name, buffer, (long long)*nelem); + H5_API_RETURN (write_step_attrib( + f, + name, l_name, + H5_INT32_T, + buffer, (hsize_t)*nelem)); +} + +#define h5_readstepattrib_i4 F77_NAME ( \ + h5_readstepattrib_i4, \ + h5_readstepattrib_i4_, \ + H5_READSTEPATTRIB_I4 ) +h5_int64_t +h5_readstepattrib_i4 ( + const h5_int64_t *const fh, + const char *name, + h5_float64_t *buffer, + const int l_name + ) { + h5_file_t f = h5_filehandlefor2c(fh); + H5_API_ENTER (h5_int64_t, + "f=%p, name='%.*s', buffer=%p", + (h5_file_p)f, l_name, name, buffer); + H5_API_RETURN (read_step_attrib( + f, + name, l_name, + H5_INT32_T, + buffer)); +} diff --git a/src/Fortran/H5_attribsF.f90 b/src/Fortran/H5_attribsF.f90 new file mode 100644 index 0000000..f98c45f --- /dev/null +++ b/src/Fortran/H5_attribsF.f90 @@ -0,0 +1,366 @@ +! __ _ _ _ _ _ _ _ +! / _(_) | ___ __ _| |_| |_ _ __(_) |__ _ _| |_ ___ ___ +! | |_| | |/ _ \ / _` | __| __| '__| | '_ \| | | | __/ _ \/ __| +! | _| | | __/ | (_| | |_| |_| | | | |_) | |_| | || __/\__ \ +! |_| |_|_|\___| \__,_|\__|\__|_| |_|_.__/ \__,_|\__\___||___/ +! __ _ _ _ ___ _ __ _ _ +! / _` | | | |/ _ \ '__| | | | +! | (_| | |_| | __/ | | |_| | +! \__, |\__,_|\___|_| \__, | +! |_| |___/ + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5GetNumFileAttribs +!! \return number of attributes or error code +!< +INTEGER*8 FUNCTION h5_getnfileattribs (filehandle) + INTEGER*8, INTENT(IN) :: filehandle !< file handle +END FUNCTION + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5GetFileAttribInfo +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_getfileattribinfo (filehandle, idx, attrib_name, attrib_nelem) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + INTEGER*8,INTENT(IN) :: idx !< index of attribute being queried + CHARACTER(LEN=*), INTENT(OUT):: attrib_name !< name of attribute + INTEGER*8,INTENT(OUT):: attrib_type !< type of attribute + INTEGER*8,INTENT(OUT):: attrib_nelem !< number of elements in the attrib array +END FUNCTION + +! __ _ _ _ _ _ _ _ +! / _(_) | ___ __ _| |_| |_ _ __(_) |__ _ _| |_ ___ ___ +! | |_| | |/ _ \ / _` | __| __| '__| | '_ \| | | | __/ _ \/ __| +! | _| | | __/ | (_| | |_| |_| | | | |_) | |_| | || __/\__ \ +! |_| |_|_|\___| \__,_|\__|\__|_| |_|_.__/ \__,_|\__\___||___/ +! _ __ _ _ +! (_) / /__ ___| |_ _ __(_)_ __ __ _ +! | | / / _ \ / __| __| '__| | '_ \ / _` | +! | |/ / (_) | \__ \ |_| | | | | | | (_| | +! |_/_/ \___/ |___/\__|_| |_|_| |_|\__, | +! |___/ + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5WriteFileAttribString +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_writefileattrib_string (filehandle, attrib_name, attrib_value) + INTEGER*8, INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to write + CHARACTER(LEN=*), INTENT(IN) :: attrib_value!< attribute data to be written +END FUNCTION + +!> +!! \ingroup h5hut_attrib_f +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_readfileattrib_string (filehandle, attrib_name, attrib_value) + INTEGER*8, INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of the attribute to read + CHARACTER(LEN=*), INTENT(IN) :: attrib_value!< attribute data will be read into this array +END FUNCTION + +! __ _ _ _ _ _ _ _ +! / _(_) | ___ __ _| |_| |_ _ __(_) |__ _ _| |_ ___ ___ +! | |_| | |/ _ \ / _` | __| __| '__| | '_ \| | | | __/ _ \/ __| +! | _| | | __/ | (_| | |_| |_| | | | |_) | |_| | || __/\__ \ +! |_| |_|_|\___| \__,_|\__|\__|_| |_|_.__/ \__,_|\__\___||___/ +! _ __ _ +! (_) / /__ _ __ ___ __ _| | +! | | / / _ \ | '__/ _ \/ _` | | +! | |/ / (_) | | | | __/ (_| | | +! |_/_/ \___/ |_| \___|\__,_|_| + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5WriteFileAttribFloat64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_writefileattrib_r8 (filehandle, attrib_name, attrib_value, attrib_nelem) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to read + REAL*8, INTENT(OUT):: attrib_value(*) !< attribute data to be written + INTEGER*8, INTENT(IN) :: attrib_nelem !< number of elements in data array +END FUNCTION + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5ReadFileAttribFloat64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_readfileattrib_r8 (filehandle, attrib_name, attrib_value) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to read + REAL*8, INTENT(OUT):: attrib_value(*) !< attribute data will be read into this array +END FUNCTION + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5WriteFileAttribFloat32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_writefileattrib_r4 (filehandle, attrib_name, attrib_value, attrib_nelem) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to read + REAL*4, INTENT(OUT):: attrib_value(*) !< attribute data to be written + INTEGER*8, INTENT(IN) :: attrib_nelem !< number of elements in data array +END FUNCTION + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5ReadFileAttribFloat32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_readfileattrib_r4 ( filehandle, attrib_name, attrib_value ) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to read + REAL*4, INTENT(OUT):: attrib_value(*) !< attribute data will be read into this array +END FUNCTION + +! __ _ _ _ _ _ _ _ +! / _(_) | ___ __ _| |_| |_ _ __(_) |__ _ _| |_ ___ ___ +! | |_| | |/ _ \ / _` | __| __| '__| | '_ \| | | | __/ _ \/ __| +! | _| | | __/ | (_| | |_| |_| | | | |_) | |_| | || __/\__ \ +! |_| |_|_|\___| \__,_|\__|\__|_| |_|_.__/ \__,_|\__\___||___/ +! _ __ _ _ +! (_) / /__ (_)_ __ | |_ ___ __ _ ___ _ __ +! | | / / _ \ | | '_ \| __/ _ \/ _` |/ _ \ '__| +! | |/ / (_) | | | | | | || __/ (_| | __/ | +! |_/_/ \___/ |_|_| |_|\__\___|\__, |\___|_| +! |___/ + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5WriteFileAttribInt64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_writefileattrib_i8 (filehandle, attrib_name, attrib_value, attrib_nelem) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to write + INTEGER*8,INTENT(OUT):: attrib_value(*) !< attribute data to be written + INTEGER*8, INTENT(IN) :: attrib_nelem !< number of elements in data array +END FUNCTION + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5ReadFileAttribInt64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_readfileattrib_i8 (filehandle, attrib_name, attrib_value) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to read + INTEGER*8,INTENT(OUT):: attrib_value(*) !< attribute data will be read into this array +END FUNCTION + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5WriteFileAttribInt32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_writefileattrib_i4 (filehandle, attrib_name, attrib_value, attrib_nelem) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to write + INTEGER*8,INTENT(OUT):: attrib_type !< type of attribute + INTEGER*4,INTENT(OUT):: attrib_value(*) !< attribute data to be written + INTEGER*8, INTENT(IN) :: attrib_nelem !< number of elements in data array +END FUNCTION + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5ReadFileAttribInt32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_readfileattrib_i4 (filehandle, attrib_name, attrib_value) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to read + INTEGER*4,INTENT(OUT):: attrib_value(*) !< attribute data will be read into this array +END FUNCTION + +! _ _ _ _ _ _ +! ___| |_ ___ _ __ __ _| |_| |_ _ __(_) |__ _ _| |_ ___ ___ +! / __| __/ _ \ '_ \ / _` | __| __| '__| | '_ \| | | | __/ _ \/ __| +! \__ \ || __/ |_) | | (_| | |_| |_| | | | |_) | |_| | || __/\__ \ +! |___/\__\___| .__/ \__,_|\__|\__|_| |_|_.__/ \__,_|\__\___||___/ +! |_| +! __ _ _ _ ___ _ __ _ _ +! / _` | | | |/ _ \ '__| | | | +! | (_| | |_| | __/ | | |_| | +! \__, |\__,_|\___|_| \__, | +! |_| |___/ + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5GetNumFileAttribs +!! \return number of attributes or error code +!< +INTEGER*8 FUNCTION h5_getnstepattribs (filehandle) + INTEGER*8, INTENT(IN) :: filehandle !< file handle +END FUNCTION + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5GetFileAttribInfo +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_getstepattribinfo (filehandle, idx, attrib_name, attrib_nelem) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + INTEGER*8,INTENT(IN) :: idx !< index of attribute being queried + CHARACTER(LEN=*), INTENT(OUT):: attrib_name !< name of attribute + INTEGER*8,INTENT(OUT):: attrib_nelem !< number of elements in the attrib array +END FUNCTION + +! _ _ _ _ _ _ +! ___| |_ ___ _ __ __ _| |_| |_ _ __(_) |__ _ _| |_ ___ ___ +! / __| __/ _ \ '_ \ / _` | __| __| '__| | '_ \| | | | __/ _ \/ __| +! \__ \ || __/ |_) | | (_| | |_| |_| | | | |_) | |_| | || __/\__ \ +! |___/\__\___| .__/ \__,_|\__|\__|_| |_|_.__/ \__,_|\__\___||___/ +! |_| +! _ __ _ _ +! (_) / /__ ___| |_ _ __(_)_ __ __ _ +! | | / / _ \ / __| __| '__| | '_ \ / _` | +! | |/ / (_) | \__ \ |_| | | | | | | (_| | +! |_/_/ \___/ |___/\__|_| |_|_| |_|\__, | +! |___/ + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5WriteStepAttribString +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_writestepattrib_string (filehandle, attrib_name, attrib_value) + INTEGER*8, INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to write + CHARACTER(LEN=*), INTENT(IN) :: attrib_value!< attribute data to be written +END FUNCTION + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5ReadStepAttribString +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_readstepattrib_string (filehandle, attrib_name, attrib_value) + INTEGER*8, INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of the attribute to read + CHARACTER(LEN=*), INTENT(IN) :: attrib_value!< attribute data will be read into this array +END FUNCTION + +! _ _ _ _ _ _ +! ___| |_ ___ _ __ __ _| |_| |_ _ __(_) |__ _ _| |_ ___ ___ +! / __| __/ _ \ '_ \ / _` | __| __| '__| | '_ \| | | | __/ _ \/ __| +! \__ \ || __/ |_) | | (_| | |_| |_| | | | |_) | |_| | || __/\__ \ +! |___/\__\___| .__/ \__,_|\__|\__|_| |_|_.__/ \__,_|\__\___||___/ +! |_| +! _ __ _ +! (_) / /__ _ __ ___ __ _| | +! | | / / _ \ | '__/ _ \/ _` | | +! | |/ / (_) | | | | __/ (_| | | +! |_/_/ \___/ |_| \___|\__,_|_| + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5WriteStepAttribFloat64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_writestepattrib_r8 (filehandle, attrib_name, attrib_value, attrib_nelem) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to read + REAL*8, INTENT(OUT):: attrib_value(*) !< attribute data to be written + INTEGER*8, INTENT(IN) :: attrib_nelem !< number of elements in data array +END FUNCTION + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5ReadStepAttribFloat64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_readstepattrib_r8 (filehandle, attrib_name, attrib_value) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to read + REAL*8, INTENT(OUT):: attrib_value(*) !< attribute data will be read into this array +END FUNCTION + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5WriteStepAttribFloat32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_writestepattrib_r4 (filehandle, attrib_name, attrib_value, attrib_nelem) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to read + REAL*4, INTENT(OUT):: attrib_value(*) !< attribute data to be written + INTEGER*8, INTENT(IN) :: attrib_nelem !< number of elements in data array +END FUNCTION + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5ReadStepAttribFloat32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_readstepattrib_r4 ( filehandle, attrib_name, attrib_value ) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to read + REAL*4, INTENT(OUT):: attrib_value(*) !< attribute data will be read into this array +END FUNCTION + +! _ _ _ _ _ _ +! ___| |_ ___ _ __ __ _| |_| |_ _ __(_) |__ _ _| |_ ___ ___ +! / __| __/ _ \ '_ \ / _` | __| __| '__| | '_ \| | | | __/ _ \/ __| +! \__ \ || __/ |_) | | (_| | |_| |_| | | | |_) | |_| | || __/\__ \ +! |___/\__\___| .__/ \__,_|\__|\__|_| |_|_.__/ \__,_|\__\___||___/ +! |_| +! _ __ _ _ +! (_) / /__ (_)_ __ | |_ ___ __ _ ___ _ __ +! | | / / _ \ | | '_ \| __/ _ \/ _` |/ _ \ '__| +! | |/ / (_) | | | | | | || __/ (_| | __/ | +! |_/_/ \___/ |_|_| |_|\__\___|\__, |\___|_| +! |___/ + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5WriteStepAttribInt64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_writestepattrib_i8 (filehandle, attrib_name, attrib_value, attrib_nelem) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to write + INTEGER*8,INTENT(OUT):: attrib_value(*) !< attribute data to be written + INTEGER*8, INTENT(IN) :: attrib_nelem !< number of elements in data array +END FUNCTION + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5ReadStepAttribInt64 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_readstepattrib_i8 (filehandle, attrib_name, attrib_value) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to read + INTEGER*8,INTENT(OUT):: attrib_value(*) !< attribute data will be read into this array +END FUNCTION + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5WriteStepAttribInt32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_writestepattrib_i4 (filehandle, attrib_name, attrib_value, attrib_nelem) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to write + INTEGER*4,INTENT(OUT):: attrib_value(*) !< attribute data to be written + INTEGER*8, INTENT(IN) :: attrib_nelem !< number of elements in data array +END FUNCTION + +!> +!! \ingroup h5hut_attrib_f +!! See \ref H5ReadStepAttribInt32 +!! \return 0 on success or error code +!< +INTEGER*8 FUNCTION h5_readstepattrib_i4 (filehandle, attrib_name, attrib_value) + INTEGER*8,INTENT(IN) :: filehandle !< file handle + CHARACTER(LEN=*), INTENT(IN) :: attrib_name !< name of attribute to read + INTEGER*4,INTENT(OUT):: attrib_value(*) !< attribute data will be read into this array +END FUNCTION diff --git a/src/Fortran/H5_attribs_F.c b/src/Fortran/H5_attribs_F.c new file mode 100644 index 0000000..5a58fd7 --- /dev/null +++ b/src/Fortran/H5_attribs_F.c @@ -0,0 +1,561 @@ + +#include +#include + +#include "h5core/h5_core.h" +#include "Underscore.h" + +#if defined(F77_SINGLE_UNDERSCORE) +#define F77NAME(a,b) a +#elif defined(F77_CRAY_UNDERSCORE) +#define F77NAME(a,b) b +#elif defined(F77_NO_UNDERSCORE) +#else +#error Error, no way to determine how to construct fortran bindings +#endif + +#if !defined(F77_NO_UNDERSCORE) + +#define h5_writefileattrib_string F77NAME ( h5_writefileattrib_string_, H5_writefileattrib_string ) +#define h5_writestepattrib_string F77NAME ( h5_writestepattrib_string_, H5_WRITESTEPATTRIB_STRING ) +#define h5_readstepattrib_string F77NAME ( h5_readstepattrib_string_, h5_READSTEPATTRIB_STRING ) +#define h5_readfileattrib_string F77NAME ( h5_readfileattrib_string_, h5_READFILEATTRIB_STRING ) + +#endif + +h5_err_t +h5_writefileattrib_string ( + h5_int64_t *const f, + const char *name, + const char *buffer, + const int l_name, + const int l_buffer + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + char *buffer2 = h5_strdupfor2c ( buffer, l_buffer ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer='%s', l_name=%d, l_buffer=%d", + fh, name2, buffer2, l_name, l_buffer); + + h5_err_t herr = h5_write_file_attrib ( + fh, name2, H5_STRING_T, buffer2, strlen(buffer2)+1 ); + + free ( name2 ); + free ( buffer2 ); + H5_API_RETURN(herr); +} + +h5_err_t +h5_writestepattrib_string ( + h5_int64_t *const f, + const char *name, + const char *buffer, + const int l_name, + const int l_buffer + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + char *buffer2 = h5_strdupfor2c ( buffer, l_buffer ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer='%s', l_name=%d, l_buffer=%d", + fh, name2, buffer2, l_name, l_buffer); + + h5_err_t herr = h5_write_step_attrib ( + fh, name2, H5_STRING_T, buffer2, strlen(buffer2)+1 ); + + free ( name2 ); + free ( buffer2 ); + H5_API_RETURN(herr); +} + +h5_err_t +h5_readfileattrib_string ( + h5_int64_t *const f, + const char *name, + char *buffer, + const int l_name, + const int l_buffer + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char * name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d, l_buffer=%d", + fh, name2, buffer, l_name, l_buffer); + + h5_err_t herr = h5_read_attrib ( + fh, fh->root_gid, name2, H5_STRING_T, buffer ); + + h5_strc2for ( buffer, l_buffer ); + + free ( name2 ); + H5_API_RETURN(herr); +} + +h5_err_t +h5_readstepeattrib_string ( + h5_int64_t *const f, + const char *name, + char *buffer, + const int l_name, + const int l_buffer + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char * name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d, l_buffer=%d", + fh, name2, buffer, l_name, l_buffer); + + h5_err_t herr = h5_read_step_attrib ( + fh, name2, H5_STRING_T, buffer ); + + h5_strc2for ( buffer, l_buffer ); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5_writefileattrib_r8 F77NAME ( \ + h5_writefileattrib_r8_, \ + H5_WRITEFILEATTRIB_R8 ) +#endif + +h5_err_t +h5_writefileattrib_r8 ( + h5_int64_t *const f, + const char *name, + const h5_float64_t *buffer, + const h5_int64_t *nelem, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, nelem=%lld, l_name=%d", + fh, name2, buffer, (long long)*nelem, l_name); + + h5_err_t herr = h5_write_file_attrib( + fh, name2, H5_FLOAT64_T, buffer, (hsize_t)*nelem); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5_readfileattrib_r8 F77NAME ( \ + h5_readfileattrib_r8_, \ + H5_READFILEATTRIB_R8 ) +#endif + +h5_err_t +h5bl_readfileattrib_r8 ( + h5_int64_t *const f, + const char *name, + h5_float64_t *buffer, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d", + fh, name2, buffer, l_name); + + h5_err_t herr = h5_read_attrib( + fh, fh->root_gid, name2, H5_FLOAT64_T, buffer); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5_writefileattrib_r4 F77NAME ( \ + h5_writefileattrib_r4_, \ + H5_WRITEFILEATTRIB_R4 ) +#endif + +h5_err_t +h5_writefileattrib_r4 ( + h5_int64_t *const f, + const char *name, + const h5_float32_t *buffer, + const h5_int64_t *nelem, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, nelem=%lld, l_name=%d", + fh, name2, buffer, (long long)*nelem, l_name); + + h5_err_t herr = h5_write_file_attrib( + fh, name2, + H5_FLOAT32_T, buffer, (hsize_t)*nelem); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5_readfileattrib_r4 F77NAME ( \ + h5_readfileattrib_r4_, \ + H5_READFILEATTRIB_R4 ) +#endif + +h5_err_t +h5bl_readfileattrib_r4 ( + h5_int64_t *const f, + const char *name, + h5_float64_t *buffer, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d", + fh, name2, buffer, l_name); + + h5_err_t herr = h5_read_attrib( + fh, fh->root_gid, name2, H5_FLOAT32_T, buffer); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5_writefileattrib_i8 F77NAME ( \ + h5_writefileattrib_i8_, \ + H5_WRITEFILEATTRIB_I8 ) +#endif + +h5_err_t +h5_writefileattrib_i8 ( + h5_int64_t *const f, + const char *name, + const h5_int64_t *buffer, + const h5_int64_t *nelem, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, nelem=%lld, l_name=%d", + fh, name2, buffer, (long long)*nelem, l_name); + + h5_err_t herr = h5_write_file_attrib( + fh, name2, H5_INT64_T, buffer, (hsize_t)*nelem); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5_readfileattrib_i8 F77NAME ( \ + h5_readfileattrib_i8_, \ + H5_READFILEATTRIB_I8 ) +#endif + +h5_err_t +h5bl_readfileattrib_i8 ( + h5_int64_t *const f, + const char *name, + h5_float64_t *buffer, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d", + fh, name2, buffer, l_name); + + h5_err_t herr = h5_read_attrib( + fh, fh->root_gid, name2, H5_INT64_T, buffer); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5_writefileattrib_i4 F77NAME ( \ + h5_writefileattrib_i4_, \ + H5_WRITEFILEATTRIB_I4 ) +#endif + +h5_err_t +h5_writefileattrib_i4 ( + h5_int64_t *const f, + const char *name, + const h5_int32_t *buffer, + const h5_int64_t *nelem, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, nelem=%lld, l_name=%d", + fh, name2, buffer, (long long)*nelem, l_name); + + h5_err_t herr = h5_write_file_attrib( + fh, name2, H5_INT32_T, buffer, (hsize_t)*nelem); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5_readfileattrib_i4 F77NAME ( \ + h5_readfileattrib_i4_, \ + H5_READFILEATTRIB_I4 ) +#endif + +h5_err_t +h5bl_readfileattrib_i4 ( + h5_int64_t *const f, + const char *name, + h5_float64_t *buffer, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d", + fh, name2, buffer, l_name); + + h5_err_t herr = h5_read_attrib( + fh, fh->root_gid, name2, H5_INT32_T, buffer); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5_writestepattrib_r8 F77NAME ( \ + h5_writestepattrib_r8_, \ + H5_WRITESTEPATTRIB_R8 ) +#endif + +h5_err_t +h5_writestepattrib_r8 ( + h5_int64_t *const f, + const char *name, + const h5_float64_t *buffer, + const h5_int64_t *nelem, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, nelem=%lld, l_name=%d", + fh, name2, buffer, (long long)*nelem, l_name); + + h5_err_t herr = h5_write_step_attrib( + fh, name2, H5_FLOAT64_T, buffer, (hsize_t)*nelem); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5_readstepattrib_r8 F77NAME ( \ + h5_readstepattrib_r8_, \ + H5_READSTEPATTRIB_R8 ) +#endif + +h5_err_t +h5bl_readstepattrib_r8 ( + h5_int64_t *const f, + const char *name, + h5_float64_t *buffer, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d", + fh, name2, buffer, l_name); + + h5_err_t herr = h5_read_step_attrib( + fh, name2, H5_FLOAT64_T, buffer); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5_writestepattrib_r4 F77NAME ( \ + h5_writestepattrib_r4_, \ + H5_WRITESTEPATTRIB_R4 ) +#endif + +h5_err_t +h5_writestepattrib_r4 ( + h5_int64_t *const f, + const char *name, + const h5_float32_t *buffer, + const h5_int64_t *nelem, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, nelem=%lld, l_name=%d", + fh, name2, buffer, (long long)*nelem, l_name); + + h5_err_t herr = h5_write_step_attrib( + fh, name2, H5_FLOAT32_T, buffer, (hsize_t)*nelem); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5_readstepattrib_r4 F77NAME ( \ + h5_readstepattrib_r4_, \ + H5_READSTEPATTRIB_R4 ) +#endif + +h5_err_t +h5bl_readstepattrib_r4 ( + h5_int64_t *const f, + const char *name, + h5_float64_t *buffer, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d", + fh, name2, buffer, l_name); + + h5_err_t herr = h5_read_step_attrib( + fh, name2, H5_FLOAT32_T, buffer); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5_writestepattrib_i8 F77NAME ( \ + h5_writestepattrib_i8_, \ + H5_WRITESTEPATTRIB_I8 ) +#endif + +h5_err_t +h5_writestepattrib_i8 ( + h5_int64_t *const f, + const char *name, + const h5_int64_t *buffer, + const h5_int64_t *nelem, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, nelem=%lld, l_name=%d", + fh, name2, buffer, (long long)*nelem, l_name); + + h5_err_t herr = h5_write_step_attrib( + fh, name2, H5_INT64_T, buffer, (hsize_t)*nelem); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5_readstepattrib_i8 F77NAME ( \ + h5_readstepattrib_i8_, \ + H5_READSTEPATTRIB_I8 ) +#endif + +h5_err_t +h5bl_readstepattrib_i8 ( + h5_int64_t *const f, + const char *name, + h5_float64_t *buffer, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d", + fh, name2, buffer, l_name); + + h5_err_t herr = h5_read_step_attrib( + fh, name2, H5_INT64_T, buffer); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5_writestepattrib_i4 F77NAME ( \ + h5_writestepattrib_i4_, \ + H5_WRITESTEPATTRIB_I4 ) +#endif + +h5_err_t +h5_writestepattrib_i4 ( + h5_int64_t *const f, + const char *name, + const h5_int32_t *buffer, + const h5_int64_t *nelem, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, nelem=%lld, l_name=%d", + fh, name2, buffer, (long long)*nelem, l_name); + + h5_err_t herr = h5_write_step_attrib( + fh, name2, H5_INT32_T, buffer, (hsize_t)*nelem); + + free ( name2 ); + H5_API_RETURN(herr); +} + +#if !defined(F77_NO_UNDERSCORE) +#define h5_readstepattrib_i4 F77NAME ( \ + h5_readstepattrib_i4_, \ + H5_READSTEPATTRIB_I4 ) +#endif + +h5_err_t +h5bl_readstepattrib_i4 ( + h5_int64_t *const f, + const char *name, + h5_float64_t *buffer, + const int l_name + ) { + + h5_file_t *fh = h5_filehandlefor2c(f); + char *name2 = h5_strdupfor2c ( name, l_name ); + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p, l_name=%d", + fh, name2, buffer, l_name); + + h5_err_t herr = h5_read_step_attrib( + fh, name2, H5_INT32_T, buffer); + + free ( name2 ); + H5_API_RETURN(herr); +} diff --git a/src/Fortran/H5_constF.f90 b/src/Fortran/H5_constF.f90 new file mode 100644 index 0000000..5ccf48a --- /dev/null +++ b/src/Fortran/H5_constF.f90 @@ -0,0 +1,61 @@ + +INTEGER*8 :: H5_STRING_T +INTEGER*8 :: H5_INT16_T +INTEGER*8 :: H5_INT32_T +INTEGER*8 :: H5_INT64_t +INTEGER*8 :: H5_FLOAT32_T +INTEGER*8 :: H5_FLOAT64_T + +PARAMETER (H5_STRING_T = 1) +PARAMETER (H5_INT16_T = 2) +PARAMETER (H5_INT32_T = 3) +PARAMETER (H5_INT64_T = 4) +PARAMETER (H5_FLOAT32_T = 5) +PARAMETER (H5_FLOAT64_T = 6) + +INTEGER*8 :: H5_MAX_NAME_LEN +PARAMETER (H5_MAX_NAME_LEN = 64) + +INTEGER*8 :: H5_SUCCESS +INTEGER*8 :: H5_OK +INTEGER*8 :: H5_NOK +INTEGER*8 :: H5_FAILURE +INTEGER*8 :: H5_ERR_BADF +INTEGER*8 :: H5_ERR_NOMEM +INTEGER*8 :: H5_ERR_INVAL +INTEGER*8 :: H5_ERR_BADFD + +INTEGER*8 :: H5_ERR_LAYOUT +INTEGER*8 :: H5_ERR_NOENTRY + +INTEGER*8 :: H5_ERR_MPI +INTEGER*8 :: H5_ERR_HDF5 +INTEGER*8 :: H5_ERR_H5 +INTEGER*8 :: H5_ERR_H5PART +INTEGER*8 :: H5_ERR_H5BLOCK +INTEGER*8 :: H5_ERR_H5FED + +INTEGER*8 :: H5_ERR_INTERNAL +INTEGER*8 :: H5_ERR_NOT_IMPLEMENTED + +PARAMETER (H5_SUCCESS = 0) +PARAMETER (H5_OK = H5_SUCCESS) +PARAMETER (H5_NOK = -1) +PARAMETER (H5_FAILURE = -2) +PARAMETER (H5_ERR_BADF = -9) +PARAMETER (H5_ERR_NOMEM = -12) +PARAMETER (H5_ERR_INVAL = -22) +PARAMETER (H5_ERR_BADFD = -77) + +PARAMETER (H5_ERR_LAYOUT = -100) +PARAMETER (H5_ERR_NOENTRY = -101) + +PARAMETER (H5_ERR_MPI = -201) +PARAMETER (H5_ERR_HDF5 = -202) +PARAMETER (H5_ERR_H5 = -203) +PARAMETER (H5_ERR_H5PART = -204) +PARAMETER (H5_ERR_H5BLOCK = -205) +PARAMETER (H5_ERR_H5FED = -206) + +PARAMETER (H5_ERR_INTERNAL = -253) +PARAMETER (H5_ERR_NOT_IMPLEMENTED = -254) diff --git a/src/Fortran/Makefile.am b/src/Fortran/Makefile.am new file mode 100644 index 0000000..a18059d --- /dev/null +++ b/src/Fortran/Makefile.am @@ -0,0 +1,59 @@ +# src/Fortran level Makefile.am + +OBJEXT=o + +AM_CPPFLAGS = -I../include @AM_CPPFLAGS@ + +F90_FILES = H5F.f90 \ + H5_constF.f90 \ + H5_attribsF.f90 \ + H5PartF.f90 \ + H5Part_ioF.f90 \ + H5BlockF.f90 \ + H5Block_attribsF.f90 \ + H5Block_ioF.f90 + +EXTRA_HEADERS = + +# Extra files that I wish to include in the dist tar ball. +EXTRA_DIST = TestUnderscoreC.c \ + TestUnderscore.f \ + $(F90_FILES) + +# Files that I don't want to include in the dist tar ball +nodist_include_HEADERS = ../include/H5hutF.h + +# What to build... Will be determined by configure script. +lib_LTLIBRARIES = @LIB_FORTRAN@ + +# Listing of all possible targets that I may build. +EXTRA_LTLIBRARIES = libH5hutF.la + +include_HEADERS = \ + ../include/H5hutF.h + +libH5hutF_la_SOURCES = \ + H5.c \ + H5_attribs.c \ + H5Part.c \ + H5Part_io.c \ + H5Block.c \ + H5Block_attribs.c \ + H5Block_io.c + +libH5hutF_la_DEPENDENCIES = + +libH5hutF_la_LDFLAGS = -version-info 2:0:0 -rpath '$(libdir)' + +../include/H5hutF.h: $(F90_FILES) + awk '/INTEGER\*8 :: /{print "\t" $$0}' $^ >$@ + awk '/PARAMETER /{print "\t" $$0}' $^ >> $@ + awk '/INTEGER\*8 FUNCTION/{print "\t" $$1 " " $$3}' $^ >>$@ + +all-local: ../include/H5hutF.h + $(INSTALL) -m644 .libs/libH5hutF.a ../lib + +clean: clean-am + +clean-local: + $(RM) -f *~ diff --git a/src/Fortran/TestUnderscore.f b/src/Fortran/TestUnderscore.f new file mode 100755 index 0000000..4de2c6e --- /dev/null +++ b/src/Fortran/TestUnderscore.f @@ -0,0 +1,12 @@ +c ============== +c +c Simple Fortran program works in conjunction with C program +c to determine how many underscores are generated +c by the fortran compiler +c +c ============== + + program TestUnderscoreF + implicit none + call FindUnderscores + end diff --git a/src/Fortran/TestUnderscoreC.c b/src/Fortran/TestUnderscoreC.c new file mode 100755 index 0000000..8f38296 --- /dev/null +++ b/src/Fortran/TestUnderscoreC.c @@ -0,0 +1,36 @@ +#include + +void findunderscores(void){ + printf("#ifndef F77_NO_UNDERSCORE\n"); + printf("#define F77_NO_UNDERSCORE\n"); + printf("#endif\n"); + printf("#ifndef F77_NO_CAPS\n"); + printf("#define F77_NO_CAPS\n"); + printf("#endif\n"); +} + +void FindUnderscores(void){ + printf("#ifndef F77_NO_UNDERSCORE\n"); + printf("#define F77_NO_UNDERSCORE\n"); + printf("#endif\n"); +} + +void FindUnderscores_(void){ + printf("#ifndef F77_SINGLE_UNDERSCORE\n"); + printf("#define F77_SINGLE_UNDERSCORE\n"); + printf("#endif\n"); +} + +void findunderscores_(void){ + printf("#ifndef F77_SINGLE_UNDERSCORE\n"); + printf("#define F77_SINGLE_UNDERSCORE\n"); + printf("#endif\n"); + printf("#ifndef F77_NO_CAPS\n"); + printf("#define F77_NO_CAPS\n"); + printf("#endif\n"); +} +void FINDUNDERSCORES(void){ + printf("#ifndef F77_CRAY_UNDERSCORE\n"); + printf("#define F77_CRAY_UNDERSCORE\n"); + printf("#endif\n"); +} diff --git a/src/Fortran/h5_private.h b/src/Fortran/h5_private.h new file mode 100644 index 0000000..cab385a --- /dev/null +++ b/src/Fortran/h5_private.h @@ -0,0 +1,83 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __FORTRAN_H5_PRIVATE_H +#define __FORTRAN_H5_PRIVATE_H + +#include +#include + +#include "h5core/h5.h" + +#include "Underscore.h" + +#if defined(F77_NO_UNDERSCORE) +#define F77_NAME(a,b,c) a +#elif defined(F77_SINGLE_UNDERSCORE) +#define F77_NAME(a,b,c) b +#elif defined(F77_CRAY_UNDERSCORE) +#define F77_NAME(a,b,c) c +#else +#error Error, no way to determine how to construct fortran bindings +#endif + +#define convert_type2for(type) \ + if (*type == H5_STRING_T) { \ + *type = 1; \ + } else if (*type == H5_INT16_T) { \ + *type = 2; \ + } else if (*type == H5_INT32_T) { \ + *type = 3; \ + } else if (*type == H5_INT64_T) { \ + *type = 4; \ + } else if (*type == H5_FLOAT32_T) { \ + *type = 5; \ + } else if (*type == H5_FLOAT64_T) { \ + *type = 6; \ + } else { \ + H5_API_LEAVE ( \ + h5_error ( \ + H5_ERR_H5, \ + "Unknown attribute type")); \ + } + +static inline char* +h5_strdupfor2c ( + const char* s, + const ssize_t len + ) { + // :FIXME: error handling + char* dup = (char*)malloc (len + 1); + strncpy (dup, s, len); + dup[len] = '\0'; + for (int i = len-1; i >= 0; i--) { + if (dup[i] == ' ') dup[i] = '\0'; + else break; + } + return dup; +} + +static inline char* +h5_strc2for ( + char* const str, + const ssize_t l_str + ) { + size_t len = strlen (str); + memset (str+len, ' ', l_str-len); + + return str; +} + +static inline h5_file_t +h5_filehandlefor2c ( + const h5_int64_t* ptr + ) { + return (h5_file_t)*ptr; +} +#endif diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..043e75d --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,4 @@ +# test level Makefile.am + +SUBDIRS = h5core @BINDINGS@ + diff --git a/src/h5core/Makefile.am b/src/h5core/Makefile.am new file mode 100644 index 0000000..e07c081 --- /dev/null +++ b/src/h5core/Makefile.am @@ -0,0 +1,114 @@ +# src level Makefile.am + +OBJEXT=o + +AM_CPPFLAGS = -I../include @AM_CPPFLAGS@ + +EXTRA_HEADERS = \ + h5_attribs_private.h \ + h5_debug_private.h \ + h5_errorhandling_private.h \ + h5_fcmp_private.h \ + h5_hdf5_private.h \ + h5_hsearch_private.h \ + h5_lustre_private.h \ + h5_maps_private.h \ + h5_model_private.h \ + h5_mpi_private.h \ + h5_private.h \ + h5_qsort_private.h \ + h5_readwrite_private.h \ + h5_syscall_private.h \ + h5_types_private.h \ + h5_va_macros.h \ + h5b_model_private.h \ + h5b_readwrite_private.h \ + h5b_types_private.h \ + h5t_access_private.h \ + h5t_adjacencies_private.h \ + h5t_core_private.h \ + h5t_errorhandling_private.h \ + h5t_map_private.h \ + h5t_model_private.h \ + h5t_octree_private.h \ + h5t_readwrite_private.h \ + h5t_ref_elements_private.h \ + h5t_retrieve_private.h \ + h5t_store_private.h \ + h5t_tags_private.h \ + h5t_types_private.h \ + h5u_readwrite_private.h \ + h5u_types_private.h + +# Extra files that I wish to include in the dist tar ball. +EXTRA_DIST = $(EXTRA_HEADERS) + +# What to build... Will be determined by configure script. +lib_LTLIBRARIES = libH5hut.la + +# Listing of sources +libH5hut_la_SOURCES = \ + h5_attach.c \ + h5_attribs.c \ + h5_errorhandling.c \ + h5_fcmp.c \ + h5_init.c \ + h5_hdf5.c \ + h5_hsearch.c \ + h5_maps.c \ + h5_model.c \ + h5_mpi.c \ + h5_openclose.c \ + h5_qsort.c \ + h5_qsort_r.c \ + h5_readwrite.c \ + h5_syscall.c \ + h5_lustre.c \ + h5u_readwrite.c \ + h5b_readwrite.c \ + h5u_model.c \ + h5b_model.c \ + h5b_attribs.c + +if ENABLE_EXPERIMENTAL +libH5hut_la_SOURCES += \ + h5t_access_tetm.c \ + h5t_access_trim.c \ + h5t_adjacencies.c \ + h5t_adjacencies_tetm.c \ + h5t_adjacencies_trim.c \ + h5t_core.c \ + h5t_core_trim.c \ + h5t_core_tetm.c \ + h5t_map.c \ + h5t_model.c \ + h5t_model_tetm.c \ + h5t_model_trim.c \ + h5t_octree.c \ + h5t_readwrite.c \ + h5t_readwrite_trim.c \ + h5t_readwrite_tetm.c \ + h5t_ref_elements.c \ + h5t_retrieve.c \ + h5t_retrieve_tetm.c \ + h5t_retrieve_trim.c \ + h5t_store.c \ + h5t_store_tetm.c \ + h5t_store_trim.c \ + h5t_tags.c +endif + +libH5hut_la_DEPENDENCIES = $(EXTRA_HEADERS) + +libH5hut_la_LDFLAGS = -version-info 2:0:0 + +all-local: + $(INSTALL) -m644 .libs/libH5hut.a ../lib + +install-exec-local: + @$(INSTALL) -d $(DESTDIR)$(includedir)/h5core + @$(INSTALL) -m644 ../include/h5core/*.h $(DESTDIR)$(includedir)/h5core/ + +clean-local: + $(RM) -f ../lib/libH5hut.* + $(RM) -f *~ diff --git a/src/h5core/h5_attach.c b/src/h5core/h5_attach.c new file mode 100644 index 0000000..486075c --- /dev/null +++ b/src/h5core/h5_attach.c @@ -0,0 +1,336 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5core/h5.h" +#include "h5_types_private.h" + +#include "h5_errorhandling_private.h" +#include "h5_hdf5_private.h" +#include "h5_model_private.h" +#include "h5core/h5_syscall.h" +#include "h5_va_macros.h" + +#include +#include +#include +#include +#include + +h5_err_t +h5_add_attachment ( + const h5_file_t f_, + const char* const fname + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, "f=%p, fname='%s'", f, fname); + // allowed file modes: O_RDWR, O_WRONLY; O_APPEND + if (f->props->mode == H5_O_RDONLY) { + H5_PRIV_FUNC_LEAVE ( + h5priv_handle_file_mode_error (f->props->mode)); + } + + struct stat st; + if (stat (fname, &st) < 0) { + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot stat file '%s'", + fname)); + } + hsize_t fsize = st.st_size; + hsize_t write_length; + char* buf = NULL; + if (f->myproc == 0) { + TRY (buf = h5_calloc (1, fsize)); + write_length = fsize; + int fd; + if ((fd = open (fname, O_RDONLY)) < 0) { + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot open file '%s' for reading", + fname)); + } + again: + if (read (fd, buf, fsize) < 0) { + if (errno == EINTR) { + goto again; + } else { + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot read file '%s'", + fname)); + } + } + if (close (fd) < 0) { + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot close file '%s'", + fname)); + } + + } else { + TRY (buf = h5_calloc (1, 1)); + write_length = 0; + } + + hid_t loc_id; + TRY (loc_id = h5priv_open_group (1, f->file, H5_ATTACHMENT)); + h5_err_t exists; + TRY (exists = hdf5_link_exists (loc_id, fname)); + if (exists && (f->props->mode == H5_O_RDWR || f->props->mode == H5_O_WRONLY)) { + // remove + } else if (exists && f->props->mode == H5_O_APPEND) { + H5_PRIV_FUNC_LEAVE ( + h5priv_handle_file_mode_error (f->props->mode)); + } + hid_t diskspace_id; + TRY (diskspace_id = hdf5_create_dataspace (1, &fsize, &fsize)); + hid_t dataset_id; + TRY (dataset_id = hdf5_create_dataset (loc_id, + fname, + H5T_NATIVE_CHAR, + diskspace_id, + H5P_DEFAULT)); + hsize_t start = 0; + TRY (hdf5_select_hyperslab_of_dataspace ( + diskspace_id, + H5S_SELECT_SET, + &start, + NULL, + &write_length, + NULL)); + + hid_t memspace_id; + hsize_t max = H5S_UNLIMITED; + TRY (memspace_id = hdf5_create_dataspace (1, &write_length, &max)); + TRY (hdf5_write_dataset (dataset_id, + H5T_NATIVE_CHAR, + memspace_id, + diskspace_id, + f->props->xfer_prop, + buf)); + + TRY (hdf5_close_dataspace (diskspace_id)); + TRY (hdf5_close_dataspace (memspace_id)); + TRY (hdf5_close_dataset (dataset_id)); + TRY (hdf5_close_group (loc_id)); + + TRY (h5_free (buf)); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + + + +static inline hid_t +open_attachments ( + const h5_file_p f + ) { + h5_err_t exists = hdf5_link_exists (f->file, H5_ATTACHMENT); + if (exists > 0) { + return hdf5_open_group (f->file, H5_ATTACHMENT); + } else if (exists == 0) { + return h5_warn ("No attachment group in file"); + } + return exists; +} + +h5_ssize_t +h5_get_num_attachments ( + const h5_file_t f_ + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_ssize_t, "f=%p", f); + h5_ssize_t num = 0; + hid_t group_id; + TRY (group_id = open_attachments (f)); + if (group_id < 0) { + H5_CORE_API_LEAVE (0); + } + TRY (num = hdf5_get_num_datasets (group_id)); + TRY (hdf5_close_group (group_id)); + H5_CORE_API_RETURN (num); +} + +h5_err_t +h5_get_attachment_info_by_idx ( + const h5_file_t f_, + const h5_size_t idx, // IN + char* const fname, // OUT + h5_size_t len_fname, // IN + h5_size_t* const fsize // OUT + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, idx=%llu, fname=%s, len_fname=%llu, fsize=%p", + f, (unsigned long long)idx, fname, (unsigned long long)len_fname, + fsize); + hid_t loc_id; + TRY (loc_id = open_attachments (f)); + if (loc_id < 0) { // no attachment group in file + H5_CORE_API_LEAVE (0); + } + TRY (hdf5_get_name_of_dataset_by_idx ( + loc_id, + idx, + fname, len_fname)); + + if (fsize) { + // get number of elements, do not change value on error + h5_ssize_t ssize; + TRY (ssize = hdf5_get_npoints_of_dataset_by_name (loc_id, fname)); + *fsize = ssize; + } + TRY (hdf5_close_group (loc_id)); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5_get_attachment_info_by_name ( + const h5_file_t f_, + const char* const fname, // IN + h5_size_t* const fsize // OUT + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, "f=%p, fname='%s', fsize=%p", f, fname, fsize); + + hid_t loc_id; + TRY (loc_id = open_attachments (f)); + if (loc_id < 0) { + H5_CORE_API_LEAVE (H5_NOK); + } + if (fsize) { + // get number of elements, do not change value on error + h5_ssize_t ssize; + TRY (ssize = hdf5_get_npoints_of_dataset_by_name (loc_id, fname)); + *fsize = ssize; + } + TRY (hdf5_close_group (loc_id)); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5_get_attachment ( + const h5_file_t f_, + const char* const fname + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, "f=%p, fname='%s'", f, fname); + // allowed modes: O_RDWR, O_RDONLY; O_APPEND + // forbidden modes: O_WRONLY + if (f->props->mode == H5_O_WRONLY) { + H5_PRIV_FUNC_LEAVE ( + h5priv_handle_file_mode_error (f->props->mode)); + } + + hid_t loc_id; + TRY (loc_id = hdf5_open_group (f->file, H5_ATTACHMENT)); + h5_err_t exists; + TRY (exists = hdf5_link_exists (loc_id, fname)); + if (f->props->mode == H5_O_WRONLY) { + H5_PRIV_FUNC_LEAVE ( + h5priv_handle_file_mode_error (f->props->mode)); + } else if (!exists) { + H5_PRIV_FUNC_LEAVE ( + h5_error ( + H5_ERR_H5, + "Attachment '%s' doesn't exist", fname)); + } + + // read dataset + hid_t dataset_id, diskspace_id; + h5_ssize_t fsize; + TRY (dataset_id = hdf5_open_dataset (loc_id, fname)); + TRY (diskspace_id = hdf5_get_dataset_space (dataset_id)); + TRY (fsize = hdf5_get_npoints_of_dataspace (diskspace_id)); + + hsize_t read_length; + char* buf = NULL; + if (f->myproc == 0) { + buf = malloc (fsize); + read_length = fsize; + + } else { + buf = malloc (1); + read_length = 0; + } + + hsize_t start = 0; + TRY (hdf5_select_hyperslab_of_dataspace ( + diskspace_id, + H5S_SELECT_SET, + &start, + NULL, + &read_length, + NULL)); + + hid_t memspace_id; + hsize_t max = H5S_UNLIMITED; + TRY (memspace_id = hdf5_create_dataspace (1, &read_length, &max)); + TRY (hdf5_read_dataset (dataset_id, + H5T_NATIVE_CHAR, + memspace_id, + diskspace_id, + f->props->xfer_prop, + buf)); + + TRY (hdf5_close_dataspace (diskspace_id)); + TRY (hdf5_close_dataspace (memspace_id)); + TRY (hdf5_close_dataset (dataset_id)); + TRY (hdf5_close_group (loc_id)); + + // write file + if (f->myproc == 0) { + int fd; + if ((fd = open (fname, O_WRONLY|O_CREAT|O_TRUNC, 0600)) < 0) { + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_H5, + "Error opening file '%s': %s", + fname, strerror(errno))); + } + if (write (fd, buf, fsize) != fsize) { + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_H5, + "Error writing to file '%s': %s", + fname, strerror(errno))); + } + if (close (fd) < 0) { + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_H5, + "Error closing file '%s': %s", + fname, strerror(errno))); + } + } + TRY (h5_free (buf)); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5_delete_attachment ( + const h5_file_t f_, + const char* const fname + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, "f=%p, fname='%s'", f, fname); + hid_t group_id; + TRY (group_id = open_attachments (f)); + if (group_id < 0) { + H5_CORE_API_LEAVE (H5_NOK); + } + TRY (hdf5_delete_link (group_id, fname, H5P_DEFAULT)); + TRY (hdf5_close_group (group_id)); + H5_CORE_API_RETURN (H5_SUCCESS); +} diff --git a/src/h5core/h5_attribs.c b/src/h5core/h5_attribs.c new file mode 100644 index 0000000..37a961a --- /dev/null +++ b/src/h5core/h5_attribs.c @@ -0,0 +1,351 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5core/h5.h" +#include "h5_types_private.h" + +#include "h5_private.h" +#include "h5_readwrite_private.h" +#include "h5_hdf5_private.h" + +h5_err_t +h5priv_read_attrib ( + const hid_t id, /*!< HDF5 object ID */ + const char* attrib_name, /*!< name of HDF5 attribute to read */ + const hid_t attrib_type, /*!< HDF5 type of attribute */ + void* const attrib_value /*!< OUT: attribute value */ + ) { + H5_PRIV_API_ENTER (h5_err_t, + "id=%d, attrib_name='%s', attrib_type=%d, attrib_value=%p", + id, + attrib_name, + attrib_type, + attrib_value); + hid_t attrib_id; + hid_t type_id; + hid_t space_id; + TRY (attrib_id = hdf5_open_attribute (id, attrib_name)); + TRY (type_id = hdf5_get_attribute_type (attrib_id)); + + hid_t h5type_id; + TRY (h5type_id = h5priv_normalize_h5_type (type_id)); + if (h5type_id != attrib_type) + H5_PRIV_API_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Attribute '%s' has type '%s' but was requested as '%s'.", + attrib_name, + hdf5_get_type_name (h5type_id), + hdf5_get_type_name (attrib_type))); + + TRY (space_id = hdf5_get_attribute_dataspace (attrib_id)); + TRY (hdf5_read_attribute (attrib_id, type_id, attrib_value)); + TRY (hdf5_close_dataspace(space_id)); + TRY (hdf5_close_type (type_id)); + TRY (hdf5_close_attribute (attrib_id)); + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5_read_file_attrib ( + const h5_file_t f_, + const char *attrib_name, + const hid_t attrib_type, + void *attrib_value + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, attrib_name='%s', attrib_type=%d, " + "attrib_value=%p", + f, + attrib_name, + attrib_type, + attrib_value); + CHECK_FILEHANDLE (f); + H5_CORE_API_RETURN (h5priv_read_attrib ( + f->root_gid, + attrib_name, + attrib_type, + attrib_value)); +} + +h5_err_t +h5_read_step_attrib ( + const h5_file_t f_, + const char *attrib_name, + const hid_t attrib_type, + void *attrib_value + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, attrib_name='%s', attrib_type=%d, " + "attrib_value=%p", + f, + attrib_name, + attrib_type, + attrib_value); + CHECK_FILEHANDLE (f); + CHECK_TIMEGROUP (f); + H5_CORE_API_RETURN (h5priv_read_attrib ( + f->step_gid, + attrib_name, + attrib_type, + attrib_value)); +} + +h5_err_t +h5priv_write_attrib ( + const hid_t id, /*!< HDF5 object ID */ + const char* attrib_name, /*!< name of HDF5 attribute to write */ + const hid_t attrib_type, /*!< HDF5 type of attribute */ + const void* attrib_value, /*!< value of attribute */ + const hsize_t attrib_nelem, /*!< number of elements (dimension) */ + const int overwrite + ) { + H5_PRIV_API_ENTER (h5_err_t, + "id=%d, attrib_name='%s', attrib_type=%d, " + "attrib_value=%p, attrib_nelem=%llu, overwrite=%d", + id, + attrib_name, + attrib_type, + attrib_value, + attrib_nelem, + overwrite); + hid_t space_id; + hid_t attrib_id; + hid_t type_id; + if ( attrib_type == H5T_NATIVE_CHAR ) { + TRY (type_id = hdf5_create_string_type (attrib_nelem)); + TRY (space_id = hdf5_create_dataspace_scalar ()); + } else { + type_id = attrib_type; + TRY (space_id = hdf5_create_dataspace (1, &attrib_nelem, NULL)); + } + h5_err_t exists; + TRY (exists = hdf5_attribute_exists (id, attrib_name)); + if (exists) { + if (overwrite) { + TRY (hdf5_delete_attribute (id, attrib_name)); + } else { + H5_PRIV_API_LEAVE ( + h5_error (H5_ERR_H5, "Cannot overwrite attribute %s/%s", + hdf5_get_objname (id), attrib_name)); + } + } + TRY (attrib_id = hdf5_create_attribute ( + id, + attrib_name, + type_id, + space_id, + H5P_DEFAULT, H5P_DEFAULT)); + + TRY (hdf5_write_attribute (attrib_id, type_id, attrib_value)); + TRY (hdf5_close_attribute (attrib_id)); + TRY (hdf5_close_dataspace (space_id)); + + if (attrib_type == H5T_NATIVE_CHAR) + TRY (hdf5_close_type (type_id)); + + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5_write_file_attrib ( + const h5_file_t f_, + const char *attrib_name, + const hid_t attrib_type, + const void *attrib_value, + const hsize_t attrib_nelem + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, attrib_name='%s', attrib_type=%d, " + "attrib_value=%p, attrib_nelem=%llu", + f, + attrib_name, + attrib_type, + attrib_value, + attrib_nelem); + CHECK_FILEHANDLE (f); + CHECK_WRITABLE_MODE (f); + H5_CORE_API_RETURN (h5priv_write_attrib ( + f->root_gid, + attrib_name, + attrib_type, + attrib_value, + attrib_nelem, + 1)); +} + +h5_err_t +h5_write_step_attrib ( + const h5_file_t f_, + const char *attrib_name, + const hid_t attrib_type, + const void *attrib_value, + const hsize_t attrib_nelem + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, attrib_name='%s', attrib_type=%d, " + "attrib_value=%p, attrib_nelem=%llu", + f, + attrib_name, + attrib_type, + attrib_value, + attrib_nelem); + CHECK_FILEHANDLE (f); + CHECK_TIMEGROUP (f); + CHECK_WRITABLE_MODE (f); + H5_CORE_API_RETURN (h5priv_write_attrib ( + f->step_gid, + attrib_name, + attrib_type, + attrib_value, + attrib_nelem, + 1)); +} + +h5_err_t +h5priv_get_attrib_info ( + const hid_t id, /*!< HDF5 object ID */ + const h5_size_t attrib_idx, /*!< index of attribute */ + char* attrib_name, /*!< OUT: name of attribute */ + const h5_size_t len_attrib_name,/*!< buffer length */ + h5_int64_t* attrib_type, /*!< OUT: H5 type of attribute */ + h5_size_t* attrib_nelem /*!< OUT: number of elements */ + ) { + H5_PRIV_API_ENTER (h5_err_t, + "id=%d, " + "attrib_idx=%llu, " + "attrib_name=%p, len_attrib_name=%llu, " + "attrib_type=%p, attrib_nelem=%p", + id, + (long long unsigned)attrib_idx, + attrib_name, + (long long unsigned)len_attrib_name, + attrib_type, + attrib_nelem); + hid_t attrib_id; + hid_t mytype; + hid_t space_id; + TRY (attrib_id = hdf5_open_attribute_idx ( + id, + (unsigned int)attrib_idx)); + + if (attrib_nelem) { + TRY (space_id = hdf5_get_attribute_dataspace (attrib_id)); + TRY (*attrib_nelem = hdf5_get_npoints_of_dataspace (space_id)); + TRY (hdf5_close_dataspace (space_id)); + } + if (attrib_name) { + TRY (hdf5_get_attribute_name ( + attrib_id, + (size_t)len_attrib_name, + attrib_name)); + } + if (attrib_type) { + TRY (mytype = hdf5_get_attribute_type (attrib_id)); + TRY (*attrib_type = h5priv_normalize_h5_type (mytype)); + TRY (hdf5_close_type (mytype)); + } + TRY (hdf5_close_attribute (attrib_id)); + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +/*! + \ingroup h5_core_attrib + + Get information about an attribute of a HDF5 object. + + \return \c H5_SUCCESS or error code. +*/ +h5_err_t +h5_get_file_attrib_info ( + const h5_file_t f_, /*!< handle to open file */ + const h5_size_t attrib_idx, /*!< index of attribute */ + char* attrib_name, /*!< OUT: name of attribute */ + const h5_size_t len_attrib_name, /*!< buffer length */ + h5_int64_t* attrib_type, /*!< OUT: H5 type of attribute */ + h5_size_t* attrib_nelem /*!< OUT: number of elements */ + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, " + "attrib_idx=%llu, attrib_name=%p, len_attrib_name=%llu, " + "attrib_type=%p, attrib_nelem=%p", + f, + (long long unsigned)attrib_idx, + attrib_name, + (long long unsigned)len_attrib_name, + attrib_type, + attrib_nelem); + CHECK_FILEHANDLE (f); + TRY (h5priv_get_attrib_info ( + f->root_gid, attrib_idx, attrib_name, len_attrib_name, + attrib_type, attrib_nelem)); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5_get_step_attrib_info ( + const h5_file_t f_, /*!< handle to open file */ + const h5_size_t attrib_idx, /*!< index of attribute */ + char* attrib_name, /*!< OUT: name of attribute */ + const h5_size_t len_attrib_name, /*!< buffer length */ + h5_int64_t* attrib_type, /*!< OUT: H5 type of attribute */ + h5_size_t* attrib_nelem /*!< OUT: number of elements */ + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, " + "attrib_idx=%llu, attrib_name=%p, len_attrib_name=%llu, " + "attrib_type=%p, attrib_nelem=%p", + f, + (long long unsigned)attrib_idx, + attrib_name, + (long long unsigned)len_attrib_name, + attrib_type, + attrib_nelem); + CHECK_FILEHANDLE (f); + CHECK_TIMEGROUP (f); + TRY (h5priv_get_attrib_info ( + f->step_gid, attrib_idx, attrib_name, len_attrib_name, + attrib_type, attrib_nelem)); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +/*! + \ingroup h5_core_attrib + + Get number of attributes of a HDF5 object. + + \return number of attributes or error code. +*/ +h5_ssize_t +h5_get_num_file_attribs ( + const h5_file_t f_ /*!< handle to open file */ + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_ssize_t, "f=%p", f); + CHECK_FILEHANDLE (f); + H5_CORE_API_RETURN (hdf5_get_num_attribute (f->root_gid)); +} + +h5_ssize_t +h5_get_num_step_attribs ( + const h5_file_t f_ /*!< handle to open file */ + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_ssize_t, "f=%p", f); + CHECK_FILEHANDLE (f); + CHECK_TIMEGROUP (f); + H5_CORE_API_RETURN (hdf5_get_num_attribute (f->step_gid)); +} + diff --git a/src/h5core/h5_attribs_private.h b/src/h5core/h5_attribs_private.h new file mode 100644 index 0000000..b990fb5 --- /dev/null +++ b/src/h5core/h5_attribs_private.h @@ -0,0 +1,42 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_ATTRIBS_PRIVATE_H +#define __H5_ATTRIBS_PRIVATE_H + +#include "h5_types_private.h" + +h5_err_t +h5priv_read_attrib ( + const hid_t id, + const char* attrib_name, + const hid_t attrib_type, + void* const attrib_value + ); + +h5_err_t +h5priv_write_attrib ( + const hid_t id, + const char* attrib_name, + const hid_t attrib_type, + const void* attrib_value, + const hsize_t attrib_nelem, + const int overwrite + ); + +h5_err_t +h5priv_get_attrib_info ( + const hid_t id, + const h5_size_t attrib_idx, + char* attrib_name, + const h5_size_t len_attrib_name, + h5_int64_t* attrib_type, + h5_size_t* attrib_nelem + ); +#endif diff --git a/src/h5core/h5_debug_private.h b/src/h5core/h5_debug_private.h new file mode 100644 index 0000000..96df636 --- /dev/null +++ b/src/h5core/h5_debug_private.h @@ -0,0 +1,48 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_DEBUG_PRIVATE_H +#define __H5_DEBUG_PRIVATE_H + +#include "h5core/h5_debug.h" + +#define H5_CORE_API_ENTER(type, fmt, ...) \ + __FUNC_ENTER(type, H5_DEBUG_CORE_API, fmt, __VA_ARGS__) +#define H5_CORE_API_LEAVE(value) __FUNC_LEAVE(value) +#define H5_CORE_API_RETURN(value) __FUNC_RETURN(value, H5_DEBUG_CORE_API) + + +#define H5_PRIV_API_ENTER(type, fmt, ...) \ + __FUNC_ENTER(type, H5_DEBUG_PRIV_API, fmt, __VA_ARGS__) +#define H5_PRIV_API_LEAVE(value) __FUNC_LEAVE(value) +#define H5_PRIV_API_RETURN(value) __FUNC_RETURN(value, H5_DEBUG_PRIV_API) + + +#define H5_PRIV_FUNC_ENTER(type, fmt, ...) \ + __FUNC_ENTER(type, H5_DEBUG_PRIV_FUNC, fmt, __VA_ARGS__ ) +#define H5_PRIV_FUNC_LEAVE(value) __FUNC_LEAVE(value) +#define H5_PRIV_FUNC_RETURN(value) __FUNC_RETURN(value, H5_DEBUG_PRIV_FUNC) + + +#define HDF5_WRAPPER_ENTER(type, fmt, ...) \ + __FUNC_ENTER(type, H5_DEBUG_HDF5, fmt, __VA_ARGS__ ) +#define HDF5_WRAPPER_LEAVE(value) __FUNC_LEAVE(value) +#define HDF5_WRAPPER_RETURN(value) __FUNC_RETURN(value, H5_DEBUG_HDF5) + + +#define MPI_WRAPPER_ENTER(type, fmt, ...) \ + __FUNC_ENTER(type, H5_DEBUG_MPI, fmt, __VA_ARGS__ ) +#define MPI_WRAPPER_LEAVE(value) __FUNC_LEAVE(value) +#define MPI_WRAPPER_RETURN(value) __FUNC_RETURN(value, H5_DEBUG_MPI) + +#define H5_INLINE_FUNC_ENTER(type) type ret_value = (type)H5_ERR; +#define H5_INLINE_FUNC_LEAVE(expr) __FUNC_LEAVE(expr) +#define H5_INLINE_FUNC_RETURN(expr) __FUNC_RETURN(expr, 0) + +#endif diff --git a/src/h5core/h5_errorhandling.c b/src/h5core/h5_errorhandling.c new file mode 100644 index 0000000..5001d7a --- /dev/null +++ b/src/h5core/h5_errorhandling.c @@ -0,0 +1,243 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5core/h5.h" +#include "h5_init_private.h" + +static h5_errorhandler_t h5_errhandler = h5_report_errorhandler; +h5_err_t h5_errno; +h5_int32_t h5_debug_level = 1; +struct call_stack h5_call_stack; + +char *h5_rfmts[] = { + [e_int] "%d", + [e_ssize_t] "%ld", + [e_char_p] "%s", + [e_void_p] "%p", + [e_h5_err_t] "%lld", + [e_h5_int64_t] "%lld", + [e_h5_id_t] "%lld", + [e_h5_ssize_t] "%lld", + [e_h5_errorhandler_t] "%p", + [e_h5_file_p] "%p", + [e_h5_file_t] "0x%08x", + [e_h5_lvl_idx_t] "%d", + [e_h5t_iterator_p] "%p", + [e_h5_loc_id_t] "%ld", + [e_h5_loc_idx_t] "%ld", + [e_hid_t] "%ld", + [e_H5O_type_t] "%ld", + [e_h5_glb_elem_p] "%p", + [e_h5_prop_p] "%p", + [e_h5_prop_t] "0x%08x", + [e_h5_prop_file_p] "%p", + [e_h5_prop_file_t] "0x%08x", + [e_herr_t] "%ld" +}; + +/*! + \ingroup h5_core + \defgroup h5_core_errorhandling + */ +const char* const H5_O_MODES[] = { + "H5_O_RDWR", + "H5_O_RDONLY", + "H5_O_WRONLY", + "H5_O_APPEND" +}; + +/*! + \ingroup h5_core_errorhandling + + Set debug/verbosity level. On level 0 all output will be supressed (even + error messages). On level 1 error messages, on level 2 warning messages + and on level 3 informational messages will be printed. On level 4 debug + messages will be printed. + + Values less than 0 are equivalent to 0. Values greater than 4 are equivalent + to 4. + + \return \c H5_SUCCESS on success. + \return \c H5_ERR_INVAL if debug level is invalid. + */ +h5_err_t +h5_set_debuglevel ( + const h5_id_t level /*!< debug level */ + ) { + if (level < 0) + h5_debug_level = (1 << 20) - 1; + else + h5_debug_level = level; + return H5_SUCCESS; +} + +/*! + \ingroup h5_core_errorhandling + + Get current debug/verbosity level. + + \return current debug level + */ +h5_err_t +h5_get_debuglevel ( + void + ) { + return h5_debug_level; +} + +/*! + \ingroup h5_core_errorhandling + + Set own error handler. + + \return \c H5_SUCCESS + */ +h5_err_t +h5_set_errorhandler ( + const h5_errorhandler_t handler + ) { + h5_errhandler = handler; + return H5_SUCCESS; +} + +/*! + \ingroup h5_core_errorhandling + + Return pointer to current error handler. + + \return \c H5_SUCCESS + */ +h5_errorhandler_t +h5_get_errorhandler ( + void + ) { + return h5_errhandler; +} + +/*! + \ingroup h5_core_errorhandling + + Get current error number. + + \return \c H5_SUCCESS + */ +h5_err_t +h5_get_errno ( + void + ) { + return h5_errno; +} + +/*! + \ingroup h5_core_errorhandling + + Set error number. + + \return \c H5_SUCCESS + */ +void +h5_set_errno ( + const h5_err_t errno + ) { + h5_errno = errno; +} + + +/*! + \ingroup h5_core_errorhandling + + This is the H5 default error handler. If an error occures, the + error message will be printed, if debug level is greater than 0. + + \return \c f->__errno + */ +h5_err_t +h5_report_errorhandler ( + const char* fmt, + va_list ap + ) { + if (h5_debug_level > 0) { + h5_verror (fmt, ap); + } + return h5_errno; +} + +/*! + \ingroup h5_core_errorhandling + + If an error occures, the error message will be printed and the + program exists with the error code given in \c f->__errno. + */ +h5_err_t +h5_abort_errorhandler ( + const char* fmt, + va_list ap + ) { + if (h5_debug_level > 0) { + h5_verror (fmt, ap); + } +#ifdef PARALLEL_IO + MPI_Abort(MPI_COMM_WORLD, -(int)h5_errno); +#else + exit (-(int)h5_errno); +#endif + return -(int)h5_errno; // never executed, just to supress a warning +} + +void +h5priv_vprintf ( + FILE* f, + const char* prefix, + const char* __funcname, + const char* fmt, + va_list ap + ) { + char fmt2[2048]; + snprintf (fmt2, sizeof(fmt2), "[proc %d] %s: %s: %s\n", h5_myproc, prefix, + __funcname, fmt); + vfprintf (f, fmt2, ap); +} + +/*! + \ingroup h5_core_errorhandling + + Print error message via error handler. + + \return \c f->__errno + */ +h5_err_t +h5_error ( + const h5_err_t errno_, + const char* fmt, + ... + ) { + h5_errno = errno_; + va_list ap; + va_start (ap, fmt); + + (*h5_errhandler)(fmt, ap); + + va_end (ap); + return h5_errno; +} + +/*! + \ingroup h5_core_errorhandling + + Print error message to \c stderr. For use in error handlers only. + */ +void +h5_verror ( + const char* fmt, + va_list ap + ) { + + if (h5_debug_level < 1) return; + h5priv_vprintf (stderr, "E", h5_call_stack.entry[0].name, fmt, ap); +} diff --git a/src/h5core/h5_errorhandling_private.h b/src/h5core/h5_errorhandling_private.h new file mode 100644 index 0000000..9e8f050 --- /dev/null +++ b/src/h5core/h5_errorhandling_private.h @@ -0,0 +1,29 @@ +#ifndef __H5_ERRORHANDLING_PRIVATE_H +#define __H5_ERRORHANDLING_PRIVATE_H + +#include "h5core/h5_errorhandling.h" + +#define h5priv_handle_file_mode_error( mode_id ) \ + h5_error( \ + H5_ERR_BADF, \ + "Operation not permitted in mode '%s'", \ + H5_O_MODES[mode_id] ); + +#define HANDLE_H5_OVERFLOW_ERR( max ) \ + h5_error( \ + H5_ERR_INVAL, \ + "Cannot store more than %lld items", (long long)max ); + +#define HANDLE_H5_PARENT_ID_ERR( parent_id ) \ + h5_error( \ + H5_ERR_INVAL, \ + "Wrong parent_id %lld.", \ + (long long)parent_id ); + +#define HANDLE_H5_OUT_OF_RANGE_ERR( otype, oid ) \ + h5_error( \ + H5_ERR_INVAL, \ + "%s id %lld out of range", \ + otype, (long long)oid ); + +#endif diff --git a/src/h5core/h5_fcmp.c b/src/h5core/h5_fcmp.c new file mode 100644 index 0000000..785c208 --- /dev/null +++ b/src/h5core/h5_fcmp.c @@ -0,0 +1,44 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include +#include + +#include "h5core/h5_types.h" + +/*! + Compare two floating point numbers using integers. See + http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm + for a detailed explanation. + */ +h5_int64_t +h5priv_fcmp ( + h5_float64_t A, + h5_float64_t B, + h5_int32_t maxUlps ) { + + // Make sure maxUlps is non-negative and small enough that the + // default NAN won't compare as equal to anything. + assert (maxUlps > 0 && maxUlps < 4 * 1024 * 1024); + assert (sizeof (long long) == sizeof (h5_int64_t) ); + + // Make [ab]Int lexicographically ordered as a twos-complement int + h5_int64_t aInt = *(h5_int64_t*)&A; + if (aInt < 0) + aInt = 0x8000000000000000LL - aInt; + + h5_int64_t bInt = *(h5_int64_t*)&B; + if (bInt < 0) + bInt = 0x8000000000000000LL - bInt; + + h5_int64_t intDiff = aInt - bInt; + if (llabs(intDiff) <= maxUlps) + return 0; + return intDiff; +} diff --git a/src/h5core/h5_fcmp_private.h b/src/h5core/h5_fcmp_private.h new file mode 100644 index 0000000..882fbbf --- /dev/null +++ b/src/h5core/h5_fcmp_private.h @@ -0,0 +1,21 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_FCMP_H +#define __H5_FCMP_H + +#include "h5core/h5_types.h" + +h5_int64_t +h5priv_fcmp ( + h5_float64_t A, + h5_float64_t B, + h5_int32_t maxUlps ); + +#endif diff --git a/src/h5core/h5_hdf5.c b/src/h5core/h5_hdf5.c new file mode 100644 index 0000000..91e8ebe --- /dev/null +++ b/src/h5core/h5_hdf5.c @@ -0,0 +1,385 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include +#include + +#include "h5_hdf5_private.h" + +#include "h5core/h5_types.h" +#include "h5core/h5_syscall.h" + +/* + Test whether given path exists. + */ +h5_err_t +h5priv_link_exists_ ( + const hid_t loc_id, + const char const* path[], + size_t size + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "loc_id=%d, (%s), path=%s, ...", + loc_id, hdf5_get_objname (loc_id), path[0]); + // for the time being we limit the concatenated path to 1024 bytes + char name[1024]; + char* s = name; + char* end = name+sizeof (name); + name[0] = '\0'; + + for (size_t i = 0; i < size; i++) { + if (i) { // do not *prepend* a slash! + *s++ = '/'; + *s = '\0'; + } + if (s+strlen(path[i])+1 >= end) H5_PRIV_API_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "path %s... to long", name)); + s = stpcpy (s, path[i]); // return ptr to end!!! + h5_err_t exists; + TRY (exists = hdf5_link_exists (loc_id, name)); + if (!exists) H5_PRIV_FUNC_LEAVE (0); + } + H5_PRIV_FUNC_RETURN (1); +} + +h5_err_t +h5priv_open_group_ ( + int create_intermediate, + const hid_t loc_id, + const char const* path[], + size_t size + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "create_intermediate=%d, loc_id=%d, (%s), path=%s, ...", + create_intermediate, loc_id, hdf5_get_objname (loc_id), + path[0]); + hid_t hid = loc_id; + hid_t hid2 = 0; + h5_err_t exists; + for (size_t i=0; i < size; i++) { + TRY (exists = hdf5_link_exists (hid, path[i])); + if (exists) { + TRY (hid2 = hdf5_open_group (hid, path[i])); + } else if (create_intermediate) { + TRY (hid2 = hdf5_create_group (hid, path[i])); + } else { + H5_PRIV_FUNC_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "No such group '%s/%s'.", + hdf5_get_objname (hid), + path[i])); + + } + if (hid != loc_id) { + TRY (hdf5_close_group (hid)); + } + hid = hid2; + } + H5_PRIV_FUNC_RETURN (hid); +} + +typedef struct op_data { + int queried_idx; + int cnt; + H5O_type_t type; + char *name; + size_t len; + char *prefix; +} op_data_t; + +static H5O_type_t +iter_op_get_obj_type ( + const hid_t g_id, + const char* name, + const H5L_info_t* info + ) { + herr_t herr; + H5O_info_t objinfo; + + if (info->type == H5L_TYPE_EXTERNAL) { + char* buf = h5_calloc (1, info->u.val_size); + if ((ptrdiff_t)buf == (ptrdiff_t)H5_ERR) { + return H5O_TYPE_UNKNOWN; + } + herr = H5Lget_val(g_id, name, buf, + info->u.val_size, H5P_DEFAULT); + if (herr < 0) { + h5_error ( + H5_ERR_HDF5, + "Can't get external link for object '%s'!", + name); + return H5O_TYPE_UNKNOWN; + } + const char *filename; + const char *objname; + herr = H5Lunpack_elink_val(buf, info->u.val_size, 0, + &filename, &objname); + if (herr < 0) { + h5_error( + H5_ERR_HDF5, + "Can't unpack external link for object '%s'!", + name); + return H5O_TYPE_UNKNOWN; + } + h5_debug( + "Followed external link to file '%s' / object '%s'.", + filename, objname); + + h5_free (buf); + + hid_t obj_id = H5Oopen(g_id, name, H5P_DEFAULT); + if (obj_id < 0) { + h5_error( + H5_ERR_HDF5, + "Can't open external link for object '%s'!", + name); + return H5O_TYPE_UNKNOWN; + } + herr = H5Oget_info(obj_id, &objinfo); + } + else { // H5L_TYPE_HARD + herr = H5Oget_info_by_name(g_id, name, &objinfo, H5P_DEFAULT); + } + + if (herr < 0) { + h5_error( + H5_ERR_HDF5, + "Can't query object with name '%s'!", name); + return H5O_TYPE_UNKNOWN; + } + return objinfo.type; +} + +static herr_t +iter_op_count ( + hid_t g_id, + const char* name, + const H5L_info_t* info, + void* _op_data + ) { + op_data_t* op_data = (op_data_t*)_op_data; + H5O_type_t type = iter_op_get_obj_type (g_id, name, info); + if (type == H5O_TYPE_UNKNOWN) + return -1; + if (type == op_data->type) + op_data->cnt++; + return 0; +} + +static herr_t +iter_op_idx ( + hid_t g_id, + const char* name, + const H5L_info_t* info, + void* _op_data + ) { + op_data_t* op_data = (op_data_t*)_op_data; + H5O_type_t type = iter_op_get_obj_type (g_id, name, info); + if (type == H5O_TYPE_UNKNOWN) + return -1; + if (type != op_data->type) + return 0; // ignore on wrong type + op_data->cnt++; + /* stop iterating if index is equal cnt */ + if (op_data->queried_idx == op_data->cnt) { + memset (op_data->name, 0, op_data->len); + strncpy (op_data->name, name, op_data->len-1); + return 1; + } + return 0; +} + +static herr_t +iter_op_count_match ( + hid_t g_id, + const char* name, + const H5L_info_t* info, + void* _op_data + ) { + H5_PRIV_FUNC_ENTER (herr_t, + "g_id=%d, name='%s', info=%p, _op_data=%p", + g_id, name, info, _op_data); + op_data_t* op_data = (op_data_t*)_op_data; + H5O_type_t type; + TRY (type = iter_op_get_obj_type (g_id, name, info)); + if (type != op_data->type) + H5_PRIV_FUNC_LEAVE (0); + /* count if prefix matches */ + if (strncmp (name, op_data->prefix, strlen(op_data->prefix)) == 0) { + op_data->cnt++; + } + H5_PRIV_FUNC_RETURN (0); +} + +ssize_t +hdf5_get_num_groups ( + const hid_t loc_id + ) { + HDF5_WRAPPER_ENTER (ssize_t, "loc_id=%d (%s)", loc_id, hdf5_get_objname (loc_id)); + op_data_t op_data; + memset (&op_data, 0, sizeof (op_data)); + op_data.type = H5O_TYPE_GROUP; + hsize_t start_idx = 0; + herr_t herr = H5Literate (loc_id, H5_INDEX_NAME, H5_ITER_INC, + &start_idx, + iter_op_count, &op_data); + if (herr < 0) { + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot get number of groups in '%s'.", + hdf5_get_objname (loc_id))); + } + HDF5_WRAPPER_RETURN (op_data.cnt); +} + +ssize_t +hdf5_get_num_groups_matching_prefix ( + const hid_t loc_id, + char* prefix + ) { + HDF5_WRAPPER_ENTER (ssize_t, + "loc_id=%d (%s), prefix='%s'", + loc_id, hdf5_get_objname (loc_id), prefix); + op_data_t op_data; + memset (&op_data, 0, sizeof (op_data)); + op_data.type = H5O_TYPE_GROUP; + op_data.prefix = prefix; + hsize_t start_idx = 0; + herr_t herr = H5Literate (loc_id, H5_INDEX_NAME, H5_ITER_INC, + &start_idx, + iter_op_count_match, &op_data); + if (herr < 0) { + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot get number of groups with prefix" + " '%s' in '%s'.", + prefix, hdf5_get_objname (loc_id))); + } + HDF5_WRAPPER_RETURN (op_data.cnt); +} + +h5_err_t +hdf5_get_name_of_group_by_idx ( + hid_t loc_id, + hsize_t idx, + char *name, + size_t len + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "loc_id=%d (%s), idx=%llu, name=%p, len=%llu", + loc_id, hdf5_get_objname (loc_id), + idx, name, (unsigned long long)len); + op_data_t op_data; + memset (&op_data, 0, sizeof (op_data)); + op_data.type = H5O_TYPE_GROUP; + op_data.cnt = -1; + op_data.queried_idx = idx; + op_data.name = name; + op_data.len = len; + hsize_t start_idx = 0; + herr_t herr = H5Literate (loc_id, H5_INDEX_NAME, H5_ITER_INC, + &start_idx, + iter_op_idx, &op_data); + if (herr < 0) { + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot get name of group with index" + " '%lu' in '%s'.", + (long unsigned int)idx, + hdf5_get_objname (loc_id))); + } + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +ssize_t +hdf5_get_num_datasets ( + const hid_t loc_id + ) { + HDF5_WRAPPER_ENTER (ssize_t, + "loc_id=%d (%s)", loc_id, hdf5_get_objname (loc_id)); + op_data_t op_data; + memset (&op_data, 0, sizeof (op_data)); + op_data.type = H5O_TYPE_DATASET; + hsize_t start_idx = 0; + herr_t herr = H5Literate (loc_id, H5_INDEX_NAME, H5_ITER_INC, + &start_idx, + iter_op_count, &op_data); + if (herr < 0) { + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot get number of datasets in '%s'.", + hdf5_get_objname (loc_id))); + } + HDF5_WRAPPER_RETURN (op_data.cnt); +} + +/* + Get name of the \c idx th dataset in group \c loc_id. + */ +h5_err_t +hdf5_get_name_of_dataset_by_idx ( + hid_t loc_id, + hsize_t idx, + char *name, + size_t len + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "loc_id=%d (%s), idx=%llu, name=%p, len=%llu", + loc_id, hdf5_get_objname (loc_id), + idx, name, (unsigned long long)len); + op_data_t op_data; + memset (&op_data, 0, sizeof (op_data)); + op_data.type = H5O_TYPE_DATASET; + op_data.cnt = -1; + op_data.queried_idx = idx; + op_data.name = name; + op_data.len = len; + hsize_t start_idx = 0; + herr_t herr = H5Literate (loc_id, H5_INDEX_NAME, H5_ITER_INC, + &start_idx, + iter_op_idx, &op_data); + if (herr < 0) { + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot get name of dataset with index" + " '%lu' in '%s'.", + (long unsigned int)idx, + hdf5_get_objname (loc_id))); + } + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +/****** I d e n t i f i e r **************************************************/ + +const char * +hdf5_get_objname ( + hid_t id + ) { + static char objname[256]; + + // memset ( objname, 0, sizeof(objname) ); + if (id == -1) { + strcpy ( objname, "[none]" ); + } else { + ssize_t size = H5Iget_name ( id, objname, sizeof(objname) ); + if ( size < 0 ) { + strcpy ( objname, "[error getting object name]" ); + } else if ( size == 0 ) { + strcpy ( objname, "[no name associated with identifier]" ); + } + } + return objname; +} diff --git a/src/h5core/h5_hdf5_private.h b/src/h5core/h5_hdf5_private.h new file mode 100644 index 0000000..f50aab0 --- /dev/null +++ b/src/h5core/h5_hdf5_private.h @@ -0,0 +1,1453 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_HDF5_PRIVATE_H +#define __H5_HDF5_PRIVATE_H + +#include + +#include "h5core/h5_types.h" +#include "h5core/h5_errorhandling.h" +#include "h5_debug_private.h" + +ssize_t +hdf5_get_num_groups ( + const hid_t loc_id + ); + +ssize_t +hdf5_get_num_groups_matching_prefix ( + const hid_t loc_id, + char* prefix + ); + +h5_err_t +hdf5_get_name_of_group_by_idx ( + hid_t loc_id, + hsize_t idx, + char *name, + size_t len + ); + +ssize_t +hdf5_get_num_datasets ( + const hid_t loc_id + ); + +h5_err_t +hdf5_get_name_of_dataset_by_idx ( + hid_t loc_id, + hsize_t idx, + char *name, + size_t len + ); + +const char * +hdf5_get_objname ( + hid_t id + ); + + +/****** L i n k **************************************************************/ + +/* + Determine whether a link with the specified name exists in a group. + + Result: + 1 if link exists + 0 if link doesn't exist + error else +*/ +static inline h5_err_t +hdf5_link_exists ( + const hid_t loc_id, + const char* name + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "loc_id=%d (%s), name='%s'", + loc_id, hdf5_get_objname (loc_id), name); + /* Save old error handler */ + H5E_auto2_t old_func; + void *old_client_data; + + H5Eget_auto2(H5E_DEFAULT, &old_func, &old_client_data); + + /* Turn off error handling */ + H5Eset_auto(H5E_DEFAULT, NULL, NULL); + + /* Probe. Likely to fail, but that’s okay */ + htri_t exists = H5Lexists ( loc_id, name, H5P_DEFAULT ); + + /* Restore previous error handler */ + H5Eset_auto(H5E_DEFAULT, old_func, old_client_data); + + if (exists < 0 ) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot query link %s/%s.", + hdf5_get_objname (loc_id), name)); + HDF5_WRAPPER_RETURN (exists); +} + +static inline h5_err_t +hdf5_delete_link ( + hid_t loc_id, + const char* name, + hid_t lapl_id + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "loc_id=%d (%s), name='%s', lapl_id=%d", + loc_id, hdf5_get_objname (loc_id), name, lapl_id); + if (H5Ldelete (loc_id, name, lapl_id) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot delete link %s/%s.", + hdf5_get_objname (loc_id), name)); + + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +/****** G r o u p ************************************************************/ + +static inline hid_t +hdf5_open_group ( + const hid_t loc_id, + const char* const group_name + ) { + HDF5_WRAPPER_ENTER (hid_t, + "loc_id=%d (%s), group_name='%s'", + loc_id, + hdf5_get_objname (loc_id), + group_name); + hid_t group_id = H5Gopen (loc_id, group_name, H5P_DEFAULT); + if (group_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot open group '%s/%s'.", + hdf5_get_objname (loc_id), + group_name)); + HDF5_WRAPPER_RETURN (group_id); +} + +static inline hid_t +hdf5_create_group ( + const hid_t loc_id, + const char* const group_name + ) { + HDF5_WRAPPER_ENTER (hid_t, + "loc_id=%d (%s), group_name='%s'", + loc_id, + hdf5_get_objname (loc_id), + group_name); + hid_t group_id = H5Gcreate ( + loc_id, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + if (group_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot create group '%s/%s'.", + hdf5_get_objname (loc_id), + group_name)); + HDF5_WRAPPER_RETURN (group_id); +} + +h5_err_t +h5priv_open_group_ (int, hid_t, const char const*[], size_t); + +#define h5priv_open_group(create_intermediate, loc_id, ...) \ + (h5priv_open_group_ (create_intermediate, \ + loc_id, \ + (const char const*[]) {__VA_ARGS__}, \ + PP_NARG(__VA_ARGS__))) + +h5_err_t +h5priv_link_exists_ ( + const hid_t loc_id, + const char const* path[], + size_t size + ); +#define h5priv_link_exists(loc_id, ...) \ + (h5priv_link_exists_ (loc_id, (const char const*[]){__VA_ARGS__}, PP_NARG(__VA_ARGS__))) + + +/*! + Close group. + + \param[in] f file handle + \param[in] group_id id of group to close + */ +static inline h5_err_t +hdf5_close_group ( + const hid_t group_id + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "group_id=%d (%s)", + group_id, + hdf5_get_objname (group_id)); + + if (group_id == 0 || group_id == -1) + HDF5_WRAPPER_LEAVE (H5_SUCCESS); + if (H5Gclose (group_id) < 0 ) { + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot terminate access to group '%s').", + hdf5_get_objname (group_id))); + } + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_ssize_t +hdf5_get_num_objs_in_group ( + const hid_t group_id + ) { + HDF5_WRAPPER_ENTER (h5_ssize_t, + "group_id=%d (%s)", + group_id, + hdf5_get_objname (group_id)); + H5G_info_t group_info; + if (H5Gget_info (group_id, &group_info) < 0) { + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot get number of objects in group '%s'.", + hdf5_get_objname(group_id))); + } + HDF5_WRAPPER_RETURN ((h5_ssize_t)group_info.nlinks); +} + + +/* + Get name of object given by index \c idx in group \c loc_id. If name is \c NULL, + return size of name. + */ +static inline h5_ssize_t +hdf5_get_objname_by_idx ( + hid_t loc_id, + hsize_t idx, + char *name, + size_t size + ) { + HDF5_WRAPPER_ENTER (h5_ssize_t, + "loc_id=%d (%s), idx=%lld", + loc_id, + hdf5_get_objname (loc_id), + (long long)idx); + + if (name == NULL) { + size = 0; + } + ssize_t len = H5Lget_name_by_idx (loc_id, ".", + H5_INDEX_NAME, H5_ITER_INC, + idx, + name, size, + H5P_DEFAULT); + if (len < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot get name of object %llu in group '%s'.", + (unsigned long long)idx, + hdf5_get_objname (loc_id))); + HDF5_WRAPPER_RETURN (len); +} + +/****** D a t a s p a c e ****************************************************/ +/*! + Create dataspace for dataset. H5Screate_simple wrapper. + + \param[in] rank rank of dataspace + \param[in] dims dimensions of dataspace + \param[in] maxdims maximum dimensions of dataspace + + */ +static inline hid_t +hdf5_create_dataspace ( + const int rank, + const hsize_t* dims, + const hsize_t* maxdims + ) { + HDF5_WRAPPER_ENTER (hid_t, + "rank=%d", + rank); + hid_t dataspace_id = H5Screate_simple (rank, dims, maxdims); + if (dataspace_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot create dataspace with rank %d.", + rank)); + HDF5_WRAPPER_RETURN (dataspace_id); +} + +static inline hid_t +hdf5_create_dataspace_scalar ( + void + ) { + HDF5_WRAPPER_ENTER (hid_t, "%s", "void"); + hid_t dataspace_id = H5Screate (H5S_SCALAR); + if (dataspace_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot create scalar dataspace.")); + HDF5_WRAPPER_RETURN (dataspace_id); +} + +static inline h5_err_t +hdf5_select_hyperslab_of_dataspace ( + hid_t space_id, + H5S_seloper_t op, + const hsize_t* start, + const hsize_t* stride, + const hsize_t* count, + const hsize_t* block + ) { + HDF5_WRAPPER_ENTER (h5_err_t, "%d", space_id); + herr_t herr = H5Sselect_hyperslab ( + space_id, + op, + start, + stride, + count, + block); + if (herr < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot set select hyperslap region or add the " + "specified region")); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +hdf5_select_elements_of_dataspace ( + hid_t space_id, + H5S_seloper_t op, + hsize_t nelems, + const hsize_t* indices + ) { + HDF5_WRAPPER_ENTER (h5_err_t, "%d", space_id); + herr_t herr; + if ( nelems > 0 ) { + herr = H5Sselect_elements ( + space_id, + op, + (size_t)nelems, + indices); + } else { + herr = H5Sselect_none ( space_id ); + } + if (herr < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot set select hyperslap region or add the " + "specified region")); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +hdf5_select_none ( + hid_t space_id + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "%d", + space_id); + herr_t herr = H5Sselect_none (space_id); + if (herr < 0) { + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Selection for writing zero-length data failed")); + } + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_ssize_t +hdf5_get_selected_npoints_of_dataspace ( + hid_t space_id + ) { + HDF5_WRAPPER_ENTER (h5_ssize_t, "%d", space_id); + hssize_t size = H5Sget_select_npoints (space_id); + if (size < 0) + HDF5_WRAPPER_LEAVE ( + h5_error( + H5_ERR_HDF5, + "Cannot determine number of " + "selected elements in dataspace.")); + HDF5_WRAPPER_RETURN (size); +} + +static inline h5_ssize_t +hdf5_get_npoints_of_dataspace ( + hid_t space_id + ) { + HDF5_WRAPPER_ENTER (h5_ssize_t, "%d", space_id); + hssize_t size = H5Sget_simple_extent_npoints (space_id); + if (size < 0) + HDF5_WRAPPER_LEAVE ( + h5_error( + H5_ERR_HDF5, + "Cannot determine number of" + "elements in dataspace.")); + HDF5_WRAPPER_RETURN (size); +} + +static inline int +hdf5_get_dims_of_dataspace ( + hid_t space_id, + hsize_t* dims, + hsize_t* maxdims + ) { + HDF5_WRAPPER_ENTER (int, "%d", space_id); + int rank = H5Sget_simple_extent_dims (space_id, dims, maxdims); + if (rank < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot determine rank of dataspace.")); + HDF5_WRAPPER_RETURN (rank); +} + + +/*! + Close space. + + \param[in] f file handle + \param[in] dataspace_id id of space to close + */ +static inline h5_err_t +hdf5_close_dataspace ( + const hid_t dataspace_id + ) { + HDF5_WRAPPER_ENTER (h5_err_t, "dataspace=%d", dataspace_id); + if (dataspace_id <= 0 || dataspace_id == H5S_ALL) + HDF5_WRAPPER_LEAVE (H5_SUCCESS); + + herr_t herr = H5Sclose (dataspace_id); + if (herr < 0) + HDF5_WRAPPER_LEAVE ( + h5_error( + H5_ERR_HDF5, + "Cannot terminate access to dataspace!")); + + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +/****** D a t a s e t ********************************************************/ +/*! + Open dataset. H5Dopen wrapper. + + \param[in] f file handle + \param[in] loc_id location id + \param[in] dataset_name name of dataset to open + */ +static inline hid_t +hdf5_open_dataset ( + const hid_t loc_id, + const char* const dataset_name + ) { + HDF5_WRAPPER_ENTER (hid_t, + "loc_id=%d (%s), dataset_name='%s'", + loc_id, + hdf5_get_objname (loc_id), + dataset_name); + hid_t dataset_id = H5Dopen ( + loc_id, + dataset_name, + H5P_DEFAULT); + if (dataset_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot open dataset '%s/%s'.", + hdf5_get_objname (loc_id), + dataset_name)); + HDF5_WRAPPER_RETURN (dataset_id); +} + +/*! + Create new dataset + + \param[in] f file handle + \param[in] loc_id id of group or file + \param[in] dataset_name name of dataset + \param[in] type_id type used in dataset + \param[in] dataspace_id dataspace of dataset + \param[in] create_prop property list for dataset creation + + */ +static inline hid_t +hdf5_create_dataset ( + hid_t loc_id, + const char* dataset_name, + const hid_t type_id, + const hid_t dataspace_id, + const hid_t create_proplist + ) { + HDF5_WRAPPER_ENTER (hid_t, + "loc_id=%d (%s), dataset_name='%s'", + loc_id, + hdf5_get_objname (loc_id), + dataset_name); + hid_t dataset_id = H5Dcreate ( + loc_id, + dataset_name, + type_id, + dataspace_id, + H5P_DEFAULT, + create_proplist, + H5P_DEFAULT); + if (dataset_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error( + H5_ERR_HDF5, + "Cannot create dataset '%s/%s'", + hdf5_get_objname (loc_id), + dataset_name)); + HDF5_WRAPPER_RETURN (dataset_id); +} + +/*! + Close dataset. + + \param[in] f file handle + \param[in] dataset_id id of dataset to close + */ +static inline h5_err_t +hdf5_close_dataset ( + const hid_t dataset_id + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "dataset_id=%d (%s)", + dataset_id, + hdf5_get_objname (dataset_id)); + if (dataset_id < 0) + HDF5_WRAPPER_LEAVE (H5_SUCCESS); + + if (H5Dclose (dataset_id) < 0) { + HDF5_WRAPPER_LEAVE ( + h5_error( + H5_ERR_HDF5, + "Close of dataset '%s' failed.", + hdf5_get_objname (dataset_id))); + } + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +/*! + Get dataspace of existing dataset + + \param[in] f file handle + \param[in] dataset_id id of dataset + + */ +static inline hid_t +hdf5_get_dataset_space ( + const hid_t dataset_id + ) { + HDF5_WRAPPER_ENTER (hid_t, + "dataset_id=%d (%s)", + dataset_id, + hdf5_get_objname(dataset_id)); + hid_t dataspace_id = H5Dget_space (dataset_id); + if (dataspace_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot get dataspace for dataset '%s'.", + hdf5_get_objname (dataset_id))); + HDF5_WRAPPER_RETURN (dataspace_id); +} + +/*! + Wrapper for H5Dwrite. + + \param[in] f file handle + \param[in] dataset_id id of dataset + \param[in] type_id type used in dataset + \param[in] memspace_id id of memory space + \param[in] diskspace_id id of disk space + \param[in] xfer_prop transfer property list + \param[in] buf buffer with date to write + + */ +static inline h5_err_t +hdf5_write_dataset ( + const hid_t dataset_id, + const hid_t type_id, + const hid_t memspace_id, + const hid_t diskspace_id, + const hid_t xfer_prop, + const void* buf + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "dataset_id=%d (%s) type_id=%d", + dataset_id, + hdf5_get_objname(dataset_id), + type_id); + + herr_t herr = H5Dwrite ( + dataset_id, + type_id, + memspace_id, + diskspace_id, + xfer_prop, + buf); + if (herr < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Write to dataset '%s' failed.", \ + hdf5_get_objname (dataset_id))); + + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +/* + Wrapper for H5Dread + */ +static inline h5_err_t +hdf5_read_dataset ( + const hid_t dataset_id, + const hid_t type_id, + const hid_t memspace_id, + const hid_t diskspace_id, + const hid_t xfer_prop, + void* const buf ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "dataset_id=%d (%s) type_id=%d", + dataset_id, + hdf5_get_objname(dataset_id), + type_id); + herr_t herr = H5Dread ( + dataset_id, + type_id, + memspace_id, + diskspace_id, + xfer_prop, + buf); + if (herr < 0) + HDF5_WRAPPER_LEAVE ( + h5_error( + H5_ERR_HDF5, + "Error reading dataset '%s'.", + hdf5_get_objname (dataset_id))); + + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline hid_t +hdf5_get_dataset_type ( + const hid_t dataset_id + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "dataset_id=%d (%s)", + dataset_id, + hdf5_get_objname(dataset_id)); + hid_t datatype_id = H5Dget_type (dataset_id); + if (datatype_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error( + H5_ERR_HDF5, + "Cannot determine dataset type.")); + + HDF5_WRAPPER_RETURN (datatype_id); +} + +static inline h5_err_t +hdf5_set_dataset_extent ( + hid_t dataset_id, + const hsize_t* size + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "dataset_id=%d (%s), size=%llu", + dataset_id, + hdf5_get_objname(dataset_id), + *size); + if (H5Dset_extent(dataset_id, size) < 0) { + HDF5_WRAPPER_LEAVE ( + h5_error( + H5_ERR_HDF5, + "Changing size of dataset '%s' dimensions failed.", + hdf5_get_objname (dataset_id))); + } + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_ssize_t +hdf5_get_npoints_of_dataset ( + hid_t dataset_id + ) { + HDF5_WRAPPER_ENTER (h5_ssize_t, + "dataset_id=%d (%s)", + dataset_id, + hdf5_get_objname(dataset_id)); + hid_t dspace_id; + hsize_t size; + TRY (dspace_id = hdf5_get_dataset_space (dataset_id)); + TRY (size = hdf5_get_npoints_of_dataspace (dspace_id)); + TRY (hdf5_close_dataspace (dspace_id)); + HDF5_WRAPPER_RETURN (size); +} + +static inline h5_ssize_t +hdf5_get_npoints_of_dataset_by_name ( + const hid_t loc_id, + const char* const name + ) { + HDF5_WRAPPER_ENTER (h5_ssize_t, + "loc_id=%d (%s), name='%s'", + loc_id, + hdf5_get_objname(loc_id), + name); + hid_t dset_id; + hsize_t size; + TRY (dset_id = hdf5_open_dataset (loc_id, name)); + TRY (size = hdf5_get_npoints_of_dataset (dset_id)); + TRY (hdf5_close_dataset (dset_id)); + HDF5_WRAPPER_RETURN (size); +} + +/****** D a t a t y p e ******************************************************/ +/*! + Create array type. Wrapper for "H5Tarray_create". + + \param[in] f file handle + \param[in] base_type_id base type + \param[in] rank rank of array + \param[in] dims dimensions + */ +static inline char_p +hdf5_get_type_name ( + hid_t type_id + ) { + if (type_id == H5_INT32_T) + return "H5_INT32_T"; + if (type_id == H5_INT64_T) + return "H5_INT64_T"; + if (type_id == H5_FLOAT32_T) + return "H5_FLOAT32_T"; + if (type_id == H5_FLOAT64_T) + return "H5_FLOAT64_T"; + if (type_id == H5_STRING_T) + return "H5_STRING_T"; + + h5_warn ("Unknown type id %d", type_id); + return "[unknown]"; +} + +static inline const char* +get_class_type_name ( + const hid_t class_id + ) { + const char* const map[] = { + [H5T_INTEGER] "H5T_INTEGER", + [H5T_FLOAT] "H5T_FLOAT", + [H5T_TIME] "H5T_TIME", + [H5T_STRING] "H5T_STRING", + [H5T_BITFIELD] "H5T_BITFIELD", + [H5T_OPAQUE] "H5T_OPAQUE", + [H5T_COMPOUND] "H5T_COMPOUND", + [H5T_REFERENCE] "H5T_REFERENCE", + [H5T_ENUM] "H5T_ENUM", + [H5T_VLEN] "H5T_VLEN", + [H5T_ARRAY] "H5T_ARRAY" + }; + if (class_id < 0 || class_id >= H5T_NCLASSES) { + return ("[unknown]"); + } + return map[class_id]; +} + +static inline hid_t +hdf5_create_array_type ( + const hid_t base_type_id, + const int rank, + const hsize_t* dims + ) { + HDF5_WRAPPER_ENTER (hid_t, + "base_type_id=%d (%s), rank=%d", + base_type_id, + hdf5_get_type_name (base_type_id), + rank); + hid_t type_id = H5Tarray_create (base_type_id, rank, dims); + if (type_id < 0) { + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Can't create array datatype object with base " + "type %s and rank %d", + hdf5_get_type_name (base_type_id), + rank)); + } + HDF5_WRAPPER_RETURN (type_id); +} + +static inline hid_t +hdf5_create_type ( + H5T_class_t class, + const size_t size + ) { + HDF5_WRAPPER_ENTER (hid_t, + "class=%d (%s)", + class, + get_class_type_name (class)); + hid_t type_id = H5Tcreate (class, size); + if (type_id < 0) { + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Can't create datatype object of class %s.", + get_class_type_name (class))); + } + HDF5_WRAPPER_RETURN (type_id); +} + +static inline hid_t +hdf5_create_string_type( + const hsize_t len + ) { + HDF5_WRAPPER_ENTER (hid_t, "len = %llu", len); + hid_t type_id = H5Tcopy ( H5T_C_S1 ); + if (type_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error( + H5_ERR_HDF5, + "Can't duplicate C string type.")); + + herr_t herr = H5Tset_size ( type_id, len ); + if (herr < 0) + HDF5_WRAPPER_LEAVE ( + h5_error( + H5_ERR_HDF5, + "Can't set length of C string type.")); + HDF5_WRAPPER_RETURN (type_id); +} + +static inline h5_err_t +hdf5_insert_type ( + hid_t type_id, + const char* name, + size_t offset, + hid_t field_id + ) { + HDF5_WRAPPER_ENTER (h5_err_t, "type_id=%d, name='%s'", type_id, name); + herr_t herr = H5Tinsert (type_id, name, offset, field_id); + if (herr < 0) + HDF5_WRAPPER_LEAVE ( + h5_error( + H5_ERR_HDF5, + "Can't insert field %s to compound datatype.", + name)); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +hdf5_close_type ( + hid_t dtype_id + ) { + HDF5_WRAPPER_ENTER (h5_err_t, "dtype_id=%d", dtype_id); + herr_t herr = H5Tclose (dtype_id); + if (herr < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot release datatype.")); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +/****** P r o p e r t y ******************************************************/ + +static inline hid_t +hdf5_create_property ( + hid_t cls_id + ) { + HDF5_WRAPPER_ENTER (hid_t, "cls_id=%d", cls_id); + hid_t prop_id = H5Pcreate (cls_id); + if (prop_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot create property list.")); + HDF5_WRAPPER_RETURN (prop_id); +} + +/*! + Get create properties of existing dataset + + \param[in] f file handle + \param[in] dataset_id id of dataset + + */ +static inline hid_t +hdf5_get_dataset_create_plist ( + const hid_t dataset_id + ) { + HDF5_WRAPPER_ENTER (hid_t, "dataset_id=%d (%s)", + dataset_id, + hdf5_get_objname (dataset_id)); + hid_t plist_id = H5Dget_create_plist (dataset_id); + if (plist_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot get create properties for dataset '%s'.", + hdf5_get_objname (dataset_id))); + HDF5_WRAPPER_RETURN (plist_id); +} + +static inline h5_err_t +hdf5_set_chunk_property ( + hid_t plist, + int rank, + hsize_t* dims + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "plist=%d, rank=%d, dims[0]=%llu ...", + plist, rank, dims[0]); + if (H5Pset_chunk (plist, rank, dims) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot add chunking property to list.")); + + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +hdf5_get_chunk_property ( + hid_t plist, + int rank, + hsize_t* dims + ) { + HDF5_WRAPPER_ENTER (h5_err_t, "plist=%d, rank=%d", plist, rank); + if (H5Pget_chunk (plist, rank, dims) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot get chunking property from list.")); + + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +hdf5_set_layout_property ( + hid_t plist, + H5D_layout_t layout + ) { + HDF5_WRAPPER_ENTER (h5_err_t, "plist=%d", plist); + if (H5Pset_layout (plist, layout) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot add layout property to list.")); + + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +#ifdef PARALLEL_IO +static inline h5_err_t +hdf5_set_fapl_mpio_property ( + hid_t fapl_id, + MPI_Comm comm, + MPI_Info info + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "fapl_id=%d, comm=..., info=...", + fapl_id); + if (H5Pset_fapl_mpio (fapl_id, comm, info) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot store IO communicator information to the " + "file access property list.")); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +hdf5_set_fapl_mpiposix_property ( + hid_t fapl_id, + MPI_Comm comm, + hbool_t use_gpfs + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "fapl_id=%d, comm=..., use_gpfs=%d", + fapl_id, (int)use_gpfs); + if ( H5Pset_fapl_mpiposix (fapl_id, comm, use_gpfs) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot store IO communicator information to" + " the file access property list.")); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +hdf5_set_dxpl_mpio_property ( + hid_t dxpl_id, + H5FD_mpio_xfer_t mode + ) { + HDF5_WRAPPER_ENTER (h5_err_t, "dxpl_id=%d, mode=%d",dxpl_id,(int)mode); + if (H5Pset_dxpl_mpio (dxpl_id, mode) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot store IO communicator information to" + " the dataset transfer property list.")); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} +#endif + +static inline h5_err_t +hdf5_set_mdc_property ( + hid_t fapl_id, + H5AC_cache_config_t *config + ) { + HDF5_WRAPPER_ENTER (h5_err_t, "fapl_id=%d, config=%p",fapl_id,config); + if (H5Pset_mdc_config (fapl_id, config) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot store metadata cache configuration in" + " the file access property list.")); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +hdf5_get_mdc_property ( + hid_t fapl_id, + H5AC_cache_config_t *config + ) { + HDF5_WRAPPER_ENTER (h5_err_t, "fapl_id=%d, config=%p",fapl_id,config); + if (H5Pget_mdc_config (fapl_id, config) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot get metadata cache configuration in" + " the file access property list.")); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +hdf5_set_btree_ik_property ( + const hid_t fcpl_id, + const hsize_t btree_ik + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "fapl_id=%d, btree_ik=%llu", + fcpl_id, btree_ik); + if (H5Pset_istore_k (fcpl_id, btree_ik) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot set btree size in the " + "file access property list.")); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +hdf5_set_alignment_property ( + hid_t plist, + hsize_t threshold, + hsize_t alignment + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "plist=%d, threshold=%llu, alignment=%llu", + plist, threshold, alignment); + if (H5Pset_alignment (plist, threshold, alignment) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot set alignment property to %llu and threshold %llu", + alignment, threshold)); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +hdf5_set_meta_block_size ( + hid_t fapl_id, + hsize_t size + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "fapl_id=%d, size=%llu", + fapl_id, size); + if (H5Pset_meta_block_size (fapl_id, size) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot set meta block size property to %llu", + size)); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +hdf5_set_fapl_core ( + hid_t fapl_id, + size_t increment, + hbool_t backing_store + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "fapl_id=%d, size=%zu, backing_store=%d", + fapl_id, increment, backing_store); + if (H5Pset_fapl_core (fapl_id, increment, backing_store)) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot set property to use the H5FD_CORE driver.")); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +hdf5_close_property ( + hid_t prop + ) { + HDF5_WRAPPER_ENTER (h5_err_t, "prop=%d", prop); + if (H5Pclose (prop) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot close property.")); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +/****** F i l e **************************************************************/ + +static inline h5_err_t +hdf5_close_file ( + hid_t file_id + ) { + HDF5_WRAPPER_ENTER (h5_err_t, "file_id=%d (%s)", + file_id, hdf5_get_objname (file_id)); + if (H5Fclose (file_id) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot close file '%s'.", + hdf5_get_objname (file_id))); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +hdf5_close ( + void + ) { + HDF5_WRAPPER_ENTER (h5_err_t, "%s", "void"); + if (H5close () < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot close HDF5 library.")); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +hdf5_flush ( + hid_t obj_id, + H5F_scope_t scope + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "obj_id=%d (%s)", + obj_id, + hdf5_get_objname (obj_id)); + if (H5Fflush (obj_id, scope) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot flush data \"%s\".", + hdf5_get_objname (obj_id))); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +/****** E r r o r h a n d l i n g ********************************************/ + +static inline h5_err_t +hdf5_set_errorhandler ( + hid_t estack_id, + H5E_auto_t func, + void* client_data + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "estack_id=%d, func=%p, client_data=%p", + estack_id, func, client_data); + if (H5Eset_auto (estack_id, func, client_data) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot initialize H5.")); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +/****** A t t r i b u t e ****************************************************/ +static inline hid_t +hdf5_attribute_exists ( + hid_t loc_id, + const char* attrib_name + ) { + HDF5_WRAPPER_ENTER (hid_t, + "loc_id=%d (%s), attr_name='%s'", + loc_id, hdf5_get_objname (loc_id), attrib_name); + htri_t exists = H5Aexists (loc_id, attrib_name); + if (exists < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot query attribute '%s' of '%s'.", + attrib_name, + hdf5_get_objname (loc_id))); + HDF5_WRAPPER_RETURN (exists); +} + +static inline hid_t +hdf5_open_attribute ( + hid_t loc_id, + const char* attrib_name + ) { + HDF5_WRAPPER_ENTER (hid_t, + "loc_id=%d (%s), attr_name='%s'", + loc_id, hdf5_get_objname (loc_id), attrib_name); + hid_t attrib_id = H5Aopen (loc_id, attrib_name, H5P_DEFAULT); + if (attrib_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot open attribute '%s' of '%s'.", + attrib_name, + hdf5_get_objname (loc_id))); + HDF5_WRAPPER_RETURN (attrib_id); +} + +static inline hid_t +hdf5_open_attribute_idx ( + hid_t loc_id, + unsigned int idx + ) { + HDF5_WRAPPER_ENTER (hid_t, + "loc_id=%d (%s), idx=%u", + loc_id, hdf5_get_objname (loc_id), idx); + hid_t attr_id = H5Aopen_idx (loc_id, idx); + if (attr_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot open attribute '%u' of '%s'.", + idx, + hdf5_get_objname (loc_id))); + HDF5_WRAPPER_RETURN (attr_id); +} + +static inline hid_t +hdf5_open_attribute_by_name ( + hid_t loc_id, + const char* obj_name, + const char* attr_name + ) { + HDF5_WRAPPER_ENTER (hid_t, + "loc_id=%d (%s), obj_name='%s', attr_name='%s'", + loc_id, hdf5_get_objname (loc_id), + obj_name, attr_name); + hid_t attr_id = H5Aopen_by_name ( + loc_id, + obj_name, + attr_name, + H5P_DEFAULT, + H5P_DEFAULT); + if (attr_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot open attribute '%s' of '%s'.", + attr_name, + obj_name)); + HDF5_WRAPPER_RETURN (attr_id); +} + +static inline hid_t +hdf5_create_attribute ( + hid_t loc_id, + const char* attr_name, + hid_t type_id, + hid_t space_id, + hid_t acpl_id, + hid_t aapl_id + ) { + HDF5_WRAPPER_ENTER (hid_t, + "loc_id=%d (%s), attr_name='%s', type_id=%d", + loc_id, hdf5_get_objname (loc_id), + attr_name, type_id); + hid_t attr_id = H5Acreate ( + loc_id, + attr_name, + type_id, + space_id, + acpl_id, + aapl_id); + if (attr_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot create attribute '%s' for '%s'.", + attr_name, + hdf5_get_objname (loc_id))); + HDF5_WRAPPER_RETURN (attr_id); +} + +static inline h5_err_t +hdf5_read_attribute ( + hid_t attr_id, + hid_t mem_type_id, + void* buf + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "attr_id=%d (%s), mem_type_id=%d, buf=%p", + attr_id, hdf5_get_objname (attr_id), + mem_type_id, buf); + if (H5Aread (attr_id, mem_type_id, buf) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot read attribute '%s'.", + hdf5_get_objname (attr_id))); + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +/* + Wrapper for H5Awrite. + */ +static inline h5_err_t +hdf5_write_attribute ( + hid_t attr_id, + hid_t mem_type_id, + const void* buf + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "attr_id=%d (%s), mem_type_id=%d, buf=%p", + attr_id, hdf5_get_objname (attr_id), + mem_type_id, buf); + if (H5Awrite (attr_id, mem_type_id, buf) < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot write attribute '%s'.", + hdf5_get_objname (attr_id))); + + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_ssize_t +hdf5_get_attribute_name ( + hid_t attr_id, + size_t buf_size, + char *buf + ) { + HDF5_WRAPPER_ENTER (h5_ssize_t, + "attr_id=%d (%s), buf_size=%llu, buf=%p", + attr_id, hdf5_get_objname (attr_id), + (unsigned long long)buf_size, buf); + ssize_t size = H5Aget_name ( attr_id, buf_size, buf ); + if (size < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot get attribute name." )); + HDF5_WRAPPER_RETURN ((h5_size_t)size); +} + +static inline hid_t +hdf5_get_attribute_type ( + hid_t attr_id + ) { + HDF5_WRAPPER_ENTER (hid_t, + "attr_id=%d (%s)", + attr_id, hdf5_get_objname (attr_id)); + hid_t datatype_id = H5Aget_type (attr_id); + if (datatype_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot get type of attribute '%s'.", + hdf5_get_objname (attr_id))); + HDF5_WRAPPER_RETURN (datatype_id); +} + +static inline hid_t +hdf5_get_attribute_dataspace ( + hid_t attr_id + ) { + HDF5_WRAPPER_ENTER (hid_t, + "attr_id=%d (%s)", + attr_id, hdf5_get_objname (attr_id)); + hid_t space_id = H5Aget_space (attr_id); + if (space_id < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot get dataspace of attribute '%s'.", + hdf5_get_objname (attr_id))); + HDF5_WRAPPER_RETURN (space_id); +} + +static inline int +hdf5_get_num_attribute ( + hid_t loc_id + ) { + HDF5_WRAPPER_ENTER (int, + "loc_id=%d (%s)", + loc_id, hdf5_get_objname (loc_id)); + int num = H5Aget_num_attrs (loc_id); + if (num < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot get number of attributes of '%s'.", + hdf5_get_objname (loc_id))); + HDF5_WRAPPER_RETURN (num); +} + +static inline herr_t +hdf5_delete_attribute ( + hid_t loc_id, + const char* attrib_name + ) { + HDF5_WRAPPER_ENTER (herr_t, + "loc_id=%d (%s), attr_name='%s'", + loc_id, hdf5_get_objname (loc_id), attrib_name); + herr_t herr = H5Adelete (loc_id, attrib_name); + if (herr < 0) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot delete attribute '%s' of '%s'.", + attrib_name, + hdf5_get_objname (loc_id))); + HDF5_WRAPPER_RETURN (herr); +} + +static inline h5_err_t +hdf5_close_attribute ( + hid_t attr_id + ) { + HDF5_WRAPPER_ENTER (h5_err_t, + "attr_id=%d (%s)", + attr_id, hdf5_get_objname (attr_id)); + if (H5Aclose (attr_id)) + HDF5_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot close attribute '%s'.", + hdf5_get_objname (attr_id))); + + HDF5_WRAPPER_RETURN (H5_SUCCESS); +} + +#endif diff --git a/src/h5core/h5_hsearch.c b/src/h5core/h5_hsearch.c new file mode 100644 index 0000000..ad7c26b --- /dev/null +++ b/src/h5core/h5_hsearch.c @@ -0,0 +1,380 @@ +/* Copyright (C) 1993,1995-1997,2002,2005,2007,2008 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1993. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include +#include +#include +#include + +#include "h5_debug_private.h" +#include "h5_hsearch_private.h" + +#include "h5core/h5_types.h" +#include "h5core/h5_syscall.h" + + +/* [Aho,Sethi,Ullman] Compilers: Principles, Techniques and Tools, 1986 + [Knuth] The Art of Computer Programming, part 3 (6.4) */ + + +/* The reentrant version has no static variables to maintain the state. + Instead the interface of all functions is extended to take an argument + which describes the current status. */ +typedef struct _ENTRY { + unsigned int used; + void* entry; +} _ENTRY; + + +/* For the used double hash method the table size has to be a prime. To + correct the user given table size we need a prime test. This trivial + algorithm is adequate because + a) the code is (most probably) called a few times per program run and + b) the number is small because the table must fit in the core */ +static int +isprime (const unsigned int number) { + /* no even number will be passed */ + unsigned int div = 3; + + while (div * div < number && number % div != 0) + div += 2; + + return number % div != 0; +} + +/* Before using the hash table we must allocate memory for it. + Test for an existing table are done. We allocate one element + more as the found prime number says. This is done for more effective + indexing as explained in the comment for the hsearch function. + The contents of the table is zeroed, especially the field used + becomes zero. */ +h5_err_t +h5priv_hcreate ( + size_t nel, + h5_hashtable_t* htab, + int (*compare)(const void*, const void*), + unsigned int (*compute_hash)(const void*), + h5_err_t (*free_entry)(const void*) + ) { + H5_PRIV_API_ENTER (h5_err_t, + "nel=%llu, htab=%p, compare=%p, " + "compute_hash=%p, free_entry=%p", + (long long unsigned)nel, + htab, compare, compute_hash, free_entry); + + /* Test for correct arguments. */ + if (htab == NULL) { + H5_PRIV_API_LEAVE (h5_error_internal ()); + } + /* Change nel to the first prime number not smaller as nel. */ + nel |= 1; /* make odd */ + while (!isprime (nel)) + nel += 2; + + htab->size = nel; + htab->filled = 0; + htab->compare = compare; + htab->compute_hash = compute_hash; + htab->free_entry = free_entry; + + /* allocate memory and zero out */ + TRY (htab->table = (_ENTRY *) h5_calloc ( + htab->size + 1, sizeof (_ENTRY))); + + /* everything went alright */ + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +/* + Resize hash table. Actually we create a new hash table with the specified + size and copy the old data. + */ +h5_err_t +h5priv_hgrow ( + size_t nel, // number of entries to grow + h5_hashtable_t* htab // hash table to resize + ) { + H5_PRIV_API_ENTER (h5_err_t, + "nel=%llu, htab=%p", + (long long unsigned)nel, htab); + if (htab == NULL) { + h5_error_internal (); + } + nel += htab->size; // new size + + // create new hash table + h5_hashtable_t __htab; + memset (&__htab, 0, sizeof (__htab)); + h5_debug ("Resize hash table from %zu to %zu elements.", htab->size, nel); + TRY (h5priv_hcreate (nel, &__htab, htab->compare, + htab->compute_hash, htab->free_entry)); + if (htab->table != NULL) { + h5_debug ("New hash table created, filling ..."); + + // add all entries to new hash table + unsigned int idx; + for (idx = 1; idx <= htab->size; idx++) { + if (htab->table[idx].used) { + void* ventry; + TRY (h5priv_hsearch ( + htab->table[idx].entry, + H5_ENTER, + &ventry, + &__htab)); + if (idx % 1000000 == 0) { + h5_debug ("."); + } + } + } + /* Free used memory. */ + TRY (h5_free (htab->table)); + h5_debug ("Old hash table removed"); + } + *htab = __htab; + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +hwalk ( + struct hsearch_data* htab, + h5_err_t (*visit)(const void *item) + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "htab=%p, visit=%p", htab, visit); + unsigned int idx = 1; + for (idx = 1; idx < htab->size; idx++) { + if (htab->table[idx].used) { + TRY ((*visit)(&htab->table[idx].entry)); + } + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +void* +h5priv_htraverse ( + struct hsearch_data* htab, + unsigned int* idx + ) { + assert (*idx > 0); + for (; *idx < htab->size; (*idx)++) { + if (htab->table[*idx].used) { + void* result = htab->table[*idx].entry; + (*idx)++; + return result; + } + } + return NULL; +} + + +/* After using the hash table it has to be destroyed. The used memory can + be freed and the local static variable can be marked as not used. */ +h5_err_t +h5priv_hdestroy ( + struct hsearch_data* htab + ) { + H5_PRIV_API_ENTER (h5_err_t, "htab=%p", htab); + /* Test for correct arguments. */ + if (htab == NULL) { + H5_PRIV_API_LEAVE (h5_error_internal ()); + } + /* Free used memory. */ + if (htab->free_entry) { + TRY (hwalk (htab, htab->free_entry)); + } + TRY (h5_free (htab->table)); + + /* the sign for an existing table is an value != NULL in htable */ + htab->table = NULL; + H5_PRIV_API_RETURN (H5_SUCCESS); +} + + + +/* This is the search function. It uses double hashing with open addressing. + The argument item.key has to be a pointer to an zero terminated, most + probably strings of chars. The function for generating a number of the + strings is simple but fast. It can be replaced by a more complex function + like ajw (see [Aho,Sethi,Ullman]) if the needs are shown. + + We use an trick to speed up the lookup. The table is created by hcreate + with one more element available. This enables us to use the index zero + special. This index will never be used because we store the first hash + index in the field used where zero means not used. Every other value + means used. The used field can be used as a first fast comparison for + equality of the stored and the parameter value. This helps to prevent + unnecessary expensive calls of strcmp. */ +h5_err_t +h5priv_hsearch ( + void* item, + const h5_action_t action, + void** retval, + struct hsearch_data* htab + ) { + H5_PRIV_API_ENTER (h5_err_t, + "item=%p, action=%d, retval=%p, htab=%p", + item, (int)action, retval, htab); + unsigned int hval; + unsigned int idx; + + /* Compute an value for the given key. Perhaps use a better method. */ + hval = htab->compute_hash(item); + + /* First hash function: simply take the modul but prevent zero. */ + idx = hval % htab->size + 1; + + if (htab->table[idx].used) { + /* Further action might be required according to the action + value. */ + if (htab->table[idx].used == hval + && (htab->compare (item, htab->table[idx].entry) == 0) ) { + if (retval) { + *retval = htab->table[idx].entry; + } + H5_PRIV_API_LEAVE (H5_SUCCESS); + } + + /* Second hash function, as suggested in [Knuth] */ + unsigned int hval2 = 1 + hval % (htab->size - 2); + unsigned int first_idx = idx; + + do { + /* Because SIZE is prime this guarantees to step + through all available indices. */ + if (idx <= hval2) + idx = htab->size + idx - hval2; + else + idx -= hval2; + + /* If we visited all entries leave the loop + unsuccessfully. */ + if (idx == first_idx) + break; + + /* If entry is found use it. */ + if (htab->table[idx].used == hval + && (htab->compare ( + item, htab->table[idx].entry) == 0) ) { + if (retval) { + *retval = htab->table[idx].entry; + } + H5_PRIV_API_LEAVE (H5_SUCCESS); + } + } while (htab->table[idx].used); + } + + /* An empty bucket has been found. */ + if (action == H5_ENTER) { + /* If table is full and another entry should be entered return + with error. */ + if (htab->filled == htab->size) { + if (retval) { + *retval = NULL; + } + H5_PRIV_API_LEAVE (h5_error_internal ()); + } + + htab->table[idx].used = hval; + htab->table[idx].entry = item; + + ++htab->filled; + + if (retval) { + *retval = htab->table[idx].entry; + } + H5_PRIV_API_LEAVE (H5_SUCCESS); + } else if (action == H5_REMOVE) { + htab->table[idx].used = 0; /* mark as unused, but */ + *retval = htab->table[idx].entry; /* return ptr to entry */ + H5_PRIV_API_LEAVE (H5_SUCCESS); + } + if (retval) *retval = NULL; + h5_debug ("Key not found in hash table."); + H5_PRIV_API_RETURN (H5_NOK); +} + +typedef struct { + char* key; +} h5_hitem_string_keyed_t; + +static int +cmp_string_keyed ( + const void* __a, + const void* __b + ) { + h5_hitem_string_keyed_t *a = (h5_hitem_string_keyed_t*) __a; + h5_hitem_string_keyed_t *b = (h5_hitem_string_keyed_t*) __b; + return strcmp (a->key, b->key); +} + +static unsigned int +compute_string_keyed ( + const void* __entry + ) { + h5_hitem_string_keyed_t* entry = (h5_hitem_string_keyed_t*) __entry; + unsigned int len = strlen (entry->key); + unsigned int hval = len; + unsigned int count = len; + while (count-- > 0) { + hval <<= 4; + hval += entry->key[count]; + } + return hval; +} + +static h5_err_t +free_string_keyed ( + const void* __entry + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "__entry=%p", __entry); + h5_hitem_string_keyed_t* entry = (h5_hitem_string_keyed_t*) __entry; + TRY (h5_free (entry->key)); + TRY (h5_free (entry)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +h5priv_hcreate_string_keyed ( + size_t nel, + h5_hashtable_t* htab, + h5_err_t (*free_entry)(const void*) + ) { + H5_PRIV_API_ENTER (h5_err_t, "htab=%p, free_entry=%p", htab, free_entry); + if (free_entry == NULL) { + TRY (h5priv_hcreate (nel, htab, + cmp_string_keyed, + compute_string_keyed, + free_string_keyed)); + } else { + TRY (h5priv_hcreate (nel, htab, + cmp_string_keyed, + compute_string_keyed, + free_entry)); + } + H5_PRIV_API_RETURN (H5_SUCCESS); +} diff --git a/src/h5core/h5_hsearch_private.h b/src/h5core/h5_hsearch_private.h new file mode 100644 index 0000000..a45f970 --- /dev/null +++ b/src/h5core/h5_hsearch_private.h @@ -0,0 +1,77 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_HSEARCH_PRIVATE_H +#define __H5_HSEARCH_PRIVATE_H + +#include "h5core/h5_types.h" + +typedef struct hsearch_data { + struct _ENTRY *table; + size_t size; + size_t filled; + int (*compare)(const void*, const void*); + unsigned int (*compute_hash)(const void*); + h5_err_t (*free_entry)(const void*); +} h5_hashtable_t; + +/* Action which shall be performed in the call to hsearch. */ +typedef enum { + H5_FIND, + H5_ENTER, + H5_REMOVE +} h5_action_t; + +typedef struct h5_entry { + void* dta; +} h5_entry_t; + +/* Reentrant versions which can handle multiple hashing tables at the + same time. */ +extern h5_err_t +h5priv_hsearch ( + void* item, + const h5_action_t action, + void** retval, + h5_hashtable_t* htab + ); + +extern h5_err_t +h5priv_hcreate ( + size_t __nel, + h5_hashtable_t* __htab, + int (*compare)(const void*, const void*), + unsigned int (*compute_hash)(const void*), + h5_err_t (*free_entry)(const void*) + ); + +extern h5_err_t +h5priv_hgrow ( + size_t nel, + h5_hashtable_t* htab + ); + +extern h5_err_t +h5priv_hdestroy ( + h5_hashtable_t* __htab + ); + +extern h5_err_t +h5priv_hcreate_string_keyed ( + size_t nel, + h5_hashtable_t* htab, + h5_err_t (*free_entry)(const void*) + ); + +extern void* +h5priv_htraverse ( + struct hsearch_data* htab, + unsigned int* idx + ); +#endif diff --git a/src/h5core/h5_init.c b/src/h5core/h5_init.c new file mode 100644 index 0000000..17992ab --- /dev/null +++ b/src/h5core/h5_init.c @@ -0,0 +1,689 @@ +#include +#include /* va_arg - System dependent ?! */ +#include +#include + +#include "h5core/h5.h" +#include "h5_hdf5_private.h" + +#include "h5_mpi_private.h" +#include "h5t_types_private.h" +#include "h5t_tags_private.h" + + + +int h5_initialized = 0; +h5_dta_types_t h5_dta_types; // type ids' for base & compound data types +int h5_myproc = 0; // proc id + +/* + create several HDF5 types + */ +static inline h5_err_t +create_array_types ( + void + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "%s", "void"); + + hsize_t dims[1] = { 3 }; + TRY( + h5_dta_types.h5_coord3d_t = hdf5_create_array_type ( + H5_FLOAT64_T, + 1, + dims) + ); + TRY( + h5_dta_types.h5_3glb_idx_t = hdf5_create_array_type ( + H5_ID_T, + 1, + dims) + ); + dims[0] = 4; + TRY( + h5_dta_types.h5_4glb_idx_t = hdf5_create_array_type ( + H5_ID_T, + 1, + dims) + ); + TRY( + h5_dta_types.h5_4chk_idx_t = hdf5_create_array_type ( + H5_INT32_T, + 1, + dims) + ); + dims[0] = 6; + TRY( + h5_dta_types.h5_coord6d_t = hdf5_create_array_type ( + H5_FLOAT64_T, + 1, + dims) + ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +create_vertex_type ( + void + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "%s", "void"); + + TRY( + h5_dta_types.h5_vertex_t = hdf5_create_type ( + H5_COMPOUND_T, + sizeof (h5_glb_vertex_t)) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_vertex_t, + "idx", + HOFFSET (h5_glb_vertex_t, idx), + H5_ID_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_vertex_t, + "P", + HOFFSET (h5_glb_vertex_t, P), + h5_dta_types.h5_coord3d_t) ); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +create_triangle_type ( + void + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "%s", "void"); + + TRY( + h5_dta_types.h5_triangle_t = hdf5_create_type ( + H5_COMPOUND_T, + sizeof (h5_glb_tri_t)) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_triangle_t, + "idx", + HOFFSET (h5_glb_tri_t, idx), + H5_ID_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_triangle_t, + "parent_idx", + HOFFSET (h5_glb_tri_t, parent_idx), + H5_ID_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_triangle_t, + "child_idx", + HOFFSET(h5_glb_tri_t, child_idx), + H5_ID_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_triangle_t, + "level_idx", + HOFFSET(h5_glb_tri_t, level_idx), + H5_INT16_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_triangle_t, + "refinement", + HOFFSET(h5_glb_tri_t, refinement), + H5_INT16_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_triangle_t, + "flags", + HOFFSET(h5_glb_tri_t, flags), + H5_INT32_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_triangle_t, + "vertex_indices", + HOFFSET (h5_glb_tri_t, vertex_indices), + h5_dta_types.h5_3glb_idx_t) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_triangle_t, + "neighbor_indices", + HOFFSET(h5_glb_tri_t, neighbor_indices), + h5_dta_types.h5_3glb_idx_t) ); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +create_tag_types ( + void + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "%s", "void"); + + TRY ( + h5_dta_types.h5t_glb_tag_idx_t = hdf5_create_type ( + H5_COMPOUND_T, + sizeof (h5t_glb_tag_idx_t)) ); + TRY ( + hdf5_insert_type ( + h5_dta_types.h5t_glb_tag_idx_t, + "eid", + HOFFSET (h5t_glb_tag_idx_t, eid), + H5_ID_T) ); + TRY ( + hdf5_insert_type ( + h5_dta_types.h5t_glb_tag_idx_t, + "idx", + HOFFSET (h5t_glb_tag_idx_t, idx), + H5_ID_T) ); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +create_tet_type ( + void + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "%s", "void"); + + TRY( + h5_dta_types.h5_tet_t = hdf5_create_type ( + H5_COMPOUND_T, + sizeof (h5_glb_tet_t)) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_tet_t, + "idx", + HOFFSET (h5_glb_tet_t, idx), + H5_ID_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_tet_t, + "parent_idx", + HOFFSET (h5_glb_tet_t, parent_idx), + H5_ID_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_tet_t, + "child_idx", + HOFFSET (h5_glb_tet_t, child_idx), + H5T_NATIVE_INT32) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_tet_t, + "level_idx", + HOFFSET(h5_glb_tet_t, level_idx), + H5_INT16_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_tet_t, + "refinement", + HOFFSET(h5_glb_tet_t, refinement), + H5_INT16_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_tet_t, + "flags", + HOFFSET(h5_glb_tet_t, flags), + H5_INT32_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_tet_t, + "vertex_indices", + HOFFSET (h5_glb_tet_t, vertex_indices), + h5_dta_types.h5_4glb_idx_t) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_tet_t, + "neighbor_indices", + HOFFSET (h5_glb_tet_t, neighbor_indices), + h5_dta_types.h5_4glb_idx_t) ); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +create_chunk_type ( + void + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "%s", "void"); + TRY( + h5_dta_types.h5_chunk_t = hdf5_create_type ( + H5_COMPOUND_T, + sizeof (h5t_chunk_t)) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_chunk_t, + "idx", + HOFFSET (h5t_chunk_t, idx), + H5_INT32_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_chunk_t, + "oct_idx", + HOFFSET (h5t_chunk_t, oct_idx), + H5_INT32_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_chunk_t, + "elem", + HOFFSET (h5t_chunk_t, elem), + H5_ID_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_chunk_t, + "weight", + HOFFSET (h5t_chunk_t, weight), + H5_ID_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_chunk_t, + "num_elems", + HOFFSET (h5t_chunk_t, num_elems), + H5_UINT16_T) ); +// TRY( +// hdf5_insert_type ( +// h5_dta_types.h5_chunk_t, +// "vtx", +// HOFFSET (h5t_chunk_t, vtx), +// H5_INT64_T) ); +// TRY( +// hdf5_insert_type ( +// h5_dta_types.h5_chunk_t, +// "num_vtx", +// HOFFSET (h5t_chunk_t, num_vtx), +// H5_INT64_T) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +create_octree_type ( + void + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "%s", "void"); + TRY( + h5_dta_types.h5_octree_t = hdf5_create_type ( + H5_COMPOUND_T, + sizeof (h5t_octant_t)) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_octree_t, + "idx", + HOFFSET (h5t_octant_t, idx), + H5_INT32_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_octree_t, + "parent_idx", + HOFFSET (h5t_octant_t, parent_idx), + H5_INT32_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_octree_t, + "child_idx", + HOFFSET (h5t_octant_t, child_idx), + H5_INT32_T) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_octree_t, + "level_idx", + HOFFSET (h5t_octant_t, level_idx), + H5_INT16_T) ); +// TRY( +// hdf5_insert_type ( +// h5_dta_types.h5_octree_t, +// "bounding_box", +// HOFFSET (h5t_octant_t, bounding_box), +// h5_dta_types.h5_coord6d_t) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_octree_t, + "userlevels", + HOFFSET (h5t_octant_t, userlevels), + H5_INT32_T) ); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +static inline h5_err_t +create_userdata_type ( + void + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "%s", "void"); + TRY( + h5_dta_types.h5_userdata_t = hdf5_create_type ( + H5_COMPOUND_T, + sizeof (h5t_oct_userdata_t)) ); + TRY( + hdf5_insert_type ( + h5_dta_types.h5_userdata_t, + "idx", + HOFFSET (h5t_oct_userdata_t, idx), + h5_dta_types.h5_4chk_idx_t) ); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#if defined(PARALLEL_IO) +static inline h5_err_t +create_mpi_type_glb_tet ( + void + ) { + h5_glb_tet_t glb_elem; + H5_PRIV_FUNC_ENTER (h5_err_t, "%s", "void"); + int i = 0; + const int count = 8; + int blocklens[count]; + MPI_Aint indices[count]; + MPI_Datatype old_types[count]; + MPI_Aint base; + MPI_Aint addr; + TRY (mpi_get_address (&glb_elem, &base)); + + // idx + blocklens[i] = 1; + TRY (mpi_get_address (&glb_elem.idx, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_LONG_LONG; + + // parent_idx + blocklens[i] = 1; + TRY (mpi_get_address (&glb_elem.parent_idx, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_LONG_LONG; + + // child_idx + blocklens[i] = 1; + TRY (mpi_get_address (&glb_elem.child_idx, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_LONG_LONG; + + // level_idx + blocklens[i] = 1; + TRY (mpi_get_address (&glb_elem.level_idx, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_SHORT; + + // refinement + blocklens[i] = 1; + TRY (mpi_get_address (&glb_elem.refinement, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_SHORT; + + // flags + blocklens[i] = 1; + TRY (mpi_get_address (&glb_elem.flags, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_UNSIGNED; + + // vertex_indices + blocklens[i] = 4; + TRY (mpi_get_address (&glb_elem.vertex_indices, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_LONG_LONG; + + // neighbor_indices + blocklens[i] = 4; + TRY (mpi_get_address (&glb_elem.neighbor_indices, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_LONG_LONG; + + // create new type + assert (i==count); + TRY (mpi_create_type_struct (count, blocklens, indices, old_types, + &h5_dta_types.mpi_glb_tet)); + // commit new type + TRY (h5priv_mpi_type_commit (&h5_dta_types.mpi_glb_tet)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +create_mpi_type_glb_tri ( + void + ) { + h5_glb_tri_t glb_elem; + H5_PRIV_FUNC_ENTER (h5_err_t, "%s", "void"); + int i = 0; + const int count = 8; + int blocklens[count]; + MPI_Aint indices[count]; + MPI_Datatype old_types[count]; + MPI_Aint base; + MPI_Aint addr; + TRY (mpi_get_address (&glb_elem, &base)); + + // idx + blocklens[i] = 1; + TRY (mpi_get_address (&glb_elem.idx, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_LONG_LONG; + + // parent_idx + blocklens[i] = 1; + TRY (mpi_get_address (&glb_elem.parent_idx, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_LONG_LONG; + + // child_idx + blocklens[i] = 1; + TRY (mpi_get_address (&glb_elem.child_idx, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_LONG_LONG; + + // level_idx + blocklens[i] = 1; + TRY (mpi_get_address (&glb_elem.level_idx, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_SHORT; + + // refinement + blocklens[i] = 1; + TRY (mpi_get_address (&glb_elem.refinement, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_SHORT; + + // flags + blocklens[i] = 1; + TRY (mpi_get_address (&glb_elem.flags, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_UNSIGNED; + + // vertex_indices + blocklens[i] = 3; + TRY (mpi_get_address (&glb_elem.vertex_indices, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_LONG_LONG; + + // neighbor_indices + blocklens[i] = 3; + TRY (mpi_get_address (&glb_elem.neighbor_indices, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_LONG_LONG; + + // create new type + assert (i==count); + TRY (mpi_create_type_struct (count, blocklens, indices, old_types, + &h5_dta_types.mpi_glb_triangle)); + // commit new type + TRY (h5priv_mpi_type_commit (&h5_dta_types.mpi_glb_triangle)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +static inline h5_err_t +create_mpi_type_glb_vtx ( + void + ) { + h5_glb_vertex_t glb_vtx; + H5_PRIV_FUNC_ENTER (h5_err_t, "%s", "void"); + int i = 0; + const int count = 2; + int blocklens[count]; + MPI_Aint indices[count]; + MPI_Datatype old_types[count]; + MPI_Aint base; + MPI_Aint addr; + TRY (mpi_get_address (&glb_vtx, &base)); + + // idx + blocklens[i] = 1; + TRY (mpi_get_address (&glb_vtx.idx, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_LONG_LONG; + + // P + blocklens[i] = 3; + TRY (mpi_get_address (&glb_vtx.P, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_DOUBLE; + + // create new type + assert (i==count); + TRY (mpi_create_type_struct (count, blocklens, indices, old_types, + &h5_dta_types.mpi_glb_vtx)); + // commit new type + TRY (h5priv_mpi_type_commit (&h5_dta_types.mpi_glb_vtx)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +create_mpi_type_edge_list_elem ( + void + ) { + h5t_edge_list_elem_t elem; + H5_PRIV_FUNC_ENTER (h5_err_t, "%s", "void"); + int i = 0; + const int count = 4; + int blocklens[count]; + MPI_Aint indices[count]; + MPI_Datatype old_types[count]; + MPI_Aint base; + MPI_Aint addr; + TRY (mpi_get_address (&elem, &base)); + + // vtx1 + blocklens[i] = 1; + TRY (mpi_get_address (&elem.vtx1, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_LONG_LONG; + + // vtx2 + blocklens[i] = 1; + TRY (mpi_get_address (&elem.vtx2, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_LONG_LONG; + + // new_vtx + blocklens[i] = 1; + TRY (mpi_get_address (&elem.new_vtx, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_LONG_LONG; + + // proc + blocklens[i] = 1; + TRY (mpi_get_address (&elem.proc, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_INT; + + // create new type + assert (i==count); + TRY (mpi_create_type_struct (count, blocklens, indices, old_types, + &h5_dta_types.mpi_edge_list_elem)); + // commit new type + TRY (h5priv_mpi_type_commit (&h5_dta_types.mpi_edge_list_elem)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +static inline h5_err_t +create_mpi_type_chunk ( + void + ) { + h5t_chunk_t chunk; + H5_PRIV_FUNC_ENTER (h5_err_t, "%s", "void"); + int i = 0; + const int count = 5; + int blocklens[count]; + MPI_Aint indices[count]; + MPI_Datatype old_types[count]; + MPI_Aint base; + MPI_Aint addr; + TRY (mpi_get_address (&chunk, &base)); + + // idx + blocklens[i] = 1; + TRY (mpi_get_address (&chunk.idx, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_INT; + + // oct_idx + blocklens[i] = 1; + TRY (mpi_get_address (&chunk.oct_idx, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_INT; + + // elem_idx + blocklens[i] = 1; + TRY (mpi_get_address (&chunk.elem, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_LONG_LONG; + + // chk_weight + blocklens[i] = 1; + TRY (mpi_get_address (&chunk.weight, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_LONG_LONG; + + // num_elems + blocklens[i] = 1; + TRY (mpi_get_address (&chunk.num_elems, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_SHORT; + + + // create new type + assert (i == count); + TRY (mpi_create_type_struct (count, blocklens, indices, old_types, + &h5_dta_types.mpi_chunk)); + // commit new type + TRY (h5priv_mpi_type_commit (&h5_dta_types.mpi_chunk)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif + +h5_err_t +_h5_exit (int status) { + exit (status); + return H5_ERR; +} + +h5_err_t +h5_initialize ( + void + ) { + h5_initialized = 1; + memset (&h5_call_stack, 0, sizeof (h5_call_stack)); + H5_CORE_API_ENTER (h5_err_t, "%s", "void"); + ret_value = H5_SUCCESS; +#ifdef PARALLEL_IO + if (h5priv_mpi_comm_rank (MPI_COMM_WORLD, &h5_myproc) < 0) { + exit (42); + } +#endif + h5_dta_types.h5_glb_idx_t = H5_INT64_T; + h5_dta_types.h5_int64_t = H5_INT64_T; + h5_dta_types.h5_float64_t = H5_FLOAT64_T; + h5_dta_types.h5_int32_t = H5_INT32_T; + + TRY (create_array_types ()); + TRY (create_vertex_type ()); + TRY (create_triangle_type ()); + TRY (create_tet_type ()); + TRY (create_tag_types ()); + TRY (create_chunk_type ()); + TRY (create_octree_type ()); + TRY (create_userdata_type ()); + +#if defined(PARALLEL_IO) + TRY (create_mpi_type_glb_tri ()); + TRY (create_mpi_type_glb_tet ()); + TRY (create_mpi_type_glb_vtx ()); + TRY (create_mpi_type_chunk ()); + TRY (create_mpi_type_edge_list_elem()); +#endif + H5_CORE_API_RETURN ((ret_value != H5_SUCCESS) ? _h5_exit (42) : H5_SUCCESS); +} diff --git a/src/h5core/h5_init_private.h b/src/h5core/h5_init_private.h new file mode 100644 index 0000000..d42b039 --- /dev/null +++ b/src/h5core/h5_init_private.h @@ -0,0 +1,29 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_INIT_PRIVATE_H +#define __H5_INIT_PRIVATE_H + +#include "h5core/h5_types.h" +#include "h5t_types_private.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern h5_dta_types_t h5_dta_types; +extern int h5_myproc; + + +#ifdef __cplusplus +} +#endif + + +#endif diff --git a/src/h5core/h5_lustre.c b/src/h5core/h5_lustre.c new file mode 100644 index 0000000..3712d07 --- /dev/null +++ b/src/h5core/h5_lustre.c @@ -0,0 +1,170 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5core/h5.h" + +#ifdef H5_USE_LUSTRE + +#include +#include +#include +#include +#include +#define __USE_GNU +#include +#undef __USE_GNU +#include +#include + + +#define MSG_HEADER "optimize for lustre: " + +static void +_print_stripe_info(struct lov_user_md *lum) +{ + fprintf (stderr, "lmm_magic: %u\n", (unsigned)lum->lmm_magic); + fprintf (stderr, "lmm_pattern: %u\n", (unsigned)lum->lmm_pattern); + fprintf (stderr, "lmm_object_id: %lu\n", (unsigned long)lum->lmm_object_id); + fprintf (stderr, "lmm_object_gr: %lu\n", (unsigned long)lum->lmm_object_gr); + fprintf (stderr, "lmm_stripe_size: %u\n", (unsigned)lum->lmm_stripe_size); + fprintf (stderr, "lmm_stripe_count: %u\n", (unsigned)lum->lmm_stripe_count); + fprintf (stderr, "lmm_stripe_offset: %u\n", (unsigned)lum->lmm_stripe_offset); +} + +static ssize_t +_get_lustre_stripe_size(h5_file_t *const f, const char *path ) +{ + size_t nbytes = sizeof(struct lov_user_md) + + INIT_ALLOC_NUM_OSTS * sizeof(struct lov_user_ost_data); + struct lov_user_md *lum = h5_calloc(1, nbytes); + if (!lum) { + h5_error(H5_ERR_INTERNAL, MSG_HEADER + "cannot allocate lustre struct"); + return -1; + } + lum->lmm_magic = LOV_USER_MAGIC; + + int fd = open(path, O_RDONLY); + if (fd < 0) { + extern int errno; + if (errno == EINVAL) + h5_error(H5_ERR_INTERNAL, MSG_HEADER + "open: a flag is invalid!"); + else if (errno == EACCES) + h5_error(H5_ERR_INTERNAL, MSG_HEADER + "open: access denied or file does not exist!"); + else if (errno == ENAMETOOLONG) + h5_error(H5_ERR_INTERNAL, MSG_HEADER + "open: path is too long!"); + else + h5_error(H5_ERR_INTERNAL, MSG_HEADER + "open: unspecific error!"); + return -1; + } + + int ret = ioctl(fd, LL_IOC_LOV_GETSTRIPE, lum); + if (ret == -1) { + extern int errno; + if (errno == EBADF) + h5_error(H5_ERR_INTERNAL, MSG_HEADER + "ioctl: bad file handle!"); + else if (errno == EINVAL) + h5_error(H5_ERR_INTERNAL, MSG_HEADER + "ioctl: invalid argument!"); + else if (errno == EIO) + h5_error(H5_ERR_INTERNAL, MSG_HEADER + "ioctl: physical I/O problem!"); + else if (errno == ENOTTY) + h5_error(H5_ERR_INTERNAL, MSG_HEADER + "ioctl: file handle does not accept control functions!"); + else if (errno == ENODEV) + h5_error(H5_ERR_INTERNAL, MSG_HEADER + "ioctl: driver doesn't support control functions!"); + else + h5_error(H5_ERR_INTERNAL, MSG_HEADER + "ioctl: unspecific error!"); + return -1; + } + + close(fd); + + if ( f->myproc == 0 && h5_get_debuglevel() >= 5 ) + _print_stripe_info(lum); + + ssize_t stripe_size = (ssize_t)lum->lmm_stripe_size; + h5_free(lum); + + return stripe_size; +} + +h5_err_t +h5_optimize_for_lustre ( + h5_file_t *const f, + const char *filename + ) { + + H5_CORE_API_ENTER (h5_err_t, "f=%p, filename='%s'", f, filename); + ssize_t stripe_size; + if ( f->myproc == 0 ) + { + char *path = h5_calloc (1, strlen(filename)+4); + strcpy(path, filename); + /* check for existing file */ + FILE *test = fopen(path, "r"); + if (!test) { + /* use directory as path */ + int i = strlen(path)-1; + while (i >= 0) { + if (path[i] != '/') path[i] = '\0'; + else break; + i--; + } + if (strlen(path) == 0) sprintf(path, "."); + } + else fclose(test); + + stripe_size = _get_lustre_stripe_size(f, path); + + h5_free(path); + } + + TRY( h5priv_mpi_bcast(&stripe_size, 1, MPI_LONG_LONG, 0, f->comm) ); + h5_info(MSG_HEADER + "Found lustre stripe size of %lld bytes", + (long long)stripe_size); + + hsize_t btree_ik = (stripe_size - 4096) / 96; + hsize_t btree_bytes = 64 + 96*btree_ik; + h5_info(MSG_HEADER + "Setting HDF5 btree ik to %lld (= %lld bytes at rank 3)", + (long long)btree_ik, (long long)btree_bytes); + TRY( hdf5_set_btree_ik_property(f->create_prop, btree_ik) ); + + /* set alignment to lustre stripe size */ + TRY( hdf5_set_alignment_property( + f->access_prop, 0, stripe_size) ); + + h5_info(MSG_HEADER "Disabling metadata cache flushes."); + /* disable metadata cache flushes */ + /* defer metadata writes */ + H5AC_cache_config_t config; + config.version = H5AC__CURR_CACHE_CONFIG_VERSION; + TRY( H5Pget_mdc_config( f->access_prop, &config ) ); + config.set_initial_size = 1; + config.initial_size = 16 * 1024 * 1024; + config.evictions_enabled = 0; + config.incr_mode = H5C_incr__off; + config.decr_mode = H5C_decr__off; + config.flash_incr_mode = H5C_flash_incr__off; + TRY( H5Pset_mdc_config( f->access_prop, &config ) ); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +#endif // H5_USE_LUSTRE diff --git a/src/h5core/h5_lustre_private.h b/src/h5core/h5_lustre_private.h new file mode 100644 index 0000000..8743021 --- /dev/null +++ b/src/h5core/h5_lustre_private.h @@ -0,0 +1,19 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_LUSTRE_PRIVATE_H +#define __H5_LUSTRE_PRIVATE_H + +#include "h5core/h5_types.h" + +h5_err_t +h5_optimize_for_lustre ( + const h5_file_t, const char*); + +#endif diff --git a/src/h5core/h5_maps.c b/src/h5core/h5_maps.c new file mode 100644 index 0000000..5b8871b --- /dev/null +++ b/src/h5core/h5_maps.c @@ -0,0 +1,271 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5core/h5.h" + +#include "h5_errorhandling_private.h" +#include "h5_maps_private.h" + +/* + Allocate new/empty string-list + */ +h5_err_t +h5priv_alloc_strlist ( + h5_strlist_t** list, + const h5_size_t size + ) { + H5_PRIV_API_ENTER (h5_err_t, + "list=%p, size=%llu", + list, (long long unsigned)size); + TRY (*list = h5_calloc ( + 1, sizeof (**list)+size*sizeof ((*list)->items[0]))); + (*list)->size = size; + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5priv_free_strlist ( + h5_strlist_t** list + ) { + H5_PRIV_API_ENTER (h5_err_t, "list=%p", list); + if (list == NULL || *list == NULL) H5_PRIV_API_LEAVE (H5_SUCCESS); + h5_strlist_t* l = *list; + for (size_t i = 0; i < l->size; i++) { + TRY (h5_free(l->items[i])); + } + TRY (h5_free (l)); + l = NULL; + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +grow_strlist ( + h5_strlist_t** list, + size_t new_size + ) { + H5_PRIV_API_ENTER (h5_err_t, "list=%p, new_size=%zu", list, new_size); + size_t num_bytes = sizeof (**list) + (new_size-1)*sizeof((*list)->items[0]); + TRY (*list = h5_alloc (*list, num_bytes)); + (*list)->size = new_size; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Add item to list at position given by \c idx. + */ +ssize_t +h5priv_insert_strlist ( + h5_strlist_t** list, + const char const* item, + size_t idx + ) { + H5_PRIV_API_ENTER (ssize_t, + "list=%p, item=%s, idx=%llu", + list, item, (long long unsigned)idx); + if (*list == NULL) { + TRY (h5priv_alloc_strlist (list, 2)); + } else if ((*list)->num_items == (*list)->size) { + h5_size_t size = (*list)->size; + if (size == 0) { + size = 16; + } else { + size *= 2; + } + TRY (grow_strlist (list, size)); + } + h5_strlist_t* l = *list; + if (idx == -1) { + idx = l->num_items; + } else { + memmove ( + &l->items[idx+1], + &l->items[idx], + (l->num_items - idx) * sizeof (l->items[0])); + } + TRY (l->items[idx] = h5_strdup(item)); + l->num_items++; + H5_PRIV_API_RETURN (idx); +} + +/* + Find ID in sorted list + */ +ssize_t +h5priv_find_strlist ( + h5_strlist_t* list, + const char* const item + ) { + H5_PRIV_API_ENTER (ssize_t, "list=%p, item=%s", list, item); + if (!list) { + H5_PRIV_API_LEAVE (-1); + } + register h5_loc_idx_t low = 0; + register h5_loc_idx_t high = list->num_items - 1; + register h5_loc_id_t diff; + register h5_loc_id_t mid; + while (low <= high) { + mid = (low + high) / 2; + diff = strcmp (list->items[mid], item); + if ( diff > 0 ) + high = mid - 1; + else if ( diff < 0 ) + low = mid + 1; + else + H5_PRIV_API_LEAVE (mid); // found + } + H5_PRIV_API_RETURN (-(low+1)); // not found +} + +/* + Search in sorted list. If item is not in list, add it. + */ +ssize_t +h5priv_search_strlist ( + h5_strlist_t** list, + const char* const item + ) { + H5_PRIV_API_ENTER (h5_err_t, "list=%p, item=%s", list, item); + h5_loc_idx_t idx = h5priv_find_strlist (*list, item); + if (idx < 0) { + idx = -(idx+1); + TRY (idx = h5priv_insert_strlist (list, item, idx)); + } + H5_PRIV_API_RETURN (idx); +} + +h5_err_t +h5priv_remove_strlist ( + h5_strlist_t* list, + const char* const item + ) { + H5_PRIV_API_ENTER (h5_err_t, "list=%p, item=%s", list, item); + ssize_t idx = h5priv_find_strlist (list, item); + if (idx < 0) H5_PRIV_API_LEAVE (-1); + + list->num_items--; + memmove ( + &list->items[idx], + &list->items[idx+1], + (list->num_items - idx) * sizeof (list->items[0])); + H5_PRIV_API_RETURN (idx); +} + + +/////////////////////////////////////////////////////////////////////////////// + +h5_err_t +h5priv_new_idxmap ( + h5_idxmap_t* map, + const h5_size_t size + ) { + H5_PRIV_API_ENTER (h5_err_t, + "map=%p, size=%llu", + map, (long long unsigned)size); + TRY (map->items = h5_calloc (size, sizeof (map->items[0]))); + map->size = size; + map->num_items = 0; + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5priv_insert_idxmap ( + h5_idxmap_t* map, + h5_glb_idx_t glb_idx, + h5_loc_idx_t loc_idx + ) { + H5_PRIV_API_ENTER (h5_err_t, + "map=%p, glb_idx=%llu, loc_idx=%llu", + map, + (long long unsigned)glb_idx, + (long long unsigned)loc_idx); + if (map->num_items == map->size) + H5_PRIV_API_LEAVE ( + HANDLE_H5_OVERFLOW_ERR ( + (long long)map->size)); + + h5_loc_idx_t i = h5priv_search_idxmap (map, glb_idx); + if (i >= 0) /* global id already in use ? */ + H5_PRIV_API_LEAVE (-1); + + i = -(i+1); + + memmove ( + &map->items[i+1], + &map->items[i], + (map->num_items - i) * sizeof(map->items[0])); + map->items[i].glb_idx = glb_idx; + map->items[i].loc_idx = loc_idx; + map->num_items++; + + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +/*! + + \ingroup h5_core + + binary search in id map. + + \return index in array if found, othwise \c -(result+1) is the index + where \c value must be inserted. + + */ +h5_loc_idx_t +h5priv_search_idxmap ( + h5_idxmap_t* map, + h5_glb_idx_t value + ) { + H5_PRIV_API_ENTER (h5_err_t, + "map=%p, value=%lld", + map, (long long)value); + register h5_loc_idx_t low = 0; + register h5_loc_idx_t high = map->num_items - 1; + while (low <= high) { + register h5_loc_idx_t mid = (low + high) / 2; + register h5_glb_idx_t diff = map->items[mid].glb_idx - value; + if ( diff > 0 ) + high = mid - 1; + else if ( diff < 0 ) + low = mid + 1; + else + H5_PRIV_API_LEAVE (mid); // found + } + H5_PRIV_API_RETURN (-(low+1)); // not found +} + +//static int +//cmp_idxmap_items ( +// const void* _item1, +// const void* _item2 +// ) { +// h5_idxmap_el_t* item1 = (h5_idxmap_el_t*)_item1; +// h5_idxmap_el_t* item2 = (h5_idxmap_el_t*)_item2; +// +// if (item1->glb_idx < item2->glb_idx) return -1; +// if (item1->glb_idx > item2->glb_idx) return 1; +// +// return 0; +//} +static inline int //faster version +cmp_idxmap_items ( + const void* _item1, + const void* _item2 + ) { + return ((h5_idxmap_el_t*)_item1)->glb_idx - ((h5_idxmap_el_t*)_item2)->glb_idx; +} + +h5_err_t +h5priv_sort_idxmap ( + h5_idxmap_t* map + ) { + H5_PRIV_API_ENTER (h5_err_t, "map=%p", map); + qsort ( map->items, map->num_items, sizeof (map->items[0]), + cmp_idxmap_items); + H5_PRIV_API_RETURN (H5_SUCCESS); +} diff --git a/src/h5core/h5_maps_private.h b/src/h5core/h5_maps_private.h new file mode 100644 index 0000000..2b3802a --- /dev/null +++ b/src/h5core/h5_maps_private.h @@ -0,0 +1,213 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_MAPS_PRIVATE_H +#define __H5_MAPS_PRIVATE_H + +#include "h5_types_private.h" +#include "h5core/h5_debug.h" +#include "h5core/h5_errorhandling.h" +#include "h5core/h5_syscall.h" +#include "h5_debug_private.h" + +typedef struct { + size_t size; + size_t num_items; + char* items[1]; +} h5_strlist_t; + + +// Allocate new list +#define h5priv_alloc_xlist( type ) \ + static inline h5_err_t \ + h5priv_alloc_ ## type ## list ( \ + h5_ ## type ## list_t**list, \ + const int32_t size \ + ) { \ + H5_PRIV_API_ENTER (h5_err_t, "list=%p, size=%d", list, size); \ + TRY (*list = h5_calloc ( \ + 1, sizeof (**list)+size*sizeof ((*list)->items[0]))); \ + (*list)->size = size; \ + H5_PRIV_API_RETURN (H5_SUCCESS); \ + } +// Free list +#define h5priv_free_xlist( type ) \ + static inline h5_err_t \ + h5priv_free_ ## type ## list ( \ + h5_ ## type ## list_t**list \ + ) { \ + H5_PRIV_API_ENTER (h5_err_t, "list=%p", list); \ + if (*list == NULL) H5_PRIV_API_LEAVE (H5_SUCCESS); \ + TRY (h5_free (*list)); \ + *list = NULL; \ + H5_PRIV_API_RETURN (H5_SUCCESS); \ + } + +// Insert item +#define h5priv_insert_into_xlist( type ) \ + static inline h5_loc_idx_t \ + h5priv_insert_into_ ## type ## list ( \ + h5_ ## type ## list_t**list, \ + h5_ ## type ## _t id, \ + h5_loc_idx_t idx \ + ) { \ + H5_PRIV_API_ENTER (h5_err_t, \ + "list=%p, id=%llu, idx=%llu", \ + list, \ + (long long unsigned)id, \ + (long long unsigned)idx); \ + if (*list == NULL) { \ + TRY (h5priv_alloc_ ## type ## list (list, 2)); \ + } else if ((*list)->num_items == (*list)->size) { \ + h5_size_t size = (*list)->size; \ + if (size == 0) { \ + size = 2; \ + } else { \ + size *= 2; \ + } \ + size_t num_bytes = sizeof (**list) + (size-1)*sizeof((*list)->items[0]); \ + TRY (*list = h5_alloc (*list, num_bytes)); \ + (*list)->size = size; \ + } \ + h5_ ## type ## list_t* l = *list; \ + if (idx == -1) { \ + idx = l->num_items; \ + } else { \ + memmove ( \ + &l->items[idx+1], \ + &l->items[idx], \ + (l->num_items - idx) * sizeof (l->items[0])); \ + } \ + l->items[idx] = id; \ + l->num_items++; \ + H5_PRIV_API_RETURN (idx); \ + } + +// Find ID in sorted list +#define h5priv_find_in_xlist(type) \ + static inline h5_loc_idx_t \ + h5priv_find_in_ ## type ## list ( \ + h5_ ## type ## list_t* list, \ + const h5_ ## type ## _t item \ + ) { \ + H5_PRIV_API_ENTER (h5_err_t, \ + "list=%p, item=%llu", \ + list, (long long unsigned)item); \ + if (!list) { \ + H5_PRIV_API_LEAVE (-1); \ + } \ + register ssize_t low = 0; \ + register ssize_t mid; \ + register ssize_t high = list->num_items - 1; \ + while (low <= high) { \ + mid = (low + high) / 2; \ + if (list->items[mid] > item) \ + high = mid - 1; \ + else if (list->items[mid] < item) \ + low = mid + 1; \ + else \ + H5_PRIV_API_LEAVE (mid); \ + } \ + H5_PRIV_API_RETURN (-(low+1)); \ + } + + +// Search in sorted list. If item is not in list, add it. +#define h5priv_search_in_xlist( type ) \ + static inline h5_loc_idx_t \ + h5priv_search_in_ ## type ## list ( \ + h5_ ## type ## list_t**list, \ + h5_ ## type ## _t item \ + ) { \ + H5_PRIV_API_ENTER (h5_err_t, \ + "list=%p, item=%llu", \ + list, (long long unsigned)item); \ + h5_loc_idx_t idx = h5priv_find_in_ ## type ## list (*list, item); \ + if (idx < 0) { \ + idx = -(idx+1); \ + TRY (idx = h5priv_insert_into_ ## type ## list (list, item, idx)); \ + } \ + H5_PRIV_API_RETURN (idx); \ + } + + +h5priv_alloc_xlist (loc_idx) +h5priv_free_xlist (loc_idx) +h5priv_insert_into_xlist (loc_idx) +h5priv_find_in_xlist (loc_idx) +h5priv_search_in_xlist (loc_idx) + +h5priv_alloc_xlist (glb_idx) +h5priv_free_xlist (glb_idx) +h5priv_insert_into_xlist (glb_idx) +h5priv_find_in_xlist (glb_idx) +h5priv_search_in_xlist (glb_idx) + + +h5_err_t +h5priv_alloc_strlist (h5_strlist_t**, const h5_size_t); + +h5_err_t +h5priv_free_strlist (h5_strlist_t**); + +ssize_t +h5priv_insert_strlist (h5_strlist_t**, const char const*, size_t); + +ssize_t +h5priv_find_strlist (h5_strlist_t*, const char* const item); + +ssize_t +h5priv_search_strlist (h5_strlist_t**, const char* const); + +h5_err_t +h5priv_remove_strlist (h5_strlist_t*, const char* const); + +h5_err_t +h5priv_new_idxmap ( + h5_idxmap_t *map, + const h5_size_t size + ); + +static inline h5_err_t +h5priv_grow_idxmap ( + h5_idxmap_t* map, + const size_t size // grow to this size + ) { + H5_PRIV_API_ENTER (h5_err_t, + "map=%p, size=%llu", + map, (long long unsigned)size); + if (map->num_items >= size) + H5_PRIV_API_LEAVE (H5_SUCCESS); + int new = (map->items == NULL); + size_t size_in_bytes = size * sizeof (map->items[0]); + TRY (map->items = h5_alloc (map->items, size_in_bytes)); + map->size = size; + if (new) map->num_items = 0; + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5priv_insert_idxmap ( + h5_idxmap_t *map, + h5_glb_idx_t glb_idx, + h5_loc_idx_t loc_idx + ); + +h5_loc_idx_t +h5priv_search_idxmap ( + h5_idxmap_t *map, + h5_glb_idx_t value + ); + +h5_err_t +h5priv_sort_idxmap ( + h5_idxmap_t *map + ); + +#endif diff --git a/src/h5core/h5_model.c b/src/h5core/h5_model.c new file mode 100644 index 0000000..ad8cd1b --- /dev/null +++ b/src/h5core/h5_model.c @@ -0,0 +1,224 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include + +#include "h5core/h5.h" +#include "h5_types_private.h" +#include "h5_hdf5_private.h" +#include "h5_model_private.h" +#include "h5_mpi_private.h" +#include "h5_readwrite_private.h" +#include "h5_va_macros.h" + +h5_err_t +h5priv_close_step ( + const h5_file_p f + ) { + H5_PRIV_API_ENTER (h5_err_t, "f=%p", f); + if (f->step_gid <= 0) + H5_PRIV_API_LEAVE (H5_SUCCESS); + TRY (hdf5_close_group (f->step_gid)); + + f->step_gid = -1; + + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5_set_step ( + const h5_file_t f_, /*!< [in] Handle to open file */ + const h5_id_t step_idx /*!< [in] Step to set. */ + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, step_idx=%lld", + f, (long long)step_idx); + TRY (h5priv_close_step (f)); + f->step_idx = step_idx; + + sprintf ( + f->step_name, + "%s#%0*lld", + f->props->prefix_step_name, f->props->width_step_idx, + (long long) f->step_idx); + h5_info ( + "Open step #%lld for file %lld", + (long long)f->step_idx, + (long long)(size_t) f); + + TRY (f->step_gid = h5priv_open_group (is_writable(f), + f->file, + f->step_name)); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +/*! + Normalize HDF5 type +*/ +h5_int64_t +h5priv_normalize_h5_type ( + hid_t type + ) { + H5_CORE_API_ENTER (h5_int64_t, "type=%d", type); + H5T_class_t tclass; + int size; + TRY (tclass = H5Tget_class (type)); + TRY (size = H5Tget_size (type)); + + switch (tclass){ + case H5T_INTEGER: + if (size==8) { + H5_CORE_API_LEAVE (H5_INT64_T); + } else if (size==4) { + H5_CORE_API_LEAVE (H5_INT32_T); + } else if (size==2) { + H5_CORE_API_LEAVE (H5_INT16_T); + } + break; + case H5T_FLOAT: + if ( size==8 ) { + H5_CORE_API_LEAVE (H5_FLOAT64_T); + } + else if ( size==4 ) { + H5_CORE_API_LEAVE (H5_FLOAT32_T); + } + break; + case H5T_STRING: + H5_CORE_API_LEAVE (H5_STRING_T); + default: + ; /* NOP */ + } + H5_CORE_API_RETURN (h5_warn ("Unknown type %d", (int)type)); +} + +h5_int64_t +h5priv_get_dataset_type( + const hid_t group_id, + const char* dset_name + ) { + H5_CORE_API_ENTER (h5_int64_t, + "group_id=%d, dset_name='%s'", + group_id, dset_name); + hid_t dset_id; + hid_t hdf5_type; + h5_int64_t type; + TRY (dset_id = hdf5_open_dataset (group_id, dset_name)); + TRY (hdf5_type = hdf5_get_dataset_type (dset_id)); + TRY (type = h5priv_normalize_h5_type (hdf5_type)); + TRY (hdf5_close_type (hdf5_type)); + TRY (hdf5_close_dataset (dset_id)); + + H5_CORE_API_RETURN (type); +} + +h5_err_t +h5_has_step ( + const h5_file_t f_, /*!< [in] Handle to open file */ + const h5_id_t step_idx /*!< [in] Step number to query */ + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, "f=%p, step_idx=%lld", f, (long long)step_idx); + char name[2*H5_STEPNAME_LEN]; + sprintf (name, + "%s#%0*lld", + f->props->prefix_step_name, f->props->width_step_idx, (long long)step_idx); + H5_CORE_API_RETURN (hdf5_link_exists(f->file, name)); +} + +h5_err_t +h5priv_normalize_dataset_name ( + const char *name, + char *name2 + ) { + H5_CORE_API_ENTER (h5_err_t, "name='%s', name2='%p'", name, name2); + if ( strlen(name) > H5_DATANAME_LEN-1 ) { + strncpy ( name2, name, H5_DATANAME_LEN-1 ); + name2[H5_DATANAME_LEN-1] = '\0'; + h5_warn ("Truncated name '%s' to '%s'.", name, name2); + } else { + strcpy ( name2, name ); + } + + if ( strcmp( name2, H5BLOCK_GROUPNAME_BLOCK ) == 0 ) { + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "Can't create dataset or field with name '%s'" + " because it is reserved by H5Block.", + H5BLOCK_GROUPNAME_BLOCK)); + } + H5_CORE_API_RETURN (H5_SUCCESS); +} + +#ifdef PARALLEL_IO +h5_err_t +h5_set_throttle ( + const h5_file_t f_, + const int factor + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, "f=%p, factor=%d", f, factor); + if ( (f->props->mode & H5_VFD_MPIIO_IND) || (f->props->mode & H5_VFD_MPIPOSIX) ) { + f->props->throttle = factor; + h5_info ("Throttling enabled with factor = %lld", f->props->throttle ); + } else { + h5_warn ("Throttling is only permitted with the MPI-POSIX " + "or MPI-IO Independent VFD." ); + } + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5priv_start_throttle ( + const h5_file_p f + ) { + H5_CORE_API_ENTER (h5_err_t, "f=%p", f); + if (f->props->throttle > 0) { + int token = 1; + h5_info ("Throttling with factor = %lld", f->props->throttle); + if (f->myproc / f->props->throttle > 0) { + h5_debug ("throttle: waiting on token from %lld", + f->myproc - f->props->throttle); + // wait to receive token before continuing with read + TRY( h5priv_mpi_recv( + &token, 1, MPI_INT, + f->myproc - f->props->throttle, // receive from previous proc + f->myproc, // use this proc id as message tag + f->props->comm + ) ); + } + h5_debug ("throttle: received token"); + } + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5priv_end_throttle ( + const h5_file_p f + ) { + H5_PRIV_API_ENTER (h5_err_t, "f=%p", f); + if (f->props->throttle > 0) { + int token; + if (f->myproc + f->props->throttle < f->nprocs) { + // pass token to next proc + h5_debug ("throttle: passing token to %lld", + f->myproc + f->props->throttle); + TRY (h5priv_mpi_send( + &token, 1, MPI_INT, + f->myproc + f->props->throttle, // send to next proc + f->myproc + f->props->throttle, // use the id of the target as tag + f->props->comm + )); + } + } + H5_PRIV_API_RETURN (H5_SUCCESS); +} +#endif // PARALLEL_IO diff --git a/src/h5core/h5_model_private.h b/src/h5core/h5_model_private.h new file mode 100644 index 0000000..e3aecb2 --- /dev/null +++ b/src/h5core/h5_model_private.h @@ -0,0 +1,45 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_MODEL_PRIVATE_H +#define __H5_MODEL_PRIVATE_H + + +/* WARNING! Changing these values will alter the data model and introduce + * file incompatibilities with previous versions. */ + +#define H5_MAX_NAME_LEN 64 +#define H5_DATANAME_LEN H5_MAX_NAME_LEN +#define H5_STEPNAME_LEN H5_MAX_NAME_LEN +#define H5_STEPNAME "Step" +#define H5_STEPWIDTH 1 +#define H5BLOCK_GROUPNAME_BLOCK "Block" +#define H5_BLOCKNAME_X "0" +#define H5_BLOCKNAME_Y "1" +#define H5_BLOCKNAME_Z "2" +#define H5_ATTACHMENT "Attachment" + +#include "h5core/h5_types.h" +#include "h5core/h5_model.h" + + +h5_err_t +h5priv_start_throttle ( + const h5_file_p); + +h5_err_t +h5priv_end_throttle ( + const h5_file_p); + +h5_err_t +h5priv_close_step ( + const h5_file_p f + ); + +#endif diff --git a/src/h5core/h5_mpi.c b/src/h5core/h5_mpi.c new file mode 100644 index 0000000..dd18c5a --- /dev/null +++ b/src/h5core/h5_mpi.c @@ -0,0 +1,246 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5core/h5.h" +#include "h5core/h5_types.h" +#include "h5_debug_private.h" + +#ifdef PARALLEL_IO + +// barrier +h5_err_t +h5priv_mpi_barrier ( + const MPI_Comm comm + ) { + MPI_WRAPPER_ENTER (h5_err_t, "comm=%p",&comm); + int err = MPI_Barrier(comm); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_MPI, + "MPI Barrier was not successful")); + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + +// communication routines +h5_err_t +h5priv_mpi_recv( + void* buf, + const int count, + const MPI_Datatype type, + const int from, + const int tag, + const MPI_Comm comm + ) { + MPI_WRAPPER_ENTER (h5_err_t, + "buf=%p, count=%d, type=?, from=%d, tag=%d, comm=?", + buf, count, from, tag); + int err = MPI_Recv( + buf, + count, + type, + from, + tag, + comm, + MPI_STATUS_IGNORE + ); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE (h5_error (H5_ERR_MPI, "Cannot receive data")); + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + +h5_err_t +h5priv_mpi_send( + void* buf, + const int count, + const MPI_Datatype type, + const int to, + const int tag, + const MPI_Comm comm + ) { + MPI_WRAPPER_ENTER (h5_err_t, + "buf=%p, count=%d, type=?, to=%d, tag=%d, comm=?", + buf, count, to, tag); + int err = MPI_Send( + buf, + count, + type, + to, + tag, + comm + ); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE (h5_error (H5_ERR_MPI, "Cannot send data")); + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + +h5_err_t +h5priv_mpi_bcast ( + void* buf, + const int count, + const MPI_Datatype type, + const int root, + const MPI_Comm comm + ) { + MPI_WRAPPER_ENTER (h5_err_t, + "buf=%p, count=%d, type=?, root=%d, comm=?", + buf, count, root); + int err = MPI_Bcast( + buf, + count, + type, + root, + comm + ); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE (h5_error (H5_ERR_MPI, "Cannot perform broadcast")); + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + + + +h5_err_t +h5priv_mpi_sum ( + void* sendbuf, + void* recvbuf, + const int count, + const MPI_Datatype type, + const MPI_Comm comm + ) { + MPI_WRAPPER_ENTER (h5_err_t, + "sendbuf=%p, recvbuf=%p, count=%d, type=?, comm=?", + sendbuf, recvbuf, count); + int err = MPI_Allreduce( + sendbuf, + recvbuf, + count, + type, + MPI_SUM, + comm + ); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE (h5_error (H5_ERR_MPI, "Cannot perform sum reduction")); + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + +h5_err_t +h5priv_mpi_prefix_sum ( + void* sendbuf, + void* recvbuf, + const int count, + const MPI_Datatype type, + const MPI_Comm comm + ) { + MPI_WRAPPER_ENTER (h5_err_t, + "sendbuf=%p, recvbuf=%p, count=%d, type=?, comm=?", + sendbuf, recvbuf, count); + int err = MPI_Scan( + sendbuf, + recvbuf, + count, + type, + MPI_SUM, + comm + ); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE (h5_error (H5_ERR_MPI, "Cannot perform prefix sum")); + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + + +// +h5_err_t +h5priv_mpi_comm_size ( + MPI_Comm comm, + int* size + ) { + MPI_WRAPPER_ENTER (h5_err_t, "comm=?, size=%p", size); + int err = MPI_Comm_size (comm, size); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE (h5_error (H5_ERR_MPI, "Cannot get communicator size")); + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + + +h5_err_t +h5priv_mpi_comm_rank ( + MPI_Comm comm, + int* rank + ) { + MPI_WRAPPER_ENTER (h5_err_t, "comm=?, rank=%p", rank); + int err = MPI_Comm_rank (comm, rank); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE (h5_error (H5_ERR_MPI, "Cannot get this task's rank")); + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + +h5_err_t +h5priv_mpi_type_contiguous ( + const size_t nelems, + const MPI_Datatype oldtype, + MPI_Datatype *const newtype + ) { + MPI_WRAPPER_ENTER (h5_err_t, "nelems=%lu, oldtype=?, newtype=?", (long unsigned)nelems); + int err; + err = MPI_Type_contiguous ( nelems, oldtype, newtype ); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE (h5_error (H5_ERR_MPI, "Cannot create new MPI type")); + err = MPI_Type_commit ( newtype ); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE (h5_error (H5_ERR_MPI, "Cannot commit new MPI type")); + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + +h5_err_t +h5priv_mpi_type_free ( + MPI_Datatype *type + ) { + MPI_WRAPPER_ENTER (h5_err_t, "type=%p", type); + int err = MPI_Type_free( type ); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE (h5_error(H5_ERR_MPI, "Cannot free MPI type")); + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + +h5_err_t +h5priv_mpi_cart_create ( + MPI_Comm old_comm, + int ndims, + int *dims, + int *period, + int reorder, + MPI_Comm *new_comm + ) { + MPI_WRAPPER_ENTER (h5_err_t, "old_comm=?, ndims=%d, dims=%p, period=%p, " + "reorder=%d, new_comm=%p", + ndims, dims, period, reorder, new_comm); + int err = MPI_Cart_create( + old_comm, ndims, dims, period, reorder, new_comm); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE (h5_error(H5_ERR_MPI, "Cannot create cartesian grid")); + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + +h5_err_t +h5priv_mpi_cart_coords ( + MPI_Comm comm, + int rank, + int maxdim, + int *coords + ) { + MPI_WRAPPER_ENTER (h5_err_t, "comm=?, rank=%d, maxdim=%d, coords=%p", + rank, maxdim, coords); + int err = MPI_Cart_coords( comm, rank, maxdim, coords ); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE (h5_error(H5_ERR_MPI, "Cannot create cartesian grid")); + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + +#endif // PARALLEL_IO + diff --git a/src/h5core/h5_mpi_private.h b/src/h5core/h5_mpi_private.h new file mode 100644 index 0000000..bbb7782 --- /dev/null +++ b/src/h5core/h5_mpi_private.h @@ -0,0 +1,299 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_MPI_PRIVATE_H +#define __H5_MPI_PRIVATE_H + +#ifdef PARALLEL_IO + +#include "h5core/h5_types.h" +#include "h5core/h5_errorhandling.h" +#include "h5_debug_private.h" + +static inline h5_err_t +h5priv_mpi_alltoall ( + void* sendbuf, + const int sendcount, + const MPI_Datatype sendtype, + void* recvbuf, + const int recvcount, + const MPI_Datatype recvtype, + const MPI_Comm comm + ) { + MPI_WRAPPER_ENTER (h5_err_t, + "sendbuf=%p, sendcount=%d, sendtype=?, recvbuf=%p, " + "recvcount=%d, recvtype=?, comm=?", + sendbuf, sendcount, recvbuf, recvcount); + int err = MPI_Alltoall ( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + comm); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_MPI, + "Cannot perform all to all communication")); + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +h5priv_mpi_alltoallv ( + void* sendbuf, + int* sendcounts, + int* senddispls, + const MPI_Datatype sendtype, + void* recvbuf, + int* recvcounts, + int* recvdispls, + const MPI_Datatype recvtype, + const MPI_Comm comm + ) { + MPI_WRAPPER_ENTER (h5_err_t, + "sendbuf=%p, sendcounts=%p, senddispls=%p, sendtype=?, " + "recvbuf=%p, recvcounts=%p, recvdispls=%p, recvtype=?, " + "comm=?", + sendbuf, sendcounts, senddispls, + recvbuf, recvcounts, recvdispls); + int err = MPI_Alltoallv ( + sendbuf, + sendcounts, + senddispls, + sendtype, + recvbuf, + recvcounts, + recvdispls, + recvtype, + comm); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_MPI, + "Cannot perform all to all communication")); + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + + +h5_err_t +h5priv_mpi_barrier ( + const MPI_Comm comm + ); + + +h5_err_t +h5priv_mpi_recv( + void* buf, + const int count, + const MPI_Datatype type, + const int from, + const int tag, + const MPI_Comm comm + ); + +h5_err_t +h5priv_mpi_send( + void* buf, + const int count, + const MPI_Datatype type, + const int to, + const int tag, + const MPI_Comm comm + ); + +h5_err_t +h5priv_mpi_bcast ( + void* buf, + const int count, + const MPI_Datatype type, + const int root, + const MPI_Comm comm + ); + +h5_err_t +h5priv_mpi_sum ( + void* sendbuf, + void* recvbuf, + const int count, + const MPI_Datatype type, + const MPI_Comm comm + ); + +h5_err_t +h5priv_mpi_prefix_sum ( + void* sendbuf, + void* recvbuf, + const int count, + const MPI_Datatype type, + const MPI_Comm comm + ); + +#define h5priv_mpi_allgather mpi_allgather +static inline h5_err_t +mpi_allgather ( + void* sendbuf, + const int sendcount, + const MPI_Datatype sendtype, + void* recvbuf, + const int recvcount, + const MPI_Datatype recvtype, + const MPI_Comm comm + ) { + MPI_WRAPPER_ENTER (h5_err_t, + "sendbuf=%p, sendcount=%d, sendtype=?, recvbuf=%p, " + "recvcount=%d, recvtype=?, comm=?", + sendbuf, sendcount, recvbuf, recvcount); + int err = MPI_Allgather ( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcount, + recvtype, + comm); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE (h5_error (H5_ERR_MPI, "Cannot gather data")); + MPI_WRAPPER_RETURN (H5_SUCCESS); +} +#define h5priv_mpi_allgatherv mpi_allgatherv +static inline h5_err_t +mpi_allgatherv ( + void* sendbuf, + const int sendcount, + const MPI_Datatype sendtype, + void* recvbuf, + int* recvcounts, + int* recvdispls, + const MPI_Datatype recvtype, + const MPI_Comm comm + ) { + MPI_WRAPPER_ENTER (h5_err_t, + "sendbuf=%p, sendcount=%d, sendtype=?, " + "recvbuf=%p, recvcounts=%p, recvtype=?, recvdispls=%p, " + "&comm=%p", + sendbuf, sendcount, recvbuf, recvcounts, recvdispls, &comm); + int err = MPI_Allgatherv ( + sendbuf, + sendcount, + sendtype, + recvbuf, + recvcounts, + recvdispls, + recvtype, + comm); + if (err != MPI_SUCCESS) + MPI_WRAPPER_LEAVE (h5_error (H5_ERR_MPI, "Cannot gather data")); + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + +/// +h5_err_t +h5priv_mpi_comm_size ( + MPI_Comm comm, + int* size + ); + +h5_err_t +h5priv_mpi_comm_rank ( + MPI_Comm comm, + int* rank + ); + +// MPI type wrappers +h5_err_t +h5priv_mpi_type_contiguous ( + const size_t nelems, + const MPI_Datatype oldtype, + MPI_Datatype *newtype + ); + +#define h5priv_mpi_get_address mpi_get_address +static inline h5_err_t +mpi_get_address ( + void* location, + MPI_Aint* address + ) { + MPI_WRAPPER_ENTER (h5_err_t, "location=%p, address=%p", location, address); + int err = MPI_Get_address (location, address); + if (err != MPI_SUCCESS) { + MPI_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_MPI, + "Cannot get MPI address of location=%p", location)); + } + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + +#define h5priv_mpi_create_type_struct mpi_create_type_struct +static inline h5_err_t +mpi_create_type_struct ( + int count, + int blocklens[], + MPI_Aint indices[], + MPI_Datatype old_types[], + MPI_Datatype* new_type + ) { + MPI_WRAPPER_ENTER (h5_err_t, + "count=%d, blocklens=%p, indices=%p, old_types=%p, new_type=%p", + count, blocklens, indices, old_types, new_type); + int err = MPI_Type_create_struct (count, blocklens, indices, old_types, new_type); + if (err != MPI_SUCCESS) { + MPI_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_MPI, + "Cannot create new MPI struct")); + } + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +h5priv_mpi_type_commit ( + MPI_Datatype* type + ) { + MPI_WRAPPER_ENTER (h5_err_t, "type=%p", type); + int err = MPI_Type_commit (type); + if (err != MPI_SUCCESS) { + MPI_WRAPPER_LEAVE ( + h5_error ( + H5_ERR_MPI, + "Cannot commit MPI datatype")); + } + MPI_WRAPPER_RETURN (H5_SUCCESS); +} + +h5_err_t +h5priv_mpi_type_free ( + MPI_Datatype *type + ); + + +// +h5_err_t +h5priv_mpi_cart_create ( + MPI_Comm old_comm, + int ndims, + int *dims, + int *period, + int reorder, + MPI_Comm *new_comm + ); + +h5_err_t +h5priv_mpi_cart_coords ( + MPI_Comm comm, + int rank, + int maxdim, + int *coords + ); + + +#endif +#endif diff --git a/src/h5core/h5_openclose.c b/src/h5core/h5_openclose.c new file mode 100644 index 0000000..c7dc041 --- /dev/null +++ b/src/h5core/h5_openclose.c @@ -0,0 +1,634 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include +#include +#include + +#include "h5core/h5.h" + +#include "h5_private.h" +#include "h5_hdf5_private.h" + +#include "h5_model_private.h" +#include "h5_mpi_private.h" +#include "h5u_readwrite_private.h" +#include "h5b_readwrite_private.h" + +#include "h5core/h5_errorhandling.h" +#include "h5core/h5_syscall.h" + +/*! + \ingroup h5_core + \defgroup h5_core_filehandling +*/ + +/*! + \ingroup h5_core_filehandling + + Check whether \c f points to a valid file handle. + + \return H5_SUCCESS or error code +*/ +h5_err_t +h5_check_filehandle ( + const h5_file_t f_ /*!< filehandle to check validity of */ + ) { + h5_file_p f = (h5_file_p)f_; + if (f == NULL || f_ == H5_FAILURE || f->file < 0 || f->u == NULL || f->b == NULL) { + return h5_error ( + H5_ERR_BADF, + "Called with bad filehandle."); + } + return H5_SUCCESS; +} + +/*! + Initialize H5Part +*/ +static herr_t +hdf5_error_handler ( + hid_t estack_id, + void* __f + ) { + UNUSED_ARGUMENT (__f); + if (h5_get_debuglevel() >= 5) { + H5Eprint (estack_id, stderr); + } + return 0; +} + +static inline h5_err_t +mpi_init ( + const h5_file_p f + ) { + H5_INLINE_FUNC_ENTER (h5_err_t); +#ifdef PARALLEL_IO + TRY (h5priv_mpi_comm_size (f->props->comm, &f->nprocs)); + TRY (h5priv_mpi_comm_rank (f->props->comm, &f->myproc)); + + /* xfer_prop: also used for parallel I/O, during actual writes + rather than the access_prop which is for file creation. */ + TRY (f->props->xfer_prop = hdf5_create_property(H5P_DATASET_XFER)); + TRY (f->props->access_prop = hdf5_create_property(H5P_FILE_ACCESS)); + + /* select the HDF5 VFD */ + if (f->props->mode & H5_VFD_MPIPOSIX) { + h5_info("Selecting MPI-POSIX VFD"); + hbool_t use_gpfs = 0; // TODO autodetect GPFS? + TRY (hdf5_set_fapl_mpiposix_property (f->props->access_prop, + f->props->comm, use_gpfs)); + + } else if (f->props->mode & H5_VFD_CORE) { + h5_info("Selecting CORE VFD"); + TRY (hdf5_set_fapl_core (f->props->access_prop, + f->props->align, 1)); + } else { + h5_info("Selecting MPI-IO VFD"); + TRY (hdf5_set_fapl_mpio_property (f->props->access_prop, + f->props->comm, MPI_INFO_NULL)); + if (f->props->mode & H5_VFD_MPIIO_IND) { + h5_info("MPI-IO: Using independent mode"); + } else { + h5_info("MPI-IO: Using collective mode"); + TRY (hdf5_set_dxpl_mpio_property (f->props->xfer_prop, + H5FD_MPIO_COLLECTIVE) ); + } + } +#ifdef H5_USE_LUSTRE + if (f->flags & H5_FS_LUSTRE) { + TRY (h5_optimize_for_lustre(f, filename)); + } +#endif +#endif /* PARALLEL_IO */ + H5_INLINE_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +set_alignment ( + const h5_file_p f + ) { + H5_INLINE_FUNC_ENTER (h5_err_t); + if ( f->props->align != 0 ) { + h5_info ("Setting HDF5 alignment to %llu bytes " + "with threshold at half that many bytes.", + f->props->align); + TRY (hdf5_set_alignment_property ( + f->props->access_prop, + f->props->align / 2, + f->props->align)); + h5_info ("Setting HDF5 meta block to %llu bytes", f->props->align); + TRY (H5Pset_meta_block_size (f->props->access_prop, f->props->align)); + } + H5_INLINE_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +set_default_file_props ( + h5_prop_file_t* props + ) { + H5_INLINE_FUNC_ENTER (h5_err_t); + h5_prop_file_t* file_props = (h5_prop_file_t*)props; + bzero (file_props, sizeof (file_props)); + file_props->class = H5_PROP_FILE; + TRY (file_props->prefix_step_name = h5_calloc (1, H5_STEPNAME_LEN)); + strncpy ( + file_props->prefix_step_name, + H5_STEPNAME, + H5_STEPNAME_LEN - 1); + file_props->width_step_idx = H5_STEPWIDTH; + H5_INLINE_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +h5_set_prop_file_mpio ( + h5_prop_t _prop, + MPI_Comm* comm + ) { + h5_prop_p prop = (h5_prop_p)_prop; + H5_CORE_API_ENTER (h5_err_t, "prop=%p, comm=%p", prop, comm); + + if (prop->class != H5_PROP_FILE) { + H5_INLINE_FUNC_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "Invalid property class: %lld", prop->class)); + } + h5_prop_file_t* file_prop = (h5_prop_file_t*)prop; + file_prop->comm = *comm; + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5_set_prop_file_align ( + h5_prop_t _prop, + h5_int64_t align + ) { + h5_prop_p prop = (h5_prop_p)_prop; + H5_CORE_API_ENTER (h5_err_t, "prop=%p, align=%lld", prop, align); + if (prop->class != H5_PROP_FILE) { + H5_INLINE_FUNC_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "Invalid property class: %lld", prop->class)); + } + h5_prop_file_t* file_prop = (h5_prop_file_t*)prop; + file_prop->align = align; + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5_set_prop_file_throttle ( + h5_prop_t _prop, + h5_int64_t throttle + ) { + h5_prop_p prop = (h5_prop_p)_prop; + H5_CORE_API_ENTER (h5_err_t, "prop=%p, throttle=%lld", prop, throttle); + if (prop->class != H5_PROP_FILE) { + H5_INLINE_FUNC_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "Invalid property class: %lld", prop->class)); + } + h5_prop_file_t* file_prop = (h5_prop_file_t*)prop; + file_prop->throttle = throttle; + H5_CORE_API_RETURN (H5_SUCCESS); +} + + +h5_prop_t +h5_create_prop ( + h5_int64_t class + ) { + H5_CORE_API_ENTER (h5_prop_t, + "class=%lld", class); + h5_prop_t* prop; + switch (class) { + case H5_PROP_FILE: + TRY (prop = h5_calloc (1, sizeof (h5_prop_file_t))); + set_default_file_props ((h5_prop_file_t*)prop); + break; + default: + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "Invalid property class: %lld", class)); + } + H5_CORE_API_RETURN ((h5_prop_t)prop); +} + +h5_err_t +h5_close_prop ( + h5_prop_t _prop + ) { + h5_prop_p prop = (h5_prop_p)_prop; + H5_CORE_API_ENTER (h5_err_t, "prop=%p", prop); + switch (prop->class) { + case H5_PROP_FILE: { + h5_prop_file_t* file_prop = (h5_prop_file_t*)prop; + TRY (h5_free (file_prop->prefix_step_name)); + break; + } + default: + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "Invalid property class: %lld", prop->class)); + } + H5_CORE_API_RETURN (h5_free (prop)); +} + +static inline h5_err_t +open_file ( + const h5_file_p f, + const char* const filename, + h5_int32_t mode + ) { + H5_INLINE_FUNC_ENTER (h5_err_t); + h5_info ("Opening file %s.", filename); + + f->props->mode = mode; + + f->nprocs = 1; // queried later + f->myproc = 0; // queried later + f->step_gid = -1; + + TRY (f->step_name = h5_calloc (2, H5_STEPNAME_LEN)); + sprintf ( + f->step_name, + "%s#%0*lld", + f->props->prefix_step_name, + f->props->width_step_idx, (long long)f->step_idx); + + TRY (hdf5_set_errorhandler (H5E_DEFAULT, hdf5_error_handler, NULL)); + + f->props->xfer_prop = f->props->access_prop = H5P_DEFAULT; + TRY (f->props->create_prop = hdf5_create_property (H5P_FILE_CREATE)); + TRY (mpi_init (f)); // noop if serial + TRY (set_alignment (f)); + + if (f->props->mode & H5_O_RDONLY) { + f->file = H5Fopen (filename, H5F_ACC_RDONLY, f->props->access_prop); + } + else if (f->props->mode & H5_O_WRONLY){ + f->file = H5Fcreate (filename, H5F_ACC_TRUNC, f->props->create_prop, + f->props->access_prop); + f->empty = 1; + } + else if (f->props->mode & H5_O_APPEND || f->props->mode & H5_O_RDWR) { + int fd = open (filename, O_RDONLY, 0); + if ((fd == -1) && (errno == ENOENT)) { + f->file = H5Fcreate (filename, H5F_ACC_TRUNC, + f->props->create_prop, f->props->access_prop); + f->empty = 1; + } + else if (fd != -1) { + close (fd); + f->file = H5Fopen (filename, H5F_ACC_RDWR, + f->props->access_prop); + } + } + else { + H5_PRIV_FUNC_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "Invalid file access mode '%lld'.", f->props->mode)); + } + + if (f->file < 0) + H5_PRIV_FUNC_LEAVE ( + h5_error ( + H5_ERR_HDF5, + "Cannot open file '%s' with mode '%lld'", + filename, f->props->mode)); + TRY (f->root_gid = hdf5_open_group (f->file, "/" )); + + TRY (h5upriv_open_file (f)); + TRY (h5bpriv_open_file (f)); + + H5_INLINE_FUNC_RETURN (H5_SUCCESS); +} + +h5_file_t +h5_open_file2 ( + const char* filename, + h5_int32_t mode, + h5_prop_t props_ + ) { + h5_prop_file_t* props = (h5_prop_file_t*)props_; + H5_CORE_API_ENTER (h5_file_t, + "filename='%s', mode=%d, props=%p", + filename, mode, props); + + h5_file_p f = NULL; + TRY (f = h5_calloc (1, sizeof (*f))); + + TRY (f->props = (h5_prop_file_t*)h5_create_prop (H5_PROP_FILE)); + TRY (set_default_file_props (f->props)); + TRY (h5_set_stepname_fmt ((uintptr_t)f, H5_STEPNAME, H5_STEPWIDTH)); + + if (props != H5_PROP_DEFAULT) { + if (props->class != H5_PROP_FILE) { + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "Invalid property class: %lld.", + props->class)); + } + f->props->comm = props->comm; + f->props->mode |= props->mode; + f->props->throttle = props->throttle; + f->props->align = props->align; + + strncpy ( + f->props->prefix_step_name, + props->prefix_step_name, + H5_STEPNAME_LEN - 1); + f->props->width_step_idx = props->width_step_idx; + } + + TRY (open_file (f, filename, mode)); + + H5_CORE_API_RETURN ((h5_file_t)f); +} + +/*! + \ingroup h5_core_filehandling + + Open file with name \c filename. This function is available in the paralell + and serial version. In the serial case \c comm may have any value. + + \param[in] filename The name of the data file to open. + \param[in] flags The access mode for the file. + \param[in] comm MPI communicator + \param[in] align Number of bytes for setting alignment, + metadata block size, etc. Set to 0 to disable. + + \return File handle. + \return H5_ERR on error. +*/ + +h5_file_t +h5_open_file ( + const char* filename, + h5_int32_t mode, + MPI_Comm comm, + h5_size_t align + ) { + H5_CORE_API_ENTER (h5_file_t, + "filename='%s', mode=%d, comm=?, align=%llu", + filename, mode, align); + h5_prop_file_t* props; + h5_file_t f; + TRY (props = (h5_prop_file_t*)h5_create_prop (H5_PROP_FILE)); + TRY (h5_set_prop_file_mpio ((h5_prop_t)props, &comm)); + TRY (h5_set_prop_file_align ((h5_prop_t)props, align)); + TRY (f = h5_open_file2 (filename, mode, (h5_prop_t)props)); + TRY (h5_close_prop ((h5_prop_t)props)); + H5_CORE_API_RETURN (f); + +} +#if 0 +h5_file_t +h5_open_file ( + const char* filename, + h5_int32_t mode, + MPI_Comm comm, + h5_size_t align + ) { + H5_CORE_API_ENTER (h5_file_t, + "filename='%s', mode=%d, comm=?, align=%llu", + filename, mode, align); + h5_prop_file_t* props; + TRY (props = (h5_prop_file_t*)h5_create_prop (H5_PROP_FILE)); + TRY (set_default_file_props (props)); + + TRY (h5_set_prop_file_mpio ((h5_prop_t)props, &comm)); + TRY (h5_set_prop_file_align ((h5_prop_t)props, align)); + + h5_file_p f = NULL; + TRY (f = h5_calloc (1, sizeof (*f))); + f->props = props; + TRY (open_file (f, filename, mode)); + + H5_CORE_API_RETURN ((h5_file_t)f); +} +#endif + +/*! + \ingroup h5_core_filehandling + + The h5_close_file() call writes all buffered data to disk, releases + all previously allocated memory and terminates access to the associated + HDF5 file. + + \return H5_SUCCESS or error code +*/ +h5_err_t +h5_close_file ( + const h5_file_t f_ /*!< file handle */ + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, "f=%p", f); + h5_errno = H5_SUCCESS; + + CHECK_FILEHANDLE (f); + + TRY (h5priv_close_step (f)); + TRY (h5upriv_close_file (f)); + TRY (h5bpriv_close_file (f)); + TRY (hdf5_close_property (f->props->xfer_prop)); + TRY (hdf5_close_property (f->props->access_prop)); + TRY (hdf5_close_property (f->props->create_prop)); + TRY (hdf5_close_group (f->root_gid)); + TRY (hdf5_flush (f->file, H5F_SCOPE_GLOBAL)); + TRY (h5_close_prop ((h5_prop_t)f->props)); + TRY (hdf5_close_file (f->file)); + TRY (h5_free (f->step_name)); + TRY (h5_free (f)); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5_close_hdf5 ( + void + ) { + H5_CORE_API_ENTER (h5_err_t, "%s", ""); + H5_CORE_API_RETURN (hdf5_close ()); +} + +h5_err_t +h5_flush_step ( + const h5_file_t f_ + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, "f=%p", f); + H5_CORE_API_RETURN (hdf5_flush (f->step_gid, H5F_SCOPE_LOCAL)); +} + +h5_err_t +h5_flush_file ( + const h5_file_t f_ + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, "f=%p", f); + H5_CORE_API_RETURN (hdf5_flush (f->file, H5F_SCOPE_GLOBAL)); +} + + +/*! + \ingroup h5_core_filehandling + + Define format of the step names. + + Example: ==H5FedDefineStepNameFormat( f, "Step", 6 )== defines step names + like ==Step#000042==. + + \return \c H5_SUCCESS or error code +*/ +h5_err_t +h5_set_stepname_fmt ( + const h5_file_t f_, + const char* name, + int width + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, name='%s', width=%d", + f, name, width); + if (width < 0) width = 0; + else if (width > H5_STEPNAME_LEN - 1) width = H5_STEPNAME_LEN - 1; + strncpy ( + f->props->prefix_step_name, + name, + H5_STEPNAME_LEN - 1); + f->props->width_step_idx = width; + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +/*! + \ingroup h5_core_filehandling + + Get format of the step names. + + \return \c H5_SUCCESS or error code +*/ +h5_err_t +h5_get_stepname_fmt ( + const h5_file_t f_, /*!< Handle to file */ + char* name, /*!< OUT: Prefix */ + int l_name, /*!< length of buffer name */ + int* width /*!< OUT: Width of the number */ + ) { + h5_file_p f = (h5_file_p)f_; + UNUSED_ARGUMENT (f); + UNUSED_ARGUMENT (name); + UNUSED_ARGUMENT (l_name); + UNUSED_ARGUMENT (width); + return h5_error_not_implemented (); +} + +/*! + \ingroup h5_core_filehandling + + Get current step number. + + \return Current step number or error code +*/ +h5_id_t +h5_get_step ( + const h5_file_t f_ /*!< file handle */ + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (h5_id_t, "f=%p", f); + H5_CORE_API_RETURN (f->step_idx); +} + +/*! + \ingroup h5_core_filehandling + + Get number of processes. + + \return Number of processes or error code +*/ +int +h5_get_num_procs ( + const h5_file_t f_ /*!< file handle */ + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (int, "f=%p", f); + H5_CORE_API_RETURN (f->nprocs); +} + +/*! + \ingroup h5_core_filehandling + + Provides access to the underlying HDF5 file handle. + + \return Number of steps or error code +*/ +hid_t +h5_get_hdf5_file( + const h5_file_t f_ /*!< file handle */ + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (hid_t, "f=%p", f); + H5_CORE_API_RETURN (f->file); +} + +/*! + \ingroup h5_core_filehandling + + Get number of steps. + + \return Number of steps or error code +*/ +h5_ssize_t +h5_get_num_steps( + const h5_file_t f_ /*!< file handle */ + ) { + h5_file_p f = (h5_file_p)f_; + H5_CORE_API_ENTER (int, "f=%p", f); + H5_CORE_API_RETURN (hdf5_get_num_groups_matching_prefix ( + f->root_gid, + f->props->prefix_step_name)); +} + +/*! + \ingroup h5_core_filehandling + + Start traversing steps. + + \return \c H5_SUCCESS or error code +*/ +h5_err_t +h5_start_traverse_steps ( + const h5_file_t f_ /*!< file handle */ + ) { + h5_file_p f = (h5_file_p)f_; + UNUSED_ARGUMENT (f); + return h5_error_not_implemented (); +} + +/*! + \ingroup h5_core_filehandling + + Go to next step. + + \return \c H5_SUCCESS or error code +*/ +h5_err_t +h5_traverse_steps ( + const h5_file_t f_ /*!< file handle */ + ) { + h5_file_p f = (h5_file_p)f_; + UNUSED_ARGUMENT (f); + return h5_error_not_implemented (); +} diff --git a/src/h5core/h5_private.h b/src/h5core/h5_private.h new file mode 100644 index 0000000..4910050 --- /dev/null +++ b/src/h5core/h5_private.h @@ -0,0 +1,22 @@ +#ifndef __H5_PRIVATE_H +#define __H5_PRIVATE_H + +#include "h5_types_private.h" +#include "h5_errorhandling_private.h" + +static inline h5_err_t +check_filehandle ( + const h5_file_p f + ) { + if (f == NULL || f->file < 0 || f->u == NULL || f->b == NULL) { + return h5_error ( + H5_ERR_BADF, + "Called with bad filehandle."); + } + return H5_SUCCESS; +} + +#define CHECK_FILEHANDLE(f) \ + TRY (check_filehandle (f)); + +#endif diff --git a/src/h5core/h5_qsort.c b/src/h5core/h5_qsort.c new file mode 100644 index 0000000..965686b --- /dev/null +++ b/src/h5core/h5_qsort.c @@ -0,0 +1,197 @@ +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)qsort.c 8.1 (Berkeley) 6/4/93"; +#endif /* LIBC_SCCS and not lint */ +#include + +#include + +#include "h5_qsort_private.h" + +#ifdef I_AM_QSORT_R +typedef int cmp_t (void *, const void *, const void *); +#else +typedef int cmp_t (const void *, const void *); +#endif +static inline char *med3(char *, char *, char *, cmp_t *, void *); +static inline void swapfunc(char *, char *, int, int); + +#define min(a, b) (a) < (b) ? a : b + +/* + * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". + */ +#define swapcode(TYPE, parmi, parmj, n) { \ + long i = (n) / sizeof (TYPE); \ + TYPE *pi = (TYPE *) (parmi); \ + TYPE *pj = (TYPE *) (parmj); \ + do { \ + TYPE t = *pi; \ + *pi++ = *pj; \ + *pj++ = t; \ + } while (--i > 0); \ +} + +#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ + es % sizeof(long) ? 2 : es == sizeof(long) ? 0 : 1; + +static inline void +swapfunc(char* a, char* b, int n, int swaptype) { + if(swaptype <= 1) + swapcode(long, a, b, n) + else + swapcode(char, a, b, n) + } + +#define swap(a, b) \ + if (swaptype == 0) { \ + long t = *(long *)(a); \ + *(long *)(a) = *(long *)(b); \ + *(long *)(b) = t; \ + } else \ + swapfunc(a, b, es, swaptype) + +#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype) + +#ifdef I_AM_QSORT_R +#define CMP(t, x, y) (cmp((t), (x), (y))) +#else +#define CMP(t, x, y) (cmp((x), (y))) +#endif + + static inline char * + med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk +#ifndef I_AM_QSORT_R +#if __GNUC__ + __attribute__((unused)) +#endif +#endif + ) + { + return CMP(thunk, a, b) < 0 ? + (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a )) + : (CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); + } + +#ifdef I_AM_QSORT_R + void + h5priv_qsort_r (void* a, size_t n, size_t es, void* thunk, cmp_t* cmp) +#else +#define thunk NULL + void + h5priv_qsort (void* a, size_t n, size_t es, cmp_t* cmp) +#endif + { + char *pa, *pb, *pc, *pd, *pl, *pm, *pn; + int d, r, swaptype, swap_cnt; + +loop: SWAPINIT(a, es); + swap_cnt = 0; + if (n < 7) { + for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) + for (pl = pm; + pl > (char *)a && CMP(thunk, pl - es, pl) > 0; + pl -= es) + swap(pl, pl - es); + return; + } + pm = (char *)a + (n / 2) * es; + if (n > 7) { + pl = a; + pn = (char *)a + (n - 1) * es; + if (n > 40) { + d = (n / 8) * es; + pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk); + pm = med3(pm - d, pm, pm + d, cmp, thunk); + pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk); + } + pm = med3(pl, pm, pn, cmp, thunk); + } + swap(a, pm); + pa = pb = (char *)a + es; + + pc = pd = (char *)a + (n - 1) * es; + for (;; ) { + while (pb <= pc && (r = CMP(thunk, pb, a)) <= 0) { + if (r == 0) { + swap_cnt = 1; + swap(pa, pb); + pa += es; + } + pb += es; + } + while (pb <= pc && (r = CMP(thunk, pc, a)) >= 0) { + if (r == 0) { + swap_cnt = 1; + swap(pc, pd); + pd -= es; + } + pc -= es; + } + if (pb > pc) + break; + swap(pb, pc); + swap_cnt = 1; + pb += es; + pc -= es; + } + if (swap_cnt == 0) { /* Switch to insertion sort */ + for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) + for (pl = pm; + pl > (char *)a && CMP(thunk, pl - es, pl) > 0; + pl -= es) + swap(pl, pl - es); + return; + } + + pn = (char *)a + n * es; + r = min(pa - (char *)a, pb - pa); + vecswap(a, pb - r, r); + r = min(pd - pc, pn - pd - es); + vecswap(pb, pn - r, r); + if ((r = pb - pa) > es) +#ifdef I_AM_QSORT_R + h5priv_qsort_r(a, r / es, es, thunk, cmp); +#else + h5priv_qsort(a, r / es, es, cmp); +#endif + if ((r = pd - pc) > es) { + /* Iterate rather than recurse to save stack space */ + a = pn - r; + n = r / es; + goto loop; + } +/* qsort(pn - r, r / es, es, cmp);*/ + } diff --git a/src/h5core/h5_qsort_private.h b/src/h5core/h5_qsort_private.h new file mode 100644 index 0000000..fa42a6a --- /dev/null +++ b/src/h5core/h5_qsort_private.h @@ -0,0 +1,31 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_QSORT_PRIVATE_H +#define __H5_QSORT_PRIVATE_H + +#include "h5core/h5_types.h" +void +h5priv_qsort_r ( + void *a, + size_t n, + size_t es, + void *thunk, + int (*compar)(void *, const void *, const void *) + ); + +void +h5priv_qsort ( + void *a, + size_t n, + size_t es, + int (*compar)(const void *, const void *) + ); + +#endif diff --git a/src/h5core/h5_qsort_r.c b/src/h5core/h5_qsort_r.c new file mode 100644 index 0000000..704a7a2 --- /dev/null +++ b/src/h5core/h5_qsort_r.c @@ -0,0 +1,8 @@ +/* + * This file is in the public domain. Originally written by Garrett + * A. Wollman. + * + * $FreeBSD: src/lib/libc/stdlib/qsort_r.c,v 1.1 2002/09/10 02:04:49 wollman Exp $ + */ +#define I_AM_QSORT_R +#include "h5_qsort.c" diff --git a/src/h5core/h5_readwrite.c b/src/h5core/h5_readwrite.c new file mode 100644 index 0000000..1738e8d --- /dev/null +++ b/src/h5core/h5_readwrite.c @@ -0,0 +1,157 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5core/h5.h" +#include "h5_types_private.h" + +#include "h5_errorhandling_private.h" +#include "h5_hdf5_private.h" +#include "h5_model_private.h" +#include "h5_readwrite_private.h" + +/*! + Write data to dataset. + + - Open/Create dataset + - set hyperslabs for disk and memory via callback functions + - Write data + - Close dataset + */ +h5_err_t +h5priv_write_dataset_by_name ( + h5t_mesh_t* const m, + const h5_file_p f, + const hid_t loc_id, + h5_dsinfo_t* dsinfo, + hid_t (*set_memspace)(h5t_mesh_t*,hid_t), + hid_t (*set_diskspace)(h5t_mesh_t*,hid_t), + const void* const data + ) { + H5_PRIV_API_ENTER (h5_err_t, + "m=%p, f=%p, loc_id=%d (%s), dsinfo=%p, set_memspace=%p, " + "set_diskspace=%p, data=%p", + m, f, loc_id, hdf5_get_objname(loc_id), + dsinfo, + set_memspace, set_diskspace, data); + h5_info ("Writing dataset %s/%s.", + hdf5_get_objname (loc_id), dsinfo->name); + + h5_err_t exists; + TRY (exists = hdf5_link_exists (loc_id, dsinfo->name)); + if ((exists > 0) && ((f->props->mode==H5_O_WRONLY) || (f->props->mode==H5_O_APPEND))) { + h5_warn ("Dataset %s/%s already exist.", + hdf5_get_objname (loc_id), dsinfo->name); + H5_PRIV_API_LEAVE (h5priv_handle_file_mode_error(f->props->mode)); + } + + /* + open/create dataset + */ + + hid_t dset_id; + hid_t dataspace_id; + hid_t diskspace_id; + hid_t memspace_id; + + if (exists) { + /* overwrite dataset */ + TRY (dset_id = hdf5_open_dataset (loc_id, dsinfo->name)); + TRY (dataspace_id = hdf5_get_dataset_space (dset_id)); + TRY (hdf5_set_dataset_extent (dset_id, dsinfo->dims)); + /* exten dataset? */ + } else { + /* create dataset */ + TRY (dataspace_id = hdf5_create_dataspace ( + dsinfo->rank, + dsinfo->dims, + dsinfo->max_dims)); + TRY (dset_id = hdf5_create_dataset ( + loc_id, + dsinfo->name, + dsinfo->type_id, + dataspace_id, + dsinfo->create_prop)); + } + TRY (memspace_id = (*set_memspace)(m, 0)); + TRY (diskspace_id = (*set_diskspace)(m, dataspace_id)); +#ifdef PARALLEL_IO + TRY (h5priv_start_throttle (f)); +#endif + TRY (hdf5_write_dataset ( + dset_id, + dsinfo->type_id, + memspace_id, + diskspace_id, + f->props->xfer_prop, + data)); +#ifdef PARALLEL_IO + TRY (h5priv_end_throttle (f)); +#endif + TRY (hdf5_close_dataspace (diskspace_id)); + TRY (hdf5_close_dataspace (memspace_id)); + TRY (hdf5_close_dataset (dset_id)); + f->empty = 0; + + H5_PRIV_API_RETURN (H5_SUCCESS); +} + + + +/*! + Write data to dataset. + + - Check existance dataset + - Write data + is needed if dset, mspace, dspace can't be set by the callback functions above + */ +h5_err_t +h5priv_write_dataset_by_name_id ( + const h5_file_p f, + const hid_t loc_id, + h5_dsinfo_t* dsinfo, + hid_t dset_id, + hid_t memspace_id, + hid_t diskspace_id, + const void* const data + ) { + H5_PRIV_API_ENTER (h5_err_t, + "f=%p, loc_id=%d (%s), dsinfo=%p, dset_id=%d, memspace_id=%d, " + "diskspace_id=%d, data=%p", + f, loc_id, hdf5_get_objname(loc_id), + dsinfo, + dset_id, + memspace_id, diskspace_id, data); + h5_info ("Writing dataset %s/%s.", + hdf5_get_objname (loc_id), dsinfo->name); + + h5_err_t exists; + TRY (exists = hdf5_link_exists (loc_id, dsinfo->name)); + if ((exists > 0) && ((f->props->mode==H5_O_WRONLY) || (f->props->mode==H5_O_APPEND))) { + h5_warn ("Dataset %s/%s already exist.", + hdf5_get_objname (loc_id), dsinfo->name); + H5_PRIV_API_LEAVE (h5priv_handle_file_mode_error(f->props->mode)); + } + +#ifdef PARALLEL_IO + TRY (h5priv_start_throttle (f)); +#endif + TRY (hdf5_write_dataset ( + dset_id, + dsinfo->type_id, + memspace_id, + diskspace_id, + f->props->xfer_prop, + data)); +#ifdef PARALLEL_IO + TRY (h5priv_end_throttle (f)); +#endif + + + H5_PRIV_API_RETURN (H5_SUCCESS); +} diff --git a/src/h5core/h5_readwrite_private.h b/src/h5core/h5_readwrite_private.h new file mode 100644 index 0000000..eb10e70 --- /dev/null +++ b/src/h5core/h5_readwrite_private.h @@ -0,0 +1,96 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_READWRITE_PRIVATE_H +#define __H5_READWRITE_PRIVATE_H + +#include "h5core/h5_types.h" + + +#define is_writable(f) (f->props->mode != H5_O_RDONLY) +#define is_readonly(f) (f->props->mode == H5_O_RDONLY) + +#define CHECK_WRITABLE_MODE(f) \ + TRY (is_writable (f) ? H5_SUCCESS : h5_error ( \ + H5_ERR_INVAL, \ + "Attempting to write to read-only file")); + +#define CHECK_READONLY_MODE(f) \ + TRY (is_readonly (f) ? H5_SUCCESS : h5_error ( \ + H5_ERR_INVAL, \ + "Operation is not allowed on writable files.")); + +#define CHECK_TIMEGROUP(f) \ + TRY ((f->step_gid > 0) ? H5_SUCCESS : h5_error ( \ + H5_ERR_INVAL, \ + "Time step is invalid! Have you set the time step?")); + + +/* + information about HDF5 dataset + */ +typedef struct h5_dataset_info { + char name[256]; + int rank; + hsize_t dims[4]; + hsize_t max_dims[4]; + hsize_t chunk_dims[4]; + hid_t type_id; + hid_t create_prop; + hid_t access_prop; +} h5_dsinfo_t; + +h5_err_t +h5priv_write_dataset_by_name ( + h5t_mesh_t* const m, + const h5_file_p f, + hid_t loc_id, + h5_dsinfo_t* ds_info, + hid_t (*set_memspace)(h5t_mesh_t*,hid_t), + hid_t (*set_diskspace)(h5t_mesh_t*,hid_t), + const void* const data + ); + +h5_err_t +h5priv_write_dataset_by_name_id ( + const h5_file_p f, + const hid_t loc_id, + h5_dsinfo_t* dsinfo, + hid_t dset_id, + hid_t memspace_id, + hid_t diskspace_id, + const void* const data + ); + +h5_err_t +h5priv_read_dataset ( + const h5_file_p, + const hid_t, h5_dsinfo_t*, + hid_t (*)(h5t_mesh_t* const, const hid_t), + hid_t (*)(h5t_mesh_t* const, const hid_t), + void* const); + +h5_int64_t +h5priv_normalize_h5_type ( + hid_t type + ); + +h5_int64_t +h5priv_get_dataset_type( + const hid_t group_id, + const char *dataset_name + ); + +h5_err_t +h5priv_normalize_dataset_name ( + const char *name, + char *name2 + ); + +#endif diff --git a/src/h5core/h5_syscall.c b/src/h5core/h5_syscall.c new file mode 100644 index 0000000..2a9554a --- /dev/null +++ b/src/h5core/h5_syscall.c @@ -0,0 +1,42 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include + +#include "h5core/h5_types.h" +#include "h5core/h5_errorhandling.h" + +void* +h5priv_tsearch ( + const void* key, + void** rootp, + int (*compar)(const void* key1, const void* key2) + ) { + void* ptr = tsearch (key, rootp, compar); + if (ptr == NULL) { + h5_error (H5_ERR_NOMEM, "Out of memory."); + return (void*)(H5_ERR); + } + return ptr; +} + +void* +h5priv_tfind ( + const void* key, + void* const* rootp, + int (*compar)(const void* key1, const void* key2) + ) { + void* ptr = tfind (key, rootp, compar); + if (ptr == NULL) { + return (void*)(H5_ERR); + } + return ptr; +} + + diff --git a/src/h5core/h5_syscall_private.h b/src/h5core/h5_syscall_private.h new file mode 100644 index 0000000..9da33b4 --- /dev/null +++ b/src/h5core/h5_syscall_private.h @@ -0,0 +1,28 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_SYSCALL_PRIVATE_H +#define __H5_SYSCALL_PRIVATE_H + +#include "h5core/h5_types.h" + +void* +h5priv_tsearch ( + const void* key, + void** rootp, + int (*compar)(const void* key1, const void* key2) + ); + +void* +h5priv_tfind ( + const void* key, + void *const* rootp, + int (*compar)(const void* key1, const void* key2) + ); +#endif diff --git a/src/h5core/h5_types_private.h b/src/h5core/h5_types_private.h new file mode 100644 index 0000000..827b63e --- /dev/null +++ b/src/h5core/h5_types_private.h @@ -0,0 +1,77 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_TYPES_PRIVATE_H +#define __H5_TYPES_PRIVATE_H + +#include +#include "h5core/h5_types.h" + +struct h5_prop { // generic property class + h5_int64_t class; // property class + char pad[248]; // sizeof (struct h5_prop) == 256 +}; + +typedef struct { // file property + h5_int64_t class; // property class == H5_PROP_FILE + h5_int64_t mode; + h5_int64_t flags; + h5_int64_t align; + h5_int64_t throttle; + MPI_Comm comm; + hid_t xfer_prop; // dataset transfer properties + hid_t access_prop; // file access properties + hid_t create_prop; // file create properties + char* prefix_step_name; // Prefix of step name + int width_step_idx; // pad step index with 0 up to this +} h5_prop_file_t; + + +/** + \struct h5_file + + This is an essentially opaque datastructure that + acts as a filehandle and is defined as type \c h5_file_t. + It is created by \ref H5OpenFile and destroyed by + \ref H5CloseFile. +*/ +struct h5_file { + hid_t file; // HDF5 file id + h5_prop_file_t* props; // file properties + char empty; // flag (should be int?!) + + /* MPI */ + int nprocs; // number of processors + int myproc; // index of my processor + + /* HDF5 */ + hid_t root_gid; // HDF5 group id of root + hid_t step_gid; // HDF5 group id of current step + + /* step internal data */ + char* step_name; // full current step name + h5_int64_t step_idx; // current step index + int is_new_step; // :FIXME: ? + + struct h5u_fdata *u; // pointer to unstructured data + struct h5b_fdata *b; // pointer to block data +}; + +struct h5_idxmap_el { + h5_glb_idx_t glb_idx; + h5_loc_idx_t loc_idx; +}; +typedef struct h5_idxmap_el h5_idxmap_el_t; + +struct h5_idxmap { + h5_size_t size; /* allocated space in number of items */ + h5_size_t num_items; /* stored items */ + h5_idxmap_el_t* items; +}; +#endif diff --git a/src/h5core/h5_va_macros.h b/src/h5core/h5_va_macros.h new file mode 100644 index 0000000..66cd7c7 --- /dev/null +++ b/src/h5core/h5_va_macros.h @@ -0,0 +1,25 @@ +#ifndef __H5_VA_MACROS_H +#define __H5_VA_MACROS_H + +#define PP_NARG(...) \ + PP_NARG_(__VA_ARGS__,PP_RSEQ_N()) +#define PP_NARG_(...) \ + PP_ARG_N(__VA_ARGS__) +#define PP_ARG_N( \ + _1, _2, _3, _4, _5, _6, _7, _8, _9,_10, \ + _11,_12,_13,_14,_15,_16,_17,_18,_19,_20, \ + _21,_22,_23,_24,_25,_26,_27,_28,_29,_30, \ + _31,_32,_33,_34,_35,_36,_37,_38,_39,_40, \ + _41,_42,_43,_44,_45,_46,_47,_48,_49,_50, \ + _51,_52,_53,_54,_55,_56,_57,_58,_59,_60, \ + _61,_62,_63,N,...) N +#define PP_RSEQ_N() \ + 63,62,61,60, \ + 59,58,57,56,55,54,53,52,51,50, \ + 49,48,47,46,45,44,43,42,41,40, \ + 39,38,37,36,35,34,33,32,31,30, \ + 29,28,27,26,25,24,23,22,21,20, \ + 19,18,17,16,15,14,13,12,11,10, \ + 9,8,7,6,5,4,3,2,1,0 + +#endif diff --git a/src/h5core/h5b_attribs.c b/src/h5core/h5b_attribs.c new file mode 100644 index 0000000..d4a1243 --- /dev/null +++ b/src/h5core/h5b_attribs.c @@ -0,0 +1,252 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ +#include "h5core/h5.h" + +#include "h5_debug_private.h" +#include "h5_va_macros.h" + +#include "h5_private.h" +#include "h5_hdf5_private.h" + +#include "h5_attribs_private.h" +#include "h5_readwrite_private.h" +#include "h5b_types_private.h" +#include "h5b_model_private.h" +h5_err_t +h5b_write_field_attrib ( + const h5_file_t fh, /*!< IN: file handle */ + const char *field_name, /*!< IN: field name */ + const char *attrib_name, /*!< IN: attribute name */ + const hid_t attrib_type, /*!< IN: attribute type */ + const void *attrib_value, /*!< IN: attribute value */ + const h5_int64_t attrib_nelem /*!< IN: number of elements */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, field_name='%s', " + "attrib_name='%s', attrib_type=%d, " + "attrib_value=%p, attrib_nelem=%lld", + f, + field_name, + attrib_name, + attrib_type, + attrib_value, + (long long)attrib_nelem); + CHECK_FILEHANDLE (f); + CHECK_WRITABLE_MODE (f); + CHECK_TIMEGROUP (f); + + TRY( h5bpriv_create_field_group(f, field_name) ); + + TRY( h5priv_write_attrib ( + f->b->field_gid, + attrib_name, + attrib_type, + attrib_value, + attrib_nelem, + 1) ); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5b_read_field_attrib ( + const h5_file_t fh, /*!< IN: file handle */ + const char *field_name, /*!< IN: field name */ + const char *attrib_name, /*!< IN: attribute name */ + const h5_int64_t attrib_type, /*!< IN: attribute type */ + void *buffer /*!< OUT: attribute value */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, field_name='%s', " + "attrib_name='%s', attrib_type=%lld, " + "attrib_value=%p", + f, + field_name, + attrib_name, + (long long)attrib_type, + buffer); + CHECK_FILEHANDLE (f); + CHECK_TIMEGROUP (f); + + TRY( h5bpriv_open_field_group(f, field_name) ); + + TRY( h5priv_read_attrib ( + f->b->field_gid, + attrib_name, + attrib_type, + buffer) ); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_ssize_t +h5b_get_num_field_attribs ( + const h5_file_t fh, /*b->field_gid)); +} + +h5_err_t +h5b_get_field_attrib_info ( + const h5_file_t fh, /*!< IN: file handle */ + const char *field_name, /*!< IN: field name */ + const h5_size_t attrib_idx, /*!< IN: attribute index */ + char *attrib_name, /*!< OUT: attribute name */ + const h5_size_t len_attrib_name, /*!< IN: buffer size */ + h5_int64_t *attrib_type, /*!< OUT: attribute type */ + h5_size_t *attrib_nelem /*!< OUT: number of elements */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, " + "field_name='%s', " + "attrib_idx=%llu, " + "attrib_name=%p, len_attrib_name=%llu, " + "attrib_type=%p, " + "attrib_nelem=%p", + f, + field_name, + (long long unsigned)attrib_idx, + attrib_name, (long long unsigned)len_attrib_name, + attrib_type, + attrib_nelem); + CHECK_FILEHANDLE (f); + CHECK_TIMEGROUP (f); + + TRY (h5bpriv_open_field_group(f, field_name)); + + H5_CORE_API_RETURN ( + h5priv_get_attrib_info ( + f->b->field_gid, + attrib_idx, + attrib_name, + len_attrib_name, + attrib_type, + attrib_nelem)); +} + +static inline h5_err_t +check_coords ( + const h5_file_p f, + int rank, + const h5_int64_t n_coords + ) { + h5b_fdata_t *b = f->b; + switch (rank) { + case 0: { + if (n_coords != b->i_max + 1) + h5_warn ("Coordinate array length (%lld) " + "does not match X dimension (%lld)", + (long long)n_coords, + (long long)b->i_max + 1); + break; + } + + case 1: + if (n_coords != b->j_max + 1) + h5_warn ("Coordinate array length (%lld) " + "does not match Y dimension (%lld)", + (long long)n_coords, + (long long)b->j_max + 1); + break; + case 2: + if (n_coords != b->k_max + 1) + h5_warn ("Coordinate array length (%lld) " + "does not match Z dimension (%lld)", + (long long)n_coords, + (long long)b->k_max + 1); + break; + default: + return h5_error_internal (); + } + return H5_SUCCESS; +} + +h5_err_t +h5b_set_3d_field_coords ( + const h5_file_t fh, + int rank, + const char* field_name, + const char* attrib_name, + const h5_float64_t* coords, + const h5_int64_t n_coords + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, " + "rank=%d, " + "field_name='%s', " + "attrib_name='%s', " + "coords=%p, n_coords=%llu", + f, + rank, + field_name, + attrib_name, + coords, (long long unsigned)n_coords); + CHECK_FILEHANDLE (f); + CHECK_TIMEGROUP (f); + + TRY (check_coords (f, rank, n_coords)); + TRY (h5b_write_field_attrib ( + (h5_file_t)f, + field_name, + attrib_name, + H5_FLOAT64_T, + coords, + n_coords)); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5b_get_3d_field_coords ( + const h5_file_t fh, + int rank, + const char* const field_name, + const char* const attrib_name, + h5_float64_t* const coords, + const h5_int64_t n_coords + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, " + "rank=%d, " + "field_name='%s', " + "attrib_name='%s', " + "coords=%p, n_coords=%llu", + f, + rank, + field_name, + attrib_name, + coords, (long long unsigned)n_coords); + CHECK_FILEHANDLE (f); + CHECK_TIMEGROUP (f); + + TRY (check_coords (f, rank, n_coords)); + TRY (h5b_read_field_attrib ( + (h5_file_t)f, + field_name, + attrib_name, + H5_FLOAT64_T, + coords)); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + + diff --git a/src/h5core/h5b_model.c b/src/h5core/h5b_model.c new file mode 100644 index 0000000..577e7e5 --- /dev/null +++ b/src/h5core/h5b_model.c @@ -0,0 +1,1021 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include +#include + +#include "h5_private.h" +#include "h5_hdf5_private.h" + +#include "h5_model_private.h" +#include "h5_mpi_private.h" +#include "h5_readwrite_private.h" +#include "h5b_types_private.h" +#include "h5core/h5_syscall.h" + +#define MIN( x, y ) ( (x) <= (y) ? (x) : (y) ) +#define MAX( x, y ) ( (x) >= (y) ? (x) : (y) ) + +/*! + \note + A partition must not be part of another partition. + + A partition must not divide another partition into two pieces. + + After handling the ghost zones, the partition must not be empty + + We must track the overall size somewhere. This is a good place to do it. (?) + */ +h5_err_t +h5b_has_field_data ( + const h5_file_t fh + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, "f=%p", f); + CHECK_FILEHANDLE (f); + h5_err_t exists; + h5_err_t result = H5_NOK; + TRY (exists = hdf5_link_exists (f->step_gid, H5BLOCK_GROUPNAME_BLOCK)); + if (exists) + result = H5_SUCCESS; + H5_CORE_API_RETURN (result); +} + +static void +_normalize_partition ( + h5b_partition_t *const p /*!< IN/OUT: partition */ + ) { + h5_size_t tmp; + + p->i_start = MAX(0, p->i_start); + p->j_start = MAX(0, p->j_start); + p->k_start = MAX(0, p->k_start); + + if ( p->i_start > p->i_end ) { + tmp = p->i_start; + p->i_start = p->i_end; + p->i_end = tmp; + } + if ( p->j_start > p->j_end ) { + tmp = p->j_start; + p->j_start = p->j_end; + p->j_end = tmp; + } + if ( p->k_start > p->k_end ) { + tmp = p->k_start; + p->k_start = p->k_end; + p->k_end = tmp; + } +} + +#ifdef PARALLEL_IO +/* MLH: this could be improved with an MPI_Reduce and MAX operator... + * but the user_layout array-of-structs would need to be a struct-of-arrays */ +static void +_get_max_dimensions ( + const h5_file_p f, + h5b_partition_t *const user_layout + ) { + int proc; + h5b_fdata_t *b = f->b; + h5b_partition_t *p = user_layout; + + b->i_max = 0; + b->j_max = 0; + b->k_max = 0; + + for ( proc = 0; proc < f->nprocs; proc++, p++ ) { + if ( p->i_end > b->i_max ) b->i_max = p->i_end; + if ( p->j_end > b->j_max ) b->j_max = p->j_end; + if ( p->k_end > b->k_max ) b->k_max = p->k_end; + } +} + +#define _NO_GHOSTZONE(p,q) ( (p->i_end < q->i_start) \ + || (p->j_end < q->j_start) \ + || (p->k_end < q->k_start) ) + + + +/*! + \ingroup h5block_private + + \internal + + Check whether two partitions have a common ghost-zone. + + \return value != \c 0 if yes otherwise \c 0 + */ +static inline int +have_ghostzone ( + const h5b_partition_t *const p, /*!< IN: partition \c p */ + const h5b_partition_t *const q /*!< IN: partition \c q */ + ) { + return ( !( _NO_GHOSTZONE ( p, q ) || _NO_GHOSTZONE ( q, p ) ) ); +} + +/*! + \ingroup h5block_private + + \internal + + Calculate volume of partition. + + \return volume + */ +static inline h5_int64_t +volume_of_partition ( + const h5b_partition_t *const p /*!< IN: partition */ + ) { + return (p->i_end - p->i_start) + * (p->j_end - p->j_start) + * (p->k_end - p->k_start); + +} + +/*! + \ingroup h5block_private + + \internal + + Calc volume of ghost-zone. + + \return volume + */ +static inline h5_int64_t +volume_of_ghostzone ( + const h5b_partition_t *const p, /*!< IN: ptr to first partition */ + const h5b_partition_t *const q /*!< IN: ptr to second partition */ + ) { + + h5_int64_t dx = MIN ( p->i_end, q->i_end ) + - MAX ( p->i_start, q->i_start ) + 1; + h5_int64_t dy = MIN ( p->j_end, q->j_end ) + - MAX ( p->j_start, q->j_start ) + 1; + h5_int64_t dz = MIN ( p->k_end, q->k_end ) + - MAX ( p->k_start, q->k_start ) + 1; + + return dx * dy * dz; +} + +/*! + \ingroup h5block_private + + \internal + + Dissolve ghost-zone by moving the X coordinates. Nothing will be changed + if \c { p->i_start <= q->i_end <= p->i_end }. In this case \c -1 will be + returned. + + \return H5_SUCCESS or -1 + */ +static h5_int64_t +_dissolve_X_ghostzone ( + h5b_partition_t *const p, /*!< IN/OUT: ptr to first partition */ + h5b_partition_t *const q /*!< IN/OUT: ptr to second partition */ + ) { + + if ( p->i_start > q->i_start ) + return _dissolve_X_ghostzone( q, p ); + + if ( q->i_end <= p->i_end ) /* no dissolving */ + return -1; + + p->i_end = ( p->i_end + q->i_start ) >> 1; + q->i_start = p->i_end + 1; + return 0; +} + +/*! + \ingroup h5block_private + + \internal + + Dissolve ghost-zone by moving the Y coordinates. Nothing will be changed + if \c { p->j_start <= q->j_end <= p->j_end }. In this case \c -1 will be + returned. + + \return H5_SUCCESS or -1 + */ +static h5_int64_t +_dissolve_Y_ghostzone ( + h5b_partition_t *const p, /*!< IN/OUT: ptr to first partition */ + h5b_partition_t *const q /*!< IN/OUT: ptr to second partition */ + ) { + + if ( p->j_start > q->j_start ) + return _dissolve_Y_ghostzone( q, p ); + + if ( q->j_end <= p->j_end ) /* no dissolving */ + return -1; + + p->j_end = ( p->j_end + q->j_start ) >> 1; + q->j_start = p->j_end + 1; + return 0; +} + +/*! + \ingroup h5block_private + + \internal + + Dissolve ghost-zone by moving the Z coordinates. Nothing will be changed + if \c { p->k_start <= q->k_end <= p->k_end }. In this case \c -1 will be + returned. + + \return H5_SUCCESS or -1 + */ +static h5_int64_t +_dissolve_Z_ghostzone ( + h5b_partition_t *const p, /*!< IN/OUT: ptr to first partition */ + h5b_partition_t *const q /*!< IN/OUT: ptr to second partition */ + ) { + + if ( p->k_start > q->k_start ) + return _dissolve_Z_ghostzone( q, p ); + + if ( q->k_end <= p->k_end ) /* no dissolving */ + return -1; + + p->k_end = ( p->k_end + q->k_start ) >> 1; + q->k_start = p->k_end + 1; + return 0; +} + +/*! + \ingroup h5block_private + + \internal + + Dissolve ghost-zone for partitions \p and \q. + + Dissolving is done by moving either the X, Y or Z plane. We never move + more than one plane per partition. Thus we always have three possibilities + to dissolve the ghost-zone. The "best" is the one with the largest + remaining volume of the partitions. + + \return H5_SUCCESS or error code. + */ +static h5_err_t +_dissolve_ghostzone ( + h5b_partition_t *const p, /*!< IN/OUT: ptr to first partition */ + h5b_partition_t *const q /*!< IN/OUT: ptr to second partition */ + ) { + h5b_partition_t p_; + h5b_partition_t q_; + h5b_partition_t p_best; + h5b_partition_t q_best; + h5_int64_t vol; + h5_int64_t max_vol = 0; + + p_ = *p; + q_ = *q; + if ( _dissolve_X_ghostzone ( &p_, &q_ ) == 0 ) { + vol = volume_of_partition ( &p_ ) + + volume_of_partition ( &q_ ); + if ( vol > max_vol ) { + max_vol = vol; + p_best = p_; + q_best = q_; + } + } + + p_ = *p; + q_ = *q; + if ( _dissolve_Y_ghostzone ( &p_, &q_ ) == 0 ) { + vol = volume_of_partition ( &p_ ) + + volume_of_partition ( &q_ ); + if ( vol > max_vol ) { + max_vol = vol; + p_best = p_; + q_best = q_; + } + } + p_ = *p; + q_ = *q; + + if ( _dissolve_Z_ghostzone ( &p_, &q_ ) == 0 ) { + vol = volume_of_partition ( &p_ ) + + volume_of_partition ( &q_ ); + if ( vol > max_vol ) { + max_vol = vol; + p_best = p_; + q_best = q_; + } + } + if ( max_vol <= 0 ) { + return h5_error ( + H5_ERR_VIEW, + "Cannot dissolve ghostzones in specified layout!" ); + } + *p = p_best; + *q = q_best; + + return H5_SUCCESS; +} + +/*! + \ingroup h5block_private + + \internal + + Dissolve all ghost-zones. + + Ghost-zone are dissolved in the order of their magnitude, largest first. + + \note + Dissolving ghost-zones automaticaly is not trivial! The implemented + algorithmn garanties, that there are no ghost-zones left and that we + have the same result on all processors. + But there may be zones which are not assigned to a partition any more. + May be we should check this and return an error in this case. Then + the user have to decide to continue or to abort. + + \b {Error Codes} + \b H5PART_NOMEM_ERR + + \return H5_SUCCESS or error code. + */ +static inline h5_err_t +_dissolve_ghostzones ( + const h5_file_p f, + const h5b_partition_t *const user_layout, + h5b_partition_t *const write_layout + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "f=%p, user_layout=%p, write_layout=%p", + f, user_layout, write_layout); + h5b_partition_t *p; + h5b_partition_t *q; + int proc_p, proc_q; + + struct list { + struct list *prev; + struct list *next; + h5b_partition_t *p; + h5b_partition_t *q; + h5_int64_t vol; + } *p_begin, *p_el, *p_max, *p_end, *p_save; + + memcpy( write_layout, user_layout, f->nprocs*sizeof(h5b_partition_t) ); + + TRY( p_begin = (struct list*)h5_calloc (1, sizeof(*p_begin)) ); + p_max = p_end = p_begin; + + memset( p_begin, 0, sizeof ( *p_begin ) ); + + for ( proc_p = 0, p = write_layout; + proc_p < f->nprocs-1; + proc_p++, p++ ) { + for ( proc_q = proc_p+1, q = &write_layout[proc_q]; + proc_q < f->nprocs; + proc_q++, q++ ) { + + if ( have_ghostzone ( p, q ) ) { + TRY( p_el = (struct list*)h5_calloc (1, sizeof(*p_el)) ); + + p_el->p = p; + p_el->q = q; + p_el->vol = volume_of_ghostzone ( p, q ); + p_el->prev = p_end; + p_el->next = NULL; + + if ( p_el->vol > p_max->vol ) + p_max = p_el; + + p_end->next = p_el; + p_end = p_el; + } + } + } + while ( p_begin->next ) { + if ( p_max->next ) p_max->next->prev = p_max->prev; + p_max->prev->next = p_max->next; + + _dissolve_ghostzone (p_max->p, p_max->q); + + h5_free (p_max); + p_el = p_max = p_begin->next; + + while ( p_el ) { + if ( have_ghostzone ( p_el->p, p_el->q ) ) { + p_el->vol = volume_of_ghostzone ( p_el->p, p_el->q ); + if ( p_el->vol > p_max->vol ) + p_max = p_el; + p_el = p_el->next; + } else { + if ( p_el->next ) + p_el->next->prev = p_el->prev; + p_el->prev->next = p_el->next; + p_save = p_el->next; + h5_free (p_el); + p_el = p_save; + } + } + + } + h5_free (p_begin); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif + +h5_err_t +h5bpriv_release_hyperslab ( + const h5_file_p f /*!< IN: file handle */ + ) { + H5_PRIV_API_ENTER (h5_err_t, "f=%p", f); + if (f->b->shape > 0) { + TRY (hdf5_close_dataspace (f->b->shape)); + f->b->shape = -1; + } + if (f->b->diskshape > 0) { + TRY (hdf5_close_dataspace(f->b->diskshape)); + f->b->diskshape = -1; + } + if (f->b->memshape > 0) { + TRY (hdf5_close_dataspace(f->b->memshape)); + f->b->memshape = -1; + } + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5bpriv_open_block_group ( + const h5_file_p f /*!< IN: file handle */ + ) { + H5_PRIV_API_ENTER (h5_err_t, "f=%p", f); + h5b_fdata_t *b = f->b; + + TRY (hdf5_close_group (b->block_gid)); + b->block_gid = hdf5_open_group (f->step_gid, H5BLOCK_GROUPNAME_BLOCK); + if (f->b->block_gid < 0) + H5_PRIV_API_LEAVE (h5_error( + H5_ERR_INVAL, + "Time step does not contain H5Block data!")); + + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +static h5_err_t +_create_block_group ( + const h5_file_p f /*!< IN: file handle */ + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "f=%p", f); + h5_err_t exists; + TRY (exists = hdf5_link_exists (f->step_gid, H5BLOCK_GROUPNAME_BLOCK)); + + if (exists > 0) { + TRY (h5bpriv_open_block_group(f)); + } else { + TRY (hdf5_close_group(f->b->block_gid) ); + TRY (f->b->block_gid = hdf5_create_group( + f->step_gid, H5BLOCK_GROUPNAME_BLOCK) ); + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +h5bpriv_have_field_group ( + const h5_file_p f, /*!< IN: file handle */ + const char *name + ) { + H5_PRIV_API_ENTER (h5_err_t, "f=%p, name='%s'", f, name); + char name2[H5_DATANAME_LEN]; + h5priv_normalize_dataset_name (name, name2); + + TRY( h5bpriv_open_block_group(f) ); + H5_PRIV_API_RETURN (hdf5_link_exists(f->b->block_gid, name2)); +} + +h5_err_t +h5bpriv_open_field_group ( + const h5_file_p f, /*!< IN: file handle */ + const char *name + ) { + H5_PRIV_API_ENTER (h5_err_t, "f=%p, name='%s'", f, name); + char name2[H5_DATANAME_LEN]; + h5priv_normalize_dataset_name (name, name2); + + TRY (hdf5_close_group (f->b->field_gid)); + TRY (h5bpriv_open_block_group (f)); + f->b->field_gid = hdf5_open_group (f->b->block_gid, name2); + if (f->b->field_gid < 0) + return h5_error( + H5_ERR_INVAL, + "Field '%s' does not exist!", name2); + + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5bpriv_create_field_group ( + const h5_file_p f, /*!< IN: file handle */ + const char *name /*!< IN: name of field group to create */ + ) { + H5_PRIV_API_ENTER (h5_err_t, "f=%p, name='%s'", f, name); + h5b_fdata_t *b = f->b; + + TRY( _create_block_group(f) ); + + char name2[H5_DATANAME_LEN]; + h5priv_normalize_dataset_name (name, name2); + + h5_err_t exists; + TRY (exists = hdf5_link_exists ( b->block_gid, name2)); + + if (exists > 0) { + TRY (h5bpriv_open_field_group (f, name2)); + } else { + TRY (hdf5_close_group (f->b->field_gid) ); + TRY (b->field_gid = hdf5_create_group (b->block_gid, name2)); + } + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_int64_t +h5b_3d_has_view ( + const h5_file_t fh /*!< IN: File handle */ + ) { + return ((h5_file_p)fh)->b->have_layout; +} + +h5_err_t +h5b_3d_set_view ( + const h5_file_t fh, /*!< IN: File handle */ + const h5_size_t i_start, /*!< IN: start index of \c i */ + const h5_size_t i_end, /*!< IN: end index of \c i */ + const h5_size_t j_start, /*!< IN: start index of \c j */ + const h5_size_t j_end, /*!< IN: end index of \c j */ + const h5_size_t k_start, /*!< IN: start index of \c k */ + const h5_size_t k_end /*!< IN: end index of \c k */ + ) { + h5_file_p f = (h5_file_p)fh; + h5b_fdata_t *b = f->b; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, " + "i_start=%llu, i_end=%llu, " + "j_start=%llu, j_end=%llu, " + "k_start=%llu, k_end=%llu", + f, + (long long unsigned)i_start, (long long unsigned)i_end, + (long long unsigned)j_start, (long long unsigned)j_end, + (long long unsigned)k_start, (long long unsigned)k_end); + b->user_layout[0].i_start = i_start; + b->user_layout[0].i_end = i_end; + b->user_layout[0].j_start = j_start; + b->user_layout[0].j_end = j_end; + b->user_layout[0].k_start = k_start; + b->user_layout[0].k_end = k_end; + _normalize_partition(&b->user_layout[0]); + +#ifdef PARALLEL_IO + h5b_partition_t *user_layout; + h5b_partition_t *write_layout; + + TRY (user_layout = h5_calloc (f->nprocs, sizeof (*user_layout))); + TRY (write_layout = h5_calloc (f->nprocs, sizeof (*write_layout))); + + user_layout[f->myproc] = b->user_layout[0]; + + TRY (h5priv_mpi_allgather( + MPI_IN_PLACE, 0, MPI_DATATYPE_NULL, + user_layout, 1, f->b->partition_mpi_t, f->props->comm)); + + _get_max_dimensions(f, user_layout); + + TRY (_dissolve_ghostzones (f, user_layout, write_layout)); + b->user_layout[0] = user_layout[f->myproc]; + b->write_layout[0] = write_layout[f->myproc]; + b->have_layout = 1; + + h5_debug ( + "User layout: %lld:%lld, %lld:%lld, %lld:%lld", + (long long)b->user_layout[0].i_start, + (long long)b->user_layout[0].i_end, + (long long)b->user_layout[0].j_start, + (long long)b->user_layout[0].j_end, + (long long)b->user_layout[0].k_start, + (long long)b->user_layout[0].k_end ); + + h5_debug ( + "Ghost-zone layout: %lld:%lld, %lld:%lld, %lld:%lld", + (long long)b->write_layout[0].i_start, + (long long)b->write_layout[0].i_end, + (long long)b->write_layout[0].j_start, + (long long)b->write_layout[0].j_end, + (long long)b->write_layout[0].k_start, + (long long)b->write_layout[0].k_end ); + + h5_free(user_layout); + h5_free(write_layout); + + TRY( h5bpriv_release_hyperslab(f) ); +#endif + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5b_3d_get_view ( + const h5_file_t fh, /*!< IN: File handle */ + h5_size_t *const i_start, /*!< OUT: start index of \c i */ + h5_size_t *const i_end, /*!< OUT: end index of \c i */ + h5_size_t *const j_start, /*!< OUT: start index of \c j */ + h5_size_t *const j_end, /*!< OUT: end index of \c j */ + h5_size_t *const k_start, /*!< OUT: start index of \c k */ + h5_size_t *const k_end /*!< OUT: end index of \c k */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, " + "i_start=%p, i_end=%p, " + "j_start=%p, j_end=%p, " + "k_start=%p, k_end=%p", + f, + i_start, i_end, + j_start, j_end, + k_start, k_end); + h5b_partition_t *p = f->b->user_layout; + + *i_start = p->i_start; + *i_end = p->i_end; + *j_start = p->j_start; + *j_end = p->j_end; + *k_start = p->k_start; + *k_end = p->k_end; + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5b_3d_get_reduced_view ( + const h5_file_t fh, /*!< IN: File handle */ + h5_size_t *const i_start, /*!< OUT: start index of \c i */ + h5_size_t *const i_end, /*!< OUT: end index of \c i */ + h5_size_t *const j_start, /*!< OUT: start index of \c j */ + h5_size_t *const j_end, /*!< OUT: end index of \c j */ + h5_size_t *const k_start, /*!< OUT: start index of \c k */ + h5_size_t *const k_end /*!< OUT: end index of \c k */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, " + "i_start=%p, i_end=%p, " + "j_start=%p, j_end=%p, " + "k_start=%p, k_end=%p", + f, + i_start, i_end, + j_start, j_end, + k_start, k_end); + h5b_partition_t *p = f->b->write_layout; + + *i_start = p->i_start; + *i_end = p->i_end; + *j_start = p->j_start; + *j_end = p->j_end; + *k_start = p->k_start; + *k_end = p->k_end; + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5b_3d_set_chunk ( + const h5_file_t fh, /*!< IN: File handle */ + const h5_size_t i, /*!< IN: size of \c i */ + const h5_size_t j, /*!< IN: size of \c j */ + const h5_size_t k /*!< IN: size of \c k */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, i=%llu, j=%llu, k=%llu", + f, + (long long unsigned)i, + (long long unsigned)j, + (long long unsigned)k); + if ( i == 0 || j == 0 || k == 0 ) + { + h5_info ("Disabling chunking" ); + TRY (hdf5_set_layout_property(f->b->dcreate_prop, H5D_CONTIGUOUS)); + } else + { + h5_info ("Setting chunk to (%lld,%lld,%lld)", + (long long)i, (long long)j, (long long)k); + hsize_t dims[3] = { k, j, i }; + TRY (hdf5_set_chunk_property (f->b->dcreate_prop, 1, dims)); + } + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5b_3d_get_chunk ( + const h5_file_t fh, /*!< IN: File handle */ + const char *field_name, /*!< IN: name of dataset */ + h5_size_t *const i, /*!< OUT: size of \c i */ + h5_size_t *const j, /*!< OUT: size of \c j */ + h5_size_t *const k /*!< OUT: size of \c k */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, i=%p, j=%p, k=%p", + f, i, j, k); + CHECK_TIMEGROUP ( f ); + + h5b_fdata_t *b = f->b; + + TRY( h5bpriv_open_field_group ( f, field_name ) ); + + hid_t dataset_id; + hid_t plist_id; + hsize_t hdims[3]; + + TRY (dataset_id = hdf5_open_dataset (b->field_gid, H5_BLOCKNAME_X)); + TRY (plist_id = hdf5_get_dataset_create_plist (dataset_id)); + TRY (hdf5_get_chunk_property (plist_id, 3, hdims)); + TRY (hdf5_close_property (plist_id)); + TRY (hdf5_close_dataset (dataset_id)); + + *i = hdims[2]; + *j = hdims[1]; + *k = hdims[0]; + + h5_info("Found chunk dimensions (%lld,%lld,%lld)", + (long long)hdims[0], + (long long)hdims[1], + (long long)hdims[2] ); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +#ifdef PARALLEL_IO +h5_err_t +h5b_3d_set_grid ( + const h5_file_t fh, /*!< IN: File handle */ + const h5_size_t i, /*!< IN: dimension in \c i */ + const h5_size_t j, /*!< IN: dimension in \c j */ + const h5_size_t k /*!< IN: dimension in \c k */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, i=%llu, j=%llu, k=%llu", + f, + (long long unsigned)i, + (long long unsigned)j, + (long long unsigned)k); + if (i*j*k != f->nprocs) { + H5_CORE_API_LEAVE ( + h5_error(H5_ERR_INVAL, + "Grid dimensions (%lld,%lld,%lld) do not multiply " + "out to %d MPI processors!", + (long long)i, + (long long)j, + (long long)k, + f->nprocs)); + } + + f->b->k_grid = i; + f->b->j_grid = j; + f->b->i_grid = k; + + int dims[3] = { k, j, i }; + int period[3] = { 0, 0, 0 }; + TRY( h5priv_mpi_cart_create( + f->props->comm, 3, dims, period, 0, &f->b->cart_comm) ); + + f->b->have_grid = 1; + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5b_3d_get_grid_coords ( + const h5_file_t fh, /*!< IN: File handle */ + const int proc, /*!< IN: MPI processor */ + h5_int64_t *i, /*!< OUT: index in \c i */ + h5_int64_t *j, /*!< OUT: index in \c j */ + h5_int64_t *k /*!< OUT: index in \c k */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, proc=%d, i=%p, j=%p, k=%p", + f, proc, i, j, k); + if ( !f->b->have_grid ) + H5_CORE_API_LEAVE ( + h5_error(H5_ERR_INVAL, + "Grid dimensions have not been set!")); + + int coords[3]; + TRY( h5priv_mpi_cart_coords(f->b->cart_comm, proc, 3, coords) ); + *k = coords[0]; + *j = coords[1]; + *i = coords[2]; + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5b_3d_set_dims ( + const h5_file_t fh, /*!< IN: File handle */ + const h5_size_t i, /*!< IN: dimension in \c i */ + const h5_size_t j, /*!< IN: dimension in \c j */ + const h5_size_t k /*!< IN: dimension in \c k */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, i=%llu, j=%llu, k=%llu", + f, + (long long unsigned)i, + (long long unsigned)j, + (long long unsigned)k); + if ( !f->b->have_grid ) + H5_CORE_API_LEAVE ( + h5_error(H5_ERR_INVAL, + "Grid dimensions have not been set!")); + + h5_size_t dims[3] = { k, j, i }; + h5_size_t check_dims[3] = { k, j, i }; + + TRY( h5priv_mpi_bcast( + check_dims, 3, MPI_LONG_LONG, 0, f->props->comm) ); + + if ( dims[0] != check_dims[0] || + dims[1] != check_dims[1] || + dims[2] != check_dims[2] + ) { + H5_CORE_API_LEAVE ( + h5_error(H5_ERR_INVAL, + "[%d] Block dimensions do not agree: " + "(%lld,%lld,%lld) != (%lld,%lld,%lld)!", + f->myproc, + (long long)dims[0], + (long long)dims[1], + (long long)dims[2], + (long long)check_dims[0], + (long long)check_dims[1], + (long long)check_dims[2])); + } + h5_int64_t coords[3]; + TRY( h5b_3d_get_grid_coords((h5_file_t)f, + f->myproc, coords+0, coords+1, coords+2) ); + + h5b_fdata_t *b = f->b; + + b->user_layout->i_start = coords[2]*dims[2]; + b->user_layout->i_end = (coords[2]+1)*dims[2] - 1; + b->user_layout->j_start = coords[1]*dims[1]; + b->user_layout->j_end = (coords[1]+1)*dims[1] - 1; + b->user_layout->k_start = coords[0]*dims[0]; + b->user_layout->k_end = (coords[0]+1)*dims[0] - 1; + + b->write_layout[0] = b->user_layout[0]; + + b->i_max = b->i_grid * dims[2] - 1; + b->j_max = b->j_grid * dims[1] - 1; + b->k_max = b->k_grid * dims[0] - 1; + + b->have_layout = 1; + + H5_CORE_API_RETURN (H5_SUCCESS); +} +#endif + +h5_err_t +h5b_3d_set_halo ( + const h5_file_t fh, /*!< IN: File handle */ + const h5_size_t i, /*!< IN: radius in \c i */ + const h5_size_t j, /*!< IN: radius in \c j */ + const h5_size_t k /*!< IN: radius in \c k */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, i=%llu, j=%llu, k=%llu", + f, + (long long unsigned)i, + (long long unsigned)j, + (long long unsigned)k); + + if ( !f->b->have_grid ) { + H5_CORE_API_LEAVE ( + h5_error(H5_ERR_INVAL, + "Grid dimensions have not been set!")); + } else if ( !f->b->have_layout ) { + H5_CORE_API_LEAVE ( + h5_error(H5_ERR_INVAL, + "Block dimensions for grid have not been set!")); + } + h5b_fdata_t *b = f->b; + + b->user_layout->i_start -= i; + b->user_layout->i_end += i; + b->user_layout->j_start -= j; + b->user_layout->j_end += j; + b->user_layout->k_start -= k; + b->user_layout->k_end += k; + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_ssize_t +h5b_get_num_fields ( + const h5_file_t fh /*!< IN: File handle */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_ssize_t, "f=%p", f); + CHECK_TIMEGROUP( f ); + + TRY (h5bpriv_open_block_group(f)); + H5_CORE_API_RETURN (hdf5_get_num_objs_in_group (f->b->block_gid)); +} + +h5_err_t +h5b_get_field_info_by_name ( + const h5_file_t fh, /*!< IN: file handle */ + const char *name, /*!< OUT: field name */ + h5_size_t *field_rank, /*!< OUT: field rank */ + h5_size_t *field_dims, /*!< OUT: field dimensions */ + h5_size_t *elem_rank, /*!< OUT: element rank */ + h5_int64_t *type /*!< OUT: datatype */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, name='%s', " + "field_rank=%p, field_dims=%p, elem_rank=%p, type=%p", + f, name, field_rank, field_dims, elem_rank, type); + CHECK_TIMEGROUP( f ); + + hsize_t dims[16]; /* give it plenty of space even though we don't expect rank > 3 */ + hsize_t _field_rank, _elem_rank; + h5_size_t i, j; + + TRY( h5bpriv_open_field_group(f, name) ); + + hid_t dataset_id; + hid_t dataspace_id; + + TRY (dataset_id = hdf5_open_dataset (f->b->field_gid, H5_BLOCKNAME_X)); + TRY (dataspace_id = hdf5_get_dataset_space (dataset_id) ); + + TRY (_field_rank = hdf5_get_dims_of_dataspace (dataspace_id, dims, NULL)); + if (field_rank) *field_rank = (h5_size_t) _field_rank; + + if (field_dims) { + for ( i = 0, j = _field_rank-1; i < _field_rank; i++, j-- ) + field_dims[i] = (h5_size_t)dims[j]; + } + + TRY (_elem_rank = hdf5_get_num_objs_in_group (f->b->field_gid)); + if (elem_rank) *elem_rank = (h5_size_t) _elem_rank; + + hid_t h5type; + TRY (h5type = hdf5_get_dataset_type (dataset_id)); + + if ( type ) + TRY( *type = h5priv_normalize_h5_type(h5type) ); + + TRY (hdf5_close_dataspace (dataspace_id)); + TRY (hdf5_close_dataset (dataset_id)); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5b_get_field_info ( + const h5_file_t fh, /*!< IN: file handle */ + const h5_size_t idx, /*!< IN: index of field */ + char *name, /*!< OUT: field name */ + const h5_size_t len_name, /*!< IN: buffer size */ + h5_size_t *field_rank, /*!< OUT: field rank */ + h5_size_t *field_dims, /*!< OUT: field dimensions */ + h5_size_t *elem_rank, /*!< OUT: element rank */ + h5_int64_t *type /*!< OUT: datatype */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, idx=%llu, " + "name=%p, len_name=%llu, " + "field_rank=%p, field_dims=%p, elem_rank=%p, type=%p", + f, + (long long unsigned)idx, + name, (long long unsigned)len_name, + field_rank, field_dims, elem_rank, type); + CHECK_TIMEGROUP( f ); + + TRY (h5bpriv_open_block_group(f)); + TRY (hdf5_get_objname_by_idx( + f->b->block_gid, + (hsize_t)idx, + name, + (size_t)len_name) ); + + H5_CORE_API_RETURN (h5b_get_field_info_by_name ( + (h5_file_t)f, + name, field_rank, field_dims, elem_rank, type)); +} + diff --git a/src/h5core/h5b_model_private.h b/src/h5core/h5b_model_private.h new file mode 100644 index 0000000..c115365 --- /dev/null +++ b/src/h5core/h5b_model_private.h @@ -0,0 +1,48 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5B_MODEL_PRIVATE_H +#define __H5B_MODEL_PRIVATE_H + +#include "h5core/h5_types.h" + +#define CHECK_LAYOUT(f) \ + TRY (f->b->have_layout ? H5_SUCCESS : h5_error ( \ + H5_ERR_VIEW, \ + "No view has been defined!")); + +h5_err_t +h5bpriv_have_field_group ( + const h5_file_p f, /*!< IN: file handle */ + const char *name + ); + +h5_err_t +h5bpriv_open_field_group ( + const h5_file_p f, /*!< IN: file handle */ + const char *name + ); + +h5_err_t +h5bpriv_create_field_group ( + const h5_file_p f, /*!< IN: file handle */ + const char *name /*!< IN: name of field group to create */ + ); + +h5_err_t +h5bpriv_open_block_group ( + const h5_file_p f /*!< IN: file handle */ + ); + +h5_err_t +h5bpriv_release_hyperslab ( + const h5_file_p f /*!< IN: file handle */ + ); + +#endif diff --git a/src/h5core/h5b_readwrite.c b/src/h5core/h5b_readwrite.c new file mode 100644 index 0000000..66299a0 --- /dev/null +++ b/src/h5core/h5b_readwrite.c @@ -0,0 +1,458 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5_types_private.h" +#include "h5_hdf5_private.h" + +#include "h5_model_private.h" +#include "h5_mpi_private.h" +#include "h5_readwrite_private.h" +#include "h5b_types_private.h" +#include "h5b_model_private.h" + +#include "h5core/h5_syscall.h" + +/*! + \ingroup h5_private + + \internal + + Initialize H5Block internal structure. + + TODO: Move to file "h5b_openclose.c" + + \return H5_SUCCESS or error code +*/ +h5_err_t +h5bpriv_open_file ( + const h5_file_p f /*!< IN: file handle */ + ) { + H5_PRIV_API_ENTER (h5_err_t, "f=%p", f); + h5b_fdata_t* b; + + if (f->b) + H5_PRIV_API_LEAVE (H5_SUCCESS); + + TRY (f->b = (h5b_fdata_t*)h5_calloc (1, sizeof (*f->b))); + + b = f->b; + memset (b, 0, sizeof (*b)); + +#if defined(PARALLEL_IO) + size_t n = sizeof (struct h5b_partition) / sizeof (h5_int64_t); + TRY (h5priv_mpi_type_contiguous(n, MPI_LONG_LONG, &b->partition_mpi_t)); +#endif + memset (b->user_layout, 0, sizeof(*b->user_layout)); + memset (b->write_layout, 0, sizeof(*b->write_layout)); + + b->shape = -1; + b->diskshape = -1; + b->memshape = -1; + b->block_gid = -1; + b->field_gid = -1; + b->have_layout = 0; + + TRY (b->dcreate_prop = hdf5_create_property (H5P_DATASET_CREATE)); + + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +/*! + \ingroup h5block_private + + \internal + + De-initialize H5Block internal structure. Open HDF5 objects are + closed and allocated memory freed. + + \return H5_SUCCESS or error code +*/ +h5_err_t +h5bpriv_close_file ( + const h5_file_p f /*!< IN: file handle */ + ) { + H5_PRIV_API_ENTER (h5_err_t, "f=%p", f); + struct h5b_fdata* b = f->b; + TRY (hdf5_close_group (b->block_gid)); + TRY (hdf5_close_group (b->field_gid)); + TRY (hdf5_close_dataspace (b->shape)); + TRY (hdf5_close_dataspace (b->diskshape)); + TRY (hdf5_close_dataspace (b->memshape)); + TRY (hdf5_close_property (b->dcreate_prop)); +#if defined(PARALLEL_IO) + TRY (h5priv_mpi_type_free (&b->partition_mpi_t)); +#endif + TRY (h5_free (f->b)); + f->b = NULL; + + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +static h5_err_t +_select_hyperslab_for_writing ( + const h5_file_p f /*!< IN: file handle */ + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "f=%p", f); + /* + re-use existing hyperslab + */ + if ( f->b->shape >= 0 ) return H5_SUCCESS; + + h5b_fdata_t *b = f->b; + h5b_partition_t *p = b->write_layout; + h5b_partition_t *q = b->user_layout; + + int rank = 3; + + hsize_t field_dims[3] = { + b->k_max+1, + b->j_max+1, + b->i_max+1 + }; + + hsize_t start[3] = { + p->k_start, + p->j_start, + p->i_start + }; + hsize_t stride[3] = { 1, 1, 1 }; + hsize_t part_dims[3] = { + p->k_end - p->k_start + 1, + p->j_end - p->j_start + 1, + p->i_end - p->i_start + 1 + }; + + + TRY (b->shape = hdf5_create_dataspace(rank, field_dims, NULL)); + TRY (b->diskshape = hdf5_create_dataspace(rank,field_dims,NULL)); + h5_debug ( + "Select hyperslab on diskshape: " + "start=(%lld,%lld,%lld), " + "stride=(%lld,%lld,%lld), " + "dims=(%lld,%lld,%lld)", + (long long)start[2], + (long long)start[1], + (long long)start[0], + (long long)stride[2], + (long long)stride[1], + (long long)stride[0], + (long long)part_dims[2], + (long long)part_dims[1], + (long long)part_dims[0] ); + + TRY( hdf5_select_hyperslab_of_dataspace( + b->diskshape, + H5S_SELECT_SET, + start, + stride, + part_dims, + NULL) ); + + field_dims[0] = q->k_end - q->k_start + 1; + field_dims[1] = q->j_end - q->j_start + 1; + field_dims[2] = q->i_end - q->i_start + 1; + + TRY (b->memshape = hdf5_create_dataspace(rank,field_dims,NULL)); + + start[0] = p->k_start - q->k_start; + start[1] = p->j_start - q->j_start; + start[2] = p->i_start - q->i_start; + + h5_debug ( + "Select hyperslab on memshape:" + "start=(%lld,%lld,%lld), " + "stride=(%lld,%lld,%lld), " + "dims=(%lld,%lld,%lld)", + (long long)start[2], + (long long)start[1], + (long long)start[0], + (long long)stride[2], + (long long)stride[1], + (long long)stride[0], + (long long)part_dims[2], + (long long)part_dims[1], + (long long)part_dims[0] ); + + TRY (hdf5_select_hyperslab_of_dataspace( + b->memshape, + H5S_SELECT_SET, + start, + stride, + part_dims, + NULL)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static h5_err_t +_write_data ( + const h5_file_p f, /*!< IN: file handle */ + const char *field_name, /*!< IN: name of field */ + const char *data_name, /*!< IN: name of dataset */ + const void *data, /*!< IN: data to write */ + const hid_t type /*!< IN: data type */ + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "f=%p, field_name=%s, data_name=%s, data=%p type=%d", + f, field_name, data_name, data, type); + hid_t dataset; + h5b_fdata_t *b = f->b; + + h5_err_t exists; + TRY (exists = hdf5_link_exists (b->field_gid, data_name)); + if ( exists > 0 ) { + TRY (dataset = hdf5_open_dataset (b->field_gid, data_name)); + hid_t type_file; + TRY( type_file = hdf5_get_dataset_type (dataset) ); + if ( type != type_file ) { + H5_PRIV_FUNC_LEAVE (h5_error( + H5_ERR_HDF5, + "Field '%s' already has type '%s' " + "but was written as '%s'.", + field_name, + hdf5_get_type_name (type_file), + hdf5_get_type_name (type))); + } + } else { + TRY (dataset = hdf5_create_dataset( + b->field_gid, + data_name, + type, + b->shape, + b->dcreate_prop)); + } +#ifdef PARALLEL_IO + TRY (h5priv_start_throttle (f)); +#endif + TRY (hdf5_write_dataset( + dataset, + type, + b->memshape, + b->diskshape, + f->props->xfer_prop, + data)); +#ifdef PARALLEL_IO + TRY (h5priv_end_throttle (f)); +#endif + TRY (hdf5_close_dataset (dataset)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +h5b_write_scalar_data ( + const h5_file_t fh, /*!< IN: file handle */ + const char *field_name, /*!< IN: name of field */ + const void *data, /*!< IN: data to write */ + const hid_t type /*!< IN: data type */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, field_name='%s', data=%p, type=%d", + f, field_name, data, type); + CHECK_TIMEGROUP (f); + CHECK_WRITABLE_MODE (f); + CHECK_LAYOUT (f); + + TRY( h5bpriv_create_field_group(f, field_name) ); + TRY( _select_hyperslab_for_writing(f) ); + TRY( _write_data(f, field_name, H5_BLOCKNAME_X, data, type) ); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5b_write_vector3d_data ( + const h5_file_t fh, /*!< IN: file handle */ + const char *field_name, /*!< IN: name of field */ + const void *xdata, /*!< IN: x data to write */ + const void *ydata, /*!< IN: y data to write */ + const void *zdata, /*!< IN: z data to write */ + const hid_t type /*!< IN: data type */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, field_name='%s', " + "xdata=%p, " + "ydata=%p, " + "zdata=%p, " + "type=%d", + f, field_name, xdata, ydata, zdata, type); + CHECK_TIMEGROUP( f ); + CHECK_WRITABLE_MODE( f ); + CHECK_LAYOUT( f ); + + TRY( h5bpriv_create_field_group(f, field_name) ); + TRY( _select_hyperslab_for_writing(f) ); + TRY( _write_data(f, field_name, H5_BLOCKNAME_X, xdata, type) ); + TRY( _write_data(f, field_name, H5_BLOCKNAME_Y, ydata, type) ); + TRY( _write_data(f, field_name, H5_BLOCKNAME_Z, zdata, type) ); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +static h5_err_t +_select_hyperslab_for_reading ( + const h5_file_p f, /*!< IN: file handle */ + const hid_t dataset + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "f=%p, dataset=%d", f, dataset); + h5b_fdata_t *b = f->b; + h5b_partition_t *p = b->user_layout; + int rank; + hsize_t field_dims[3]; + hsize_t start[3] = { + p->k_start, + p->j_start, + p->i_start + }; + hsize_t stride[3] = { 1, 1, 1 }; + hsize_t part_dims[3] = { + p->k_end - p->k_start + 1, + p->j_end - p->j_start + 1, + p->i_end - p->i_start + 1 + }; + + TRY( h5bpriv_release_hyperslab(f) ); + + TRY (b->diskshape = hdf5_get_dataset_space (dataset)); + + TRY (rank = hdf5_get_dims_of_dataspace(b->diskshape, field_dims, NULL)); + if (rank != 3) + H5_PRIV_FUNC_LEAVE ( + h5_error( + H5_ERR_INVAL, + "H5Block dataset has bad rank '%d' instead" + " of rank 3! Is the file corrupt?", + rank)); + + if ( (field_dims[0] < (hsize_t)b->k_max) || + (field_dims[1] < (hsize_t)b->j_max) || + (field_dims[2] < (hsize_t)b->i_max) ) + H5_PRIV_FUNC_LEAVE ( + h5_error( + H5_ERR_VIEW, + "H5Block dataset has invalid view. " + "Is the file corrupt?")); + + h5_debug ( + "field_dims: (%lld,%lld,%lld)", + (long long)field_dims[2], + (long long)field_dims[1], + (long long)field_dims[0] ); + + TRY (b->memshape = hdf5_create_dataspace (rank, part_dims, NULL)); + + TRY (hdf5_select_hyperslab_of_dataspace( + b->diskshape, + H5S_SELECT_SET, + start, + stride, + part_dims, + NULL)); + + h5_debug ( + "Select hyperslab: " + "start=(%lld,%lld,%lld), " + "stride=(%lld,%lld,%lld), " + "dims=(%lld,%lld,%lld)", + (long long)start[2], + (long long)start[1], + (long long)start[0], + (long long)stride[2], + (long long)stride[1], + (long long)stride[0], + (long long)part_dims[2], + (long long)part_dims[1], + (long long)part_dims[0] ); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static h5_err_t +read_data ( + const h5_file_p f, /*!< IN: file handle */ + const char *dataset_name, /*!< IN: name of dataset */ + void *data, /*!< OUT: ptr to read buffer */ + const hid_t type /*!< IN: data type */ + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "f=%p, dataset_name=%s, data=%p, type=%d", + f, dataset_name, data, type); + hid_t dataset; + h5b_fdata_t *b = f->b; + + TRY (dataset = hdf5_open_dataset (b->field_gid, dataset_name)); + TRY (_select_hyperslab_for_reading (f, dataset) ); +#ifdef PARALLEL_IO + TRY (h5priv_start_throttle (f)); +#endif + TRY (hdf5_read_dataset( + dataset, + type, + f->b->memshape, + f->b->diskshape, + f->props->xfer_prop, + data)); +#ifdef PARALLEL_IO + TRY (h5priv_end_throttle (f)); +#endif + TRY (hdf5_close_dataset(dataset)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +h5b_read_scalar_data ( + const h5_file_p fh, /*!< IN: file handle */ + const char *field_name, /*!< IN: name of field */ + void *data, /*!< OUT: read bufer */ + const hid_t type /*!< IN: data type */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, field_name='%s', data=%p, type=%d", + f, field_name, data, type); + CHECK_TIMEGROUP( f ); + CHECK_LAYOUT( f ); + + TRY( h5bpriv_open_field_group(f, field_name) ); + TRY( read_data(f, H5_BLOCKNAME_X, data, type) ); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5b_read_vector3d_data ( + const h5_file_p fh, /*!< IN: file handle */ + const char *field_name, /*!< IN: name of field */ + void *xdata, /*!< IN: x data to write */ + void *ydata, /*!< IN: y data to write */ + void *zdata, /*!< IN: z data to write */ + const hid_t type /*!< IN: data type */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, field_name='%s', " + "xdata=%p, " + "ydata=%p, " + "zdata=%p, " + "type=%d", + f, field_name, xdata, ydata, zdata, type); + CHECK_TIMEGROUP( f ); + CHECK_LAYOUT( f ); + + TRY( h5bpriv_open_field_group(f, field_name) ); + TRY( read_data(f, H5_BLOCKNAME_X, xdata, type) ); + TRY( read_data(f, H5_BLOCKNAME_Y, ydata, type) ); + TRY( read_data(f, H5_BLOCKNAME_Z, zdata, type) ); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + diff --git a/src/h5core/h5b_readwrite_private.h b/src/h5core/h5b_readwrite_private.h new file mode 100644 index 0000000..215ce20 --- /dev/null +++ b/src/h5core/h5b_readwrite_private.h @@ -0,0 +1,24 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5B_READWRITE_PRIVATE_H +#define __H5B_READWRITE_PRIVATE_H + +#include "h5core/h5_types.h" + +h5_err_t +h5bpriv_open_file ( + const h5_file_p f + ); + +h5_err_t +h5bpriv_close_file ( + const h5_file_p f + ); +#endif diff --git a/src/h5core/h5b_types_private.h b/src/h5core/h5b_types_private.h new file mode 100644 index 0000000..837363b --- /dev/null +++ b/src/h5core/h5b_types_private.h @@ -0,0 +1,39 @@ +#ifndef __H5B_TYPES_PRIVATE_H +#define __H5B_TYPES_PRIVATE_H + +struct h5b_partition { + h5_int64_t i_start; + h5_int64_t i_end; + h5_int64_t j_start; + h5_int64_t j_end; + h5_int64_t k_start; + h5_int64_t k_end; +}; + +struct h5b_fdata { + h5_id_t step_idx; + h5_size_t i_max; + h5_size_t j_max; + h5_size_t k_max; + struct h5b_partition user_layout[1]; + struct h5b_partition write_layout[1]; + int have_layout; + + MPI_Comm cart_comm; + h5_size_t i_grid; + h5_size_t j_grid; + h5_size_t k_grid; + int have_grid; + + hid_t shape; + hid_t memshape; + hid_t diskshape; + hid_t block_gid; + hid_t field_gid; + hid_t dcreate_prop; + + MPI_Datatype partition_mpi_t; +}; +typedef struct h5b_fdata h5b_fdata_t; +typedef struct h5b_partition h5b_partition_t; +#endif diff --git a/src/h5core/h5t_access_private.h b/src/h5core/h5t_access_private.h new file mode 100644 index 0000000..38dd439 --- /dev/null +++ b/src/h5core/h5t_access_private.h @@ -0,0 +1,352 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5T_ACCESS_PRIVATE_H +#define __H5T_ACCESS_PRIVATE_H + +#include "h5core/h5_types.h" +#include "h5t_types_private.h" + +struct h5t_access_methods { +#if defined(PARALLEL_IO) + MPI_Datatype (*get_mpi_type_of_glb_elem)( + h5t_mesh_t* const m); +#endif + h5_loc_elem_t* (*get_loc_elem)( + h5t_mesh_t* const, const h5_loc_idx_t); + h5_glb_idx_t (*get_loc_elem_glb_idx)( + h5t_mesh_t* const, const h5_loc_idx_t); + h5_glb_idx_t (*set_loc_elem_glb_idx)( + h5t_mesh_t* const, const h5_loc_idx_t, const h5_glb_idx_t); + h5_loc_idx_t (*get_loc_elem_parent_idx)( + h5t_mesh_t* const, const h5_loc_idx_t); + h5_loc_idx_t (*set_loc_elem_parent_idx)( + h5t_mesh_t* const, const h5_loc_idx_t, const h5_loc_idx_t); + h5_loc_id_t (*get_loc_elem_child_idx)( + h5t_mesh_t* const, const h5_loc_idx_t); + h5_loc_id_t (*set_loc_elem_child_idx)( + h5t_mesh_t* const, const h5_loc_idx_t, const h5_loc_idx_t); + h5_lvl_idx_t (*get_loc_elem_level_idx)( + h5t_mesh_t* const, const h5_loc_idx_t); + h5_lvl_idx_t (*set_loc_elem_level_idx)( + h5t_mesh_t* const, const h5_loc_idx_t, const h5_lvl_idx_t); + h5_loc_idx_t* (*get_loc_elem_vertex_indices)( + h5t_mesh_t* const, const h5_loc_idx_t); + h5_loc_idx_t* (*get_loc_elem_vertex_indices_of_array)( + h5t_mesh_t* const, const h5_loc_idx_t, const h5_loc_elem_t* loc_elems); + h5_loc_idx_t (*get_loc_elem_vertex_idx)( + h5t_mesh_t* const, const h5_loc_idx_t, const h5_loc_idx_t); + h5_loc_idx_t (*set_loc_elem_vertex_idx)( + h5t_mesh_t* const, const h5_loc_idx_t, const h5_loc_idx_t, const h5_loc_idx_t); + h5_loc_idx_t* (*get_loc_elem_neighbor_indices)( + h5t_mesh_t* const, const h5_loc_idx_t); + h5_loc_idx_t (*get_loc_elem_neighbor_idx)( + h5t_mesh_t* const, const h5_loc_idx_t, const h5_loc_idx_t); + h5_loc_idx_t (*set_loc_elem_neighbor_idx)( + h5t_mesh_t* const, const h5_loc_idx_t, const h5_loc_idx_t, const h5_loc_idx_t); + h5_loc_id_t (*get_loc_entity_parent)( + h5t_mesh_t* const, h5_loc_id_t); + h5_err_t (*get_loc_entity_children)( + h5t_mesh_t* const, const h5_loc_id_t, h5_loc_id_t*); + + h5_glb_elem_t* (*alloc_glb_elems)(h5t_mesh_t* const, const size_t); + h5_glb_elem_t* (*get_glb_elem)(h5_glb_elem_t*, const h5_loc_idx_t); + h5_glb_elem_t* (*copy_glb_elems)(h5_glb_elem_t*, h5_loc_idx_t, + h5_glb_elem_t*, h5_loc_idx_t, + size_t); + h5_err_t (*sort_glb_elems)(h5_glb_elem_t*, size_t); + h5_glb_idx_t (*get_glb_elem_idx)(h5_glb_elem_t* const, const h5_loc_idx_t); + h5_lvl_idx_t (*get_glb_elem_level)(h5_glb_elem_t* const, const h5_loc_idx_t); + h5_glb_idx_t* (*get_glb_elem_vertices)(h5_glb_elem_t* const, const h5_loc_idx_t); + h5_glb_idx_t* (*get_glb_elem_neighbors)(h5_glb_elem_t* const, const h5_loc_idx_t); + + h5_err_t (*set_geom_boundary_elem_flag)(h5t_mesh_t* const, const h5_loc_idx_t); + int (*is_geom_boundary_elem)(h5t_mesh_t* const, const h5_loc_idx_t); + int (*is_boundary_facet)(h5t_mesh_t* const, const h5_loc_idx_t, const h5_loc_idx_t); + int (*is_boundary_face)(h5t_mesh_t* const, const int, const h5_loc_idx_t, const h5_loc_idx_t); +}; + +extern struct h5t_access_methods h5tpriv_access_trim_methods; +extern struct h5t_access_methods h5tpriv_access_tetm_methods; + +#if defined(PARALLEL_IO) +static inline MPI_Datatype +h5tpriv_get_mpi_type_of_glb_elem ( + h5t_mesh_t* const m + ) { + return m->methods->access->get_mpi_type_of_glb_elem (m); +} +#endif + +static inline h5_loc_elem_t* +h5tpriv_get_loc_elem ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return m->methods->access->get_loc_elem(m, elem_idx); +} + +static inline h5_glb_idx_t +h5tpriv_set_loc_elem_glb_idx ( + h5t_mesh_t* const m, + h5_loc_idx_t loc_elem_idx, + h5_glb_idx_t glb_elem_idx + ) { + return m->methods->access->set_loc_elem_glb_idx(m, loc_elem_idx, glb_elem_idx); +} + +static inline h5_glb_idx_t +h5tpriv_get_loc_elem_glb_idx ( + h5t_mesh_t* const m, + h5_loc_idx_t loc_elem_idx + ) { + return m->methods->access->get_loc_elem_glb_idx(m, loc_elem_idx); +} + +static inline h5_loc_idx_t +h5tpriv_get_loc_elem_parent_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return m->methods->access->get_loc_elem_parent_idx(m, elem_idx); +} + +static inline h5_loc_idx_t +h5tpriv_set_loc_elem_parent_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t parent_idx + ) { + return m->methods->access->set_loc_elem_parent_idx(m, elem_idx, parent_idx); +} + +static inline h5_loc_idx_t +h5tpriv_get_loc_elem_child_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return m->methods->access->get_loc_elem_child_idx(m, elem_idx); +} + +static inline h5_loc_idx_t +h5tpriv_set_loc_elem_child_idx ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx, + h5_loc_idx_t child_idx) { + return m->methods->access->set_loc_elem_child_idx (m, elem_idx, child_idx); +} + +static inline h5_lvl_idx_t +h5tpriv_get_loc_elem_level_idx ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx + ) { + return m->methods->access->get_loc_elem_level_idx (m, elem_idx); +} + +static inline h5_lvl_idx_t +h5tpriv_set_loc_elem_level_idx ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx, + h5_lvl_idx_t lvl_idx + ) { + return m->methods->access->set_loc_elem_level_idx (m, elem_idx, lvl_idx); +} + +static inline h5_loc_idx_t* +h5tpriv_get_loc_elem_vertex_indices ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx + ) { + return m->methods->access->get_loc_elem_vertex_indices (m, elem_idx); +} + +static inline h5_loc_idx_t* +h5tpriv_get_loc_elem_vertex_indices_of_array ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx, + h5_loc_elem_t* loc_elems + ) { + return m->methods->access->get_loc_elem_vertex_indices_of_array (m, elem_idx, loc_elems); +} + +static inline h5_loc_idx_t +h5tpriv_get_loc_elem_vertex_idx ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx, + h5_loc_idx_t face_idx + ) { + return m->methods->access->get_loc_elem_vertex_idx(m, elem_idx, face_idx); +} + +static inline h5_loc_idx_t +h5tpriv_set_loc_elem_vertex_idx ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx, + h5_loc_idx_t face_idx, + h5_loc_idx_t vertex_idx + ) { + return m->methods->access->set_loc_elem_vertex_idx(m, elem_idx, face_idx, vertex_idx); +} + +static inline h5_loc_idx_t* +h5tpriv_get_loc_elem_neighbor_indices ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx + ) { + return m->methods->access->get_loc_elem_neighbor_indices(m, elem_idx); +} + +static inline h5_loc_idx_t +h5tpriv_get_loc_elem_neighbor_idx ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx, + h5_loc_idx_t face_idx + ) { + return m->methods->access->get_loc_elem_neighbor_idx(m, elem_idx, face_idx); +} + +static inline h5_loc_idx_t +h5tpriv_set_loc_elem_neighbor_idx ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx, + h5_loc_idx_t face_idx, + h5_loc_idx_t idx + ) { + return m->methods->access->set_loc_elem_neighbor_idx(m, elem_idx, face_idx, idx); +} + +static inline h5_loc_id_t +h5tpriv_get_loc_entity_parent ( + h5t_mesh_t* const m, + h5_loc_id_t entity_id + ) { + return m->methods->access->get_loc_entity_parent (m, entity_id); +} + +static inline h5_err_t +h5tpriv_get_loc_entity_children ( + h5t_mesh_t* const m, + const h5_loc_id_t elem_id, + h5_loc_id_t* const children + ) { + return m->methods->access->get_loc_entity_children (m, elem_id, children); +} + +static inline h5_glb_elem_t* +h5tpriv_alloc_glb_elems ( + h5t_mesh_t* const m, const size_t n + ) { + return m->methods->access->alloc_glb_elems(m, n); +} + +static inline h5_glb_elem_t* +h5tpriv_get_glb_elem ( + h5t_mesh_t* m, + h5_glb_elem_t* const elems, + h5_loc_idx_t idx + ) { + return m->methods->access->get_glb_elem (elems, idx); +} + +static inline h5_glb_elem_t* +h5tpriv_copy_glb_elems ( + h5t_mesh_t* const m, + h5_glb_elem_t* dstbuf, + h5_loc_idx_t dstidx, + h5_glb_elem_t* srcbuf, + h5_loc_idx_t srcidx, + size_t count + ) { + return m->methods->access->copy_glb_elems (dstbuf, dstidx, srcbuf, srcidx, count); +} + +static inline h5_err_t +h5tpriv_sort_glb_elems ( + h5t_mesh_t* const m, + h5_glb_elem_t* elems, + size_t count + ) { + return m->methods->access->sort_glb_elems (elems, count); +} + +static inline h5_glb_idx_t +h5tpriv_get_glb_elem_idx ( + h5t_mesh_t* const m, + h5_glb_elem_t* const elems, + const h5_loc_idx_t idx + ) { + return m->methods->access->get_glb_elem_idx (elems, idx); +} + +static inline h5_lvl_idx_t +h5tpriv_get_glb_elem_level( + h5t_mesh_t* const m, + h5_glb_elem_t* const elems, + h5_loc_idx_t elem_idx + ) { + return m->methods->access->get_glb_elem_level (elems, elem_idx); +} + +static inline h5_glb_idx_t* +h5tpriv_get_glb_elem_vertices( + h5t_mesh_t* const m, + h5_glb_elem_t* const elems, + h5_loc_idx_t elem_idx + ) { + return m->methods->access->get_glb_elem_vertices (elems, elem_idx); +} + +static inline h5_glb_idx_t* +h5tpriv_get_glb_elem_neighbors( + h5t_mesh_t* const m, + h5_glb_elem_t* const elems, + h5_loc_idx_t elem_idx + ) { + return m->methods->access->get_glb_elem_neighbors (elems, elem_idx); +} + + +static inline h5_err_t +h5tpriv_set_geom_boundary_elem_flag ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx + ) { + return m->methods->access->set_geom_boundary_elem_flag (m, elem_idx); +} + +static inline int +h5tpriv_is_geom_boundary_elem ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx + ) { + return m->methods->access->is_geom_boundary_elem (m, elem_idx); +} + +static inline int +h5tpriv_is_boundary_facet ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx, + h5_loc_idx_t facet_idx + ) { + return m->methods->access->is_boundary_facet (m, elem_idx, facet_idx); +} + +static inline int +h5tpriv_is_boundary_face ( + h5t_mesh_t* const m, + const int dim, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t facet_idx + ) { + return m->methods->access->is_boundary_face (m, dim, elem_idx, facet_idx); +} + + +#endif diff --git a/src/h5core/h5t_access_tetm.c b/src/h5core/h5t_access_tetm.c new file mode 100644 index 0000000..771470b --- /dev/null +++ b/src/h5core/h5t_access_tetm.c @@ -0,0 +1,721 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5core/h5.h" +#include "h5_types_private.h" +#include "h5_init_private.h" +#include "h5t_types_private.h" +#include "h5t_model_private.h" +#include "h5t_access_private.h" + +/*** op's on local elements ***/ + +#if defined(PARALLEL_IO) +static MPI_Datatype +get_mpi_type_of_glb_elem ( + h5t_mesh_t* const m + ) { + return h5_dta_types.mpi_glb_tet; +} +#endif + +/*** op's on local elements ***/ +static h5_loc_elem_t* +get_loc_elem ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return (h5_loc_elem_t*)(((h5_loc_tet_t*)m->loc_elems) + elem_idx); +} + +static h5_glb_idx_t +get_loc_elem_glb_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return ((h5_loc_tet_t*)m->loc_elems)[elem_idx].glb_idx; +} + +static h5_glb_idx_t +set_loc_elem_glb_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_glb_idx_t glb_idx + ) { + ((h5_loc_tet_t*)m->loc_elems)[elem_idx].glb_idx = glb_idx; + return glb_idx; +} + +static h5_loc_idx_t +get_loc_elem_parent_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return ((h5_loc_tet_t*)m->loc_elems)[elem_idx].parent_idx; +} + +static h5_loc_idx_t +set_loc_elem_parent_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t parent_idx + ) { + ((h5_loc_tet_t*)m->loc_elems)[elem_idx].parent_idx = parent_idx; + return parent_idx; +} + +static h5_loc_idx_t +get_loc_elem_child_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return ((h5_loc_tet_t*)m->loc_elems)[elem_idx].child_idx; +} + +static h5_loc_idx_t +set_loc_elem_child_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t child_idx + ) { + ((h5_loc_tet_t*)m->loc_elems)[elem_idx].child_idx = child_idx; + return child_idx; +} + +static h5_lvl_idx_t +get_loc_elem_level_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return ((h5_loc_tet_t*)m->loc_elems)[elem_idx].level_idx; +} + +static h5_lvl_idx_t +set_loc_elem_level_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_lvl_idx_t level_idx + ) { + ((h5_loc_tet_t*)m->loc_elems)[elem_idx].level_idx = level_idx; + return level_idx; +} + +static h5_loc_idx_t* +get_loc_elem_vertex_indices ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return ((h5_loc_tet_t*)m->loc_elems)[elem_idx].vertex_indices; +} + +static h5_loc_idx_t* +get_loc_elem_vertex_indices_of_array ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_elem_t* loc_elems + ) { + return ((h5_loc_tet_t*)loc_elems)[elem_idx].vertex_indices; +} + +static h5_loc_idx_t +get_loc_elem_vertex_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t face_idx + ) { + return ((h5_loc_tet_t*)m->loc_elems)[elem_idx].vertex_indices[face_idx]; +} + +static h5_loc_idx_t +set_loc_elem_vertex_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t face_idx, + const h5_loc_idx_t vertex_idx + ) { + ((h5_loc_tet_t*)m->loc_elems)[elem_idx].vertex_indices[face_idx] = vertex_idx; + return vertex_idx; +} + +static h5_loc_idx_t* +get_loc_elem_neighbor_indices ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return ((h5_loc_tet_t*)m->loc_elems)[elem_idx].neighbor_indices; +} + +static h5_loc_idx_t +get_loc_elem_neighbor_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t face_idx + ) { + return ((h5_loc_tet_t*)m->loc_elems)[elem_idx].neighbor_indices[face_idx]; +} + +static h5_loc_idx_t +set_loc_elem_neighbor_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t face_idx, + const h5_loc_idx_t neighbor_idx + ) { + ((h5_loc_tet_t*)m->loc_elems)[elem_idx].neighbor_indices[face_idx] = neighbor_idx; + return neighbor_idx; +} + +/*** op's on global elements ***/ +static h5_glb_elem_t* +alloc_glb_elems ( + h5t_mesh_t* const m, const size_t size + ) { + H5_PRIV_FUNC_ENTER (h5_glb_elem_p, "m=%p, size=%zu", m, size); + h5_glb_elem_p buf; + TRY (buf = h5_calloc (size, sizeof(h5_glb_tet_t))); + H5_PRIV_FUNC_RETURN (buf); +} + +static h5_glb_elem_t* +get_glb_elem ( + h5_glb_elem_t* __elems, + const h5_loc_idx_t idx + ) { + h5_glb_tet_t* elems = (h5_glb_tet_t*)__elems; + return (h5_glb_elem_t*)(elems+idx); +} + +static h5_glb_elem_t* +copy_glb_elems ( + h5_glb_elem_t* dstbuf, + h5_loc_idx_t dstidx, + h5_glb_elem_t* srcbuf, + h5_loc_idx_t srcidx, + size_t count + ) { + h5_glb_tet_t* dst = (h5_glb_tet_t*)dstbuf + dstidx; + h5_glb_tet_t* src = (h5_glb_tet_t*)srcbuf + srcidx; + memcpy (dst, src, count*sizeof(*src)); + return (h5_glb_elem_t*)dst; +} + +int compare_glb_elems(const void *p_a, const void *p_b) { + return ((h5_glb_tet_t*) p_a)->idx - ((h5_glb_tet_t*) p_b)->idx; +} + + +static h5_err_t +sort_glb_elems ( + h5_glb_elem_t* elems, + size_t count + ) { + qsort(elems,(int) count, sizeof (h5_glb_tet_t), compare_glb_elems); + return H5_SUCCESS; +} + + +static h5_glb_idx_t +get_glb_elem_idx ( + h5_glb_elem_t* const elems, + const h5_loc_idx_t elem_idx + ) { + return ((h5_glb_tet_t*)elems)[elem_idx].idx; +} + +static h5_lvl_idx_t +get_glb_elem_level ( + h5_glb_elem_t* const elems, + const h5_loc_idx_t elem_idx + ) { + return ((h5_glb_tet_t*)elems)[elem_idx].level_idx; +} + +static h5_glb_idx_t* +get_glb_elem_vertices ( + h5_glb_elem_t* const elems, + const h5_loc_idx_t elem_idx + ) { + return ((h5_glb_tet_t*)elems)[elem_idx].vertex_indices; +} + +static h5_glb_idx_t* +get_glb_elem_neighbors ( + h5_glb_elem_t* const elems, + const h5_loc_idx_t elem_idx + ) { + return ((h5_glb_tet_t*)elems)[elem_idx].neighbor_indices; +} + +static h5_err_t +set_geom_boundary_elem_flag ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx + ) { + ((h5_loc_tet_t*)m->loc_elems)[elem_idx].flags |= H5_GEOBORDER_ENTITY; + return H5_SUCCESS; +} + +static int +is_geom_boundary_elem ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return (((h5_loc_tet_t*)m->loc_elems)[elem_idx].flags & H5_GEOBORDER_ENTITY) ? 1 : 0; +} + +static int +is_boundary_facet ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t facet_idx + ) { + return (((h5_loc_tet_t*)m->loc_elems)[elem_idx].neighbor_indices[facet_idx] == -1); +} + +static int +is_boundary_face ( + h5t_mesh_t* const m, + const int dim, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t facet_idx + ) { + UNUSED_ARGUMENT (m); + UNUSED_ARGUMENT (dim); + UNUSED_ARGUMENT (elem_idx); + UNUSED_ARGUMENT (facet_idx); + + return h5_error_internal (); +} + +/* + From time to time we need the parent entity of a given entity. This is + simple for cells but requires some knowledge about the mesh refinement + method for all other entities. Of course not all entities have a parent + anyway. + + Just as an reminder: New vertices in a refined tetrahedron P: + + 3 + ** + ** * + * * * + * * * + * * * + * 9 * + * * * + 7 * 8 + * * * + * 2 * + * * * * * + * * * * + * 5 6 * + * * * * + ** ** + 0 * * * * * * * 4 * * * * * * *1 + + The new cells (with n_P: number of children): + + n_P vertices + 0 0,4,5,7 + 1 4,1,6,8 + 2 5,6,2,9 + 3 7,8,9,3 + 4 4,5,6,8 + 5 4,5,7,8 + 6 5,6,8,9 + 7 5,7,8,9 + + Given an entity E we know: + + * C: the cell E belongs to, + * e_C: the id of E in C and E = [e_C,C] + * P: the parent of C, if any + * n_P: the number of child C + + */ + +/* + Parent of tetrahedron + --------------------- + This is the simplest case: each children knows his parent. + + + Parent of triangle + ------------------ + Given an triangle E, we want to know the parent triangle of E. + + Refining a tetrahedron gives 4*4 new triangles on the surface of the + tetrahedron. We don't care about the inner triangles. + + The new triangles on the surface of P are: + + n_P vertices triangles + 0 0,4,5,7 (0,4,5)* (0,4,7)* (0,5,7)* (4,5,7) + 1 4,1,6,8 (4,1,6)* (4,1,8)* (4,6,8) (1,6,8)* + 2 5,6,2,9 (5,6,2)* (5,6,9) (5,2,9)* (6,2,9)* + 3 7,8,9,3 (7,8,9) (7,8,3)* (7,9,3)* (8,9,3)* + 4 4,5,6,8 (4,5,6)* (4,5,8) (4,6,8) (5,6,8) + 5 4,5,7,8 (4,5,7) (4,5,8) (4,7,8)* (5,7,8) + 6 5,6,8,9 (5,6,8) (5,6,9) (5,8,9) (6,8,9)* + 7 5,7,8,9 (5,7,8) (5,7,9)* (5,8,9) (7,8,9) + + Now let's have a look on triangle id's. We want to map an triangle id e_C + of cell C to the triangle id e_P of its parent P. As we can see in above + table, the triangle (0,4,5) has id 0 and belongs to child 0. The parent + triangle of (0,4,5) is (0,1,2) also with id 0. It is simple to prove, that + the triangle id of child and parent are identical in all cases. + + triangle tetrahedron triangle id parent triangle id + (0,4,5) (0,4,5,7) 0 0 + (0,4,7) (0,4,5,7) 1 1 + (0,5,7) (0,4,5,7) 2 2 + (4,1,6) (4,1,6,8) 0 0 + (4,1,8) (4,1,6,8) 1 1 + (1,6,8) (4,1,6,8) 3 3 + (5,6,2) (5,6,2,9) 0 0 + (5,2,9) (5,6,2,9) 2 2 + (6,2,9) (5,6,2,9) 3 3 + (7,8,3) (7,8,9,3) 1 1 + (7,9,3) (7,8,9,3) 2 2 + (8,9,3) (7,8,9,3) 3 3 + (4,5,6) (4,5,6,8) 0 0 + (4,7,8) (4,5,7,8) 2 1 + (6,8,9) (5,6,8,9) 3 3 + (5,7,9) (5,7,8,9) 1 2 + + This gives us the following matrix: + + t r i a n g l e i d + 0 1 2 3 + + c 0 0 1 2 -1 + h 1 0 1 -1 3 + i 2 0 -1 2 3 + l 3 -1 1 2 3 + d 4 0 -1 -1 -1 + 5 -1 -1 1 -1 + n 6 -1 -1 -1 3 + o 7 -1 2 -1 -1 + + */ +int map_tri_to_parent_face[8][4] = { + { 0, 1, 2,-1}, // 0 + { 0, 1,-1, 3}, // 1 + { 0,-1, 2, 3}, // 2 + {-1, 1, 2, 3}, // 3 + { 0,-1,-1,-1}, // 4 + {-1,-1, 1,-1}, // 5 + {-1,-1,-1, 3}, // 6 + {-1, 2,-1,-1} // 7 +}; + +/* + Parent of edge + -------------- + Given an edge E, we want to know the parent edge of E. + + Refining P we get 25 new edges. But only 12 edges are intersecting with + edges of P. Only for these 12 edges we have a parent edges in P. So, + we don't have to care about the 13 other edges. It is obvious, that only + the first for children of P have edges intersecting with edges of P. + These edges are marked in the following table. + + Edges of the first four childern of P: + + n_P vertices edges + 0 0,4,5,7 (0,4)* (0,5)* (4,5) (0,7)* (4,7) (5,7) + 1 4,1,6,8 (4,1)* (4,6) (1,6)* (4,8) (1,8)* (6,8) + 2 5,6,2,9 (5,6) (5,2)* (6,2)* (5,9) (6,9) (2,9)* + 3 7,8,9,3 (7,8) (7,9) (8,9) (7,3)* (8,3)* (9,3)* + + Now let's have a look on edge id's. We want to map an edge id e_C of cell + C to the edge id e_P of its parent P. As we can see in above table, the + edge (0,4) has id 0 and belongs to child 0. The parent edge of (0,4) is + (0,1) also with id 0. It is simple to prove, that the edge id in child + and parent are identical in all cases. This gives us the following matrix: + + e d g e i d + 0 1 2 3 4 5 + + c 0 0 1 -1 3 -1 -1 + h 1 0 -1 2 -1 4 -1 + i 2 -1 1 2 -1 -1 5 + l 3 -1 -1 -1 3 4 5 + d 4 -1 -1 -1 -1 -1 -1 + 5 -1 -1 -1 -1 -1 -1 + n 6 -1 -1 -1 -1 -1 -1 + o 7 -1 -1 -1 -1 -1 -1 + + How to read it? Given an entity E, we know the element/cell C + entity E is belonging to and the edge number e_C. We know the parent P of + C and we know which number of child C is, let this be n_P. + + The matrix maps child number and edge id of E to the corresponding edge + id of the parent. + + f (n_P, e_C) -> e_P + + If the result is -1, no parent edge exists. Otherwise the parent edge is + [e_P,P] + + */ +int map_edge_to_parent_face[8][6] = { + { 0, 1,-1, 3,-1,-1}, + { 0,-1, 2,-1, 4,-1}, + {-1, 1, 2,-1,-1, 5}, + {-1,-1,-1, 3, 4, 5}, + {-1,-1,-1,-1,-1,-1}, + {-1,-1,-1,-1,-1,-1}, + {-1,-1,-1,-1,-1,-1}, + {-1,-1,-1,-1,-1,-1}, +}; +/* + Parent of vertex + ---------------- + This case is trivial. + */ +int map_vertex_to_parent_face[8][4] = { + { 0,-1,-1,-1}, + {-1, 1,-1,-1}, + {-1,-1, 2,-1}, + {-1,-1,-1, 3}, + {-1,-1,-1,-1}, + {-1,-1,-1,-1}, + {-1,-1,-1,-1}, + {-1,-1,-1,-1}, +}; + +static h5_loc_id_t +get_loc_entity_parent ( + h5t_mesh_t* const m, + h5_loc_id_t entity_id + ) { + // extract type ID and face index + h5_loc_id_t type_id = h5tpriv_get_entity_type (entity_id); + h5_loc_idx_t face_idx = h5tpriv_get_face_idx (entity_id); + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + + // # of children + h5_loc_idx_t parent_idx = get_loc_elem_parent_idx (m, elem_idx); + if (parent_idx < 0) + return H5_NOK; + h5_loc_idx_t firstborn_idx = get_loc_elem_child_idx (m, parent_idx); + h5_loc_idx_t num_child = elem_idx - firstborn_idx; + + switch (type_id) { + case H5T_TYPE_VERTEX: { + face_idx = map_vertex_to_parent_face[num_child][face_idx]; + break; + } + case H5T_TYPE_EDGE: { + face_idx = map_edge_to_parent_face[num_child][face_idx]; + break; + } + case H5T_TYPE_TRIANGLE: { + face_idx = map_edge_to_parent_face[num_child][face_idx]; + break; + } + case H5T_TYPE_TET: { + break; + } + default: + h5_error_internal (); + } + return (face_idx != -1) ? + h5tpriv_build_entity_id (type_id, face_idx, parent_idx) : -1; +} + +static h5_err_t +get_children_of_loc_elem ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, // in + h5_loc_idx_t elem_idx, // in + h5_loc_id_t* children // out + ) { + if (face_idx != 0) { + return h5_error_internal (); + } + h5_loc_idx_t idx = ((h5_loc_tet_t*)m->loc_elems)[elem_idx].child_idx; + children[0] = h5tpriv_build_tet_id ((h5_loc_idx_t)0, idx++); + children[1] = h5tpriv_build_tet_id ((h5_loc_idx_t)0, idx++); + children[2] = h5tpriv_build_tet_id ((h5_loc_idx_t)0, idx++); + children[3] = h5tpriv_build_tet_id ((h5_loc_idx_t)0, idx++); + children[4] = h5tpriv_build_tet_id ((h5_loc_idx_t)0, idx++); + children[5] = h5tpriv_build_tet_id ((h5_loc_idx_t)0, idx++); + children[6] = h5tpriv_build_tet_id ((h5_loc_idx_t)0, idx++); + children[7] = h5tpriv_build_tet_id ((h5_loc_idx_t)0, idx); + + return H5_SUCCESS; +} +/* + Compute direct children of a triangle. + + Face 0 Face 1 Face 2 Face 3 + 1 1 2 1 + + + + + + |\ |\ |\ |\ + | \ | \ | \ | \ + | \ | \ | \ | \ + | \ | \ | \ | \ + 4+----+6 4+----+8 5+----+9 6+----+8 + |\ |\ |\ |\ |\ |\ |\ |\ + | \ | \ | \ | \ | \ | \ | \ | \ + | \ | \ | \ | \ | \ | \ | \ | \ + | \| \ | \| \ | \| \ | \| \ + |+----+----+ +----+----+ +----+----+ +----+----+ + 0 5 2 0 7 3 0 7 3 2 9 3 + + z ^ z ^ y ^ z ^ + | | | | + |+--> +--> +--> +--> + y x x x + + Triangle: face idx, #child + + [0,4,5]: 0, 0 [0,4,7]: 1, 0 [0,5,7]: 2, 0 [1,6,8]: 3, 1 + [1,4,6]: 0, 1 [1,4,8]: 1, 1 [2,5,9]: 2, 2 [2,6,9]: 3, 2 + [2,5,6]: 0, 2 [3,7,8]: 1, 3 [3,7,9]: 2, 3 [3,8,9]: 3, 3 + [4,5,6]: 0, 4 [4,7,8]: 2, 5 [5,7,9]: 1, 7 [6,8,9]: 3, 6 + + */ +static inline h5_err_t +get_children_of_loc_triangle ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, // in + h5_loc_idx_t elem_idx, // in + h5_loc_id_t* children // out + ) { + h5_loc_idx_t map[4][4][2] = { + {{0,0},{0,1},{0,2},{0,4}}, // face 0 + {{1,0},{1,1},{1,3},{2,5}}, // face 1 + {{2,0},{2,2},{2,3},{1,7}}, // face 2 + {{3,1},{3,2},{3,3},{3,6}} // face 3 + }; + int num_faces = h5tpriv_ref_elem_get_num_facets (m); + if ((face_idx < 0) || (face_idx >= num_faces)) { + return h5_error_internal (); + } + h5_loc_idx_t idx = ((h5_loc_tet_t*)m->loc_elems)[elem_idx].child_idx; + children[0] = h5tpriv_build_triangle_id ( + map[face_idx][0][0], idx+map[face_idx][0][1]); + children[1] = h5tpriv_build_triangle_id ( + map[face_idx][1][0], idx+map[face_idx][1][1]); + children[2] = h5tpriv_build_triangle_id ( + map[face_idx][2][0], idx+map[face_idx][2][1]); + children[3] = h5tpriv_build_triangle_id ( + map[face_idx][3][0], idx+map[face_idx][3][1]); + return H5_SUCCESS; +} + +/* + Return the two direct children of the edge given by face and + element index of first child. + */ +static h5_err_t +get_children_of_loc_edge ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, + h5_loc_idx_t elem_idx, + h5_loc_id_t* children + ) { + /* + Please read the note about the offsets in the corresponding file + for triangle meshes. + */ + int offs[6][2] = { {0,1}, // edge 0 + {0,2}, // edge 1 + {1,2}, // edge 2 + {0,3}, // edge 3 + {1,3}, // edge 4 + {2,3} // edge 5 + }; + h5_loc_idx_t num_faces = h5tpriv_ref_elem_get_num_edges (m); + if ((face_idx < 0) || (face_idx >= num_faces)) { + return h5_error_internal (); + } + h5_loc_idx_t idx = ((h5_loc_tet_t*)m->loc_elems)[elem_idx].child_idx; + children[0] = h5tpriv_build_edge_id (face_idx, idx+offs[face_idx][0]); + children[1] = h5tpriv_build_edge_id (face_idx, idx+offs[face_idx][1]); + return H5_SUCCESS; +} + +static h5_err_t +get_loc_entity_children ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_id_t* const children + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llx, children=%p", + m, (long long)entity_id, children); + + const h5_loc_id_t type_id = h5tpriv_get_entity_type (entity_id); + const h5_loc_idx_t face_idx = h5tpriv_get_face_idx (entity_id); + const h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + + if (h5tpriv_is_leaf_elem (m, &((h5_loc_tet_t*)m->loc_elems)[elem_idx])) { + H5_PRIV_FUNC_LEAVE (H5_NOK); // not refined + } + switch (type_id) { + case H5T_TYPE_TET: { + H5_PRIV_FUNC_LEAVE ( + get_children_of_loc_elem (m, face_idx, elem_idx, children)); + break; + } + case H5T_TYPE_TRIANGLE: { + H5_PRIV_FUNC_LEAVE ( + get_children_of_loc_triangle (m, face_idx, elem_idx, children)); + break; + } + case H5T_TYPE_EDGE: { + H5_PRIV_FUNC_LEAVE ( + get_children_of_loc_edge (m, face_idx, elem_idx, children)); + } + default: + H5_PRIV_FUNC_LEAVE (h5_error_internal ()); + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +struct h5t_access_methods h5tpriv_access_tetm_methods = { +#if defined(PARALLEL_IO) + get_mpi_type_of_glb_elem, +#endif + get_loc_elem, + get_loc_elem_glb_idx, + set_loc_elem_glb_idx, + get_loc_elem_parent_idx, + set_loc_elem_parent_idx, + get_loc_elem_child_idx, + set_loc_elem_child_idx, + get_loc_elem_level_idx, + set_loc_elem_level_idx, + get_loc_elem_vertex_indices, + get_loc_elem_vertex_indices_of_array, + get_loc_elem_vertex_idx, + set_loc_elem_vertex_idx, + get_loc_elem_neighbor_indices, + get_loc_elem_neighbor_idx, + set_loc_elem_neighbor_idx, + get_loc_entity_parent, + get_loc_entity_children, + alloc_glb_elems, + get_glb_elem, + copy_glb_elems, + sort_glb_elems, + get_glb_elem_idx, + get_glb_elem_level, + get_glb_elem_vertices, + get_glb_elem_neighbors, + set_geom_boundary_elem_flag, + is_geom_boundary_elem, + is_boundary_facet, + is_boundary_face, +}; + diff --git a/src/h5core/h5t_access_trim.c b/src/h5core/h5t_access_trim.c new file mode 100644 index 0000000..b452969 --- /dev/null +++ b/src/h5core/h5t_access_trim.c @@ -0,0 +1,420 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5core/h5.h" +#include "h5_init_private.h" +#include "h5t_types_private.h" +#include "h5t_model_private.h" +#include "h5t_access_private.h" + +#if defined(PARALLEL_IO) +static MPI_Datatype +get_mpi_type_of_glb_elem ( + h5t_mesh_t* const m + ) { + return h5_dta_types.mpi_glb_triangle; +} +#endif + +/*** op's on local elements ***/ +static h5_loc_elem_t* +get_loc_elem ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return (h5_loc_elem_t*)(((h5_loc_tri_t*)m->loc_elems) + elem_idx); +} + +static h5_glb_idx_t +get_loc_elem_glb_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return ((h5_loc_tri_t*)m->loc_elems)[elem_idx].glb_idx; +} + +static h5_glb_idx_t +set_loc_elem_glb_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_glb_idx_t glb_idx + ) { + ((h5_loc_tri_t*)m->loc_elems)[elem_idx].glb_idx = glb_idx; + return glb_idx; +} + +static h5_loc_idx_t +get_loc_elem_parent_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return ((h5_loc_tri_t*)m->loc_elems)[elem_idx].parent_idx; +} + +static h5_loc_idx_t +set_loc_elem_parent_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t parent_idx + ) { + ((h5_loc_tri_t*)m->loc_elems)[elem_idx].parent_idx = parent_idx; + return parent_idx; +} + +static h5_loc_idx_t +get_loc_elem_child_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return ((h5_loc_tri_t*)m->loc_elems)[elem_idx].child_idx; +} + +static h5_loc_idx_t +set_loc_elem_child_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t child_idx + ) { + ((h5_loc_tri_t*)m->loc_elems)[elem_idx].child_idx = child_idx; + return child_idx; +} + +static h5_lvl_idx_t +get_loc_elem_level_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return ((h5_loc_tri_t*)m->loc_elems)[elem_idx].level_idx; +} + +static h5_lvl_idx_t +set_loc_elem_level_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_lvl_idx_t level_idx + ) { + ((h5_loc_tri_t*)m->loc_elems)[elem_idx].level_idx = level_idx; + return level_idx; +} + +static h5_loc_idx_t* +get_loc_elem_vertex_indices ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return ((h5_loc_tri_t*)m->loc_elems)[elem_idx].vertex_indices; +} + +static h5_loc_idx_t* +get_loc_elem_vertex_indices_of_array ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_elem_t* loc_elems + ) { + return ((h5_loc_tri_t*)loc_elems)[elem_idx].vertex_indices; +} + +static h5_loc_idx_t +get_loc_elem_vertex_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t face_idx + ) { + return ((h5_loc_tri_t*)m->loc_elems)[elem_idx].vertex_indices[face_idx]; +} + +static h5_loc_idx_t +set_loc_elem_vertex_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t face_idx, + const h5_loc_idx_t vertex_idx + ) { + ((h5_loc_tri_t*)m->loc_elems)[elem_idx].vertex_indices[face_idx] = vertex_idx; + return vertex_idx; +} + +static h5_loc_idx_t* +get_loc_elem_neighbor_indices ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return ((h5_loc_tri_t*)m->loc_elems)[elem_idx].neighbor_indices; +} + +static h5_loc_idx_t +get_loc_elem_neighbor_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t face_idx + ) { + return ((h5_loc_tri_t*)m->loc_elems)[elem_idx].neighbor_indices[face_idx]; +} + +static h5_loc_idx_t +set_loc_elem_neighbor_idx ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t face_idx, + const h5_loc_idx_t neighbor_idx + ) { + ((h5_loc_tri_t*)m->loc_elems)[elem_idx].neighbor_indices[face_idx] = neighbor_idx; + return neighbor_idx; +} + + +/*** op's on global elements ***/ +static h5_glb_elem_t* +alloc_glb_elems ( + h5t_mesh_t* const m, const size_t size + ) { + H5_PRIV_FUNC_ENTER (h5_glb_elem_p, "m=%p, size=%zu", m, size); + h5_glb_elem_p buf; + TRY (buf = h5_calloc (size, sizeof(h5_glb_tri_t))); + H5_PRIV_FUNC_RETURN (buf); +} + +static h5_glb_elem_t* +get_glb_elem ( + h5_glb_elem_t* __elems, + const h5_loc_idx_t idx + ) { + h5_glb_tri_t* elems = (h5_glb_tri_t*)__elems; + return (h5_glb_elem_t*)(elems+idx); +} + +static h5_glb_elem_t* +copy_glb_elems ( + h5_glb_elem_t* dstbuf, + h5_loc_idx_t dstidx, + h5_glb_elem_t* srcbuf, + h5_loc_idx_t srcidx, + size_t count + ) { + h5_glb_tri_t* dst = (h5_glb_tri_t*)dstbuf + dstidx; + h5_glb_tri_t* src = (h5_glb_tri_t*)srcbuf + srcidx; + memcpy (dst, src, count*sizeof(*src)); + return (h5_glb_elem_t*)dst; +} + +int compare_glb_elems(const void *p_a, const void *p_b) { + return ((h5_glb_tri_t*) p_a)->idx - ((h5_glb_tri_t*) p_b)->idx; +} + + +static h5_err_t +sort_glb_elems ( + h5_glb_elem_t* elems, + size_t count + ) { + h5_glb_tri_t* tri = (h5_glb_tri_t*) elems; + qsort(tri, count, sizeof (*tri), compare_glb_elems); + return H5_SUCCESS; +} + +static h5_glb_idx_t +get_glb_elem_idx ( + h5_glb_elem_t* const elems, + const h5_loc_idx_t elem_idx + ) { + h5_glb_tri_t* tris = (h5_glb_tri_t*)elems; + return tris[elem_idx].idx; +} + +static h5_lvl_idx_t +get_glb_elem_level ( + h5_glb_elem_t* const elems, + const h5_loc_idx_t elem_idx + ) { + return ((h5_glb_tri_t*)elems)[elem_idx].level_idx; +} + +static h5_glb_idx_t* +get_glb_elem_vertices ( + h5_glb_elem_t* const elems, + const h5_loc_idx_t elem_idx + ) { + return ((h5_glb_tri_t*)elems)[elem_idx].vertex_indices; +} + +static h5_glb_idx_t* +get_glb_elem_neighbors ( + h5_glb_elem_t* const elems, + const h5_loc_idx_t elem_idx + ) { + return ((h5_glb_tri_t*)elems)[elem_idx].neighbor_indices; +} + +static h5_err_t +set_geom_boundary_elem_flag ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx + ) { + ((h5_loc_tri_t*)m->loc_elems)[elem_idx].flags |= H5_GEOBORDER_ENTITY; + return H5_SUCCESS; +} + +static int +is_geom_boundary_elem ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + return (((h5_loc_tri_t*)m->loc_elems)[elem_idx].flags & H5_GEOBORDER_ENTITY) ? 1 : 0; +} + +static int +is_boundary_facet ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t facet_idx + ) { + return (((h5_loc_tri_t*)m->loc_elems)[elem_idx].neighbor_indices[facet_idx] == -1); +} + +static int +is_boundary_face ( + h5t_mesh_t* const m, + const int dim, + const h5_loc_idx_t elem_idx, + const h5_loc_idx_t facet_idx + ) { + UNUSED_ARGUMENT (m); + UNUSED_ARGUMENT (dim); + UNUSED_ARGUMENT (elem_idx); + UNUSED_ARGUMENT (facet_idx); + return h5_error_internal (); +} + +static h5_loc_id_t +get_loc_entity_parent ( + h5t_mesh_t* const m, + h5_loc_id_t entity_id + ) { + // TODO + return h5_error_not_implemented (); +} + +static h5_err_t +get_children_of_loc_elem ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, // in + h5_loc_idx_t elem_idx, // in + h5_loc_id_t* children // out + ) { + if (face_idx != 0) { + return h5_error_internal (); + } + h5_loc_idx_t idx = ((h5_loc_tri_t*)m->loc_elems)[elem_idx].child_idx; + children[0] = h5tpriv_build_tet_id ((h5_loc_idx_t)0, idx++); + children[1] = h5tpriv_build_tet_id ((h5_loc_idx_t)0, idx++); + children[2] = h5tpriv_build_tet_id ((h5_loc_idx_t)0, idx++); + children[3] = h5tpriv_build_tet_id ((h5_loc_idx_t)0, idx++); + + return H5_SUCCESS; +} + + +static h5_err_t +get_children_of_loc_edge ( + h5t_mesh_t* const m, + const h5_loc_idx_t face_idx, + const h5_loc_idx_t elem_idx, + h5_loc_id_t* children + ) { + /* + Please note: The face index of the children and the father is + always the same. The only think we have to know, is the offset + to the element index of the first child. This is either 0, 1 or + 2. The third child is an "inner" child which doesn't superpose edges + of the parent. + + The direct children of edge 0 of an element are edge 0 of the + first child and edge 0 of the second child, giving the offset 0 + and 1 for this edge. + */ + int off[3][2] = { {0,1}, // edge 0 + {0,2}, // edge 1 + {1,2} // edge 2 + }; + h5_loc_idx_t num_faces = h5tpriv_ref_elem_get_num_edges (m); + if ((face_idx < 0) || (face_idx >= num_faces)) { + return h5_error_internal (); + } + h5_loc_idx_t idx = ((h5_loc_tri_t*)m->loc_elems)[elem_idx].child_idx; + children[0] = h5tpriv_build_edge_id (face_idx, idx+off[face_idx][0]); + children[1] = h5tpriv_build_edge_id (face_idx, idx+off[face_idx][1]); + return H5_SUCCESS; +} + +static h5_err_t +get_loc_entity_children ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_id_t* const children + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llx, children=%p", + m, (long long)entity_id, children); + + const h5_loc_id_t type_id = h5tpriv_get_entity_type (entity_id); + const h5_loc_idx_t face_idx = h5tpriv_get_face_idx (entity_id); + const h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + + if (h5tpriv_is_leaf_elem (m, &((h5_loc_tri_t*)m->loc_elems)[elem_idx])) { + H5_PRIV_FUNC_LEAVE (H5_NOK); // not refined + } + switch (type_id) { + case H5T_TYPE_TRIANGLE: { + H5_PRIV_FUNC_LEAVE ( + get_children_of_loc_elem (m, face_idx, elem_idx, children)); + break; + } + case H5T_TYPE_EDGE: { + H5_PRIV_FUNC_LEAVE ( + get_children_of_loc_edge (m, face_idx, elem_idx, children)); + } + } + H5_PRIV_FUNC_RETURN (h5_error_internal ()); +} + +struct h5t_access_methods h5tpriv_access_trim_methods = { +#if defined(PARALLEL_IO) + get_mpi_type_of_glb_elem, +#endif + get_loc_elem, + get_loc_elem_glb_idx, + set_loc_elem_glb_idx, + get_loc_elem_parent_idx, + set_loc_elem_parent_idx, + get_loc_elem_child_idx, + set_loc_elem_child_idx, + get_loc_elem_level_idx, + set_loc_elem_level_idx, + get_loc_elem_vertex_indices, + get_loc_elem_vertex_indices_of_array, + get_loc_elem_vertex_idx, + set_loc_elem_vertex_idx, + get_loc_elem_neighbor_indices, + get_loc_elem_neighbor_idx, + set_loc_elem_neighbor_idx, + get_loc_entity_parent, + get_loc_entity_children, + alloc_glb_elems, + get_glb_elem, + copy_glb_elems, + sort_glb_elems, + get_glb_elem_idx, + get_glb_elem_level, + get_glb_elem_vertices, + get_glb_elem_neighbors, + set_geom_boundary_elem_flag, + is_geom_boundary_elem, + is_boundary_facet, + is_boundary_face, +}; diff --git a/src/h5core/h5t_adjacencies.c b/src/h5core/h5t_adjacencies.c new file mode 100644 index 0000000..ae414c7 --- /dev/null +++ b/src/h5core/h5t_adjacencies.c @@ -0,0 +1,56 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5core/h5.h" + +#include "h5t_types_private.h" +#include "h5t_adjacencies_private.h" +#include "h5t_map_private.h" +#include "h5t_core_private.h" + +#include + +h5_err_t +h5t_get_adjacencies ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + const h5_int32_t dim, + h5_loc_idlist_t** list + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, entity_id=%llu, dim=%d, list=%p", + m, (long long unsigned)entity_id, dim, list); + H5_CORE_API_RETURN (h5tpriv_get_adjacencies (m, entity_id, dim, list)); +} + +h5_err_t +h5t_release_list_of_adjacencies ( + h5t_mesh_t* const m, + h5_loc_idlist_t** list + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p, list=%p", m, list); + UNUSED_ARGUMENT (m); + H5_CORE_API_RETURN (h5priv_free_loc_idlist (list)); +} + +h5_err_t +h5t_find_te2 ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, + h5_loc_idx_t elem_idx, + h5_loc_idlist_t** retval + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, face_idx=%lld, elem_idx=%lld, retval=%p", + m, + (long long)face_idx, + (long long)elem_idx, + retval); + H5_CORE_API_RETURN (h5tpriv_find_te2 (m,face_idx,elem_idx,retval)); +} diff --git a/src/h5core/h5t_adjacencies_private.h b/src/h5core/h5t_adjacencies_private.h new file mode 100644 index 0000000..51f6fb9 --- /dev/null +++ b/src/h5core/h5t_adjacencies_private.h @@ -0,0 +1,44 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5T_ADJACENCIES_PRIVATE_H +#define __H5T_ADJACENCIES_PRIVATE_H + +#include "h5core/h5_types.h" +#include "h5t_types_private.h" +#include "h5_debug_private.h" + +struct h5t_adjacency_methods { + h5_err_t (*get_adjacencies)( + h5t_mesh_t* const, + const h5_loc_id_t, const h5_int32_t, h5_loc_idlist_t**); +}; + +extern struct h5t_adjacency_methods h5tpriv_trim_adjacency_methods; +extern struct h5t_adjacency_methods h5tpriv_tetm_adjacency_methods; + +static inline h5_err_t +h5tpriv_get_adjacencies ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + const h5_int32_t dim, + h5_loc_idlist_t** list + ) { + H5_PRIV_API_ENTER (h5_err_t, + "m=%p, entity_id=%lld, dim=%d, list=%p", + m, (long long)entity_id, dim, list); + if (m->methods->adjacency == NULL) { + H5_PRIV_API_LEAVE (h5_error_internal ()); + } + H5_PRIV_API_RETURN (m->methods->adjacency->get_adjacencies( + m, entity_id, dim, list)); +} + + +#endif diff --git a/src/h5core/h5t_adjacencies_tetm.c b/src/h5core/h5t_adjacencies_tetm.c new file mode 100644 index 0000000..3675cef --- /dev/null +++ b/src/h5core/h5t_adjacencies_tetm.c @@ -0,0 +1,802 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5_maps_private.h" +#include "h5t_core_private.h" +#include "h5t_types_private.h" +#include "h5t_model_private.h" +#include "h5t_map_private.h" +#include "h5t_access_private.h" +#include "h5t_adjacencies_private.h" + +#include + +#define H5_LOC_ELEM_T h5_loc_tet_t + + +/* + For the computation of some adjacency relations we need to know either + the descendant or the sections of a triangle or an edge. We use the term + "descendant" for the set of all grandchildren and "sections" for the + descendant of the entity which has been refined most. The following + example helps to show the difference: + + We want to know the descendant and sections of the edge (0,1). Let (0,1) + be an edge of the tetrahedra T_i and T_j. Let the edge (0,1) in T_i be + + 0---3---2-------1 + + and in T_j: + + 0---3-4-2-------1 + + We have the following descendants: + (0,3), (3,2), (2,1), (3,4), (4,2) + + and the sections: + (0,3), (3,4), (4,2), (2,1) + + Note: (3,2) is *not* a section of (0,1) + */ +static inline h5_err_t +get_descendant_of_edge ( + h5t_mesh_t* const m, + h5_loc_id_t entity_id, + h5_loc_idlist_t** children + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, children=%p", + m, + (long long unsigned)entity_id, + children); + h5_loc_idlist_t* te = NULL; + TRY( h5tpriv_find_te (m, entity_id, &te ) ); + h5_loc_id_t* edge_idp = te->items; + h5_loc_id_t* end = te->items+te->num_items; + do { + h5_loc_id_t edge_ids[2] = {-1,-1}; + TRY (h5tpriv_get_loc_entity_children (m, *edge_idp, edge_ids)); + if (edge_ids[0] == -1) { + TRY( h5priv_insert_into_loc_idlist (children, *edge_idp, -1) ); + } else { + TRY( get_descendant_of_edge (m, edge_ids[0], children) ); + TRY( get_descendant_of_edge (m, edge_ids[1], children) ); + } + } while (++edge_idp < end); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_sections_of_edge ( + h5t_mesh_t* const m, + h5_loc_id_t entity_id, + h5_loc_idlist_t** children + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, children=%p", + m, + (long long unsigned)entity_id, + children); + h5_loc_idlist_t* te = NULL; + TRY( h5tpriv_find_te (m, entity_id, &te) ); + h5_loc_id_t* edge_idp = te->items; + h5_loc_id_t* end = te->items+te->num_items; + int refined = 0; + do { + h5_loc_id_t edge_ids[2] = {-1,-1}; + TRY (h5tpriv_get_loc_entity_children (m, *edge_idp, edge_ids)); + if (edge_ids[0] >= 0) { + refined = 1; + TRY (get_sections_of_edge (m, edge_ids[0], children)); + TRY (get_sections_of_edge (m, edge_ids[1], children)); + } + } while (++edge_idp < end); + if (!refined) { + TRY( h5priv_insert_into_loc_idlist (children, te->items[0], -1) ); + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_descendant_of_triangle ( + h5t_mesh_t* const m, + h5_loc_id_t entity_id, + h5_loc_idlist_t** children + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, children=%p", + m, + (long long unsigned)entity_id, + children); + h5_loc_idlist_t* td; + TRY( h5tpriv_find_td (m, entity_id, &td) ); + h5_loc_id_t* triangle_idp = td->items; + h5_loc_id_t* end = td->items+td->num_items; + do { + h5_loc_id_t triangle_ids[4] = {-1,-1,-1,-1}; + TRY (h5tpriv_get_loc_entity_children (m, *triangle_idp, triangle_ids)); + + if (triangle_ids[0] == -1) { + TRY (h5priv_insert_into_loc_idlist (children, *triangle_idp, -1) ); + } else { + TRY (get_descendant_of_triangle (m, triangle_ids[0], children)); + TRY (get_descendant_of_triangle (m, triangle_ids[1], children)); + TRY (get_descendant_of_triangle (m, triangle_ids[2], children)); + TRY (get_descendant_of_triangle (m, triangle_ids[3], children)); + } + } while (++triangle_idp < end); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_sections_of_triangle ( + h5t_mesh_t* const m, + h5_loc_id_t entity_id, + h5_loc_idlist_t** children + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, children=%p", + m, + (long long unsigned)entity_id, + children); + h5_loc_idlist_t* td; + TRY (h5tpriv_find_td (m, entity_id, &td)); + h5_loc_id_t* triangle_idp = td->items; + h5_loc_id_t* end = td->items+td->num_items; + int refined = 0; + do { + h5_loc_id_t triangle_ids[4] = {-1,-1,-1,-1}; + TRY (h5tpriv_get_loc_entity_children (m, *triangle_idp, triangle_ids)); + if (triangle_ids[0] >= 0) { + refined = 1; + TRY (get_sections_of_triangle (m, triangle_ids[0], children)); + TRY (get_sections_of_triangle (m, triangle_ids[1], children)); + TRY (get_sections_of_triangle (m, triangle_ids[2], children)); + TRY (get_sections_of_triangle (m, triangle_ids[3], children)); + } + } while (++triangle_idp < end); + if (!refined) { + TRY( h5priv_insert_into_loc_idlist (children, td->items[0], -1) ); + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Add unique ID of vertex given by face and element index to list. + */ +static inline h5_err_t +add_vertex2 ( + h5t_mesh_t* const m, // in + h5_loc_idlist_t** list, // out + h5_loc_idx_t face_idx, // in + h5_loc_idx_t elem_idx // in + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, list=%p, face_idx=%llu, elem_idx=%llu", + m, list, + (long long unsigned)face_idx, + (long long unsigned)elem_idx); + h5_loc_idlist_t* tv; + TRY( h5tpriv_find_tv2 (m, face_idx, elem_idx, &tv) ); + TRY( h5priv_search_in_loc_idlist (list, tv->items[0]) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Add unique ID of edge given by ID or face and element index. + */ +static inline h5_err_t +add_edge ( + h5t_mesh_t* const m, // in + h5_loc_idlist_t** list, // out + h5_loc_id_t entity_id // in + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, list=%p, entity_id=%llu", + m, list, + (long long unsigned)entity_id); + h5_loc_idlist_t* te = NULL; + TRY( h5tpriv_find_te (m, entity_id, &te) ); + TRY( h5priv_search_in_loc_idlist (list, te->items[0]) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +add_edge2 ( + h5t_mesh_t* const m, // in + h5_loc_idlist_t** list, // out + h5_loc_idx_t face_idx, // in + h5_loc_idx_t elem_idx // in + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, list=%p, face_idx=%llu, elem_idx=%llu", + m, list, + (long long unsigned)face_idx, + (long long unsigned)elem_idx); + h5_loc_idlist_t* te; + TRY( h5tpriv_find_te2 (m, face_idx, elem_idx, &te) ); + TRY( h5priv_search_in_loc_idlist (list, te->items[0]) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Add unique ID of triangle given by ID or face and element index. + */ +static inline h5_err_t +add_triangle ( + h5t_mesh_t* const m, // in + h5_loc_idlist_t** list, // out + h5_loc_idx_t entity_id // in + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, list=%p, entity_id=%llu", + m, list, + (long long unsigned)entity_id); + h5_loc_idlist_t* td; + TRY( h5tpriv_find_td (m, entity_id, &td) ); + TRY( h5priv_search_in_loc_idlist (list, td->items[0]) ); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +add_triangle2 ( + h5t_mesh_t* const m, // in + h5_loc_idlist_t** list, // out + h5_loc_idx_t face_idx, // in + h5_loc_idx_t elem_idx // in + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, list=%p, face_idx=%llu, elem_idx=%llu", + m, list, + (long long unsigned)face_idx, + (long long unsigned)elem_idx); + h5_loc_idlist_t* td; + TRY( h5tpriv_find_td2 (m, face_idx, elem_idx, &td) ); + TRY( h5priv_search_in_loc_idlist (list, td->items[0]) ); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +add_elem2 ( + h5_loc_idlist_t** list, // out + h5_loc_idx_t elem_idx // in + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "list=%p, elem_idx=%llu", + list, + (long long unsigned)elem_idx); + h5_loc_id_t elem_id = h5tpriv_build_tet_id ((h5_loc_idx_t)0, elem_idx); + TRY( h5priv_search_in_loc_idlist (list, elem_id) ); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Get upward adjacent edges to vertex given by ID. + */ +static inline h5_err_t +get_edges_uadj_to_vertex ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + h5_loc_idx_t vertex_idx; + TRY( h5tpriv_get_vertex_index_of_vertex (m, entity_id, &vertex_idx) ); + h5_loc_idlist_t* tv = m->adjacencies.tv.v[vertex_idx]; + + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t* vertex_idp = tv->items; + h5_loc_id_t* end = vertex_idp + tv->num_items; + do { + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (*vertex_idp); + h5_loc_idx_t face_idx = h5tpriv_get_face_idx (*vertex_idp); + H5_LOC_ELEM_T* elem = ((H5_LOC_ELEM_T*)m->loc_elems)+elem_idx; + + if (!h5tpriv_is_leaf_elem (m, elem)) { + continue; + } + TRY( add_edge2 (m, list, + h5tpriv_ref_elem_get_edge_idx ( + m, 0, face_idx, 0), + elem_idx) ); + TRY( add_edge2 (m, list, + h5tpriv_ref_elem_get_edge_idx ( + m, 0, face_idx, 1), + elem_idx) ); + TRY( add_edge2 (m, list, + h5tpriv_ref_elem_get_edge_idx ( + m, 0, face_idx, 2), + elem_idx) ); + } while (++vertex_idp < end); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_triangles_uadj_to_vertex ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + /* get list of all tetrahedra connected to given vertex + Note: this list may include tetrahedra which are not in + the (current) leaf grid */ + h5_loc_idx_t vertex_idx; + TRY( h5tpriv_get_vertex_index_of_vertex (m, entity_id, &vertex_idx) ); + h5_loc_idlist_t* tv = m->adjacencies.tv.v[vertex_idx]; + + // build list of upward adjacent triangles + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t* vertex_idp = tv->items; + h5_loc_id_t* end = vertex_idp + tv->num_items; + do { + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (*vertex_idp); + h5_loc_idx_t face_idx = h5tpriv_get_face_idx (*vertex_idp); + H5_LOC_ELEM_T* elem = ((H5_LOC_ELEM_T*)m->loc_elems) + elem_idx; + if (!h5tpriv_is_leaf_elem (m, elem)) { + continue; + } + TRY( add_triangle2 (m, list, + h5tpriv_ref_elem_get_triangle_idx ( + m, 0, face_idx, 0), + elem_idx) ); + TRY( add_triangle2 (m, list, + h5tpriv_ref_elem_get_triangle_idx ( + m, 0, face_idx, 1), + elem_idx) ); + TRY( add_triangle2 (m, list, + h5tpriv_ref_elem_get_triangle_idx ( + m, 0, face_idx, 2), + elem_idx) ); + } while (++vertex_idp < end); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_tets_uadj_to_vertex ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + h5_loc_idx_t vertex_idx; + TRY( h5tpriv_get_vertex_index_of_vertex (m, entity_id, &vertex_idx) ); + h5_loc_idlist_t* tv = m->adjacencies.tv.v[vertex_idx]; + + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t* vertex_idp = tv->items; + h5_loc_id_t* end = vertex_idp + tv->num_items; + do { + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (*vertex_idp); + H5_LOC_ELEM_T* elem = ((H5_LOC_ELEM_T*)m->loc_elems) + elem_idx; + if (!h5tpriv_is_leaf_elem (m, elem)) { + continue; + } + TRY( add_elem2 (list, elem_idx) ); + } while (++vertex_idp < end); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_triangles_uadj_to_edge ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + h5_loc_idlist_t* children; + TRY( h5priv_alloc_loc_idlist (&children, 8) ); + TRY( get_descendant_of_edge (m, entity_id, &children) ); + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t* edge_idp = children->items; + h5_loc_id_t* end = children->items+children->num_items; + do { + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (*edge_idp); + h5_loc_idx_t face_idx = h5tpriv_get_face_idx (*edge_idp); + TRY( add_triangle2 (m, list, + h5tpriv_ref_elem_get_triangle_idx ( + m, 1, face_idx, 0), + elem_idx) ); + TRY( add_triangle2 (m, list, + h5tpriv_ref_elem_get_triangle_idx ( + m, 1, face_idx, 1), + elem_idx) ); + } while (++edge_idp < end); + TRY (h5priv_free_loc_idlist (&children)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_tets_uadj_to_edge ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + h5_loc_idlist_t* children; + TRY( h5priv_alloc_loc_idlist (&children, 8) ); + TRY( get_descendant_of_edge (m, entity_id, &children) ); + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t* edge_idp = children->items; + h5_loc_id_t* end = children->items+children->num_items; + do { + TRY( add_elem2 (list, h5tpriv_get_elem_idx (*edge_idp)) ); + } while (++edge_idp < end); + TRY( h5priv_free_loc_idlist (&children) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_tets_uadj_to_triangle ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + h5_loc_idlist_t* children; + TRY( h5priv_alloc_loc_idlist (&children, 8) ); + TRY( get_descendant_of_triangle (m, entity_id, &children) ); + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t* triangle_idp = children->items; + h5_loc_id_t* end = triangle_idp + children->num_items; + do { + TRY( add_elem2 (list, h5tpriv_get_elem_idx (*triangle_idp)) ); + } while (++triangle_idp < end); + TRY( h5priv_free_loc_idlist (&children) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_vertices_dadj_to_edge ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + h5_loc_idlist_t* children; + TRY( h5priv_alloc_loc_idlist (&children, 8) ); + TRY( get_sections_of_edge (m, entity_id, &children) ); + // build list of unique vertex IDs + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t* edge_idp = children->items; + h5_loc_id_t* end = edge_idp + children->num_items; + do { + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (*edge_idp); + h5_loc_idx_t face_idx = h5tpriv_get_face_idx (*edge_idp); + + TRY( add_vertex2 (m, list, + h5tpriv_ref_elem_get_vertex_idx ( + m, 1, face_idx, 0), + elem_idx) ); + TRY( add_vertex2 (m, list, + h5tpriv_ref_elem_get_vertex_idx ( + m, 1, face_idx, 1), + elem_idx) ); + } while (++edge_idp < end); + TRY( h5priv_free_loc_idlist(&children) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Compute downward adjacent vertices of all edges of triangle. + */ +static inline h5_err_t +get_vertices_dadj_to_triangle ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + h5_loc_idlist_t* children; + TRY( h5priv_alloc_loc_idlist (&children, 8) ); + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + h5_loc_idx_t face_idx = h5tpriv_get_face_idx (entity_id); + h5_loc_idx_t edge_idx; + int i; + // loop over all vertices of given triangle + for (i = 0; i < 3; i++) { + edge_idx = h5tpriv_ref_elem_get_edge_idx (m, 2, face_idx, i); + TRY( get_sections_of_edge ( + m, + h5tpriv_build_edge_id (edge_idx, elem_idx), + &children) ); + } + // build list of unique vertex IDs + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t* edge_idp = children->items; + h5_loc_id_t* end = edge_idp + children->num_items; + do { + elem_idx = h5tpriv_get_elem_idx (*edge_idp); + edge_idx = h5tpriv_get_face_idx (*edge_idp); + + TRY( add_vertex2 (m, list, + h5tpriv_ref_elem_get_vertex_idx ( + m, 1, edge_idx, 0), + elem_idx) ); + TRY( add_vertex2 (m, list, + h5tpriv_ref_elem_get_vertex_idx ( + m, 1, edge_idx, 1), + elem_idx) ); + } while (++edge_idp < end ); + TRY( h5priv_free_loc_idlist(&children) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Compute downward adjacent vertices to tetrahedron given by ID. + */ +static inline h5_err_t +get_vertices_dadj_to_tet ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + h5_loc_idlist_t* children; + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + TRY( h5priv_alloc_loc_idlist (&children, 8) ); + // loop over all edges of tetrahedron + h5_loc_idx_t edge_idx = h5tpriv_ref_elem_get_num_edges(m); + while (--edge_idx >= 0) { + TRY( get_sections_of_edge ( + m, + h5tpriv_build_edge_id ( edge_idx, elem_idx ), + &children) ); + } + // build list of unique vertex IDs + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t* edge_idp = children->items; + h5_loc_id_t* end = edge_idp + children->num_items; + do { + elem_idx = h5tpriv_get_elem_idx (*edge_idp); + edge_idx = h5tpriv_get_face_idx (*edge_idp); + + TRY( add_vertex2 (m, list, + h5tpriv_ref_elem_get_vertex_idx ( + m, 1, edge_idx, 0), + elem_idx) ); + TRY( add_vertex2 (m, list, + h5tpriv_ref_elem_get_vertex_idx ( + m, 1, edge_idx, 1), + elem_idx) ); + } while (++edge_idp < end); + TRY( h5priv_free_loc_idlist(&children) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_edges_dadj_to_triangle ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + h5_loc_idlist_t* children; + TRY( h5priv_alloc_loc_idlist (&children, 8) ); + h5_loc_idx_t face_idx = h5tpriv_get_face_idx (entity_id); + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + // loop over all three edges of triangle + h5_loc_idx_t i; + for (i = 0; i < 3; i++) { + TRY( get_sections_of_edge ( + m, + h5tpriv_build_edge_id ( + h5tpriv_ref_elem_get_edge_idx ( + m, 2, face_idx, i), + elem_idx ), + &children) ); + } + // build list of unique edge IDs + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t* edge_idp = children->items; + h5_loc_id_t* end = edge_idp + children->num_items; + do { + TRY( add_edge (m, list, *edge_idp) ); + } while (++edge_idp < end); + TRY( h5priv_free_loc_idlist (&children) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_edges_dadj_to_tet ( + h5t_mesh_t* const m, + const h5_loc_id_t elem_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, elem_id=%llu, list=%p", + m, (long long unsigned)elem_id, list); + h5_loc_idlist_t* children; + TRY( h5priv_alloc_loc_idlist (&children, 8) ); + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (elem_id); + + // loop over all edges of tet + h5_loc_idx_t edge_idx = h5tpriv_ref_elem_get_num_edges(m); + while (--edge_idx >= 0) { + TRY( get_sections_of_edge ( + m, + h5tpriv_build_edge_id (edge_idx, elem_idx), + &children) ); + } + // build list of unique edge IDs + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t* edge_idp = children->items; + h5_loc_id_t* end = edge_idp + children->num_items; + do { + TRY( add_edge (m, list, *edge_idp) ); + } while (++edge_idp < end); + TRY( h5priv_free_loc_idlist (&children) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_triangles_dadj_to_tet ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + h5_loc_idlist_t* children; + TRY( h5priv_alloc_loc_idlist (&children, 8) ); + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + // loop over all triangle of element + h5_loc_idx_t triangle_idx = h5tpriv_ref_elem_get_num_facets(m); + while (--triangle_idx >= 0) { + TRY( get_sections_of_triangle ( + m, + h5tpriv_build_edge_id (triangle_idx, elem_idx), + &children) ); + } + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t* triangle_idp = children->items; + h5_loc_id_t* end = triangle_idp + children->num_items; + do { + TRY( add_triangle (m, list, *triangle_idp) ); + } while (++triangle_idp < end); + TRY( h5priv_free_loc_idlist (&children) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +dim_error( + const h5_int32_t dim + ) { + return h5_error ( + H5_ERR_INVAL, + "Illegal dimension %ld", (long)dim); +} + +static inline h5_err_t +get_adjacencies_to_vertex ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + const h5_int32_t dim, + h5_loc_idlist_t** list + ) { + switch (dim) { + case 1: + return get_edges_uadj_to_vertex(m, entity_id, list); + case 2: + return get_triangles_uadj_to_vertex(m, entity_id, list); + case 3: + return get_tets_uadj_to_vertex(m, entity_id, list); + default: + return dim_error (dim); + } +} + +static inline h5_err_t +get_adjacencies_to_edge ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + const h5_int32_t dim, + h5_loc_idlist_t** list + ) { + switch (dim) { + case 0: + return get_vertices_dadj_to_edge(m, entity_id, list); + case 2: + return get_triangles_uadj_to_edge(m, entity_id, list); + case 3: + return get_tets_uadj_to_edge(m, entity_id, list); + default: + return dim_error (dim); + } +} + +static inline h5_err_t +get_adjacencies_to_triangle ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + const h5_int32_t dim, + h5_loc_idlist_t** list + ) { + switch (dim) { + case 0: + return get_vertices_dadj_to_triangle(m, entity_id, list); + case 1: + return get_edges_dadj_to_triangle(m, entity_id, list); + case 3: + return get_tets_uadj_to_triangle(m, entity_id, list); + default: + return dim_error (dim); + } +} + +static inline h5_err_t +get_adjacencies_to_tet ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + const h5_int32_t dim, + h5_loc_idlist_t** list + ) { + switch (dim) { + case 0: + return get_vertices_dadj_to_tet(m, entity_id, list); + case 1: + return get_edges_dadj_to_tet(m, entity_id, list); + case 2: + return get_triangles_dadj_to_tet(m, entity_id, list); + default: + return dim_error (dim); + } +} + +static h5_err_t +get_adjacencies ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + const h5_int32_t dim, + h5_loc_idlist_t** list + ) { + h5_loc_id_t entity_type = h5tpriv_get_entity_type (entity_id); + switch (entity_type) { + case H5T_TYPE_VERTEX: + return get_adjacencies_to_vertex (m, entity_id, dim, list); + case H5T_TYPE_EDGE: + return get_adjacencies_to_edge (m, entity_id, dim, list); + case H5T_TYPE_TRIANGLE: + return get_adjacencies_to_triangle (m, entity_id, dim, list); + case H5T_TYPE_TET: + return get_adjacencies_to_tet (m, entity_id, dim, list); + default: + break; + } + return h5_error_internal (); +} +struct h5t_adjacency_methods h5tpriv_tetm_adjacency_methods = { + get_adjacencies, +}; + diff --git a/src/h5core/h5t_adjacencies_trim.c b/src/h5core/h5t_adjacencies_trim.c new file mode 100644 index 0000000..8c3df0a --- /dev/null +++ b/src/h5core/h5t_adjacencies_trim.c @@ -0,0 +1,466 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5t_types_private.h" +#include "h5t_model_private.h" +#include "h5t_map_private.h" +#include "h5t_access_private.h" +#include "h5t_adjacencies_private.h" +#include "h5t_core_private.h" + +#include + +#define H5_LOC_ELEM_T h5_loc_tri_t + +/* + Please read the note about "descendants" and "sections" in the + corresponding file for tetrahedral meshes. + */ +static inline h5_err_t +get_descendant_of_edge ( + h5t_mesh_t* const m, + h5_loc_id_t entity_id, + h5_loc_idlist_t** children + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, children=%p", + m, + (long long unsigned)entity_id, + children); + h5_loc_idlist_t* te; + TRY( h5tpriv_find_te (m, entity_id, &te ) ); + h5_loc_id_t* edge_idp = te->items; + h5_loc_id_t* end = te->items + te->num_items; + do { + h5_loc_id_t edge_ids[2] = {-1,-1}; + TRY (h5tpriv_get_loc_entity_children (m, *edge_idp, edge_ids)); + if (edge_ids[0] == -1) { + TRY( h5priv_insert_into_loc_idlist (children, *edge_idp, -1) ); + } else { + TRY( get_descendant_of_edge (m, edge_ids[0], children) ); + TRY( get_descendant_of_edge (m, edge_ids[1], children) ); + } + } while (++edge_idp < end); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_sections_of_edge ( + h5t_mesh_t* const m, + h5_loc_id_t entity_id, + h5_loc_idlist_t** children + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, children=%p", + m, + (long long unsigned)entity_id, + children); + h5_loc_idlist_t* te; + TRY (h5tpriv_find_te (m, entity_id, &te)); + h5_loc_id_t* edge_idp = te->items; + h5_loc_id_t *end = te->items+te->num_items; + int refined = 0; + do { + h5_loc_id_t edge_ids[2] = {-1,-1}; + TRY (h5tpriv_get_loc_entity_children (m, *edge_idp, edge_ids)); + if (edge_ids[0] >= 0) { + refined = 1; + TRY (get_sections_of_edge (m, edge_ids[0], children)); + TRY (get_sections_of_edge (m, edge_ids[1], children)); + } + } while (++edge_idp < end); + if (!refined) { + TRY (h5priv_insert_into_loc_idlist (children, te->items[0], -1)); + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Add unique ID of vertex given by face and element index to list. + */ +static inline h5_err_t +add_vertex2 ( + h5t_mesh_t* const m, // in + h5_loc_idlist_t** list, // out + h5_loc_idx_t face_idx, // in + h5_loc_idx_t elem_idx // in + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, list=%p, face_idx=%llu, elem_idx=%llu", + m, list, + (long long unsigned)face_idx, + (long long unsigned)elem_idx); + h5_loc_idlist_t* tv; + TRY( h5tpriv_find_tv2 (m, face_idx, elem_idx, &tv) ); + TRY( h5priv_search_in_loc_idlist (list, tv->items[0]) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Add unique ID of edge given by ID or face and element index. + */ +static inline h5_err_t +add_edge ( + h5t_mesh_t* const m, // in + h5_loc_idlist_t** list, // out + h5_loc_id_t entity_id // in + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, list=%p, entity_id=%llu", + m, list, + (long long unsigned)entity_id); + h5_loc_idlist_t* te; + TRY( h5tpriv_find_te (m, entity_id, &te) ); + TRY( h5priv_search_in_loc_idlist (list, te->items[0]) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +add_edge2 ( + h5t_mesh_t* const m, + h5_loc_idlist_t** list, + h5_loc_idx_t face_idx, + h5_loc_idx_t elem_idx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, list=%p, face_idx=%llu, elem_idx=%llu", + m, list, + (long long unsigned)face_idx, + (long long unsigned)elem_idx); + h5_loc_idlist_t *te; + TRY( h5tpriv_find_te2 (m, face_idx, elem_idx, &te) ); + TRY( h5priv_search_in_loc_idlist (list, te->items[0]) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +add_elem2 ( + h5_loc_idlist_t** list, // out + h5_loc_idx_t elem_idx // in + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "list=%p, elem_idx=%llu", + list, + (long long unsigned)elem_idx); + h5_loc_id_t elem_id = h5tpriv_build_triangle_id ((h5_loc_idx_t)0, elem_idx); + TRY( h5priv_search_in_loc_idlist (list, elem_id) ); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Get upward adjacent edges to vertex given by ID + */ +static inline h5_err_t +get_edges_uadj_to_vertex ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + h5_loc_idx_t vertex_idx; + TRY( h5tpriv_get_vertex_index_of_vertex (m, entity_id, &vertex_idx) ); + h5_loc_idlist_t* tv = m->adjacencies.tv.v[vertex_idx]; + + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t* vertex_idp = tv->items; + h5_loc_id_t* end = vertex_idp + tv->num_items; + do { + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (*vertex_idp); + h5_loc_idx_t face_idx = h5tpriv_get_face_idx (*vertex_idp); + H5_LOC_ELEM_T* elem= ((H5_LOC_ELEM_T*)m->loc_elems) + elem_idx; + + if (!h5tpriv_is_leaf_elem (m, elem)) { + continue; + } + TRY( add_edge2 (m, list, + h5tpriv_ref_elem_get_edge_idx ( + m, 0, face_idx, 0), + elem_idx) ); + TRY( add_edge2 (m, list, + h5tpriv_ref_elem_get_edge_idx ( + m, 0, face_idx, 1), + elem_idx) ); + } while (++vertex_idp < end); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_triangles_uadj_to_vertex ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + h5_loc_idx_t vertex_idx; + TRY( h5tpriv_get_vertex_index_of_vertex (m, entity_id, &vertex_idx) ); + h5_loc_idlist_t* tv = m->adjacencies.tv.v[vertex_idx]; + + TRY ( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t *vertex_idp = tv->items; + h5_loc_id_t* end = vertex_idp + tv->num_items; + do { + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (*vertex_idp); + H5_LOC_ELEM_T* elem = ((H5_LOC_ELEM_T*)m->loc_elems) + elem_idx; + + if (!h5tpriv_is_leaf_elem (m, elem)) { + continue; + } + TRY (add_elem2 (list, elem_idx)); + } while (++vertex_idp < end); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_triangles_uadj_to_edge ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + h5_loc_idlist_t* children; + TRY( h5priv_alloc_loc_idlist (&children, 8) ); + TRY( get_descendant_of_edge (m, entity_id, &children) ); + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t *edge_idp = children->items; + h5_loc_id_t *end = children->items+children->num_items; + do { + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (*edge_idp); + TRY (add_elem2 (list, elem_idx)); + } while (++edge_idp < end); + TRY( h5priv_free_loc_idlist (&children) ); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_edges_adj_to_edge ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_idlist_t* children; + TRY( h5priv_alloc_loc_idlist (&children, 8) ); + TRY( get_sections_of_edge (m, entity_id, &children) ); + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t* edge_idp = children->items; + h5_loc_id_t* end = children->items+children->num_items; + do { + TRY( add_edge (m, list, *edge_idp) ); + } while (++edge_idp < end); + TRY( h5priv_free_loc_idlist(&children) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_vertices_dadj_to_edge ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + h5_loc_idlist_t* children; + TRY( h5priv_alloc_loc_idlist (&children, 8) ); + TRY( get_sections_of_edge (m, entity_id, &children) ); + TRY( h5priv_alloc_loc_idlist (list, 8) ); + h5_loc_id_t* edge_idp = children->items; + h5_loc_id_t* end = edge_idp + children->num_items; + do { + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (*edge_idp); + h5_loc_idx_t face_idx = h5tpriv_get_face_idx (*edge_idp); + + TRY( add_vertex2 (m, list, + h5tpriv_ref_elem_get_vertex_idx ( + m, 1, face_idx, 0), + elem_idx) ); + TRY( add_vertex2 (m, list, + h5tpriv_ref_elem_get_vertex_idx ( + m, 1, face_idx, 1), + elem_idx) ); + } while (++edge_idp < end); + TRY( h5priv_free_loc_idlist (&children) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Compute downward adjacent vertices of all edges of triangle. + */ +static inline h5_err_t +get_vertices_dadj_to_triangle ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + h5_loc_idlist_t* children; + TRY (h5priv_alloc_loc_idlist (&children, 8)); + + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx ( entity_id ); + // loop over all edges of triangle + h5_loc_idx_t face_idx; + h5_loc_idx_t num_faces = h5tpriv_ref_elem_get_num_edges (m); + for (face_idx = 0; face_idx < num_faces; face_idx++) { + TRY( get_sections_of_edge ( + m, + h5tpriv_build_edge_id (face_idx, elem_idx), + &children) ); + } + TRY (h5priv_alloc_loc_idlist (list, 8)); + h5_loc_id_t *edge_idp = children->items; + h5_loc_id_t *end = edge_idp + children->num_items; + do { + elem_idx = h5tpriv_get_elem_idx (*edge_idp); + face_idx = h5tpriv_get_face_idx (*edge_idp); + + TRY( add_vertex2 (m, list, + h5tpriv_ref_elem_get_vertex_idx ( + m, 1, face_idx, 0), + elem_idx) ); + TRY( add_vertex2 (m, list, + h5tpriv_ref_elem_get_vertex_idx ( + m, 1, face_idx, 1), + elem_idx) ); + } while (++edge_idp < end); + TRY (h5priv_free_loc_idlist(&children)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_edges_dadj_to_triangle ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idlist_t** list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, entity_id=%llu, list=%p", + m, (long long unsigned)entity_id, list); + h5_loc_idlist_t* children; + TRY (h5priv_alloc_loc_idlist (&children, 8)); + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + // loop over all edges of triangle + h5_loc_idx_t edge_idx = h5tpriv_ref_elem_get_num_edges (m); + while (--edge_idx >= 0) { + TRY( get_sections_of_edge ( + m, + h5tpriv_build_edge_id (edge_idx, elem_idx), + &children) ); + } + TRY (h5priv_alloc_loc_idlist (list, 8)); + h5_loc_id_t* edge_idp = children->items; + h5_loc_id_t* end = edge_idp + children->num_items; + do { + TRY( add_edge (m, list, *edge_idp) ); + } while (++edge_idp < end); + TRY (h5priv_free_loc_idlist(&children)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +dim_error( + const h5_int32_t dim + ) { + return h5_error ( + H5_ERR_INVAL, + "Illegal dimension %ld", (long)dim); +} + +static inline h5_err_t +get_adjacencies_to_vertex ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + const h5_int32_t dim, + h5_loc_idlist_t** list + ) { + switch (dim) { + case 1: + return get_edges_uadj_to_vertex(m, entity_id, list); + case 2: + return get_triangles_uadj_to_vertex(m, entity_id, list); + default: + return dim_error (dim); + } +} + +static inline h5_err_t +get_adjacencies_to_edge ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + const h5_int32_t dim, + h5_loc_idlist_t** list + ) { + switch (dim) { + case 0: + return get_vertices_dadj_to_edge(m, entity_id, list); + case 1: + return get_edges_adj_to_edge(m, entity_id, list); + case 2: + return get_triangles_uadj_to_edge(m, entity_id, list); + default: + return dim_error (dim); + } +} + +static inline h5_err_t +get_adjacencies_to_triangle ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + const h5_int32_t dim, + h5_loc_idlist_t** list + ) { + switch (dim) { + case 0: + return get_vertices_dadj_to_triangle(m, entity_id, list); + case 1: + return get_edges_dadj_to_triangle(m, entity_id, list); + default: + return dim_error (dim); + } +} + +static h5_err_t +get_adjacencies ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + const h5_int32_t dim, + h5_loc_idlist_t** list + ) { + h5_loc_id_t entity_type = h5tpriv_get_entity_type (entity_id); + switch (entity_type) { + case H5T_TYPE_VERTEX: + return get_adjacencies_to_vertex (m, entity_id, dim, list); + case H5T_TYPE_EDGE: + return get_adjacencies_to_edge (m, entity_id, dim, list); + case H5T_TYPE_TRIANGLE: + return get_adjacencies_to_triangle (m, entity_id, dim, list); + default: + break; + } + return h5_error_internal (); +} + +struct h5t_adjacency_methods h5tpriv_trim_adjacency_methods = { + get_adjacencies +}; + diff --git a/src/h5core/h5t_core.c b/src/h5core/h5t_core.c new file mode 100644 index 0000000..afe6e36 --- /dev/null +++ b/src/h5core/h5t_core.c @@ -0,0 +1,431 @@ +#include + +#include "h5t_types_private.h" +#include "h5core/h5t_map.h" + +#include "h5t_map_private.h" +#include "h5t_core_private.h" +#include "h5t_access_private.h" +#include "h5t_errorhandling_private.h" + +h5_err_t +h5tpriv_grow_te_htab ( + h5t_mesh_t* const m, + size_t nel + ); + +h5_err_t +h5tpriv_grow_td_htab ( + h5t_mesh_t* const m, + size_t nel + ) ; + +h5_err_t +h5tpriv_enter_tv2 ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, // in + h5_loc_idx_t elem_idx, // in + h5_loc_idlist_t** idlist // out + ) { + H5_PRIV_API_ENTER (h5_err_t, + "m=%p, face_idx=%lld, elem_idx=%lld, idlist=%p", + m, (long long)face_idx, (long long)elem_idx, idlist); + + h5_loc_idx_t vertex_idx; + TRY (h5t_get_loc_vertex_index_of_vertex2 ( + m, + face_idx, elem_idx, + &vertex_idx)); + + TRY (h5priv_search_in_loc_idlist ( + &m->adjacencies.tv.v[vertex_idx], + h5tpriv_build_vertex_id (face_idx, elem_idx))); + + // set return value + if (idlist) { + *idlist = m->adjacencies.tv.v[vertex_idx]; + } + + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5tpriv_enter_te2 ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, + h5_loc_idx_t elem_idx, + h5_loc_idlist_t** idlist + ) { + H5_PRIV_API_ENTER (h5_err_t, + "m=%p, face_idx=%lld, elem_idx=%lld, idlist=%p", + m, (long long)face_idx, (long long)elem_idx, idlist); + h5t_adjacencies_t* a = &m->adjacencies; + void* __retval; + static h5t_te_entry_t* entry = NULL; + + if (entry == NULL) { + TRY (entry = h5_calloc (1, sizeof (*entry))); + } + TRY (h5t_get_loc_vertex_indices_of_edge2 ( + m, face_idx, elem_idx, entry->key.vids)); + /* + resize hash table if more than 4/5 filled + */ + if ((a->te_hash.size*4) <= (a->te_hash.filled*5)) { + h5_debug ("Resize te-structure"); + h5_loc_idx_t num_interior_elems = m->num_interior_elems[m->num_leaf_levels-1]; + TRY (h5tpriv_grow_te_htab (m, 2*(num_interior_elems - elem_idx)+8192)); + } + TRY (h5priv_hsearch ( + entry, + H5_ENTER, + &__retval, + &a->te_hash)); + h5t_te_entry_t* te_entry = (h5t_te_entry_t *)__retval; + if (entry == te_entry) { // if used, + entry = NULL; // force allocation of new entry + } + TRY (h5priv_search_in_loc_idlist ( + &te_entry->value, + h5tpriv_build_edge_id (face_idx, elem_idx))); + + if (idlist) { + *idlist = te_entry->value; + } + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5tpriv_enter_td2 ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, + h5_loc_idx_t elem_idx, + h5_loc_idlist_t** idlist // out + ) { + H5_PRIV_API_ENTER (h5_err_t, + "m=%p, face_idx=%lld, elem_idx=%lld, idlist=%p", + m, (long long)face_idx, (long long)elem_idx, idlist); + h5t_adjacencies_t* a = &m->adjacencies; + void* __retval; + static h5t_td_entry_t* entry = NULL; + + if (entry == NULL) { + TRY (entry = h5_calloc (1, sizeof(*entry)) ); + } + TRY (h5t_get_loc_vertex_indices_of_triangle2 ( + m, face_idx, elem_idx, entry->key.vids) ); + /* resize hash table if more than 80% filled */ + if ((a->td_hash.size*4) <= (a->td_hash.filled*5)) { + h5_debug ("Resize td-structure"); + h5_loc_idx_t num_interior_elems = m->num_interior_elems[m->num_leaf_levels-1]; + TRY (h5tpriv_grow_td_htab (m, 3*(num_interior_elems-elem_idx))); + } + /* search in hash, add if entry doesn't already exists */ + TRY (h5priv_hsearch ( + entry, + H5_ENTER, + &__retval, + &a->td_hash)); + h5t_td_entry_t *td_entry = (h5t_td_entry_t *)__retval; + if (entry == td_entry) { // if used: + entry = NULL; // force allocation of new + } + + /* search ID in list of IDs for given triangle */ + TRY (h5priv_search_in_loc_idlist ( + &td_entry->value, + h5tpriv_build_triangle_id (face_idx, elem_idx))); + if (idlist) { + *idlist = td_entry->value; + } + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +static int +cmp_te_entries ( + const void* __a, + const void* __b + ) { + h5t_te_entry_t* a = (h5t_te_entry_t*)__a; + h5t_te_entry_t* b = (h5t_te_entry_t*)__b; + return memcmp (a->key.vids, b->key.vids, sizeof (a->key.vids)); +} + +static unsigned int +compute_te_hashval ( + const void* __item + ) { + h5t_te_entry_t* item = (h5t_te_entry_t*)__item; + uint16_t* key = (uint16_t*)item->key.vids; + unsigned int count = 2*sizeof (item->key.vids[0]) / sizeof (uint16_t); + unsigned int hval = count; + while (count--) { + if (*key) { + hval <<= 6; + hval += *key; + } + key++; + } + return hval; +} + +static h5_err_t +release_te_entry ( + const void* __entry + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "__entry=%p", __entry); + struct h5_te_entry* entry = *(struct h5_te_entry**)__entry; + h5_loc_idlist_t* list = entry->value; + TRY (h5priv_free_loc_idlist (&list)); + TRY (h5_free (entry)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +h5tpriv_grow_te_htab ( + h5t_mesh_t* const m, + size_t nel + ) { + H5_PRIV_API_ENTER (h5_err_t, "m=%p, nel=%zu", m, nel); + h5_debug ("Resize te-structure by %zu", nel); + h5t_adjacencies_t* a = &m->adjacencies; + if ( a->te_hash.size == 0 ) { + TRY (h5priv_hcreate ( + nel, + &a->te_hash, + cmp_te_entries, + compute_te_hashval, + release_te_entry)); + } else { + TRY (h5priv_hgrow (nel, &a->te_hash)); + } + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +/* + Find item in the T(E) hash table. + + Passing item with type entry type. + */ +static inline h5_err_t +find_te ( + h5t_mesh_t* const m, + h5t_te_entry_t* item, // in: item to find + h5_loc_idlist_t** idlist // out: + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, item=%p, idlist=%p", + m, item, idlist); + void* __entry; + TRY (h5priv_hsearch ( + item, + H5_FIND, + &__entry, + &m->adjacencies.te_hash)); + h5t_te_entry_t* entry = (h5t_te_entry_t*)__entry; + if (entry == NULL) { + H5_PRIV_FUNC_LEAVE (H5_NOK); // not found + } + if (idlist) { + *idlist = entry->value; + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Find item in the T(E) hash table. + + Passing item with face and local element ID. + */ +h5_err_t +h5tpriv_find_te ( + h5t_mesh_t* const m, + h5_loc_idx_t edge_id, // in + h5_loc_idlist_t** idlist // out + ) { + H5_PRIV_API_ENTER (h5_err_t, + "m=%p, edge_id=%lld, idlist=%p", + m, (long long)edge_id, idlist); + h5t_te_entry_t item; + TRY (h5t_get_loc_vertex_indices_of_edge ( + m, + edge_id, + item.key.vids)); + + TRY (find_te (m, &item, idlist)); + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5tpriv_find_te2 ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, // in + h5_loc_idx_t elem_idx, // in + h5_loc_idlist_t** idlist // out + ) { + H5_PRIV_API_ENTER (h5_err_t, + "m=%p, face_idx=%lld, elem_idx=%lld, idlist=%p", + m, (long long)face_idx, (long long)elem_idx, idlist); + h5t_te_entry_t item; + TRY (h5t_get_loc_vertex_indices_of_edge2 ( + m, + face_idx, + elem_idx, + item.key.vids)); + TRY (find_te (m, &item, idlist)); + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +static int +cmp_td_entries ( + const void* __a, + const void* __b + ) { + h5t_td_entry_t* a = (h5t_td_entry_t*)__a; + h5t_td_entry_t* b = (h5t_td_entry_t*)__b; + return memcmp (a->key.vids, b->key.vids, sizeof(a->key.vids)); +} + +static unsigned int +compute_td_hashval ( + const void* __item + ) { + h5t_td_entry_t* item = (h5t_td_entry_t*)__item; + uint16_t* key = (uint16_t*)item->key.vids; + unsigned int count = 3 * sizeof (item->key.vids[0]) / sizeof (uint16_t); + unsigned int hval = count; + while (count--) { + if (*key) { + hval <<= 6; + hval += *key; + } + key++; + } + return hval; +} + +static h5_err_t +release_td_entry ( + const void* __entry + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "__entry=%p", __entry); + struct h5_td_entry* entry = *(struct h5_td_entry**)__entry; + h5_loc_idlist_t* list = entry->value; + TRY (h5priv_free_loc_idlist (&list)); + TRY (h5_free (entry)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + +h5_err_t +h5tpriv_grow_td_htab ( + h5t_mesh_t* const m, + size_t nel + ) { + H5_PRIV_API_ENTER (h5_err_t, "m=%p, nel=%lld", m, (long long)nel); + h5_debug ("Resize td-structure"); + h5t_adjacencies_t* a = &m->adjacencies; + if (a->td_hash.size == 0) { + TRY (h5priv_hcreate ( + nel, + &a->td_hash, + cmp_td_entries, + compute_td_hashval, + release_td_entry)); + } else { + TRY (h5priv_hgrow (nel, &a->td_hash)); + } + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +find_td ( + h5t_mesh_t* const m, + h5t_td_entry_t* item, + h5_loc_idlist_t** idlist // out + ) { + void* __entry; + h5priv_hsearch ( + item, + H5_FIND, + &__entry, + &m->adjacencies.td_hash); + if (__entry == NULL) { + return h5tpriv_error_local_triangle_nexist (item->key.vids); + } + h5t_td_entry_t* entry = (h5t_td_entry_t*)__entry; + *idlist = entry->value; + return H5_SUCCESS; +} + +h5_err_t +h5tpriv_find_td ( + h5t_mesh_t* const m, + h5_loc_idx_t triangle_id, + h5_loc_idlist_t** idlist + ) { + H5_PRIV_API_ENTER (h5_err_t, + "m=%p, triangle_id=%lld, idlist=%p", + m, (long long)triangle_id, idlist); + h5t_td_entry_t item; + TRY (h5t_get_loc_vertex_indices_of_triangle ( + m, + triangle_id, + item.key.vids)); + TRY (find_td (m, &item, idlist)); + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5tpriv_find_td2 ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, + h5_loc_idx_t elem_idx, + h5_loc_idlist_t** idlist + ) { + H5_PRIV_API_ENTER (h5_err_t, + "m=%p, face_idx=%lld, elem_idx=%lld, idlist=%p", + m, (long long)face_idx, (long long)elem_idx, idlist); + h5t_td_entry_t item; + TRY (h5t_get_loc_vertex_indices_of_triangle2 ( + m, + face_idx, + elem_idx, + item.key.vids)); + TRY (find_td (m, &item, idlist)); + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +/* + Return list of elements sharing the same vertex. + */ +h5_err_t +h5tpriv_find_tv2 ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, + h5_loc_idx_t elem_idx, + h5_loc_idlist_t** idlist + ) { + H5_PRIV_API_ENTER (h5_err_t, + "m=%p, face_idx=%lld, elem_idx=%lld, idlist=%p", + m, (long long)face_idx, (long long)elem_idx, idlist); + h5_loc_idx_t idx; + TRY (idx = h5tpriv_get_loc_elem_vertex_idx (m, elem_idx, face_idx)); + *idlist = m->adjacencies.tv.v[idx]; + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +/* + Return list of elements sharing the same vertex. + */ +h5_err_t +h5tpriv_find_tv3 ( + h5t_mesh_t* const m, + h5_loc_idx_t vtx_idx, + h5_loc_idlist_t** idlist + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, vtx_idx=%lld, idlist=%p", + m, (long long)vtx_idx, idlist); + *idlist = m->adjacencies.tv.v[vtx_idx]; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} diff --git a/src/h5core/h5t_core_private.h b/src/h5core/h5t_core_private.h new file mode 100644 index 0000000..ca297b1 --- /dev/null +++ b/src/h5core/h5t_core_private.h @@ -0,0 +1,204 @@ +#ifndef __H5T_CORE_PRIVATE_H +#define __H5T_CORE_PRIVATE_H + + +#define MAX_CHUNKS_PER_OCTANT 4 // WARNING there are probably places where the makro isn't used +// also it's not simply changeable since types ect. have to be adjusted! +#define NUM_OCTANTS 8 + +#define UPDATE_WEIGHTS 1 // if 1 it is split, if 2 they are copied. checkout h5t_store.c update_weight_children() + +#define MAX_NUM_ELEMS_TO_REFINE_LOCALLY 2048 // used define instead of having number in code + + +#include "h5t_tags_private.h" + +#include "h5t_types_private.h" + +#include "h5t_access_private.h" +#include "h5t_adjacencies_private.h" +#include "h5t_map_private.h" +#include "h5t_model_private.h" +#include "h5t_ref_elements_private.h" +#include "h5t_readwrite_private.h" +#include "h5t_retrieve_private.h" +#include "h5t_store_private.h" + +#include "h5t_errorhandling_private.h" + +#include "h5t_octree_private.h" + +#include + + +typedef struct h5t_te_entry_key { + h5_loc_idx_t vids[2]; +} h5t_te_entry_key_t; + +typedef struct h5t_td_entry_key { + h5_loc_idx_t vids[3]; +} h5t_td_entry_key_t; + +/* + List of all upward adjacent elements of same coarsness of a specific face. + The face is specified by its local vertex IDs. + */ +typedef struct h5_te_entry { + h5t_te_entry_key_t key; + h5_loc_idlist_t* value; +} h5t_te_entry_t; + +typedef struct h5_td_entry { + h5t_td_entry_key_t key; + h5_loc_idlist_t* value; +} h5t_td_entry_t; + +h5_err_t +h5tpriv_enter_tv2 ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, // in + h5_loc_idx_t elem_idx, // in + h5_loc_idlist_t** idlist // out + ); + +h5_err_t +h5tpriv_enter_te2 ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, + h5_loc_idx_t elem_idx, + h5_loc_idlist_t** idlist + ); + +h5_err_t +h5tpriv_enter_td2 ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, + h5_loc_idx_t elem_idx, + h5_loc_idlist_t** idlist // out + ); + +h5_err_t +h5tpriv_find_tv2 ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, + h5_loc_idx_t elem_idx, + h5_loc_idlist_t** idlist + ); + +h5_err_t +h5tpriv_find_tv3 ( + h5t_mesh_t* const m, + h5_loc_idx_t vtx_idx, + h5_loc_idlist_t** idlist + ); + +h5_err_t +h5tpriv_find_te ( + h5t_mesh_t* const m, + h5_loc_idx_t edge_id, // in + h5_loc_idlist_t** idlist // out + ); + +h5_err_t +h5tpriv_find_te2 ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, // in + h5_loc_idx_t elem_idx, // in + h5_loc_idlist_t** idlist // out + ); + +h5_err_t +h5tpriv_find_td ( + h5t_mesh_t* const m, + h5_loc_idx_t triangle_id, + h5_loc_idlist_t** idlist + ); + +h5_err_t +h5tpriv_find_td2 ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, + h5_loc_idx_t elem_idx, + h5_loc_idlist_t** idlist + ); + +static inline h5_loc_idlist_t* +h5tpriv_traverse_tv ( + h5t_mesh_t* const m, + unsigned int* i + ) { + assert (i != NULL); + if (*i < 0) i = 0; + if (*i >= m->num_loc_vertices[m->num_loaded_levels-1]) { + return NULL; + } + h5_loc_idlist_t* result = m->adjacencies.tv.v[*i]; + (*i)++; + return result; +} + +static inline h5_loc_idlist_t* +h5tpriv_traverse_te ( + h5t_mesh_t* const m, + unsigned int* i + ) { + assert (i != NULL); + if (*i < 1) *i = 1; + h5t_te_entry_t* entry = h5priv_htraverse (&m->adjacencies.te_hash, i); + h5_loc_idlist_t* result = NULL; + if (entry) { + result = entry->value; + } + return result; +} + +static inline h5_loc_idlist_t* +h5tpriv_traverse_td ( + h5t_mesh_t* const m, + unsigned int* i + ) { + assert (i != NULL); + if (*i < 0) i = 0; + h5t_td_entry_t* entry = h5priv_htraverse (&m->adjacencies.td_hash, i); + h5_loc_idlist_t* result = NULL; + if (entry) { + result = entry->value; + } + return result; +} + +struct h5t_core_methods { + h5_err_t (*update_internal_structs)( + h5t_mesh_t* const, + h5_lvl_idx_t); + h5_err_t (*release_internal_structs)( + h5t_mesh_t* const); +}; + +extern struct h5t_core_methods h5tpriv_trim_core_methods; +extern struct h5t_core_methods h5tpriv_tetm_core_methods; + +static inline h5_err_t +h5tpriv_release_adjacency_structs ( + h5t_mesh_t* const m + ) { + H5_PRIV_API_ENTER (h5_err_t, "m=%p", m); + if (m->methods->adjacency == NULL) { + H5_PRIV_API_LEAVE (H5_OK); + } + H5_PRIV_API_RETURN (m->methods->core->release_internal_structs(m)); +} + +static inline h5_err_t +h5tpriv_update_internal_structs ( + h5t_mesh_t* const m, + const h5_lvl_idx_t level_id + ) { + H5_PRIV_API_ENTER (h5_err_t, "m=%p, level_id=%d", m, level_id); + if (m->methods->adjacency == NULL) { + H5_PRIV_API_LEAVE (H5_OK); + } + H5_PRIV_API_RETURN (m->methods->core->update_internal_structs(m, level_id)); +} + +#endif diff --git a/src/h5core/h5t_core_tetm.c b/src/h5core/h5t_core_tetm.c new file mode 100644 index 0000000..0a1eaf8 --- /dev/null +++ b/src/h5core/h5t_core_tetm.c @@ -0,0 +1,289 @@ +/* + Copyright 2006-2010 + Paul Scherrer Institut, Villigen, Switzerland; + Achim Gsell + All rights reserved. + + Authors + Achim Gsell + + Warning + This code is under development. + */ + +#include + +#include + + +#include "h5_maps_private.h" +#include "h5t_model_private.h" +#include "h5t_types_private.h" +#include "h5t_core_private.h" +#include "h5t_retrieve_private.h" + + +#define H5_LOC_ELEM_T h5_loc_tet_t + + +static inline void +set_vertex_flags ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, // in + h5_loc_idx_t elem_idx, // in + h5_int32_t* flags // in/out + ) { + H5_LOC_ELEM_T* elems = (H5_LOC_ELEM_T*)m->loc_elems; + H5_LOC_ELEM_T* elem = elems + elem_idx; + + if (!h5tpriv_is_leaf_elem (m, elem)) { + return; // skip non-leaf cells + } + if (elem->flags & H5_GHOST_ENTITY) { + if (!(*flags & H5_BORDER_ENTITY)) { + // vertex is either border- or front-vertex + // if it is border-vertex, this flag will be reset later + *flags |= H5_FRONT_ENTITY; + } + return; + } + + // vertex is either interior- or border-vertex + if (!(*flags & H5_BORDER_ENTITY)) { + *flags |= H5_INTERIOR_ENTITY; + } + if (elem->flags & H5_BORDER_ENTITY) { + // cell is border-cell: vertex is either boder- or interior-vertex + // loop over all facets connected to given vertex + int num_facets = h5tpriv_ref_elem_get_num_facets_to_vertex (m, face_idx); + for (int i = 0; i < num_facets; i++) { + int j = h5tpriv_ref_elem_get_facet_to_vertex (m, face_idx, i); + // if neighbor is ghost-cell: vertex is border-vertex + h5_loc_idx_t neighbor_idx = elem->neighbor_indices[j]; + if (neighbor_idx >= 0 && + elems[neighbor_idx].flags & H5_GHOST_ENTITY) { + *flags |= H5_BORDER_ENTITY; + *flags &= ~(H5_INTERIOR_ENTITY|H5_FRONT_ENTITY); + } + } + } +} + +/* + edges are either interior-, border or front-entities + */ +static inline void +set_edge_flags ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, // in + h5_loc_idx_t elem_idx, // in + h5_int32_t* flags // in/out + ) { + H5_LOC_ELEM_T* elems = (H5_LOC_ELEM_T*)m->loc_elems; + H5_LOC_ELEM_T* elem = elems + elem_idx; + + if (!h5tpriv_is_leaf_elem (m, elem)) { + return; // skip non-leaf cells + } + + if (elem->flags & H5_GHOST_ENTITY) { + if (!(*flags & H5_BORDER_ENTITY)) { + // entity is either border- or front-entity + // if it is border-entity, this flag will be reset later + *flags |= H5_FRONT_ENTITY; + } + return; + } + + // entity is either interior- or border-entity + if (!(*flags & H5_BORDER_ENTITY)) { + *flags |= H5_INTERIOR_ENTITY; + } + if (elem->flags & H5_BORDER_ENTITY) { + // cell is border-cell: vertex is either boder- or interior-vertex + // loop over all facets connected to given vertex + int num_facets = h5tpriv_ref_elem_get_num_facets_to_edge (m, face_idx); + for (int i = 0; i < num_facets; i++) { + int j = h5tpriv_ref_elem_get_facet_to_edge (m, face_idx, i); + // if neighbor is ghost-cell: vertex is border-vertex + h5_loc_idx_t neighbor_idx = elem->neighbor_indices[j]; + if (neighbor_idx >= 0 && + elems[neighbor_idx].flags & H5_GHOST_ENTITY) { + *flags |= H5_BORDER_ENTITY; + *flags &= ~(H5_INTERIOR_ENTITY|H5_FRONT_ENTITY); + } + } + } +} + + +/* + triangle are either interior-, border or front-entities + */ +static inline void +set_triangle_flags ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, // in + h5_loc_idx_t elem_idx, // in + h5_int32_t* flags // in/out + ) { + H5_LOC_ELEM_T* elems = (H5_LOC_ELEM_T*)m->loc_elems; + H5_LOC_ELEM_T* elem = elems + elem_idx; + + if (!h5tpriv_is_leaf_elem (m, elem)) { + return; // skip non-leaf cells + } + + if (elem->flags & H5_GHOST_ENTITY) { + if (!(*flags & H5_BORDER_ENTITY)) { + // entity is either border- or front-entity + // if it is border-entity, this flag will be reset later + *flags |= H5_FRONT_ENTITY; + } + return; + } + + // entity is either interior- or border-entity + if (!(*flags & H5_BORDER_ENTITY)) { + *flags |= H5_INTERIOR_ENTITY; + } + if (elem->flags & H5_BORDER_ENTITY) { + // cell is border-cell: vertex is either boder- or interior-vertex + // if neighbor is ghost-cell: vertex is border-vertex + h5_loc_idx_t neighbor_idx = elem->neighbor_indices[face_idx]; + if (neighbor_idx >= 0 && + elems[neighbor_idx].flags & H5_GHOST_ENTITY) { + *flags |= H5_BORDER_ENTITY; + *flags &= ~(H5_INTERIOR_ENTITY|H5_FRONT_ENTITY); + } + } +} + +/* + Allocate structure keeping the upward adjacent elements for each vertex. + */ +static inline h5_err_t +alloc_tv ( + h5t_mesh_t* const m, + const h5_lvl_idx_t from_lvl + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, from_lvl=%u", + m, (unsigned)from_lvl); + h5_loc_idx_t num_loc_vertices = m->num_loc_vertices[m->num_loaded_levels-1]; + + h5t_adjacencies_t* adj = &m->adjacencies; + // allocate ptr to ID-list per vertex + TRY( adj->tv.v = h5_alloc (adj->tv.v, num_loc_vertices*sizeof(*adj->tv.v)) ); + + size_t i = from_lvl <= 0 ? 0 : m->num_loc_vertices[from_lvl-1]; + memset (adj->tv.v+i, 0, (num_loc_vertices-i)*sizeof(*adj->tv.v)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +reset_flags ( + h5t_mesh_t* const m + ) { + // traverse all entries in tv + unsigned int i = 0; + h5_loc_idlist_t* entry; + while ((entry = h5tpriv_traverse_tv (m, &i))) { + entry->flags = 0; + } + + // traverse all entries in te + i = 0; + while ((entry = h5tpriv_traverse_te (m, &i))) { + entry->flags = 0; + } + + // traverse all entries in td + i = 0; + while ((entry = h5tpriv_traverse_td (m, &i))) { + entry->flags = 0; + } + + return H5_SUCCESS; +} + +static h5_err_t +update_internal_structs ( + h5t_mesh_t* const m, + const h5_lvl_idx_t from_lvl + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, from_lvl=%u", + m, (unsigned)from_lvl); + h5_lvl_idx_t to_lvl = m->num_loaded_levels - 1; + assert (to_lvl >= 0); + + /* expand structure */ + TRY (alloc_tv (m, from_lvl)); + + int num_vertices_of_elem = h5tpriv_ref_elem_get_num_vertices(m); + int num_edges_of_elem = h5tpriv_ref_elem_get_num_edges(m); + int num_facets_of_elem = h5tpriv_ref_elem_get_num_facets (m); + + /* loop over all elements starting at from_lvl up to the last loaded level + including all ghost elements */ + h5_loc_idx_t elem_idx = (from_lvl <= 0) ? 0 : m->num_interior_elems[from_lvl-1]; + h5_loc_idx_t last = m->num_interior_elems[to_lvl] + m->num_ghost_elems[to_lvl]; + + for (; elem_idx < last; elem_idx++) { + int face_idx; + // Compute upward adjacent elements for each vertex. + for (face_idx = 0; face_idx < num_vertices_of_elem; face_idx++) { + TRY (h5tpriv_enter_tv2 (m, face_idx, elem_idx, NULL)); + } + // Compute upward adjacent elements for each edge. + for (face_idx = 0; face_idx < num_edges_of_elem; face_idx++) { + TRY (h5tpriv_enter_te2 (m, face_idx, elem_idx, NULL)); + } + // Compute upward adjacent elements for each triangle. + for (face_idx = 0; face_idx < num_facets_of_elem; face_idx++) { + TRY (h5tpriv_enter_td2 (m, face_idx, elem_idx, NULL)); + } + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Release structure keeping the upward adjacent elements for each vertex. + */ +static inline h5_err_t +release_tv ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + h5t_adjacencies_t* adj = &m->adjacencies; + if (adj->tv.v == NULL) + H5_PRIV_FUNC_LEAVE (H5_SUCCESS); + + h5_loc_idx_t vertex_idx = 0; + h5_loc_idx_t last = m->num_loc_vertices[m->num_loaded_levels-1]; + for (; vertex_idx < last; vertex_idx++) { + TRY( h5priv_free_loc_idlist (&adj->tv.v[vertex_idx]) ); + } + TRY( h5_free (adj->tv.v) ); + adj->tv.v = NULL; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static h5_err_t +release_internal_structs ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + TRY( release_tv (m) ); + TRY( h5priv_hdestroy (&m->adjacencies.te_hash) ); + TRY( h5priv_hdestroy (&m->adjacencies.td_hash) ); + memset (&m->adjacencies, 0, sizeof (m->adjacencies)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +struct h5t_core_methods h5tpriv_tetm_core_methods = { + update_internal_structs, + release_internal_structs, +}; diff --git a/src/h5core/h5t_core_trim.c b/src/h5core/h5t_core_trim.c new file mode 100644 index 0000000..d0264a7 --- /dev/null +++ b/src/h5core/h5t_core_trim.c @@ -0,0 +1,276 @@ +/* + Copyright 2006-2011 + Paul Scherrer Institut, Villigen, Switzerland; + Achim Gsell + All rights reserved. + + Authors + Achim Gsell + + Warning + This code is under development. + */ + +#include +#include +#include + +#include "h5t_types_private.h" +#include "h5t_model_private.h" +#include "h5t_core_private.h" +#include "h5t_core_private.h" + +#define H5_LOC_ELEM_T h5_loc_tri_t + +/* + loop over all connected cells: flags |= cell->flags + + if result is: + H5_GHOST_ENTITY==0 && H5_BORDER_ENTITY==0 && H5_INTERIOR_ENTITY==0: illegal + H5_GHOST_ENTITY==0 && H5_BORDER_ENTITY==0 && H5_INTERIOR_ENTITY==1: interior + H5_GHOST_ENTITY==0 && H5_BORDER_ENTITY==1 && H5_INTERIOR_ENTITY==0: illegal(?) + H5_GHOST_ENTITY==0 && H5_BORDER_ENTITY==1 && H5_INTERIOR_ENTITY==1: interior + H5_GHOST_ENTITY==1 && H5_BORDER_ENTITY==0 && H5_INTERIOR_ENTITY==0: front + H5_GHOST_ENTITY==1 && H5_BORDER_ENTITY==0 && H5_INTERIOR_ENTITY==1: illegal + H5_GHOST_ENTITY==1 && H5_BORDER_ENTITY==1 && H5_INTERIOR_ENTITY==0: border + H5_GHOST_ENTITY==1 && H5_BORDER_ENTITY==1 && H5_INTERIOR_ENTITY==1: border + + */ +static inline void +set_vertex_flags ( + h5t_mesh_t* const m, + h5_loc_idlist_t* list, // in: all upward adj cell of vertex + h5_loc_idx_t* num_all_partition // in/out: increment for each vertex + ) { + H5_LOC_ELEM_T* cell; + h5_loc_idx_t cell_idx; + list->flags = 0; + for (size_t i = 0; i < list->num_items; i++) { + cell_idx = h5tpriv_get_elem_idx (list->items[i]); + cell = (H5_LOC_ELEM_T*)m->loc_elems + cell_idx; + list->flags |= cell->flags; + } + int32_t flags = list->flags & (H5_INTERIOR_ENTITY|H5_BORDER_ENTITY|H5_GHOST_ENTITY); + if ((flags & ~H5_BORDER_ENTITY) == H5_INTERIOR_ENTITY) { + // interior flag set, border doesn't matter + flags = H5_INTERIOR_ENTITY; + + } else if (flags == H5_GHOST_ENTITY) { + // only ghost flag set + flags = H5_FRONT_ENTITY; + + } else if ((flags & ~H5_INTERIOR_ENTITY) == (H5_BORDER_ENTITY|H5_GHOST_ENTITY)) { + // ghost and border flag is set, interior doesn't matter + flags = H5_BORDER_ENTITY; + + } else { + // entity not on current level + } + if (list->flags & H5_GEOBORDER_ENTITY) { + for (size_t i = 0; i < list->num_items; i++) { + h5_loc_idx_t face_idx = h5tpriv_get_face_idx (list->items[i]); + cell_idx = h5tpriv_get_elem_idx (list->items[i]); + cell = (H5_LOC_ELEM_T*)m->loc_elems + cell_idx; + int num_facets = h5tpriv_ref_elem_get_num_facets_to_vertex (m, face_idx); + for (int i = 0; i < num_facets; i++) { + int j = h5tpriv_ref_elem_get_facet_to_vertex (m, face_idx, i); + if (cell->neighbor_indices[j] == -1) { + flags |= H5_GEOBORDER_ENTITY; + } + } + } + } + list->flags = flags; +} + +/* + edges are either interior-, border or front-entities + */ +static inline void +set_edge_flags ( + h5t_mesh_t* const m, + h5_loc_idlist_t* list, // in + h5_loc_idx_t* num_all_partition // in/out + ) { + H5_LOC_ELEM_T* cell; + h5_loc_idx_t cell_idx; + list->flags = 0; + for (size_t i = 0; i < list->num_items; i++) { + cell_idx = h5tpriv_get_elem_idx (list->items[i]); + cell = (H5_LOC_ELEM_T*)m->loc_elems + cell_idx; + list->flags |= cell->flags; + } + int32_t flags = list->flags & (H5_INTERIOR_ENTITY|H5_BORDER_ENTITY|H5_GHOST_ENTITY); + if ((flags & ~H5_BORDER_ENTITY) == H5_INTERIOR_ENTITY) { + // interior flag set, border doesn't matter + flags = H5_INTERIOR_ENTITY; + + } else if (flags == H5_GHOST_ENTITY) { + // only ghost flag set + flags = H5_FRONT_ENTITY; + + } else if ((flags & ~H5_INTERIOR_ENTITY) == (H5_BORDER_ENTITY|H5_GHOST_ENTITY)) { + // ghost and border flag is set, interior doesn't matter + flags = H5_BORDER_ENTITY; + + } else { + // entity not on current level + } + if (list->flags & H5_GEOBORDER_ENTITY) { + if (list->num_items == 1) { + flags |= H5_GEOBORDER_ENTITY; + } + } + list->flags = flags; +} + + +static inline h5_err_t +alloc_tv ( + h5t_mesh_t* const m, + const h5_lvl_idx_t from_lvl + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, from_lvl=%u", + m, (unsigned)from_lvl); + h5_loc_idx_t num_loc_vertices = m->num_loc_vertices[m->num_loaded_levels-1]; + + h5t_adjacencies_t* adj = &m->adjacencies; + // allocate ptr to ID-list per vertex + TRY( adj->tv.v = h5_alloc (adj->tv.v, num_loc_vertices*sizeof(*adj->tv.v)) ); + + size_t i = from_lvl <= 0 ? 0 : m->num_loc_vertices[from_lvl-1]; + memset (adj->tv.v+i, 0, (num_loc_vertices-i)*sizeof(*adj->tv.v)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + add new entities + set flags for all entities and count entities in all-partition + create index sets + */ +static inline h5_err_t +update_internal_structs ( + h5t_mesh_t* const m, + const h5_lvl_idx_t from_lvl + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, from_lvl=%u", + m, (unsigned)from_lvl); + + ////// + // add new entities + h5_lvl_idx_t to_lvl = m->num_loaded_levels - 1; + assert (to_lvl >= 0); + + /* expand structure */ + TRY( alloc_tv (m, from_lvl) ); + + int num_vertices_of_elem = h5tpriv_ref_elem_get_num_vertices(m); + int num_edges_of_elem = h5tpriv_ref_elem_get_num_edges(m); + + /* loop over all elements starting at from_lvl up to the last loaded level + including all ghost elements */ + h5_loc_idx_t elem_idx = (from_lvl <= 0) ? 0 : m->num_interior_elems[from_lvl-1]; + h5_loc_idx_t last = m->num_interior_elems[to_lvl] + m->num_ghost_elems[to_lvl]; + + for (; elem_idx < last; elem_idx++) { + int face_idx; + // Compute upward adjacent elements for each vertex. + for (face_idx = 0; face_idx < num_vertices_of_elem; face_idx++) { + TRY (h5tpriv_enter_tv2 (m, face_idx, elem_idx, NULL)); + } + // Compute upward adjacent elements for each edge. + for (face_idx = 0; face_idx < num_edges_of_elem; face_idx++) { + h5_loc_idlist_t* idlist; + TRY (h5tpriv_enter_te2 (m, face_idx, elem_idx, &idlist)); +#if (!NDEBUG) + if (idlist->num_items > 2) { + h5_debug ("Error %d edge neighbors %d %d %d", + idlist->num_items, idlist->items[0], + idlist->items[1], idlist->items[2]); + } + + +#endif + } + } + + ////// + // set flags for all entities + + // traverse all entries in tv + unsigned int i = 0; + h5_loc_idlist_t* entry; + h5_loc_idx_t num_vertices_all_partition = 0; + while ((entry = h5tpriv_traverse_tv (m, &i))) { + set_vertex_flags (m, entry, &num_vertices_all_partition); + } + + // traverse all entries in te + i = 0; + h5_loc_idx_t num_edges_all_partition = 0; + while ((entry = h5tpriv_traverse_te (m, &i))) { + set_edge_flags (m, entry, &num_edges_all_partition); + } + + ////// + // create index sets + + +#if (!defined(NDEBUG) && (h5_debug_level & (1<<5))) + if (!m->is_chunked) { + h5t_adjacencies_t* adj = &m->adjacencies; + h5_loc_idx_t idx = 0; + h5_loc_idx_t num_loc_vertices = m->num_loc_vertices[m->num_loaded_levels-1]; + for (; idx < num_loc_vertices; idx++) { + h5_debug ("vertex idx: %llu, flags: %llu", + (long long unsigned)idx, (long long unsigned)adj->tv.v[idx]->flags); + } + + h5_loc_idlist_t* list; + i = 1; + while ((list = h5tpriv_traverse_te (m, &i))) { + h5_debug ("edge id: %llx, flags: %llu", + (long long unsigned)list->items[0], (long long unsigned)list->flags); + } + } +#endif + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +release_tv ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + h5t_adjacencies_t* adj = &m->adjacencies; + if (adj->tv.v == NULL) + H5_PRIV_FUNC_LEAVE (H5_SUCCESS); + + h5_loc_idx_t vertex_idx = 0; + h5_loc_idx_t last = m->num_loc_vertices[m->num_loaded_levels-1]; + for (; vertex_idx < last; vertex_idx++) { + TRY( h5priv_free_loc_idlist (&adj->tv.v[vertex_idx]) ); + } + TRY( h5_free (adj->tv.v) ); + adj->tv.v = NULL; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +release_internal_structs ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + TRY( release_tv (m) ); + TRY( h5priv_hdestroy (&m->adjacencies.te_hash) ); + memset (&m->adjacencies, 0, sizeof (m->adjacencies)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +struct h5t_core_methods h5tpriv_trim_core_methods = { + update_internal_structs, + release_internal_structs, +}; diff --git a/src/h5core/h5t_errorhandling_private.h b/src/h5core/h5t_errorhandling_private.h new file mode 100644 index 0000000..e710ef9 --- /dev/null +++ b/src/h5core/h5t_errorhandling_private.h @@ -0,0 +1,53 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5T_ERRORHANDLING_PRIVATE_H +#define __H5T_ERRORHANDLING_PRIVATE_H + +#include "h5core/h5_types.h" +#include "h5core/h5_errorhandling.h" +#include "h5_debug_private.h" + +#define ERR_ELEM_NEXIST "Element with local vertex IDs (%s) doesn't exist!" + +static inline h5_err_t +h5tpriv_inval_codim ( + int codim, + int min_codim, + int max_codim + ) { + return h5_error (H5_ERR_INVAL, + "Co-dimension %d requested, " + "but must be between %d and %d", + codim, min_codim, max_codim); +} + +#define h5tpriv_error_undef_mesh() \ + h5_error( \ + H5_ERR_INVAL, \ + "Mesh not yet defined." ); + +#define h5tpriv_error_undef_level() \ + h5_error( \ + H5_ERR_INVAL, \ + "Level not defined." ); + + +#define h5tpriv_error_nexist_level( level_id ) \ + h5_error( \ + H5_ERR_INVAL, \ + "Level %lld doesn't exist.", (long long)level_id ); + +#define h5tpriv_error_local_triangle_nexist( indices ) \ + h5_error( \ + H5_ERR_NOENTRY, \ + "Triangle with local vertex IDs (%lld,%lld,%lld) doesn't exist!", \ + (long long)indices[0], (long long)indices[1], (long long)indices[2] ); + +#endif diff --git a/src/h5core/h5t_map.c b/src/h5core/h5t_map.c new file mode 100644 index 0000000..14f41c3 --- /dev/null +++ b/src/h5core/h5t_map.c @@ -0,0 +1,571 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5_fcmp_private.h" +#include "h5_hdf5_private.h" + +#include "h5t_types_private.h" +#include "h5t_access_private.h" +#include "h5t_map_private.h" +#include "h5core/h5t_map.h" +#include "h5t_model_private.h" +#include "h5_mpi_private.h" + +/* + Mapping of global to local id's: + + Before adding a new level or closing the mesh, we must define global id's + for the vertices and elements. This we have to do only for the last stored + level. + */ + + +/*! + Compare to vertices given by their 3-dimensional coordinates + */ +static int +cmp_vertices ( + h5_float64_t P0[3], + h5_float64_t P1[3] + ) { + int i; + for (i = 0; i < 3; i++) { + h5_int64_t diff = h5priv_fcmp (P0[i], P1[i], 10); + if (diff < 0) return -1; + else if (diff > 0) return 1; + } + return 0; +} + +/*! + Sort (small) array of local vertex indices geometrically. + */ +h5_err_t +h5tpriv_sort_local_vertex_indices ( + h5t_mesh_t* const m, + h5_loc_idx_t* const indices, /* IN/OUT: local vertex indices */ + const h5_size_t size /* size of array */ + ) { + H5_PRIV_API_ENTER (h5_err_t, + "m=%p, indices=%p, size=%llu", + m, indices, (long long unsigned)size); + + h5_size_t i; + for (i = 1; i < size; ++i) { + h5_loc_idx_t idx = indices[i]; + + h5_size_t j = i; + while ((j >= 1 ) && cmp_vertices ( + m->vertices[idx].P, + m->vertices[indices[j-1]].P + ) < 0 ) { + indices[j] = indices[j-1]; + --j; + } + indices[j] = idx; + } + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +/*! + find if there is an entry with glb_idx in the map and return position + if not in map return the position last_position +1 + */ +#define h5tpriv_error_global_id_nexist( name, id ) \ + h5_error( \ + H5_ERR_NOENTRY, \ + "%s with global id %lld does not exist!", \ + name, (long long)id ); + +h5_loc_idx_t +h5tpriv_find_glb_idx_in_map ( + h5_idxmap_t* map, + const h5_glb_idx_t glb_idx + ) { + H5_CORE_API_ENTER (h5_loc_idx_t, "m=%p, glb_idx=%lld", map, (long long)glb_idx); + if (glb_idx < 0) return -1; + + h5_loc_idx_t loc_idx = h5priv_search_idxmap (map, glb_idx); // loc_idx is position in map + if (loc_idx < 0) { // set to next position + loc_idx = map->num_items; + } + H5_CORE_API_RETURN (loc_idx); +} + +/*! + Map a global vertex index to corresponding local index. + */ +h5_loc_idx_t +h5t_map_global_vertex_idx2local ( + h5t_mesh_t* const m, + const h5_glb_idx_t glb_idx + ) { + H5_CORE_API_ENTER (h5_loc_idx_t, "m=%p, glb_idx=%lld", m, (long long)glb_idx); + if (glb_idx < 0) return -1; + + h5_loc_idx_t loc_idx = h5priv_search_idxmap (&m->map_vertex_g2l, glb_idx); // loc_idx is position in map + if (loc_idx < 0) { + H5_CORE_API_LEAVE (h5tpriv_error_global_id_nexist ("vertex", glb_idx)); + } + H5_CORE_API_RETURN (m->map_vertex_g2l.items[loc_idx].loc_idx); // loc_idx is position in m->vertices! +} + +h5_err_t +h5t_map_global_vertex_indices2local ( + h5t_mesh_t* const m, + const h5_glb_idx_t* const glb_indices, + const h5_size_t size, + h5_loc_idx_t* const loc_indices + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, glb_indices=%p, size=%llu, loc_indices=%p", + m, glb_indices, (long long unsigned)size, loc_indices); + h5_size_t i; + for (i = 0; i < size; i++) { + TRY (loc_indices[i] = + h5t_map_global_vertex_idx2local (m, glb_indices[i])); + } + H5_CORE_API_RETURN (H5_SUCCESS); +} + +/*! + Get local element idx of element given by its global idx. + + \param[in] f File handle + \param[in] glb_idx Global element index + + \return Local element index + or -1, if \c glb_idx is -1 + or \c -glb_idx-2, if cell is on another proc + */ +h5_loc_idx_t +h5t_map_glb_elem_idx2loc ( + h5t_mesh_t* const m, + const h5_glb_idx_t glb_idx + ) { + H5_CORE_API_ENTER (h5_loc_idx_t, + "m=%p, glb_idx=%lld", + m, (long long)glb_idx); + + // global index is -1, if the cell is at the geometric border + if (glb_idx < 0) H5_CORE_API_LEAVE (-1); + + h5_loc_idx_t i = h5priv_search_idxmap (&m->map_elem_g2l, glb_idx); + // global index >= 0 && negative result means: element is on other proc + if (i < 0) H5_CORE_API_LEAVE (-glb_idx-2); + + H5_CORE_API_RETURN (m->map_elem_g2l.items[i].loc_idx); +} + + +h5_err_t +h5t_map_glb_elem_indices2loc ( + h5t_mesh_t* const m, + const h5_glb_idx_t* glb_indices, + const h5_size_t size, + h5_loc_idx_t* loc_indices + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, glb_indices=%p, size=%llu, loc_indices=%p", + m, glb_indices, (long long unsigned)size, loc_indices); + const h5_glb_idx_t* end = glb_indices+size; + + while (glb_indices < end) { + *loc_indices = h5t_map_glb_elem_idx2loc (m, *glb_indices); + loc_indices++; + glb_indices++; + } + H5_CORE_API_RETURN (H5_SUCCESS); +} + + +/* + rebuild mapping of global vertex indices to their local indices + */ +h5_err_t +h5tpriv_rebuild_map_vertex_g2l ( + h5t_mesh_t* const m, + h5_lvl_idx_t from_lvl, // from level + h5_lvl_idx_t to_lvl // up to and including this level + ) { + H5_CORE_API_ENTER (h5_loc_idx_t, "m=%p, from_lvl=%d, to_lvl=%d", + m, from_lvl, to_lvl); + + h5_loc_idx_t loc_idx = from_lvl > 0 ? m->num_loc_vertices[from_lvl-1] : 0; + h5_loc_idx_t num_loc_vertices = m->num_loc_vertices[to_lvl]; + h5_idxmap_el_t *item = &m->map_vertex_g2l.items[loc_idx]; + + for (; loc_idx < num_loc_vertices; loc_idx++, item++) { + item->glb_idx = m->vertices[loc_idx].idx; + item->loc_idx = loc_idx; + m->map_vertex_g2l.num_items++; + } + h5priv_sort_idxmap (&m->map_vertex_g2l); + H5_PRIV_API_RETURN (H5_SUCCESS); +} +/* + rebuild mapping of global vertex indices to their local indices + */ +h5_err_t +h5tpriv_rebuild_map_vertex_g2l_partial ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_loc_idx_t, "m=%p", + m); + + h5_loc_idx_t loc_idx = m->last_stored_vid_before_ref + 1; + h5_loc_idx_t start = loc_idx; + h5_loc_idx_t num_loc_vertices = m->last_stored_vid - m->last_stored_vid_before_ref; + h5_idxmap_el_t *item = &m->map_vertex_g2l.items[loc_idx]; + + for (; loc_idx < start + num_loc_vertices; loc_idx++, item++) { + item->glb_idx = m->vertices[loc_idx].idx; + item->loc_idx = loc_idx; + m->map_vertex_g2l.num_items++; + } + h5priv_sort_idxmap (&m->map_vertex_g2l); + H5_PRIV_API_RETURN (H5_SUCCESS); +} +/* + Get local vertex indices of entity given by it's local ID. + */ +h5_err_t +h5t_get_loc_vertex_indices_of_entity ( + h5t_mesh_t* const m, // in + const h5_loc_id_t entity_id, // in + h5_loc_idx_t* vertex_indices // out + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, entity_id=%llu, vertex_indices=%p", + m, + (long long unsigned)entity_id, + vertex_indices); + h5_loc_idx_t type = h5tpriv_get_entity_type (entity_id); + h5_loc_idx_t face_idx = h5tpriv_get_face_idx (entity_id); + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + int dim = 0; + switch (type) { + case H5T_TYPE_VERTEX: dim = 0; break; + case H5T_TYPE_EDGE: dim = 1; break; + case H5T_TYPE_TRIANGLE: dim = 2; break; + case H5T_TYPE_TET: dim = 3; break; + default: + H5_CORE_API_LEAVE (h5_error_internal ()); + } + h5_loc_idx_t* indices = h5tpriv_get_loc_elem_vertex_indices (m, elem_idx); + const h5t_ref_elem_t* ref_elem = m->ref_elem; + int num_vertices = ref_elem->num_vertices_of_face[dim][face_idx]; + for (int i = 0; i < num_vertices; i++) { + int idx = h5tpriv_ref_elem_get_vertex_idx(m, dim, face_idx, i); + vertex_indices[i] = indices[idx]; + } + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5t_get_glb_vertex_indices_of_entity ( + h5t_mesh_t* const m, // in + const h5_loc_id_t entity_id, // in + h5_glb_idx_t* vertex_indices // out + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, entity_id=%llu, vertex_indices=%p", + m, + (long long unsigned)entity_id, + vertex_indices); + h5_loc_idx_t type = h5tpriv_get_entity_type (entity_id); + h5_loc_idx_t face_idx = h5tpriv_get_face_idx (entity_id); + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + int dim = 0; + switch (type) { + case H5T_TYPE_VERTEX: dim = 0; break; + case H5T_TYPE_EDGE: dim = 1; break; + case H5T_TYPE_TRIANGLE: dim = 2; break; + case H5T_TYPE_TET: dim = 3; break; + default: + H5_CORE_API_LEAVE (h5_error_internal ()); + } + h5_loc_idx_t* indices = h5tpriv_get_loc_elem_vertex_indices (m, elem_idx); + const h5t_ref_elem_t* ref_elem = m->ref_elem; + int num_vertices = ref_elem->num_vertices_of_face[dim][face_idx]; + for (int i = 0; i < num_vertices; i++) { + int idx = h5tpriv_ref_elem_get_vertex_idx(m, dim, face_idx, i); + h5_loc_idx_t loc_idx = indices[idx]; + vertex_indices[i] = m->vertices[loc_idx].idx; + } + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5tpriv_get_vertex_index_of_vertex ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idx_t* vertex_index + ) { + H5_CORE_API_ENTER (h5_loc_idx_t, + "m=%p, entity_id=%llu, vertex_index=%llu", + m, + (long long unsigned)entity_id, + (long long unsigned)*vertex_index); + h5_loc_idx_t face_idx = h5tpriv_get_face_idx (entity_id); + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + H5_CORE_API_RETURN (h5tpriv_get_vertex_index_of_vertex2 ( + m, face_idx, elem_idx, vertex_index)); +} + +h5_err_t +h5tpriv_get_vertex_index_of_vertex2 ( + h5t_mesh_t* const m, + const h5_loc_idx_t face_idx, // vertex index according ref. element + const h5_loc_idx_t elem_idx, // local element index + h5_loc_idx_t* vertex_indices // OUT: vertex ID's + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, face_idx=%llu, elem_idx=%llu, vertex_indices=%p", + m, + (long long unsigned)face_idx, + (long long unsigned)elem_idx, + vertex_indices); + vertex_indices[0] = h5tpriv_get_loc_elem_vertex_idx (m, elem_idx, face_idx); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +/* + Get the local ID of the vertices of an elemet. + */ +h5_err_t +h5t_get_loc_vertex_indices_of_edge ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idx_t* vertex_indices + ) { + H5_CORE_API_ENTER (h5_loc_idx_t, + "m=%p, entity_id=%llu, vertex_indices=%p", + m, + (long long unsigned)entity_id, + vertex_indices); + h5_loc_idx_t face_idx = h5tpriv_get_face_idx (entity_id); + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + H5_CORE_API_RETURN (h5t_get_loc_vertex_indices_of_edge2 ( + m, face_idx, elem_idx, vertex_indices)); +} + +/*! + Get local vertex indices of an edge. The edge is specified by the local + element index and the face number of the edge according the reference + element. + + This function can be used with tetrahedral and triangle meshes. + */ +h5_err_t +h5t_get_loc_vertex_indices_of_edge2 ( + h5t_mesh_t* const m, + const h5_loc_idx_t face_idx, // edge index according ref. element + const h5_loc_idx_t elem_idx, // local element index + h5_loc_idx_t* vertex_indices // OUT: vertex indices + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, face_idx=%llu, elem_idx=%llu, vertex_indices=%p", + m, + (long long unsigned)face_idx, + (long long unsigned)elem_idx, + vertex_indices); + const h5_loc_idx_t* indices = h5tpriv_get_loc_elem_vertex_indices (m, elem_idx); + + h5_loc_idx_t idx; + idx = h5tpriv_ref_elem_get_vertex_idx (m, 1, face_idx, 0); + vertex_indices[0] = indices[idx]; + idx = h5tpriv_ref_elem_get_vertex_idx (m, 1, face_idx, 1); + vertex_indices[1] = indices[idx]; + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5t_get_loc_vertex_indices_of_triangle ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idx_t* vertex_indices + ) { + H5_CORE_API_ENTER (h5_loc_idx_t, + "m=%p, entity_id=%llu, vertex_indices=%p", + m, + (long long unsigned)entity_id, + vertex_indices); + h5_loc_idx_t face_idx = h5tpriv_get_face_idx (entity_id); + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + H5_CORE_API_RETURN (h5t_get_loc_vertex_indices_of_triangle2 ( + m, face_idx, elem_idx, vertex_indices)); +} + +h5_err_t +h5t_get_loc_vertex_indices_of_triangle2 ( + h5t_mesh_t* const m, + const h5_loc_idx_t face_idx, + const h5_loc_idx_t elem_idx, + h5_loc_idx_t* vertex_indices + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, face_idx=%llu, elem_idx=%llu, vertex_indices=%p", + m, + (long long unsigned)face_idx, + (long long unsigned)elem_idx, + vertex_indices); + const h5_loc_idx_t* indices = h5tpriv_get_loc_elem_vertex_indices (m, elem_idx); + + h5_loc_idx_t idx; + idx = h5tpriv_ref_elem_get_vertex_idx (m, 2, face_idx, 0); + vertex_indices[0] = indices[idx]; + idx = h5tpriv_ref_elem_get_vertex_idx (m, 2, face_idx, 1); + vertex_indices[1] = indices[idx]; + idx = h5tpriv_ref_elem_get_vertex_idx (m, 2, face_idx, 2); + vertex_indices[2] = indices[idx]; + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5t_get_loc_vertex_indices_of_tet ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idx_t* vertex_indices + ) { + H5_CORE_API_ENTER (h5_loc_idx_t, + "m=%p, entity_id=%llu, vertex_indices=%p", + m, + (long long unsigned)entity_id, + vertex_indices); + + const h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + const h5_loc_idx_t* indices = h5tpriv_get_loc_elem_vertex_indices ( + m, elem_idx); + + h5_loc_idx_t idx; + idx = h5tpriv_ref_elem_get_vertex_idx (m, 3, 0, 0); + vertex_indices[0] = indices[idx]; + idx = h5tpriv_ref_elem_get_vertex_idx (m, 3, 0, 1); + vertex_indices[1] = indices[idx]; + idx = h5tpriv_ref_elem_get_vertex_idx (m, 3, 0, 2); + vertex_indices[2] = indices[idx]; + idx = h5tpriv_ref_elem_get_vertex_idx (m, 3, 0, 3); + vertex_indices[3] = indices[idx]; + H5_CORE_API_RETURN (H5_SUCCESS); +} + +#ifdef PARALLEL_IO +int +compare_glb_idx_oct (const void * p_a,const void* p_b) { + return *(h5_glb_idx_t*) p_a - *(h5_glb_idx_t*) p_b; +} + +/* + * takes all local element idx from m->marked_entities gets their glb_idx + * and exchanges them with all proc and adds them to the glb_list + */ +h5_err_t +h5priv_exchange_loc_list_to_glb ( + h5t_mesh_t* const m, + h5_glb_idxlist_t** glb_list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, glb_list=%p", m, glb_list); + int* num_elems = NULL; + TRY (num_elems = h5_calloc (m->f->nprocs, sizeof (*num_elems))); + + // exchange size of marked_entities + TRY (h5priv_mpi_allgather ( + &m->marked_entities->num_items, + 1, + MPI_INT, + num_elems, + 1, + MPI_INT, + m->f->props->comm)); + // calc sendbuf + h5_glb_idx_t* sendbuf; + TRY (sendbuf = h5_calloc (m->marked_entities->num_items, sizeof (*sendbuf))); + // loc -> glb + for (int i = 0; i < m->marked_entities->num_items; i++) { + if (m->marked_entities->items[i] > m->last_stored_eid) { + H5_PRIV_FUNC_LEAVE (h5_error ( + H5_ERR_INVAL, + "Element chosen to be refined is %d but there are only %d elements", + m->marked_entities->items[i], + m->last_stored_eid + 1 )); + } + + sendbuf[i] = h5tpriv_get_loc_elem_glb_idx (m, m->marked_entities->items[i]); + + } + + + int* recvdispls = NULL; + TRY (recvdispls = h5_calloc (m->f->nprocs, sizeof (*recvdispls))); + int num_tot_elems = num_elems[0]; + for (int i = 1; i < m->f->nprocs; i++) { + recvdispls[i] = recvdispls[i-1] + num_elems[i-1]; + num_tot_elems += num_elems[i]; + } + TRY (h5priv_alloc_glb_idxlist (glb_list, num_tot_elems)); + (*glb_list)->num_items = num_tot_elems; + // exchange + TRY (mpi_allgatherv ( + sendbuf, + m->marked_entities->num_items, + MPI_LONG_LONG, + (*glb_list)->items, + num_elems, + recvdispls, + MPI_LONG_LONG, + m->f->props->comm + )) + + + qsort ((*glb_list)->items, num_tot_elems, sizeof (*(*glb_list)->items), compare_glb_idx_oct); + TRY (h5_free (num_elems)); + TRY (h5_free (sendbuf)); + TRY (h5_free (recvdispls)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif + +/* + Find ID in sorted list +*/ +h5_loc_id_t +h5priv_find_idlist ( + h5_loc_idlist_t* list, + const h5_loc_id_t item + ) { + H5_PRIV_API_ENTER (h5_err_t, + "list=%p, item=%llu", + list, (long long unsigned)item); + if (!list) { + H5_PRIV_API_LEAVE (-1); + } + register size_t low = 0; + register size_t mid; + register size_t high = list->num_items - 1; + register h5_loc_idx_t diff; + const h5_loc_id_t face_id = h5tpriv_get_face_id(item); + const h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx(item); + while (low <= high) { + mid = (low + high) / 2; + diff = h5tpriv_get_elem_idx(list->items[mid]) - elem_idx; + // if element indices are equal, we decide on the face indices + if (diff == 0) { + diff = h5tpriv_get_face_id (list->items[mid]) - face_id; + } + if ( diff > 0 ) + high = mid - 1; + else if ( diff < 0 ) + low = mid + 1; + else + H5_PRIV_API_LEAVE (mid); // found + } + H5_PRIV_API_RETURN (-(low+1)); // not found +} + diff --git a/src/h5core/h5t_map_private.h b/src/h5core/h5t_map_private.h new file mode 100644 index 0000000..c937e4b --- /dev/null +++ b/src/h5core/h5t_map_private.h @@ -0,0 +1,120 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5T_MAP_PRIVATE_H +#define __H5T_MAP_PRIVATE_H + +#include "h5_types_private.h" +#include "h5core/h5_debug.h" +#include "h5core/h5_errorhandling.h" +#include "h5core/h5_syscall.h" +#include "h5_debug_private.h" +#include "h5t_model_private.h" + +/* + Find ID in sorted list + Special version of macro h5priv_find_in_xlist() for local and global entity IDs +*/ +#define h5priv_find_in_idlist(type) \ + static inline h5_loc_idx_t \ + h5priv_find_in_ ## type ## list ( \ + h5_ ## type ## list_t* list, \ + const h5_ ## type ## _t item \ + ) { \ + H5_PRIV_API_ENTER (h5_err_t, \ + "list=%p, item=%llu", \ + list, (long long unsigned)item); \ + if (!list) { \ + H5_PRIV_API_LEAVE (-1); \ + } \ + register size_t low = 0; \ + register size_t mid; \ + register size_t high = list->num_items - 1; \ + register h5_ ## type ## x_t diff; \ + const h5_ ## type ## _t face_id = h5tpriv_get_face_id(item); \ + const h5_ ## type ## x_t elem_idx = h5tpriv_get_elem_idx(item); \ + while (low <= high) { \ + mid = (low + high) / 2; \ + diff = h5tpriv_get_elem_idx(list->items[mid]) - elem_idx; \ + if (diff == 0) { \ + diff = h5tpriv_get_face_id (list->items[mid]) - face_id; \ + } \ + if ( diff > 0 ) \ + high = mid - 1; \ + else if ( diff < 0 ) \ + low = mid + 1; \ + else \ + H5_PRIV_API_LEAVE (mid); \ + } \ + H5_PRIV_API_RETURN (-(low+1)); \ + } + + +h5priv_alloc_xlist (loc_id) +h5priv_free_xlist (loc_id) +h5priv_insert_into_xlist (loc_id) +h5priv_find_in_idlist (loc_id) +h5priv_search_in_xlist (loc_id) + +h5priv_alloc_xlist (glb_id) +h5priv_free_xlist (glb_id) +h5priv_insert_into_xlist (glb_id) +h5priv_find_in_idlist (glb_id) +h5priv_search_in_xlist (glb_id) + +h5_err_t +h5tpriv_get_vertex_index_of_vertex ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idx_t* vertex_index + ); + +h5_err_t +h5tpriv_get_vertex_index_of_vertex2 ( + h5t_mesh_t* const m, + const h5_loc_idx_t face_idx, + const h5_loc_idx_t elem_idx, + h5_loc_idx_t* vertex_indices + ); + +h5_err_t +h5tpriv_sort_local_vertex_indices ( + h5t_mesh_t* const m, + h5_loc_idx_t * const indices, + const h5_size_t size + ); + +h5_loc_idx_t +h5tpriv_get_local_vid ( + h5t_mesh_t* const m, + h5_float64_t P[3] + ); + +h5_err_t +h5tpriv_rebuild_map_vertex_g2l ( + h5t_mesh_t* const m, + h5_lvl_idx_t from_lvl, + h5_lvl_idx_t to_lvl + ); +h5_err_t +h5tpriv_rebuild_map_vertex_g2l_partial ( + h5t_mesh_t* const m + ); +h5_err_t +h5priv_exchange_loc_list_to_glb ( + h5t_mesh_t* const m, + h5_glb_idxlist_t** glb_list + ); + +h5_loc_idx_t +h5tpriv_find_glb_idx_in_map ( + h5_idxmap_t* map, + const h5_glb_idx_t glb_idx + ); +#endif diff --git a/src/h5core/h5t_model.c b/src/h5core/h5t_model.c new file mode 100644 index 0000000..c0cb97a --- /dev/null +++ b/src/h5core/h5t_model.c @@ -0,0 +1,598 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5core/h5.h" +#include "h5_mpi_private.h" +#include "h5_errorhandling_private.h" + +#include "h5_attribs_private.h" +#include "h5_hdf5_private.h" + +#include "h5t_types_private.h" +#include "h5t_errorhandling_private.h" +#include "h5t_model_private.h" +#include "h5t_adjacencies_private.h" +#include "h5t_readwrite_private.h" +#include "h5t_tags_private.h" + +#include "h5_init_private.h" + +#include "h5core/h5_model.h" +#include "h5t_core_private.h" +#include "h5t_store_private.h" + +#include +#include + + +/*! + \ingroup h5_private + + \internal + + Initialize topo internal structure. The structure has already be initialized + with zero's. + + \return H5_SUCCESS or error code + */ +h5_err_t +h5tpriv_init_mesh ( + h5t_mesh_t* const m, + const h5_file_p f, + const char* name, + const hid_t mesh_hid, + const hid_t elem_type, + const h5t_ref_elem_t* ref_elem, + h5t_methods_t* methods, + const int create_mesh + ) { + H5_PRIV_API_ENTER (h5_err_t, "m=%p", m); + + m->f = f; + strncpy (m->mesh_name, name, sizeof (m->mesh_name)-1); + m->mesh_name[sizeof(m->mesh_name)-1] = '\0'; + m->mesh_gid = mesh_hid; + m->ref_elem = ref_elem; + m->methods = methods; + + m->mesh_changed = 0; + m->num_leaf_levels = -1; + m->leaf_level = 0; + m->last_stored_vid = -1; + m->last_stored_eid = -1; + m->last_stored_vid_before_ref = -1; + m->last_stored_eid_before_ref = -1; + m->timing.num_timing = NUM_TIMING; + m->timing.next_time = 0; + m->timing.f = NULL; + m->is_chunked = 0; + + /* initialize pointers */ + m->octree = NULL; + m->chunks = NULL; + m->loc_elems = NULL; + m->num_interior_elems = NULL; + m->num_glb_elems = NULL; + m->num_interior_leaf_elems = NULL; + m->num_glb_leaf_elems = NULL; + m->map_elem_g2l.items = NULL; + m->vertices = NULL; + m->num_loc_vertices = NULL; + m->map_vertex_g2l.items = NULL; + m->num_b_vtx = NULL; + m->first_b_vtx = NULL; +// m->weights = NULL; + + /* chunks */ + strcpy (m->dsinfo_chunks.name, "Chunks"); + m->dsinfo_chunks.rank = 1; + m->dsinfo_chunks.dims[0] = 0; + m->dsinfo_chunks.max_dims[0] = H5S_UNLIMITED; + m->dsinfo_chunks.chunk_dims[0] = 4096; + m->dsinfo_chunks.type_id = h5_dta_types.h5_chunk_t; + TRY (m->dsinfo_chunks.create_prop = hdf5_create_property ( + H5P_DATASET_CREATE) ); + TRY (hdf5_set_chunk_property ( + m->dsinfo_chunks.create_prop, + m->dsinfo_chunks.rank, + m->dsinfo_chunks.chunk_dims) ); + m->dsinfo_chunks.access_prop = H5P_DEFAULT; + + /* octree */ + strcpy (m->dsinfo_octree.name, "Octants"); + m->dsinfo_octree.rank = 1; + m->dsinfo_octree.dims[0] = 0; + m->dsinfo_octree.max_dims[0] = H5S_UNLIMITED; + m->dsinfo_octree.chunk_dims[0] = 4096; + m->dsinfo_octree.type_id = h5_dta_types.h5_octree_t; + TRY (m->dsinfo_octree.create_prop = hdf5_create_property ( + H5P_DATASET_CREATE) ); + TRY (hdf5_set_chunk_property ( + m->dsinfo_octree.create_prop, + m->dsinfo_octree.rank, + m->dsinfo_octree.chunk_dims) ); + m->dsinfo_octree.access_prop = H5P_DEFAULT; + + /* octree userdata */ + strcpy (m->dsinfo_userdata.name, "Oct_userdata"); + m->dsinfo_userdata.rank = 1; + m->dsinfo_userdata.dims[0] = 0; + m->dsinfo_userdata.max_dims[0] = H5S_UNLIMITED; + m->dsinfo_userdata.chunk_dims[0] = 4096; + m->dsinfo_userdata.type_id = h5_dta_types.h5_userdata_t; + TRY (m->dsinfo_userdata.create_prop = hdf5_create_property ( + H5P_DATASET_CREATE) ); + TRY (hdf5_set_chunk_property ( + m->dsinfo_userdata.create_prop, + m->dsinfo_userdata.rank, + m->dsinfo_userdata.chunk_dims) ); + m->dsinfo_userdata.access_prop = H5P_DEFAULT; + + /* vertices */ + strcpy (m->dsinfo_vertices.name, "Vertices"); + m->dsinfo_vertices.rank = 1; + m->dsinfo_vertices.dims[0] = 0; + m->dsinfo_vertices.max_dims[0] = H5S_UNLIMITED; + m->dsinfo_vertices.chunk_dims[0] = 4096; + m->dsinfo_vertices.type_id = h5_dta_types.h5_vertex_t; + TRY (m->dsinfo_vertices.create_prop = hdf5_create_property ( + H5P_DATASET_CREATE) ); + TRY (hdf5_set_chunk_property ( + m->dsinfo_vertices.create_prop, + m->dsinfo_vertices.rank, + m->dsinfo_vertices.chunk_dims) ); + m->dsinfo_vertices.access_prop = H5P_DEFAULT; + + /* Elems */ + strcpy (m->dsinfo_elems.name, "Elems"); + m->dsinfo_elems.rank = 1; + m->dsinfo_elems.dims[0] = 0; + m->dsinfo_elems.max_dims[0] = H5S_UNLIMITED; + m->dsinfo_elems.chunk_dims[0] = 4096; + m->dsinfo_elems.type_id = elem_type; + TRY (m->dsinfo_elems.create_prop = hdf5_create_property ( + H5P_DATASET_CREATE) ); + TRY (hdf5_set_chunk_property ( + m->dsinfo_elems.create_prop, + m->dsinfo_elems.rank, + m->dsinfo_elems.chunk_dims) ); + m->dsinfo_elems.access_prop = H5P_DEFAULT; + + /* Weights */ + strcpy (m->dsinfo_weights.name, "weights"); + m->dsinfo_weights.rank = 1; +// m->dsinfo_weights.rank = 2; + m->dsinfo_weights.dims[0] = 0; +// m->dsinfo_weights.dims[1] = 0; + m->dsinfo_weights.max_dims[0] = H5S_UNLIMITED; +// m->dsinfo_weights.max_dims[1] = H5S_UNLIMITED; + m->dsinfo_weights.chunk_dims[0] = 4096; +// m->dsinfo_weights.chunk_dims[0] = 4096; + m->dsinfo_weights.type_id = h5_dta_types.h5_int32_t; + TRY (m->dsinfo_weights.create_prop = hdf5_create_property ( + H5P_DATASET_CREATE) ); + TRY (hdf5_set_chunk_property ( + m->dsinfo_weights.create_prop, + m->dsinfo_weights.rank, + m->dsinfo_weights.chunk_dims) ); + m->dsinfo_weights.access_prop = H5P_DEFAULT; + + if (create_mesh) { + m->num_leaf_levels = 0; + } else { + TRY (h5priv_read_attrib ( + m->mesh_gid, + "__num_leaf_levels__", + H5T_NATIVE_INT16, + &m->num_leaf_levels)); + m->leaf_level = m->num_leaf_levels-1; //seems not to be set otherwise but for reading vtx it should be... + TRY (m->num_glb_elems = h5_calloc (m->num_leaf_levels, sizeof(*m->num_glb_elems))); + TRY (m->num_glb_leaf_elems = h5_calloc (m->num_leaf_levels, sizeof(*m->num_glb_leaf_elems))); + TRY (m->num_glb_vertices = h5_calloc (m->num_leaf_levels, sizeof (*m->num_glb_vertices))); + + TRY (m->num_b_vtx = h5_alloc (m->num_b_vtx, m->num_leaf_levels*sizeof (*m->num_b_vtx))); + TRY (m->first_b_vtx = h5_alloc (m->first_b_vtx, m->num_leaf_levels*sizeof (*m->first_b_vtx))); + + TRY (m->num_interior_elems = h5_calloc (m->num_leaf_levels, sizeof(*m->num_interior_elems))); + TRY (m->num_interior_leaf_elems = h5_calloc (m->num_leaf_levels, sizeof(*m->num_interior_leaf_elems))); + TRY (m->num_ghost_elems = h5_calloc (m->num_leaf_levels, sizeof(*m->num_ghost_elems))); + TRY (m->num_loc_vertices = h5_calloc (m->num_leaf_levels, sizeof (*m->num_loc_vertices))); + + TRY (h5priv_read_attrib ( + m->mesh_gid, + "__num_elems__", + H5T_NATIVE_INT64, + m->num_glb_elems)); + + TRY (h5priv_read_attrib ( + m->mesh_gid, + "__num_leaf_elems__", + H5T_NATIVE_INT64, + m->num_glb_leaf_elems)); + + TRY (h5priv_read_attrib ( + m->mesh_gid, + "__num_vertices__", + H5T_NATIVE_INT64, + m->num_glb_vertices)); + // if the file version is lower the following attributes are missing: + hid_t exists; + TRY (exists = hdf5_attribute_exists ( + m->mesh_gid, + "__is_chunked__")); + if (exists) { + + TRY (h5priv_read_attrib ( + m->mesh_gid, + "__num_b_vertices__", + H5T_NATIVE_INT64, + m->num_b_vtx)); + TRY (h5priv_read_attrib ( + m->mesh_gid, + "__first_b_vertices__", + H5T_NATIVE_INT64, + m->first_b_vtx)); + TRY (h5priv_read_attrib ( + m->mesh_gid, + "__is_chunked__", + H5T_NATIVE_INT16, + &m->is_chunked)); + TRY (h5priv_read_attrib ( + m->mesh_gid, + "__num_weights__", + H5T_NATIVE_INT32, + &m->num_weights)); + } else { + memset (m->num_b_vtx, -1, m->num_leaf_levels * sizeof (m->num_b_vtx)); + memset (m->first_b_vtx, -1, m->num_leaf_levels * sizeof (m->first_b_vtx)); + m->is_chunked = 0; + m->num_weights = 0; + } + + + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + +/* + Open HDF5 group with specific mesh + */ +static h5_err_t +release_elems ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + TRY (h5_free (m->loc_elems)); m->loc_elems = NULL; + TRY (h5_free (m->num_glb_elems)); m->num_glb_elems = NULL; + TRY (h5_free (m->num_glb_leaf_elems)); m->num_glb_leaf_elems = NULL; + TRY (h5_free (m->num_interior_elems)); m->num_interior_elems = NULL; + TRY (h5_free (m->num_interior_leaf_elems)); m->num_interior_leaf_elems = NULL; + TRY (h5_free (m->num_ghost_elems)); m->num_ghost_elems = NULL; + TRY (h5_free (m->map_elem_g2l.items)); m->map_elem_g2l.items = NULL; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static h5_err_t +release_vertices ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + TRY (h5_free (m->vertices)); m->vertices = NULL; + TRY (h5_free (m->num_glb_vertices)); m->num_glb_vertices = NULL; + TRY (h5_free (m->num_loc_vertices)); m->num_loc_vertices = NULL; + TRY (h5_free (m->map_vertex_g2l.items)); m->map_vertex_g2l.items = NULL; + TRY (h5_free (m->first_b_vtx)); m->first_b_vtx = NULL; + TRY (h5_free (m->num_b_vtx)); m->num_b_vtx = NULL; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static h5_err_t +release_memory ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + TRY (h5tpriv_release_adjacency_structs (m)); + TRY (release_elems (m)); + TRY (release_vertices (m)); +#ifdef PARALLEL_IO + if (m->is_chunked) { + TRY (h5tpriv_free_chunks (m)); + TRY (H5t_free_octree (m->octree)); + TRY (h5_free (m->weights)); + } +#endif + TRY (h5_free (m)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +write_timing ( + h5t_mesh_t* const m +) { + H5_CORE_API_ENTER (h5_err_t, "m=%p", m); + if (m->f->myproc == 0 && m->timing.f != NULL) { + FILE* file = fopen (m->timing.f,"a"); + h5_time_t tmp =m->timing.measure[m->timing.num_timing-1]- m->timing.measure[0]; + fprintf (file,"#writing timing \n " + " nprocs max_chunks num_elems tot_time init_mesh " + " reading_octree reading_chunks reading_weights " + " distributing_chunks reading_elems reading_vtx " + " internal_update ref pre_ref ref boundary weights " + " init_glb_elems init_glb_vtx exchange_glb_structs " + " store_glb_struct post_ref close " + " write_weights write_chunks write_octree " + " calc_vtx_map vtx_hyperslap write_vertices write_elems " + "\n" + " %d %d %lld %4.4f", + m->f->nprocs, max_num_elems_p_chunk, + (long long int) m->num_glb_elems[m->num_leaf_levels-1], + tmp >=0 ? tmp: 0); + + for (int i = 1; i < m->timing.num_timing; i++) { + tmp = m->timing.measure[i]- m->timing.measure[i-1] ; + fprintf (file," %4.4f ", tmp >=0 ? tmp: 0 ); + } + fprintf (file,"\n"); + fprintf (file, "# nprocs reading_octree_chunks distribute_chunks reading_elems" + " reading_vtx refinement postrefinement write_oct_chunks " + " vtx_hyperslaps write_vtx write_elems\n"); + fprintf (file,"# %d %4.4f %4.4f %4.4f %4.4f %4.4f %4.4f %4.4f %4.4f %4.4f %4.4f \n\n", + m->f->nprocs, + m->timing.measure[4] - m->timing.measure[0], + m->timing.measure[5] - m->timing.measure[4], + m->timing.measure[6] - m->timing.measure[5], + m->timing.measure[8] - m->timing.measure[6], + m->timing.measure[11] - m->timing.measure[8], + m->timing.measure[18] - m->timing.measure[11], + m->timing.measure[22] - m->timing.measure[18], + m->timing.measure[24] - m->timing.measure[22], + m->timing.measure[25] - m->timing.measure[24], + m->timing.measure[26] - m->timing.measure[25]); + fclose (file); + } + H5_CORE_API_RETURN (H5_SUCCESS); +} +h5_err_t +set_timing_file ( + h5t_mesh_t* const m, + char* time_f + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p", m); + m->timing.f = time_f; + H5_CORE_API_RETURN (H5_SUCCESS); +} +h5_err_t +h5t_close_mesh ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p", m); +#ifdef PARALLEL_IO + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); +#endif + // check if tagsets are still open + if (m->mtagsets && m->mtagsets->num_items > 0) + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_H5FED, + "Mesh cannot be closed: Mesh is referenced by open tagsets")); + + if (!(m->f->props->mode & H5_O_RDONLY)) { + TRY (h5tpriv_write_mesh (m)); + } + TRY (hdf5_close_group (m->mesh_gid)); + + TRY (write_timing (m)); + + TRY (release_memory (m)); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5t_set_level ( + h5t_mesh_t* const m, + const h5_lvl_idx_t level_id + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p, level_id=%d", m, level_id); + + if ((level_id < 0) || (level_id >= m->num_leaf_levels)) + H5_CORE_API_LEAVE (HANDLE_H5_OUT_OF_RANGE_ERR ("Level", level_id)); + + h5_lvl_idx_t prev_level = m->leaf_level; + m->leaf_level = level_id; + + if (level_id >= m->num_loaded_levels) { + TRY (h5tpriv_update_internal_structs (m, ++prev_level)); + } + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5t_set_mesh_changed ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p",m); + m->mesh_changed = 1; + H5_CORE_API_RETURN (H5_SUCCESS); +} + +/* + Allocate \c num additional vertices. + */ +h5_err_t +h5tpriv_alloc_loc_vertices ( + h5t_mesh_t* const m, + const h5_size_t num + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, num=%llu", + m, + (long long unsigned)num); + ssize_t size = num * sizeof (m->vertices[0]); + TRY (m->vertices = h5_alloc (m->vertices, size)); + TRY (h5priv_grow_idxmap (&m->map_vertex_g2l, num)); + H5_PRIV_API_RETURN (H5_SUCCESS); +} + + +/*! + Get number of meshes of given type. + + \param[in] f File handle + \param[in] type_id Type of mesh we want the number of. + + \return Number of meshes of type \c type_id or error code. + */ +static inline h5_ssize_t +get_num_meshes ( + const h5_file_t fh, + const char* grpname + ) { + h5_file_p f = (h5_file_p)fh; + H5_PRIV_FUNC_ENTER (h5_ssize_t, "f=%p, grpname=%s", f, grpname); + hid_t topo_gid = -1; + hid_t meshes_gid = -1; + + h5_err_t exists; + TRY (exists = hdf5_link_exists (f->root_gid, H5T_CONTAINER_GRPNAME)); + if (!exists) H5_CORE_API_LEAVE (0); + + TRY (topo_gid = hdf5_open_group (f->root_gid, H5T_CONTAINER_GRPNAME)); + + TRY (exists = hdf5_link_exists (topo_gid, grpname)); + if (!exists) H5_CORE_API_LEAVE (0); + + TRY (meshes_gid = hdf5_open_group (topo_gid, grpname)); + h5_ssize_t num_meshes; + TRY (num_meshes = hdf5_get_num_groups (meshes_gid)); + TRY (hdf5_close_group (meshes_gid) ); + TRY (hdf5_close_group (topo_gid) ); + + H5_CORE_API_RETURN (num_meshes); +} + +h5_ssize_t +h5t_get_num_tetmeshes ( + const h5_file_t fh + ) { + H5_CORE_API_ENTER (h5_ssize_t, "f=%p", (h5_file_p)fh); + H5_CORE_API_RETURN (get_num_meshes (fh, TETRAHEDRAL_MESHES_GRPNAME)); +} + +h5_ssize_t +h5t_get_num_trimeshes ( + const h5_file_t fh + ) { + H5_CORE_API_ENTER (h5_ssize_t, "f=%p", (h5_file_p)fh); + H5_CORE_API_RETURN (get_num_meshes (fh, TRIANGLE_MESHES_GRPNAME)); +} + +/*! + Get the number of hierarchical mesh levels for the current mesh. + + \param[in] f File handle + + \return Number of hierarchical mesh levels or error code. + */ +h5_ssize_t +h5t_get_num_leaf_levels ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_ssize_t, "m=%p", m); + H5_CORE_API_RETURN (m->num_leaf_levels); +} + +/*! + Get current level. + + \param[in] f File handle. + + \return Current level ID. +*/ +h5_lvl_idx_t +h5t_get_level ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_lvl_idx_t, "m=%p", m); + H5_CORE_API_RETURN (m->leaf_level); +} + +/*! + Return number of elems on compute node \c cnode_id on + current level. If \cnode_id is equal \c -1 return the + number of elements in the entire mesh. + + \remark + Refined elems are *not* counted. + + \param[in] f File handle. + \param[in] cnode Compute node + + \return Number of elements or error code. + */ + +h5_ssize_t +h5t_get_num_leaf_elems ( + h5t_mesh_t* const m, + const h5_id_t cnode + ) { + H5_CORE_API_ENTER (h5_ssize_t, "m=%p, cnode=%llu", + m, (long long unsigned)cnode); + UNUSED_ARGUMENT (cnode); + + if (m->leaf_level < 0) { + H5_CORE_API_LEAVE (h5tpriv_error_undef_level ()); + } + H5_CORE_API_RETURN (m->num_interior_elems[m->leaf_level]); +} +/*! + Return number of vertices on compute node \c cnode_id + on current level. If \cnode_id is equal \c -1 return the + number of vertices in the entire mesh. + + \remark + There is nothing like "refined vertices". + + \param[in] f File handle. + \param[in] cnode Compute node + + \return Number of vertices or error code. + */ +h5_ssize_t +h5t_get_num_vertices ( + h5t_mesh_t* const m, + h5_id_t cnode + ) { + H5_CORE_API_ENTER (h5_ssize_t, + "m=%p, cnode=%llu", + m, (long long unsigned)cnode); + UNUSED_ARGUMENT (cnode); + + if (m->leaf_level < 0) { + H5_CORE_API_LEAVE (h5tpriv_error_undef_level ()); + } + H5_CORE_API_RETURN (m->num_loc_vertices[m->leaf_level]); +} + +/*! + Return if mesh is chunked + + \param[in] f File handle. + + \return 0 if not chunked + */ +h5_lvl_idx_t +h5t_is_chunked ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_lvl_idx_t, "m=%p", m); + H5_CORE_API_RETURN (m->is_chunked); +} + diff --git a/src/h5core/h5t_model_private.h b/src/h5core/h5t_model_private.h new file mode 100644 index 0000000..3ffe884 --- /dev/null +++ b/src/h5core/h5t_model_private.h @@ -0,0 +1,128 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ +#ifndef __H5T_MODEL_PRIVATE_H +#define __H5T_MODEL_PRIVATE_H + +#include "h5core/h5_types.h" +#include "h5core/h5t_model.h" +#include "h5t_types_private.h" + +#define H5T_CONTAINER_GRPNAME "Topo" +#define TETRAHEDRAL_MESHES_GRPNAME "TetMeshes" +#define TRIANGLE_MESHES_GRPNAME "TriangleMeshes" + +#if !(defined(ULLONG_MAX)) +#define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +#endif + +/* + ID's: 64bit + + Vertices: + 000100vv tttttttt tttttttt tttttttt tttttttt tttttttt tttttttt tttttttt + 3V TT TT TT TT TT TT + + Edges: + 00100eee tttttttt tttttttt tttttttt tttttttt tttttttt tttttttt tttttttt + 2E TT TT TT TT TT TT + + Trinagles: + 001100dd tttttttt tttttttt tttttttt tttttttt tttttttt tttttttt tttttttt + 1D TT TT TT TT TT TT + + Tets: + 01000000 tttttttt tttttttt tttttttt tttttttt tttttttt tttttttt tttttttt + 00 TT TT TT TT TT TT + +*/ + +#define BITS_OF(x) (sizeof(x)*CHAR_BIT) + +#define H5T_TYPE_VERTEX (1<<4) +#define H5T_TYPE_EDGE (2<<4) +#define H5T_TYPE_TRIANGLE (3<<4) +#define H5T_TYPE_TET (4<<4) + +#define H5T_FACE_MASK (0x0f) +#define H5T_TYPE_MASK (0x70) + +#if 0 +enum elem_types { + vertex = 1, // 1 vertex + edge, // 2 vertices + triangle, // 3 vertices + quadrangle, // 4 vertices + tetrahedron, // 4 vertices + pyramid, // 5 vertices + prism, // 6 vertices + hexahedron // 8 vertices +}; +#endif + +#define h5tpriv_build_entity_id( type, face_idx, elem_idx ) \ + (((type) | (face_idx)) << (BITS_OF(elem_idx)-8) | (elem_idx)) + +#define h5tpriv_build_vertex_id( face_idx, elem_idx ) \ + (h5tpriv_build_entity_id (H5T_TYPE_VERTEX, face_idx, elem_idx)) + +#define h5tpriv_build_edge_id( face_idx, elem_idx ) \ + (h5tpriv_build_entity_id (H5T_TYPE_EDGE, face_idx, elem_idx)) + +#define h5tpriv_build_triangle_id( face_idx, elem_idx ) \ + (h5tpriv_build_entity_id (H5T_TYPE_TRIANGLE, face_idx, elem_idx)) + +#define h5tpriv_build_tet_id( face_idx, elem_idx ) \ + (h5tpriv_build_entity_id (H5T_TYPE_TET, face_idx, elem_idx)) + +#define h5tpriv_get_entity_type( entity_id ) \ + ((entity_id >> (BITS_OF(entity_id)-8)) & H5T_TYPE_MASK) + +#define h5tpriv_get_face_idx( entity_id ) \ + (((entity_id) >> (BITS_OF(entity_id)-8)) & H5T_FACE_MASK) + +#define h5tpriv_get_face_id( entity_id ) \ + (((entity_id) >> (BITS_OF(entity_id)-8)) & (H5T_TYPE_MASK|H5T_FACE_MASK)) + +#define h5tpriv_get_elem_idx( entity_id ) \ + (((entity_id) << 8) >> 8) + + +/* + Test whether given element is on current level. This is the case, if + - the level_id of the element is <= the current level + - and, if any, the direct children is on a level > the current level +*/ +#define h5tpriv_is_leaf_elem(m, el) \ + ( ((el)->level_idx <= m->leaf_level) && \ + ((el)->child_idx < 0 || (el)->child_idx >= m->num_interior_elems[m->leaf_level]) ) + + +#define H5T_BOUNDARY_ELEM_FLAG 1 +#define H5T_BOUNDARY_FACET_FLAG 2 + +h5_err_t h5tpriv_alloc_loc_vertices (h5t_mesh_t* const, const h5_size_t); + +h5_err_t +h5tpriv_init_mesh ( + h5t_mesh_t* const m, + const h5_file_p f, + const char* name, + const hid_t mesh_hid, + const hid_t elem_type, + const h5t_ref_elem_t* ref_elem, + h5t_methods_t* methods, + const int create_mesh + ); + +h5_err_t +h5tpriv_alloc_num_vertices ( + h5t_mesh_t* const m, + const h5_size_t num + ); +#endif diff --git a/src/h5core/h5t_model_tetm.c b/src/h5core/h5t_model_tetm.c new file mode 100644 index 0000000..2bf4f2c --- /dev/null +++ b/src/h5core/h5t_model_tetm.c @@ -0,0 +1,240 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5t_types_private.h" + +#include "h5_hdf5_private.h" +#include "h5_va_macros.h" + + +#include "h5t_model_private.h" +#include "h5t_access_private.h" +#include "h5t_adjacencies_private.h" +#include "h5t_readwrite_private.h" +#include "h5t_retrieve_private.h" +#include "h5t_store_private.h" + +#include "h5_init_private.h" +#include "h5t_core_private.h" + +static struct h5t_methods tet_funcs = { + &h5tpriv_read_tetm_methods, + &h5tpriv_tetm_store_methods, + &h5tpriv_tetm_retrieve_methods, + &h5tpriv_access_tetm_methods, + &h5tpriv_tetm_adjacency_methods, + &h5tpriv_tetm_core_methods +}; + +/* + open tetrahedral mesh + */ +h5_err_t +h5t_open_tetrahedral_mesh_by_idx ( + const h5_file_t fh, + const h5_id_t idx, + h5t_mesh_t** mesh + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, "f=%p, idx=%lld, mesh=%p", f, (long long)idx, mesh); + hid_t ctn_hid; + char name[1024]; + + TRY (ctn_hid = h5priv_open_group ( + 0, + f->root_gid, + H5T_CONTAINER_GRPNAME, + TETRAHEDRAL_MESHES_GRPNAME)); + TRY (hdf5_get_name_of_group_by_idx (ctn_hid, idx, name, sizeof (name))); + TRY (hdf5_close_group (ctn_hid)); + + H5_CORE_API_RETURN (h5t_open_tetrahedral_mesh ((h5_file_t)f, name, mesh)); +} + +h5_err_t +h5t_open_tetrahedral_mesh ( + const h5_file_t fh, + const char* name, + h5t_mesh_t** mesh + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, "f=%p, name=%s, mesh=%p", f, name, mesh); + hid_t mesh_hid; + + TRY (mesh_hid = h5priv_open_group ( + 0, // do not create intermediate groups + f->root_gid, + H5T_CONTAINER_GRPNAME, + TETRAHEDRAL_MESHES_GRPNAME, + name)); + + TRY (*mesh = h5_calloc (1, sizeof(**mesh))); + h5t_mesh_t* m = *mesh; + TRY (h5tpriv_init_mesh ( + m, + f, + name, + mesh_hid, + h5_dta_types.h5_tet_t, + &h5t_tet_ref_elem, + &tet_funcs, + 0)); +#ifdef PARALLEL_IO // reason: even if we have a chunked mesh, if h5hut is not parallel + // it does not support reading chunked meshes + TRY (m->is_chunked ? h5tpriv_read_chunked_mesh (m) :h5tpriv_read_mesh (m)); +#else + TRY (h5tpriv_read_mesh (m)); +#endif + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5t_open_tetrahedral_mesh_part ( + const h5_file_p f, + const char* name, + h5t_mesh_t** mesh, + h5_glb_idx_t* elem_indices, + h5_glb_idx_t dim + ) { + H5_CORE_API_ENTER (h5_err_t, "f=%p, name=%s, mesh=%p", f, name, mesh); + hid_t mesh_hid; + + TRY (mesh_hid = h5priv_open_group ( + 0, + f->root_gid, + H5T_CONTAINER_GRPNAME, + TRIANGLE_MESHES_GRPNAME, + name)); + + TRY (*mesh = h5_calloc (1, sizeof(**mesh))); + h5t_mesh_t* m = *mesh; + TRY (h5tpriv_init_mesh ( + m, + f, + name, + mesh_hid, + h5_dta_types.h5_tet_t, + &h5t_tet_ref_elem, + &tet_funcs, + 0)); + TRY (h5tpriv_read_mesh_part (m, elem_indices, dim)); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +/*! + Add new mesh + + \return mesh id + */ +h5_err_t +h5t_add_tetrahedral_mesh ( + const h5_file_t fh, + const char* name, + h5t_mesh_t** mesh + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, "f=%p, name=%s, mesh=%p", f, name, mesh); + CHECK_WRITABLE_MODE (f); + h5_err_t exists; + TRY (exists = h5priv_link_exists ( + f->root_gid, + H5T_CONTAINER_GRPNAME, + TETRAHEDRAL_MESHES_GRPNAME, + name)); + if (exists) { + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR, + "Tetrahedral mesh '%s' already exists!", + name)); + } + hid_t mesh_hid; + TRY (mesh_hid = h5priv_open_group ( + 1, // create intermediate groups in path + f->root_gid, + H5T_CONTAINER_GRPNAME, + TETRAHEDRAL_MESHES_GRPNAME, + name)); + + TRY (*mesh = h5_calloc (1, sizeof(**mesh))); + h5t_mesh_t* m = *mesh; + TRY (h5tpriv_init_mesh ( + m, + f, + name, + mesh_hid, + h5_dta_types.h5_tet_t, + &h5t_tet_ref_elem, + &tet_funcs, + 1)); + + m->leaf_level = 0; + m->num_leaf_levels = 0; + TRY (h5tpriv_add_level (m)); + m->mesh_changed = 1; + + H5_CORE_API_RETURN (H5_SUCCESS); +} +/*! + Add new mesh + + \return mesh id + */ +h5_err_t +h5t_add_chunked_tetrahedral_mesh ( + const h5_file_t fh, + const char* name, + h5t_mesh_t** mesh + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, "f=%p, name=%s, mesh=%p", f, name, mesh); +#ifdef PARALLEL_IO + CHECK_WRITABLE_MODE (f); + h5_err_t exists; + TRY (exists = h5priv_link_exists ( + f->root_gid, + H5T_CONTAINER_GRPNAME, + TETRAHEDRAL_MESHES_GRPNAME, + name)); + if (exists) { + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR, + "Tetrahedral mesh '%s' already exists!", + name)); + } + hid_t mesh_hid; + TRY (mesh_hid = h5priv_open_group ( + 1, // create intermediate groups in path + f->root_gid, + H5T_CONTAINER_GRPNAME, + TETRAHEDRAL_MESHES_GRPNAME, + name)); + + TRY (*mesh = h5_calloc (1, sizeof(**mesh))); + h5t_mesh_t* m = *mesh; + TRY (h5tpriv_init_mesh ( + m, + f, + name, + mesh_hid, + h5_dta_types.h5_tet_t, + &h5t_tet_ref_elem, + &tet_funcs, + 1)); + m->is_chunked = 1; + TRY (H5t_init_octree(&m->octree, sizeof (h5t_oct_userdata_t), NULL, -1, m->f->props->comm)); + m->leaf_level = 0; + m->num_leaf_levels = 0; + TRY (h5tpriv_add_level (m)); + m->mesh_changed = 1; +#endif + H5_CORE_API_RETURN (H5_SUCCESS); +} diff --git a/src/h5core/h5t_model_trim.c b/src/h5core/h5t_model_trim.c new file mode 100644 index 0000000..2de40ad --- /dev/null +++ b/src/h5core/h5t_model_trim.c @@ -0,0 +1,266 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ +#include "h5t_types_private.h" + +#include "h5_hdf5_private.h" +#include "h5_mpi_private.h" +#include "h5_va_macros.h" + +#include "h5t_model_private.h" +#include "h5t_access_private.h" +#include "h5t_adjacencies_private.h" +#include "h5t_readwrite_private.h" +#include "h5t_retrieve_private.h" +#include "h5t_store_private.h" + +#include "h5_init_private.h" +#include "h5t_core_private.h" + +static struct h5t_methods tri_funcs = { + &h5tpriv_read_trim_methods, + &h5tpriv_trim_store_methods, + &h5tpriv_trim_retrieve_methods, + &h5tpriv_access_trim_methods, + &h5tpriv_trim_adjacency_methods, + &h5tpriv_trim_core_methods +}; + +/* + open tetrahedral mesh + */ +h5_err_t +h5t_open_triangle_mesh_by_idx ( + const h5_file_t fh, + const h5_id_t idx, + h5t_mesh_t** mesh + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, "f=%p, idx=%lld, mesh=%p", f, (long long)idx, mesh); + hid_t ctn_hid; + char name[1024]; + + TRY (ctn_hid = h5priv_open_group ( + 0, + f->root_gid, + H5T_CONTAINER_GRPNAME, + TRIANGLE_MESHES_GRPNAME)); + TRY (hdf5_get_name_of_group_by_idx (ctn_hid, idx, name, sizeof (name))); + TRY (hdf5_close_group (ctn_hid)); + + H5_CORE_API_RETURN (h5t_open_triangle_mesh ((h5_file_t)f, name, mesh)); +} + +h5_err_t +h5t_open_triangle_mesh ( + const h5_file_t fh, + const char* name, + h5t_mesh_t** mesh + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, "f=%p, name=%s, mesh=%p", f, name, mesh); +#ifdef PARALLEL_IO + MPI_Barrier (f->props->comm); + double start = MPI_Wtime(); +#endif + hid_t mesh_hid; + TRY (mesh_hid = h5priv_open_group ( + 0, + f->root_gid, + H5T_CONTAINER_GRPNAME, + TRIANGLE_MESHES_GRPNAME, + name)); + + TRY (*mesh = h5_calloc (1, sizeof(**mesh))); + h5t_mesh_t* m = *mesh; + TRY (h5tpriv_init_mesh ( + m, + f, + name, + mesh_hid, + h5_dta_types.h5_triangle_t, + &h5t_tri_ref_elem, + &tri_funcs, + 0)); +#ifdef PARALLEL_IO // reason: even if we have a chunked mesh, if h5hut is not parallel + MPI_Barrier (m->f->props->comm); + m->timing.measure[m->timing.next_time++] = start; + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + // it does not support reading chunked meshes + TRY (m->is_chunked && m->f->nprocs > 1? h5tpriv_read_chunked_mesh (m) :h5tpriv_read_mesh (m)); +#else + TRY (h5tpriv_read_mesh (m)); +#endif + H5_CORE_API_RETURN (H5_SUCCESS); +} + + +h5_err_t +h5t_open_triangle_mesh_part ( + const h5_file_t fh, + const char* name, + h5t_mesh_t** mesh, + h5_glb_idx_t* elem_indices, + h5_glb_idx_t dim + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, "f=%p, name=%s, mesh=%p", f, name, mesh); + hid_t mesh_hid; +#ifdef PARALLEL_IO + MPI_Barrier (f->props->comm); + double start = MPI_Wtime(); +#endif + TRY (mesh_hid = h5priv_open_group ( + 0, + f->root_gid, + H5T_CONTAINER_GRPNAME, + TRIANGLE_MESHES_GRPNAME, + name)); + + TRY (*mesh = h5_calloc (1, sizeof(**mesh))); + h5t_mesh_t* m = *mesh; + TRY (h5tpriv_init_mesh ( + m, + f, + name, + mesh_hid, + h5_dta_types.h5_triangle_t, + &h5t_tri_ref_elem, + &tri_funcs, + 0)); +#ifdef PARALLEL_IO // reason: even if we have a chunked mesh, if h5hut is not parallel + MPI_Barrier (m->f->props->comm); + m->timing.measure[m->timing.next_time++] = start; + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); +#endif + + TRY (h5tpriv_read_mesh_part (m, elem_indices, dim)); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +/*! + Add new mesh + + \return mesh id + */ +h5_err_t +h5t_add_triangle_mesh ( + const h5_file_t fh, + const char* name, + h5t_mesh_t** mesh + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, "f=%p, name=%s, mesh=%p", f, name, mesh); + CHECK_WRITABLE_MODE (f); + h5_err_t exists; + TRY (exists = h5priv_link_exists ( + f->root_gid, + H5T_CONTAINER_GRPNAME, + TRIANGLE_MESHES_GRPNAME, + name)); + if (exists) { + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR, + "Tetrahedral mesh '%s' already exists!", + name)); + } + hid_t mesh_hid; + TRY (mesh_hid = h5priv_open_group ( + 1, // create intermediate groups in path + f->root_gid, + H5T_CONTAINER_GRPNAME, + TRIANGLE_MESHES_GRPNAME, + name)); + + TRY (*mesh = h5_calloc (1, sizeof(**mesh))); + h5t_mesh_t* m = *mesh; + TRY (h5tpriv_init_mesh ( + m, + f, + name, + mesh_hid, + h5_dta_types.h5_triangle_t, + &h5t_tri_ref_elem, + &tri_funcs, + 1)); + + m->leaf_level = 0; + m->num_leaf_levels = 0; + TRY (h5tpriv_add_level (m)); + m->mesh_changed = 1; + + H5_CORE_API_RETURN (H5_SUCCESS); +} +/*! + Add new chunked mesh + + \return mesh id + */ +h5_err_t +h5t_add_chunked_triangle_mesh( + const h5_file_t fh, + const char* name, + h5t_mesh_t** mesh + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, "f=%p, name=%s, mesh=%p", f, name, mesh); +#ifdef PARALLEL_IO + int size = -1; + TRY (h5priv_mpi_comm_size (f->props->comm, &size)); + if (size != 1) { + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR, + "Trying to create a chunked mesh with '%d' procs instead of 1!", + size)); + } + + CHECK_WRITABLE_MODE (f); + h5_err_t exists; + TRY (exists = h5priv_link_exists ( + f->root_gid, + H5T_CONTAINER_GRPNAME, + TRIANGLE_MESHES_GRPNAME, + name)); + if (exists) { + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR, + "Triangle mesh '%s' already exists!", + name)); + } + hid_t mesh_hid; + TRY (mesh_hid = h5priv_open_group ( + 1, // create intermediate groups in path + f->root_gid, + H5T_CONTAINER_GRPNAME, + TRIANGLE_MESHES_GRPNAME, + name)); + + TRY (*mesh = h5_calloc (1, sizeof(**mesh))); + h5t_mesh_t* m = *mesh; + TRY (h5tpriv_init_mesh ( + m, + f, + name, + mesh_hid, + h5_dta_types.h5_triangle_t, + &h5t_tri_ref_elem, + &tri_funcs, + 1)); + m->is_chunked = 1; + TRY (H5t_init_octree(&m->octree, sizeof (h5t_oct_userdata_t), NULL, -1, m->f->props->comm)); + m->leaf_level = 0; + m->num_leaf_levels = 0; + TRY (h5tpriv_add_level (m)); + m->mesh_changed = 1; +#endif + H5_CORE_API_RETURN (H5_SUCCESS); +} diff --git a/src/h5core/h5t_octree.c b/src/h5core/h5t_octree.c new file mode 100644 index 0000000..0ae228c --- /dev/null +++ b/src/h5core/h5t_octree.c @@ -0,0 +1,3251 @@ +#include "h5t_octree_private.h" +#include "h5t_core_private.h" + +#ifdef PARALLEL_IO + +#include +#include +#include + +#include "h5_mpi_private.h" + +static h5_err_t +get_bounding_box_of_octant ( + h5t_octree_t* const octree, + h5_oct_idx_t oct_idx, + h5_float64_t* bounding_box + ); + +#if 0 + +/*** code copied from http://stackoverflow.com/questions/111928/is-there-a-printf-converter-to-print-in-binary-format + * author http://stackoverflow.com/users/429544/techplexengineer + */ +static int printf_arginfo_M(const struct printf_info *info, size_t n, int *argtypes, int *avoidwarning) { + /* "%M" always takes one argument, a pointer to uint8_t[6]. */ + if (n > 0) { + argtypes[0] = PA_POINTER; + } + return 1; +} /* printf_arginfo_M */ + +static int printf_output_M(FILE *stream, const struct printf_info *info, const void *const *args) { + int value = 0; + int len; + value = *(int *) (args[0]); +// value = *(int **) (args[0]); + //Begin My Code ------------------------------------------------------------ + char buffer [2] = ""; //Is this bad? + char buffer2 [40] = ""; //Is this bad? + int bits = 32; //info->width; +// if (bits <= 0) +// bits = 8; //Default to 8 bits + int counter = 1; + uint mask = 1 << (bits-1); + while (mask > 0) { + sprintf(buffer, "%s", (((value & mask) > 0) ? "1" : "0")); + strcat(buffer2, buffer); + if (counter %8 == 0) { + sprintf(buffer, " "); + strcat(buffer2, buffer); + } + mask >>= 1; + counter++; + } + strcat(buffer2, "\n"); + //End my code -------------------------------------------------------------- + len = fprintf(stream, "%s", buffer2); + return len; +} /* printf_output_M */ +static int +printf_output_B(FILE* stream, + const struct printf_info* info, + const void* const* args + ) { + int value = 0; + int length = 0; + value = *(int *) (args[0]); + char buffer [2] = ""; + char buffer2 [40] = ""; + int bits = 32; + int counter = 1; + uint mask = 1 << (bits-1); + while (mask > 0) { + sprintf(buffer, "%s", (((value & mask) > 0) ? "1" : "0")); + strcat(buffer2, buffer); + if (counter %8 == 0) { + sprintf(buffer, " "); + strcat(buffer2, buffer); + } + mask >>= 1; + counter++; + } + strcat(buffer2, "\n"); + length = fprintf(stream, "%s", buffer2); + return length; +} + +static int +printf_arginfo_B (const struct printf_info* info, + size_t n, + int* argtypes, + int* args + ) { + if (n > 0) { + argtypes[0] = PA_POINTER; + } + return 1; +} +#endif + +static inline h5_err_t +create_mpi_type_octant ( + void + ) { + h5t_octant_t octant; + H5_PRIV_FUNC_ENTER (h5_err_t, "%s", "void"); + int i = 0; + const int count = 6; + int blocklens[count]; + MPI_Aint indices[count]; + MPI_Datatype old_types[count]; + MPI_Aint base; + MPI_Aint addr; + TRY (mpi_get_address (&octant, &base)); + + // idx + blocklens[i] = 1; + TRY (mpi_get_address (&octant.idx, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_INT; + + // parent_idx + blocklens[i] = 1; + TRY (mpi_get_address (&octant.parent_idx, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_INT; + + // child_idx + blocklens[i] = 1; + TRY (mpi_get_address (&octant.child_idx, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_INT; + + // level_idx + blocklens[i] = 1; + TRY (mpi_get_address (&octant.level_idx, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_SHORT; + +// // bounding_box +// blocklens[i] = 6; +// TRY (mpi_get_address (&octant.bounding_box, &addr)); +// indices[i] = addr - base; +// old_types[i++] = MPI_DOUBLE; + + // processor + blocklens[i] = 1; + TRY (mpi_get_address (&octant.processor, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_INT; + + // userlevels + blocklens[i] = 1; + TRY (mpi_get_address (&octant.userlevels, &addr)); + indices[i] = addr - base; + old_types[i++] = MPI_INT; + + + // create new type + assert (i == count); + TRY (mpi_create_type_struct (count, blocklens, indices, old_types, + &h5_oct_dta_types.mpi_octant)); + // commit new type + TRY (h5priv_mpi_type_commit (&h5_oct_dta_types.mpi_octant)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t H5t_create_mpi_type_octant (void) { + return create_mpi_type_octant (); +} +/* + * Get parent index of octant + */ +static h5_oct_idx_t +get_parent ( + h5t_octree_t* const octree, + const h5_oct_idx_t oct_idx + ) { + if (oct_idx <= 0) { + return -1; + } + return (octree->octants[oct_idx].parent_idx); +}; +h5_oct_idx_t +H5t_get_parent (h5t_octree_t* const octree, const h5_oct_idx_t oct_idx) { + return get_parent (octree, oct_idx); +}; + +static int +get_maxpoints ( + h5t_octree_t* const octree + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p,", octree); + H5_PRIV_FUNC_RETURN (octree->maxpoints); +} +int H5t_get_maxpoints (h5t_octree_t* const octree) { + return get_maxpoints (octree); +} + +static h5_err_t +set_maxpoints ( + h5t_octree_t* const octree, + int maxpoints + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, maxpoints=%d", octree, maxpoints); + assert (maxpoints > 0); + octree->maxpoints = maxpoints; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t H5t_set_maxpoints (h5t_octree_t* const octree, int maxpoints) { + return set_maxpoints (octree, maxpoints); +} + +/* + * Check if octant is on level + * return value is 0 if it is NOT on level + */ +h5_oct_level_t +oct_has_level ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_level_t level + ) { + return octree->octants[oct_idx].userlevels & 1 << level; +} +h5_oct_level_t H5t_oct_has_level (h5t_octree_t* octree, h5_oct_idx_t oct_idx, h5_oct_level_t level) { + return oct_has_level (octree, oct_idx, level); +} +/* + * set internal data changed + */ +static h5_err_t +set_intdata_chg ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d", octree, oct_idx); + + octree->octants[oct_idx].level_idx |= ( 1 << OCT_CHG_INTERNAL); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * get new proc + */ +static h5_int32_t +get_proc ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx + ) { + return octree->octants[oct_idx].processor; + +} +h5_int32_t +H5t_get_proc (h5t_octree_t* octree, h5_oct_idx_t oct_idx) { + return get_proc (octree, oct_idx); +} +/* + * set new proc + */ +static h5_err_t +set_proc ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_int32_t proc + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d proc=%d", octree, oct_idx, proc); + + if (octree->octants[oct_idx].processor != proc) { // to avoid unnecessary internal updates + octree->octants[oct_idx].processor = proc; + TRY (set_intdata_chg (octree, oct_idx)); + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t +H5t_set_proc (h5t_octree_t* octree, h5_oct_idx_t oct_idx, h5_int32_t proc) { + return set_proc (octree, oct_idx, proc); +} +/* + * set new proc without triggering update + * WARNING if not all proc do the same the state gets inconsistent! + */ +static h5_err_t +set_proc_int ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_int32_t proc + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d proc=%d", octree, oct_idx, proc); + + octree->octants[oct_idx].processor = proc; + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t +H5t_set_proc_int (h5t_octree_t* octree, h5_oct_idx_t oct_idx, h5_int32_t proc) { + return set_proc_int (octree, oct_idx, proc); +} + +/* + * set userlevel + */ +static h5_err_t +set_userlevel ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_level_t level + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d level=%d", octree, oct_idx, level); + + octree->octants[oct_idx].userlevels |= ( 1 << level); + + TRY (set_intdata_chg (octree, oct_idx)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t H5t_set_userlevel (h5t_octree_t* octree, h5_oct_idx_t oct_idx, h5_oct_level_t level) { + return set_userlevel (octree, oct_idx, level); +} +/* + * get userlevel + */ +static h5_oct_level_t +get_userlevel ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d", octree, oct_idx); + h5_oct_level_t level; + level = octree->octants[oct_idx].userlevels ; + level = ((level | 1 << (OCT_USERLEV_LENGTH - 1)) ^ (1 << (OCT_USERLEV_LENGTH - 1))); // remove leave level bit + + H5_PRIV_FUNC_RETURN (level); +} +h5_oct_level_t H5t_get_userlevel (h5t_octree_t* octree, h5_oct_idx_t oct_idx) { + return get_userlevel (octree, oct_idx); +} + +/* + * set userlevel + */ +static h5_err_t +set_userlevel_int ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_level_t level + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d level=%d", octree, oct_idx, level); + + octree->octants[oct_idx].userlevels |= ( 1 << level); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +// is an internal function - maybe if there is a usecase one could make it API but is dangerous +// to use since it could create a missmatch in level definitions an different procs +//h5_err_t H5t_set_userlevel_int (h5t_octree_t* octree, h5_oct_idx_t oct_idx, h5_oct_level_t level) { +// return set_userlevel_int (octree, oct_idx, level); +//} + +#if 0 +/* + * remove userlevel + */ +static h5_err_t +remove_userlevel ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_level_t level + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d level=%d", octree, oct_idx, level); + if (oct_has_level (octree,oct_idx,level)){ + octree->octants[oct_idx].userlevels ^= ( 1 << level); + TRY (set_intdata_chg (octree, oct_idx)); + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif + +static h5_err_t +remove_userlevel_int ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_level_t level + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d level=%d", octree, oct_idx, level); + if (oct_has_level (octree,oct_idx,level)){ + octree->octants[oct_idx].userlevels ^= ( 1 << level); + + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * set leave level + */ +static h5_err_t +set_leave_level ( + h5t_octree_t* octree + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octree); + + for (int i = 0; i <= octree->current_oct_idx; i++) { + // check if leave level bit needs to be changed + if (((octree->octants[i].child_idx == -1) && + ((octree->octants[i].userlevels & 1 << (OCT_USERLEV_LENGTH - 1)) != 1 << (OCT_USERLEV_LENGTH - 1) )) || + ((octree->octants[i].child_idx != -1) && + ((octree->octants[i].userlevels & 1 << (OCT_USERLEV_LENGTH - 1)) == 1 << (OCT_USERLEV_LENGTH - 1) ))) { + octree->octants[i].userlevels ^= 1 << (OCT_USERLEV_LENGTH - 1); + //TRY (set_intdata_chg (octree, i)); + } + } + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +#if 0 +/* + * Clear all levels + */ +static h5_err_t +clear_all_levels ( + h5t_octree_t* octree + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octree); + + for (int i = 0; i <= octree->current_oct_idx; i++) { + octree->octants[i].userlevels = 0; + //TRY (set_intdata_chg (octree, i)); + } + set_leave_level (octree); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif + +static h5_err_t +clear_level_internal ( + h5t_octree_t* octree + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octree); + for (int i = 0; i <= octree->current_oct_idx; i++) { + if ((octree->octants[i].level_idx & (1 << OCT_CHG_INTERNAL)) == (1 << OCT_CHG_INTERNAL) ) { + octree->octants[i].level_idx ^= (1 << OCT_CHG_INTERNAL); + } + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + +/* + * get orientation of octant + */ +static h5_oct_orient_t +get_orient ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx + ) { + if (oct_idx != 0) { + // WARNING Right shift may not work as expected (c standart is not clear) + // implementation now without right shift + h5_oct_orient_t orient = 0; + if ((octree->octants[oct_idx].level_idx & (1 << OCT_X)) != 0) { + orient += 1; + } + if ((octree->octants[oct_idx].level_idx & (1 << OCT_Y)) != 0) { + orient += 2; + } + if ((octree->octants[oct_idx].level_idx & (1 << OCT_Z)) != 0) { + orient += 4; + } + return orient ; + } else { + return -1; + } + +} +/* + * get orientation of octant + */ +static h5_lvl_idx_t +get_oct_level ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx + ) { + assert (oct_idx > -1); + if (oct_idx != 0) { + // WARNING Right shift may not work as expected (c standart is not clear) + // implementation now without right shift + h5_oct_orient_t orient = 0; + if ((octree->octants[oct_idx].level_idx & (1 << OCT_CHG_INTERNAL)) != 0) { + orient |= 1 << OCT_CHG_INTERNAL; + } + if ((octree->octants[oct_idx].level_idx & (1 << OCT_CHG_USERDATA)) != 0) { + orient |= 1 << OCT_CHG_USERDATA; + } + if ((octree->octants[oct_idx].level_idx & (1 << OCT_X)) != 0) { + orient |= 1 << OCT_X; + } + if ((octree->octants[oct_idx].level_idx & (1 << OCT_Y)) != 0) { + orient |= 1 << OCT_Y; + } + if ((octree->octants[oct_idx].level_idx & (1 << OCT_Z)) != 0) { + orient |= 1 << OCT_Z; + } + return octree->octants[oct_idx].level_idx ^ orient ; + } else { + return 0; + } + +} + + +#if 0 +/* + * Get total number of octants + */ +static h5_oct_idx_t +get_nbr_octants ( + h5t_octree_t* const octree + ) { + return (octree->current_oct_idx) +1; +}; + +/* + * Make global update because user data changed + */ +#endif + +static h5_err_t +update_userdata ( + h5t_octree_t* const octree + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octree); + h5_oct_idx_t* oct_idx; + TRY (oct_idx = h5_calloc (octree->current_oct_idx + 1, sizeof (*oct_idx))); + h5_oct_idx_t nbr_loc_oct_changed = 0; + for (int i = 0; i <= octree->current_oct_idx; i++) { + if ((octree->octants[i].level_idx & (1 << OCT_CHG_USERDATA)) == (1 << OCT_CHG_USERDATA)) { + oct_idx[nbr_loc_oct_changed] = i; + nbr_loc_oct_changed++; + } + } + + // exchange the number of changed octants + int size; + TRY (h5priv_mpi_comm_size (octree->comm, &size)); + h5_int32_t* nbr_oct_changed; + TRY (nbr_oct_changed = h5_calloc (size, sizeof (*nbr_oct_changed))); + + TRY (h5priv_mpi_allgather (&nbr_loc_oct_changed, + 1, + MPI_INT, + nbr_oct_changed, + 1, + MPI_INT, + octree->comm)); + + + // exchange the changed octant_id's + h5_oct_idx_t* changed_oct_idx; + h5_oct_idx_t* recv_displs; + h5_oct_idx_t* recv_counts = nbr_oct_changed; // just for simpler naming + h5_oct_idx_t nbr_glb_oct_changed = nbr_oct_changed[0]; + + TRY (recv_displs = h5_calloc(size,sizeof(*recv_displs))); + + recv_displs[0] = 0; + + for (int i = 1; i < size; i++) { + recv_displs[i] = recv_displs[i-1] + nbr_oct_changed[i-1]; + nbr_glb_oct_changed += nbr_oct_changed[i]; + }; + TRY (changed_oct_idx = h5_calloc (nbr_glb_oct_changed, sizeof (*changed_oct_idx))); + TRY (mpi_allgatherv (oct_idx, + nbr_loc_oct_changed, + MPI_INT, + changed_oct_idx, + recv_counts, + recv_displs, + MPI_INT, + octree->comm + )); + + // check if an octant has been changed on multiple procs + h5_oct_idx_t oct_idx_to_check; + for (int i = 0; i < nbr_glb_oct_changed - 1; i++) { + oct_idx_to_check = changed_oct_idx[i]; + for (int j = i + 1; j < nbr_glb_oct_changed; j++) { + if (oct_idx_to_check == changed_oct_idx[j]) { + /*** an octant was changed twice! ***/ + H5_PRIV_FUNC_LEAVE( h5_error ( + H5_ERR_INVAL, + "Multiple cores tried to update the same userdata with idx: %d", + oct_idx_to_check)); + }; + }; + }; + /*** exchange changed userdata ***/ + // new mpi datatype for userdata + MPI_Datatype userdata_type; + + TRY (h5priv_mpi_type_contiguous (octree->size_userdata, MPI_BYTE, &userdata_type)); + TRY (h5priv_mpi_type_commit (&userdata_type)); + + void* sendbuf; + void* recvbuf; + TRY (sendbuf = h5_calloc (nbr_loc_oct_changed, octree->size_userdata)); + TRY (recvbuf = h5_calloc (nbr_glb_oct_changed, octree->size_userdata)); + +// recv_counts[0] *= octree->size_userdata; +// for (int i = 1; i < size; i++) { +// recv_displs[i] *= octree->size_userdata; +// recv_counts[i] *= octree->size_userdata; +// }; + char* charp_to = (char*) sendbuf; + char* charp_from = (char*) octree->userdata; + // memcpy to send buffer + for (int i = 0; i < nbr_loc_oct_changed; i++) { + memcpy( &(charp_to[i*octree->size_userdata]), + &(charp_from[oct_idx[i]*octree->size_userdata]), + octree->size_userdata); + }; + + TRY (mpi_allgatherv ( + sendbuf, + nbr_loc_oct_changed, + userdata_type, + recvbuf, + recv_counts, + recv_displs, + userdata_type, + octree->comm + )); + // copy user data to local memory location + charp_to = octree->userdata; + charp_from = recvbuf; + //TODO could be improved by not copying the already local updated octants + for (int i = 0; i < nbr_glb_oct_changed; i++) { + memcpy( &(charp_to[changed_oct_idx[i] * octree->size_userdata]), + &(charp_from[i * octree->size_userdata]), + octree->size_userdata); + } + // set changed user data to 0 + for (int i = 0; i <= octree->current_oct_idx; i++) { + if (i == octree->nbr_alloc_oct) { h5_debug ("THIS shoul not happen");} + octree->octants[i].level_idx &= ~(1 << OCT_CHG_USERDATA); + } + // free memory + + TRY (h5_free (oct_idx)); + TRY (h5_free (nbr_oct_changed)); + TRY (h5_free (sendbuf)); + TRY (h5_free (recvbuf)); + TRY (h5_free (recv_displs)); + TRY (h5_free (changed_oct_idx)); + //MPI_Type_free(&userdata_type); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +}; +h5_err_t +H5t_update_userdata (h5t_octree_t* const octree) { + return update_userdata (octree); +} + +/* + * Make global update because internal data changed + */ + +static h5_err_t +update_internal ( + h5t_octree_t* const octree + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octree); + int nprocs =-1; + h5priv_mpi_comm_size (octree->comm, &nprocs); + if (nprocs == 1 ) { + // set changed internal data to 0 + clear_level_internal (octree); + set_leave_level (octree); + } + + h5_oct_idx_t* oct_idx; + TRY (oct_idx = h5_calloc (octree->current_oct_idx + 1, sizeof (*oct_idx))); + h5_oct_idx_t nbr_loc_oct_changed = 0; + for (int i = 0; i <= octree->current_oct_idx; i++) { + if ((octree->octants[i].level_idx & (1 << OCT_CHG_INTERNAL)) == (1 << OCT_CHG_INTERNAL)) { + oct_idx[nbr_loc_oct_changed] = i; + nbr_loc_oct_changed++; + } + } + + // exchange the number of changed octants + int size; + TRY (h5priv_mpi_comm_size (octree->comm, &size)); + h5_int32_t* nbr_oct_changed; + TRY (nbr_oct_changed = h5_calloc (size, sizeof (*nbr_oct_changed))); + + TRY (h5priv_mpi_allgather (&nbr_loc_oct_changed, + 1, + MPI_INT, + nbr_oct_changed, + 1, + MPI_INT, + octree->comm)); + + // exchange the changed octant_id's + h5_oct_idx_t* changed_oct_idx; + h5_oct_idx_t* recv_displs; + h5_oct_idx_t* recv_counts = nbr_oct_changed; // just for simpler naming + h5_oct_idx_t nbr_glb_oct_changed = nbr_oct_changed[0]; + + TRY (recv_displs = h5_calloc(size,sizeof(*recv_displs))); + + recv_displs[0] = 0; + + for (int i = 1; i < size; i++) { + recv_displs[i] = recv_displs[i-1] + nbr_oct_changed[i-1]; + nbr_glb_oct_changed += nbr_oct_changed[i]; + }; + if (nbr_glb_oct_changed == 0) { + // set changed internal data to 0 + clear_level_internal (octree); + // free memory + + TRY (h5_free (oct_idx)); + TRY (h5_free (nbr_oct_changed)); + TRY (h5_free (recv_displs)); + H5_PRIV_FUNC_LEAVE (H5_SUCCESS); + } + TRY (changed_oct_idx = h5_calloc (nbr_glb_oct_changed, sizeof (*changed_oct_idx))); + TRY (mpi_allgatherv (oct_idx, + nbr_loc_oct_changed, + MPI_INT, + changed_oct_idx, + recv_counts, + recv_displs, + MPI_INT, + octree->comm + )); + + // check if an octant has been changed on multiple procs + h5_oct_idx_t oct_idx_to_check; + for (int i = 0; i < nbr_glb_oct_changed - 1; i++) { + oct_idx_to_check = changed_oct_idx[i]; + for (int j = i + 1; j < nbr_glb_oct_changed; j++) { + if (oct_idx_to_check == changed_oct_idx[j]) { + /*** an octant was changed twice! ***/ + H5_PRIV_FUNC_LEAVE(H5_ERR_INVAL) + }; + }; + }; + /*** exchange changed octants ***/ + // new mpi datatype for userdata + + + void* sendbuf; + void* recvbuf; + TRY (sendbuf = h5_calloc (nbr_loc_oct_changed, sizeof (*(octree->octants)))); + TRY (recvbuf = h5_calloc (nbr_glb_oct_changed, sizeof (*(octree->octants)))); + + h5t_octant_t* charp_to = (h5t_octant_t*) sendbuf; + h5t_octant_t* charp_from = octree->octants; + // memcpy to send buffer + for (int i = 0; i < nbr_loc_oct_changed; i++) { + memcpy( &(charp_to[i]), + &(charp_from[oct_idx[i]]), + sizeof (*octree->octants)); + }; + + TRY (mpi_allgatherv ( + sendbuf, + nbr_loc_oct_changed, + h5_oct_dta_types.mpi_octant, + recvbuf, + recv_counts, + recv_displs, + h5_oct_dta_types.mpi_octant, + octree->comm + )); + // copy user data to local memory location + charp_to = octree->octants; + charp_from = recvbuf; + //TODO could be improved by not copying the already local updated octants + for (int i = 0; i < nbr_glb_oct_changed; i++) { + memcpy( &(charp_to[changed_oct_idx[i]]), + &(charp_from[i]), + sizeof (*octree->octants)); + } + // set changed internal data to 0 + clear_level_internal (octree); + set_leave_level (octree); + // free memory + + TRY (h5_free (oct_idx)); + TRY (h5_free (nbr_oct_changed)); + TRY (h5_free (sendbuf)); + TRY (h5_free (recvbuf)); + TRY (h5_free (recv_displs)); + TRY (h5_free (changed_oct_idx)); + + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +}; +h5_err_t +H5t_update_internal (h5t_octree_t* const octree) { + return update_internal (octree); +} + +/* + * Get first children index of octant + */ +static h5_oct_idx_t +get_children ( + h5t_octree_t* const octree, + const h5_oct_idx_t oct_idx + ) { + return octree->octants[oct_idx].child_idx; +}; +h5_oct_idx_t +H5t_get_children (h5t_octree_t* const octree, const h5_oct_idx_t oct_idx) { + return get_children (octree, oct_idx); +}; +/* + * Get pointer to userdata of octant for reading + * This Pointer is only valid till the next call of the Library! + */ +static h5_err_t +get_userdata_r ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + void** userdata + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d, userdata=%p", octree, oct_idx, userdata); + + char* userdata_int = (char*) octree->userdata; + *userdata = &userdata_int[oct_idx * octree->size_userdata]; + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t +H5t_get_userdata_r (h5t_octree_t* octree, h5_oct_idx_t oct_idx, void** userdata) { + return get_userdata_r (octree, oct_idx, userdata); +} + +/* + * Get pointer to userdata of octant for reading/writing + * This Pointer is only valid till the next call of the Library! + * To make the write visible to all procs call update_userdata(h5t_octree_t* octree); + */ +static h5_err_t +get_userdata_rw ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + void** userdata + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d, userdata=%p", octree, oct_idx, userdata); + + octree->octants[oct_idx].level_idx |= (1 << OCT_CHG_USERDATA); + char* userdata_int; + userdata_int = octree->userdata; + *userdata = &userdata_int[oct_idx * octree->size_userdata]; + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t +H5t_get_userdata_rw (h5t_octree_t* octree, h5_oct_idx_t oct_idx, void** userdata) { + return get_userdata_rw (octree, oct_idx, userdata); +} + + +/* + * grow data structure of octree + */ +static h5_err_t +grow_octree ( + h5t_octree_t* octree, + h5_int32_t additional_size + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, additional_size=%d", octree, additional_size); + + if (additional_size == -1) { + additional_size = octree->nbr_alloc_oct; + } + if (additional_size < 8 ) { + additional_size = 8; + } + // check if data structures already exist + if (octree->octants == NULL) { + // allocate data structures + TRY (octree->octants = h5_calloc (additional_size, sizeof (*(octree->octants)))); + if (octree->size_userdata > 0) { + TRY (octree->userdata = h5_calloc (additional_size, octree->size_userdata)); + memset (octree->userdata, -1, additional_size * octree->size_userdata); + } + octree->nbr_alloc_oct = additional_size; + } else { + // grow data structure + TRY (octree->octants = h5_alloc (octree->octants, (octree->nbr_alloc_oct + additional_size) * sizeof (*(octree->octants)))); + if (octree->size_userdata > 0) { + TRY (octree->userdata = h5_alloc (octree->userdata, (octree->nbr_alloc_oct+additional_size) * octree->size_userdata)); + memset (((char*)octree->userdata) + octree->nbr_alloc_oct * octree->size_userdata , -1, additional_size * octree->size_userdata); + } + octree->nbr_alloc_oct += additional_size; + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); + +} + +#if 0 +/* + * Reset user data + */ +static h5_err_t +reset_userdata ( + h5t_octree_t* octree, + h5_int32_t size_userdata + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, size_userdata=%d", octree, size_userdata); + + // make sure all procs call the function + TRY (h5priv_mpi_barrier (octree->comm)); + + // delete userdata + TRY (h5_free(octree->userdata)); + + // allocate new userdata + if (size_userdata > 0) { + octree->size_userdata = size_userdata; + TRY (octree->userdata = h5_calloc (octree->nbr_alloc_oct, octree->size_userdata)); + } else { + octree->size_userdata = -1; + } + // set changed user data to 0 + for (int i = 0; i <= octree->current_oct_idx; i++) { + octree->octants[i].level_idx &= ~(1 << OCT_CHG_USERDATA); + } + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif +/* + * Create octant + */ +static h5_err_t +create_octant ( + h5t_octree_t* octree, + h5_oct_idx_t parent_idx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "octree=%p, parent_idx=%d", + octree, + parent_idx); + + octree->current_oct_idx +=1; + + // check if there is enough space to insert one octant more. + if (octree->current_oct_idx >= octree->nbr_alloc_oct) { + TRY (grow_octree (octree,-1)); + } + // set parameters + h5t_octant_t* current_octant = &(octree->octants[octree->current_oct_idx]); + current_octant->idx = octree->current_oct_idx; + current_octant->parent_idx = parent_idx; + current_octant->child_idx = -1; + if (parent_idx >= 0) { + + current_octant->level_idx = ((octree->current_oct_idx - octree->octants[parent_idx].child_idx) << OCT_X) + + get_oct_level (octree, parent_idx) + 1; + + + } + + if (parent_idx != -1) { + current_octant->processor = octree->octants[parent_idx].processor; + } else { + current_octant->processor = 0; + } + current_octant->userlevels = 0; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +}; + +/* + * Create root octant + */ +static h5_err_t +create_root_octant ( + h5t_octree_t* octree + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octree); + if (octree->octants == NULL || octree->nbr_alloc_oct < 1) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INTERNAL); + } + TRY (create_octant (octree,-1)); + octree->octants[0].level_idx = 0; + TRY (set_leave_level(octree)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +}; +/* + * Initialize an octree + */ +static h5_err_t +init_octree ( + h5t_octree_t** octree, + h5_int32_t size_userdata, + h5_float64_t* const bounding_box, + h5_int32_t maxpoints, + const MPI_Comm comm + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "octree=%p, size_userdata=%d, " + "bounding_box=%p, " + "maxpoints=%d, comm=?", + octree, + size_userdata, + bounding_box, + maxpoints); + + TRY (h5priv_mpi_barrier (comm)); + + /*** assert of input data ***/ + //TODO maybe there is a more thorough check needed that input data is valid (i.e. the same on all proc) + if (bounding_box != NULL && (bounding_box[0] >= bounding_box[3] || + bounding_box[1] >= bounding_box[4] || + bounding_box[2] >= bounding_box[5])) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INVAL); + }; + + /*** allocate octree ***/ + TRY (*octree = h5_calloc (1, sizeof (**octree))); + + (*octree)->comm = comm; + (*octree)->size_userdata = size_userdata; + TRY (create_mpi_type_octant ()); + (*octree)->octants = NULL; + (*octree)->userdata = NULL; + (*octree)->maxpoints = maxpoints; + + /*** allocate datastructures***/ + TRY (grow_octree (*octree,9)); + + (*octree)->nbr_alloc_oct = 9; + (*octree)->ref_oct_idx = -1; + (*octree)->current_oct_idx = -1; + TRY (create_root_octant (*octree)); + + if (bounding_box != NULL) { + TRY (H5t_set_bounding_box (*octree, bounding_box)); + } + + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +}; + +h5_err_t H5t_init_octree (h5t_octree_t** octree, h5_int32_t size_userdata, h5_float64_t* const bounding_box, h5_int32_t maxpoints, const MPI_Comm comm) { + return init_octree (octree, size_userdata, bounding_box, maxpoints, comm); +} + +static h5_err_t +read_octree ( + h5t_octree_t** octree, + h5_oct_idx_t current_oct_idx, + h5_int32_t size_userdata, + h5_int32_t maxpoints, + h5t_octant_t** octants, + void** userdata, + const MPI_Comm comm + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "octree=%p, current_oct_idx=%d, size_userdata=%d, " + "maxpoints=%d, octants=%p, userdata=%p, comm=?", + octree, + current_oct_idx, + size_userdata, + maxpoints, + octants, + userdata); + + TRY (h5priv_mpi_barrier (comm)); // delete for speed up? + + /*** allocate octree ***/ + TRY (*octree = h5_calloc (1, sizeof (**octree))); + (*octree)->comm = comm; + (*octree)->size_userdata = size_userdata; + TRY (create_mpi_type_octant ()); + (*octree)->octants = NULL; + (*octree)->userdata = NULL; + (*octree)->maxpoints = maxpoints; + + /*** allocate datastructures***/ + TRY (grow_octree (*octree,current_oct_idx + 1)); + + (*octree)->nbr_alloc_oct = current_oct_idx + 1; + (*octree)->ref_oct_idx = -1; + (*octree)->current_oct_idx = current_oct_idx; + (*octants) = (*octree)->octants; + (*userdata) = (*octree)->userdata; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t H5t_read_octree (h5t_octree_t** octree, h5_oct_idx_t current_oct_idx, h5_int32_t size_userdata, h5_int32_t maxpoints, h5t_octant_t** octants, void** userdata, const MPI_Comm comm) { + return read_octree (octree, current_oct_idx, size_userdata, maxpoints, octants, userdata, comm); +} +/* + * free octree + */ +static h5_err_t +free_oct ( + h5t_octree_t* octree) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octree); + if (octree != NULL) { + if (octree->userdata != NULL) { + TRY (h5_free (octree->userdata)); + } + MPI_Type_free(&h5_oct_dta_types.mpi_octant); + TRY (h5_free (octree->octants)); + TRY (h5_free (octree)); + octree = NULL; + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t H5t_free_octree (h5t_octree_t* octree) { + return free_oct (octree); +} +static h5_err_t +write_octree ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + + + H5_PRIV_FUNC_RETURN (h5_error_not_implemented ()); +} +h5_err_t H5t_write_octree ( h5t_mesh_t* const m) { + return write_octree (m); +} + +#if 0 +/* + * Print octree in human readable form + */ +static h5_err_t +print_octree_dbg ( + h5t_octree_t* octree + ) { + H5_PRIV_FUNC_ENTER (h5_err_t,"octree=%p", octree); + int rank; + TRY (h5priv_mpi_comm_rank (octree->comm, &rank)); + h5_debug ("\nproc %d: Octree\n" + "proc %d: current_oct_idx: %d \n" + "proc %d: nbr_alloc_oct: %d \n\n", + rank, + rank, + octree->current_oct_idx, + rank, + octree->nbr_alloc_oct); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * Print octree in human readable form + */ +static h5_err_t +print_octree ( + h5t_octree_t* octree + ) { + H5_PRIV_FUNC_ENTER (h5_err_t,"octree=%p", octree); + int rank; + TRY (h5priv_mpi_comm_rank (octree->comm, &rank)); + printf ("\nproc %d: Octree\n" + "proc %d: current_oct_idx: %d \n" + "proc %d: nbr_alloc_oct: %d \n\n", + rank, + rank, + octree->current_oct_idx, + rank, + octree->nbr_alloc_oct); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * Traverse through octants and print them in human readable form + */ +static h5_err_t +print_octants ( + h5t_octree_t* octree + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octree); +#if 0 + register_printf_specifier ('B', printf_output_M, printf_arginfo_M); + int rank; + TRY (h5priv_mpi_comm_rank (octree->comm, &rank)); + for (int i = 0; i <= octree->current_oct_idx; i++) { + printf ("\n" +// h5_debug ("\n" + " Octant\n idx: %d \n" + " parent_idx: %d \n" + " child_idx: %d \n" +// " bounding_box: %4.4f, %4.4f, %4.4f \n" +// " %4.4f, %4.4f, %4.4f \n" + " processor: %d \n" + " level_idx: %B \n" + " userlevels: %B \n\n", + octree->octants[i].idx, + octree->octants[i].parent_idx, + octree->octants[i].child_idx, +// octree->octants[i].bounding_box[0], +// octree->octants[i].bounding_box[1], +// octree->octants[i].bounding_box[2], +// octree->octants[i].bounding_box[3], +// octree->octants[i].bounding_box[4], +// octree->octants[i].bounding_box[5], + octree->octants[i].processor, + octree->octants[i].level_idx, + octree->octants[i].userlevels); + + } +#endif + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif + +#if 0 +static h5_err_t +print_octants_arr ( + h5t_octant_t* octants, + h5_int32_t nbr_oct, + h5_int32_t rank + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octants); +#if 0 + register_printf_specifier ('B', printf_output_M, printf_arginfo_M); + + for (int i = 0; i < nbr_oct; i++) { + h5_debug ("\n" + " Octant\n idx: %d \n" + " parent_idx: %d \n" + " child_idx: %d \n" +// " bounding_box: %4.4f, %4.4f, %4.4f \n" +// " %4.4f, %4.4f, %4.4f \n" + " processor: %d \n" + " level_idx: %B \n" + " userlevels: %B \n\n", + octants[i].idx, + octants[i].parent_idx, + octants[i].child_idx, +// octants[i].bounding_box[0], +// octants[i].bounding_box[1], +// octants[i].bounding_box[2], +// octants[i].bounding_box[3], +// octants[i].bounding_box[4], +// octants[i].bounding_box[5], + octants[i].processor, + octants[i].level_idx, + octants[i].userlevels); + + } +#endif + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif +///* +// * Traverse through octants and plot the for gnuplot +// */ + +int print_octant_for_gnuplot ( + h5_oct_idx_t oct_idx, + h5_float64_t* bounding_box + ) { +#if 0 + printf ( "# Octant idx: %d \n" + " %4.4f, %4.4f, %4.4f \n" + " %4.4f, %4.4f, %4.4f \n" + " %4.4f, %4.4f, %4.4f \n" + " %4.4f, %4.4f, %4.4f \n" + " %4.4f, %4.4f, %4.4f \n\n", + oct_idx, + bounding_box[0], bounding_box[1], bounding_box[2], + bounding_box[3], bounding_box[1], bounding_box[2], + bounding_box[3], bounding_box[4], bounding_box[2], + bounding_box[0], bounding_box[4], bounding_box[2], + bounding_box[0], bounding_box[1], bounding_box[2]); + printf ( + " %4.4f, %4.4f, %4.4f \n" + " %4.4f, %4.4f, %4.4f \n" + " %4.4f, %4.4f, %4.4f \n" + " %4.4f, %4.4f, %4.4f \n" + " %4.4f, %4.4f, %4.4f \n\n", + bounding_box[0], bounding_box[1], bounding_box[5], + bounding_box[3], bounding_box[1], bounding_box[5], + bounding_box[3], bounding_box[4], bounding_box[5], + bounding_box[0], bounding_box[4], bounding_box[5], + bounding_box[0], bounding_box[1], bounding_box[5]); + printf ( + " %4.4f, %4.4f, %4.4f \n" + " %4.4f, %4.4f, %4.4f \n\n" + + " %4.4f, %4.4f, %4.4f \n" + " %4.4f, %4.4f, %4.4f \n\n" + + " %4.4f, %4.4f, %4.4f \n" + " %4.4f, %4.4f, %4.4f \n\n" + + " %4.4f, %4.4f, %4.4f \n" + " %4.4f, %4.4f, %4.4f \n\n", + bounding_box[0], bounding_box[1], bounding_box[2], + bounding_box[0], bounding_box[1], bounding_box[5], + + bounding_box[3], bounding_box[1], bounding_box[2], + bounding_box[3], bounding_box[1], bounding_box[5], + + bounding_box[3], bounding_box[4], bounding_box[2], + bounding_box[3], bounding_box[4], bounding_box[5], + + bounding_box[0], bounding_box[4], bounding_box[2], + bounding_box[0], bounding_box[4], bounding_box[5]); +#endif + return 0; +} + +h5_err_t +plot_octants ( + h5t_octree_t* octree + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octree); +// h5_debug ("# start plot octants",""); + h5_float64_t bounding_box[6]; + int i; + for (i = 0; i <= octree->current_oct_idx; i++) { +// h5_debug ( + TRY (get_bounding_box_of_octant (octree, i, bounding_box)); + print_octant_for_gnuplot (i, bounding_box); + } + for (i = 0; i <= octree->current_oct_idx; i++) { + TRY (get_bounding_box_of_octant (octree, i, bounding_box)); + printf ( + "set label \" %d \" at first %4.4f, first %4.4f font \"Helvetica,7\"\n",octree->octants[i].idx, bounding_box[0] + 0.02 + 0.6 * bounding_box[1], bounding_box[2] + 0.02 + 0.4 * bounding_box[1]); + } +// h5_debug ("# end plot octants",""); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static h5_err_t +get_siblings( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_idx_t* siblings_idx + ); + +h5_err_t +plot_octant_anc ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octree); +// h5_debug ("# start plot octants",""); + h5_float64_t bounding_box[6]; + do { + TRY (get_siblings(octree, oct_idx, &oct_idx)); + for (int i = 0; i < NUM_OCTANTS; i++) { + TRY (get_bounding_box_of_octant (octree, oct_idx + i, bounding_box)); + print_octant_for_gnuplot (oct_idx + i, bounding_box); + + printf ( + "set label \" %d \" at first %4.4f, first %4.4f font \"Helvetica,7\"\n",octree->octants[oct_idx+i].idx, bounding_box[0] + 0.02 + 0.6 * bounding_box[1], bounding_box[2] + 0.02 + 0.4 * bounding_box[1]); + } + } while ((oct_idx = get_parent(octree, oct_idx)) != -1); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t +plot_leaf_octants ( + h5t_octree_t* octree + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octree); + + h5_float64_t bounding_box[6]; + h5t_oct_iterator_t* iter; + TRY (H5t_init_leafoct_iterator (octree, &iter)); + h5_oct_idx_t oct_idx = -1; + while ((oct_idx = H5t_iterate_oct(iter)) != -1) { + + TRY (get_bounding_box_of_octant (octree, oct_idx, bounding_box)); + print_octant_for_gnuplot (oct_idx, bounding_box); + } + printf ("\n #real oct labels \n"); + TRY (H5t_init_leafoct_iterator (octree, &iter)); + while ((oct_idx = H5t_iterate_oct(iter)) != -1) { + TRY (get_bounding_box_of_octant (octree, oct_idx, bounding_box)); + printf ( + "set label \" %d \" at first %4.4f, first %4.4f font \"Helvetica,7\"\n", + octree->octants[oct_idx].idx, bounding_box[0] + 0.02 + 0.6 * bounding_box[1], bounding_box[2] + 0.02 + 0.4 * bounding_box[1]); + } + printf ("\n #leaf oct labels \n"); + TRY (H5t_init_leafoct_iterator (octree, &iter)); + int counter = 0; + while ((oct_idx = H5t_iterate_oct(iter)) != -1) { + TRY (get_bounding_box_of_octant (octree, oct_idx, bounding_box)); + printf ( + "set label \" %d \" at first %4.4f, first %4.4f font \"Helvetica,7\"\n", + counter++, bounding_box[0] + 0.02 + 0.6 * bounding_box[1], bounding_box[2] + 0.02 + 0.4 * bounding_box[1]); + } + TRY (H5t_end_iterate_oct(iter)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +void print_array ( + h5_int32_t* neigh, + h5_oct_idx_t nbr_neigh, + int rank + ) { + printf ("proc %d: array \n",rank); + for (int i = 0; i < nbr_neigh; i++) { + printf (" %d, ", neigh[i]); + } + + printf ("\n"); + } + + +/* + * begin refine octants + */ +static h5_err_t +begin_refine_octants( + h5t_octree_t* octree + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octree); + + TRY (h5priv_mpi_barrier (octree->comm)); + update_internal (octree); + octree->ref_oct_idx = octree->current_oct_idx; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * Refine an octant + */ +static h5_err_t +refine_octant( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d", octree, oct_idx); + int rank; + MPI_Comm_rank (octree->comm, &rank); + + if (octree->octants[oct_idx].processor != rank ) { + h5_debug ("Trying to refine an octant that doesn't belong to proc"); + H5_PRIV_FUNC_LEAVE (H5_ERR_INVAL); + } + + if (octree->octants[oct_idx].child_idx != -1 || octree->ref_oct_idx == -1) { + h5_debug ("Either octant is already refined or begin_refine_octants() was not invoked"); + H5_PRIV_FUNC_LEAVE (H5_ERR_INVAL); + } + if( octree->current_oct_idx + 1 + 8 >= octree->nbr_alloc_oct) { + /*** need to allocate more memory for octants ***/ + TRY (grow_octree (octree, -1)); + } + + + octree->octants[oct_idx].child_idx = octree->current_oct_idx + 1; + TRY (create_octant (octree, oct_idx)); + + TRY (create_octant (octree, oct_idx)); + + TRY (create_octant (octree, oct_idx)); + + TRY (create_octant (octree, oct_idx)); + + TRY (create_octant (octree, oct_idx)); + + TRY (create_octant (octree, oct_idx)); + + TRY (create_octant (octree, oct_idx)); + + TRY (create_octant (octree, oct_idx)); + + set_leave_level (octree); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * end refine octants + */ +static h5_err_t +end_refine_octants( + h5t_octree_t* octree, + h5_oct_point_t* midpoints, + int num_midpoints + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octree); + if (octree->ref_oct_idx == -1) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INVAL); + } + + // exchange how many new octants per proc where created + int size,rank; + TRY (h5priv_mpi_comm_size (octree->comm, &size)); + TRY (h5priv_mpi_comm_rank (octree->comm, &rank)); + h5_int32_t* nbr_oct_new; + TRY (nbr_oct_new = h5_calloc (size,sizeof (*nbr_oct_new))); + h5_int32_t total_oct_new = 0; + h5_oct_idx_t loc_oct_new = octree->current_oct_idx - octree->ref_oct_idx; + TRY (h5priv_mpi_allgather (&loc_oct_new, + 1, + MPI_INT, + nbr_oct_new, + 1, + MPI_INT, + octree->comm)); + + // calculate own range (i.e. offset) + h5_oct_idx_t* offset; + TRY (offset = h5_calloc (size,sizeof(*offset))); + total_oct_new = nbr_oct_new[0]; + for (int i = 1; i < size; i++ ) { + total_oct_new += nbr_oct_new[i]; + offset[i] = nbr_oct_new[i-1] + offset[i-1]; + } + // allocate enough memory for all new octants + if (octree->ref_oct_idx + 1 + total_oct_new >= octree->nbr_alloc_oct) { + TRY (grow_octree (octree, total_oct_new )); + } + + // update octants with offset + if (offset[rank] > 0) { + for (int i = octree->ref_oct_idx+1; i <= octree->current_oct_idx; i++) { + if (octree->octants[i].idx > octree->ref_oct_idx) { + octree->octants[i].idx += offset[rank]; + } + if (octree->octants[i].parent_idx > octree->ref_oct_idx) { + octree->octants[i].parent_idx += offset[rank]; + } + if (octree->octants[i].child_idx > octree->ref_oct_idx) { + octree->octants[i].child_idx += offset[rank]; + } + } + // update midpoints list with offset + if (num_midpoints > 0) { + for (int i = 0; i < num_midpoints; i++) { + if (midpoints[i].oct > octree->ref_oct_idx) { + midpoints[i].oct += offset[rank]; + } + } + } + + } + void* sendbuf; + void* recvbuf; + if ((loc_oct_new) > 0) { + TRY (sendbuf = h5_calloc (loc_oct_new ,sizeof (h5t_octant_t))); + } else { + sendbuf = NULL; + } + TRY (recvbuf = h5_calloc (total_oct_new ,sizeof (h5t_octant_t))); + // copy new octants to send buffer + memmove (sendbuf, + &(octree->octants[octree->ref_oct_idx + 1]), + loc_oct_new * sizeof (h5t_octant_t)); + octree->current_oct_idx = octree->ref_oct_idx + total_oct_new; + // commit new type + +// TRY (h5priv_mpi_type_commit (&h5_oct_dta_types.mpi_octant)); + + TRY (mpi_allgatherv ( + sendbuf, + nbr_oct_new[rank], + h5_oct_dta_types.mpi_octant, + recvbuf, + nbr_oct_new, + offset, + h5_oct_dta_types.mpi_octant, + octree->comm + )); + + memcpy (&(octree->octants[octree->ref_oct_idx + 1]), recvbuf, total_oct_new * sizeof (h5t_octant_t)); + + // update parents child_idx + //TODO could be more efficient + for (int i = octree->current_oct_idx; i > octree->ref_oct_idx ; i--) { + h5_oct_idx_t parent_idx = get_parent (octree, i); + if (parent_idx < 0 || parent_idx > octree->current_oct_idx) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INTERNAL); + } + octree->octants[parent_idx].child_idx = i; + + } + + octree->ref_oct_idx = -1; + + TRY (h5_free (nbr_oct_new)); + if (sendbuf != NULL) { + TRY (h5_free (sendbuf)); + } + TRY (h5_free (recvbuf)); + TRY (h5_free (offset)); + update_userdata (octree); + clear_level_internal (octree); + update_internal (octree); // maybe update leave level would be enough + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + * compare func for qsort bsearch + */ +int compare_points_x(const void *p_a, const void *p_b) +{ +return ((*(h5_oct_point_t*)p_a).x - (*(h5_oct_point_t*)p_b).x) >= 0 ? 1 : 0; +} +int compare_points_y(const void *p_a, const void *p_b) +{ +return ((*(h5_oct_point_t*)p_a).y - (*(h5_oct_point_t*)p_b).y) >= 0 ? 1 : 0; +} +int compare_points_z(const void *p_a, const void *p_b) +{ +return ((*(h5_oct_point_t*)p_a).z - (*(h5_oct_point_t*)p_b).z) >= 0 ? 1 : 0; +} +int sort_points_x(const void *p_a, const void *p_b) +{ + + if (((*(h5_oct_point_t*)p_a).x - (*(h5_oct_point_t*)p_b).x) < 0 ) + return -1 ; + if (((*(h5_oct_point_t*)p_a).x - (*(h5_oct_point_t*)p_b).x) == 0 ) + return 0; + if (((*(h5_oct_point_t*)p_a).x - (*(h5_oct_point_t*)p_b).x) > 0 ) + return 1 ; + return -1; // will never be executed +} +int sort_points_y(const void *p_a, const void *p_b) +{ + if (((*(h5_oct_point_t*)p_a).y - (*(h5_oct_point_t*)p_b).y) < 0 ) + return -1 ; + if (((*(h5_oct_point_t*)p_a).y - (*(h5_oct_point_t*)p_b).y) == 0 ) + return 0; + if (((*(h5_oct_point_t*)p_a).y - (*(h5_oct_point_t*)p_b).y) > 0 ) + return 1 ; + return -1; // will never be executed +} +int sort_points_z(const void *p_a, const void *p_b) +{ + if (((*(h5_oct_point_t*)p_a).z - (*(h5_oct_point_t*)p_b).z) < 0 ) + return -1 ; + if (((*(h5_oct_point_t*)p_a).z - (*(h5_oct_point_t*)p_b).z) == 0 ) + return 0; + if (((*(h5_oct_point_t*)p_a).z - (*(h5_oct_point_t*)p_b).z) > 0 ) + return 1 ; + return -1; // will never be executed +} + + +/* + * multidimensional sort of array of points + */ +static h5_err_t +sort_array ( + h5_oct_point_t* key, + h5_oct_point_t* points, + h5_int32_t nbr_points, + h5_oct_point_t** split, + h5_int32_t* nbr_in_split + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "key=%p, points=%p, nbr_points=%d, split=%p, nbr_in_split=%p", + key, points, nbr_points, split, nbr_in_split); + + // sort in z + comparison_fn_t compare; + compare.compare = compare_points_z; + split[0] = points; + qsort (points, nbr_points, sizeof (*points), sort_points_z); + split[4] = linsearch (key, points, nbr_points, sizeof (*points), compare); + if (split[4] == NULL) { + nbr_in_split[0] = nbr_points; + } else { + nbr_in_split[0] = split[4] - split[0]; + } + nbr_in_split[4] = nbr_points - nbr_in_split[0]; + + + // sort in y + compare.compare = compare_points_y; + qsort (split[0], nbr_in_split[0], sizeof (*points), sort_points_y); + qsort (split[4], nbr_in_split[4], sizeof (*points), sort_points_y); + split[2] = linsearch (key, split[0], nbr_in_split[0], sizeof (*points), compare); + split[6] = linsearch (key, split[4], nbr_in_split[4], sizeof (*points), compare); + if (split[2] == NULL) { + nbr_in_split[2] = 0; + } else { + nbr_in_split[2] = nbr_in_split[0] - (split[2] - split[0]); + } + nbr_in_split[0] -= nbr_in_split[2]; + + if (split[6] == NULL) { + nbr_in_split[6] = 0; + } else { + nbr_in_split[6] = nbr_in_split[4] - (split[6] - split[4]); + } + nbr_in_split[4] -= nbr_in_split[6]; + + // sort in x + compare.compare = compare_points_x; + qsort (split[0], nbr_in_split[0], sizeof (*points), sort_points_x); + qsort (split[2], nbr_in_split[2], sizeof (*points), sort_points_x); + qsort (split[4], nbr_in_split[4], sizeof (*points), sort_points_x); + qsort (split[6], nbr_in_split[6], sizeof (*points), sort_points_x); + split[1] = linsearch (key, split[0], nbr_in_split[0], sizeof (*points), compare); + split[3] = linsearch (key, split[2], nbr_in_split[2], sizeof (*points), compare); + split[5] = linsearch (key, split[4], nbr_in_split[4], sizeof (*points), compare); + split[7] = linsearch (key, split[6], nbr_in_split[6], sizeof (*points), compare); + + if (split[1] == NULL) { + nbr_in_split[1] = 0; + } else { + nbr_in_split[1] = nbr_in_split[0] - (split[1] - split[0]); + } + nbr_in_split[0] -= nbr_in_split[1]; + + if (split[3] == NULL) { + nbr_in_split[3] = 0; + } else { + nbr_in_split[3] = nbr_in_split[2] - (split[3] - split[2]); + } + nbr_in_split[2] -= nbr_in_split[3]; + + if (split[5] == NULL) { + nbr_in_split[5] = 0; + } else { + nbr_in_split[5] = nbr_in_split[4] - (split[5] - split[4]); + } + nbr_in_split[4] -= nbr_in_split[5]; + + if (split[7] == NULL) { + nbr_in_split[7] = 0; + } else { + nbr_in_split[7] = nbr_in_split[6] - (split[7] - split[6]); + } + nbr_in_split[6] -= nbr_in_split[7]; + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * get_midpoint + */ +static h5_err_t +get_midpoint ( + h5_oct_point_t* midpoint, + h5_float64_t* bounding_box + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "midpoint=%p, bounding_box=%p", midpoint, bounding_box); + midpoint->x = (bounding_box[3] + bounding_box[0]) / 2.0; + midpoint->y = (bounding_box[4] + bounding_box[1]) / 2.0; + midpoint->z = (bounding_box[5] + bounding_box[2]) / 2.0; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * function to calculate bounding box of child with orientation orient + */ + +static h5_err_t +get_new_bounding_box ( + h5_float64_t* bb, + h5_float64_t* new_bb, + h5_oct_orient_t orient + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "midpoint=%p, bounding_box=%p, orient=%d", bb, new_bb, orient); + h5_float64_t xmin, xmid, xmax, ymin, ymid, ymax, zmin, zmid, zmax; + + // store all values such that bb and new_bb can be the same + xmin = bb[0]; + xmax = bb[3]; + xmid = (xmin + xmax) / 2; + + ymin = bb[1]; + ymax = bb[4]; + ymid = (ymin + ymax) / 2; + + zmin = bb[2]; + zmax = bb[5]; + zmid = (zmin + zmax) / 2; + + // x direction + if ((orient & 1) == 1) { + new_bb[0] = xmid; + new_bb[3] = xmax; + } else { + new_bb[0] = xmin; + new_bb[3] = xmid; + } + // y direction + if ((orient & 2) == 2) { + new_bb[1] = ymid; + new_bb[4] = ymax; + } else { + new_bb[1] = ymin; + new_bb[4] = ymid; + } + // z direction + if ((orient & 4) == 4) { + new_bb[2] = zmid; + new_bb[5] = zmax; + } else { + new_bb[2] = zmin; + new_bb[5] = zmid; + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +void print_array_p ( + h5_oct_point_t* neigh, + h5_oct_idx_t nbr_neigh, + int rank + ) { + printf ("proc %d: array \n",rank); + for (int i = 0; i < nbr_neigh; i++) { + printf (" %4.4f, %4.4f, %4.4f / %d, %lld --", neigh[i].x, neigh[i].y, neigh[i].z, neigh[i].oct, (long long) neigh[i].elem); + } + + printf ("\n"); + } +/* + * recursive refine oct w points + */ +static h5_err_t +recursive_ref_points ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_float64_t* bounding_box, + h5_oct_point_t* points, + h5_int32_t nbr_points, + h5_int32_t max_points + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "octree=%p, oct_idx=%d points=%p, bounding_box=%p, nbr_points=%d, max_points=%d", + octree, + oct_idx, + bounding_box, + points, + nbr_points, + max_points); + + h5_oct_point_t midpoint; + TRY (get_midpoint (&midpoint, bounding_box)); + if (octree->octants[oct_idx].child_idx == -1) { + // octant needs to be refined + TRY (refine_octant (octree, oct_idx)); + } + h5_oct_point_t* split_arr[8]; + h5_oct_point_t** split = split_arr; + h5_int32_t nbr_in_split_arr[8]; + h5_int32_t* nbr_in_split = nbr_in_split_arr; + TRY (sort_array (&midpoint, points, nbr_points, split, nbr_in_split)); + + for (int i = 0; i < 8; i++) { + if (nbr_in_split[i] > max_points || + (h5tpriv_octant_is_full (octree, octree->octants[oct_idx].child_idx + i) + && nbr_in_split[i] > 0) + ) { + h5_float64_t new_bounding_box[6]; + TRY (get_new_bounding_box (bounding_box, new_bounding_box, i)); + // call itself with points belonging to childrens octants + TRY (recursive_ref_points (octree, octree->octants[oct_idx].child_idx + i, new_bounding_box, split[i], nbr_in_split[i], max_points)); + + } else { + // assign oct_idx to points + // print_array_p (points,nbr_points,32); + for (int j = 0; j < nbr_in_split[i]; j++) { + (split[i] + j)->oct = octree->octants[oct_idx].child_idx + i; + + } + //print_array_p (points,nbr_points,32); + } + } + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + * refine with points + */ +static h5_err_t +refine_w_points ( + h5t_octree_t* octree, + h5_oct_point_t* points, + h5_int32_t nbr_points, + h5_int32_t max_points + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, points=%p, nbr_points=%d, max_points=%d", octree, points, nbr_points, max_points); + if (nbr_points < 1) { + TRY (begin_refine_octants (octree)); + TRY (end_refine_octants (octree, points, nbr_points)); + H5_PRIV_FUNC_LEAVE (H5_SUCCESS); + } + + TRY (begin_refine_octants (octree)); + + if (points[0].oct == -1) { // adding points for the first time + if (nbr_points > max_points || h5tpriv_octant_is_full (octree, 0)) { + TRY (recursive_ref_points (octree, 0, octree->bounding_box, points, nbr_points, max_points)); + } else { + for (int j = 0; j < nbr_points; j++) { + points[j].oct = 0; + } + } + } else { // midpoints from refining elements + int counter = 0; + h5_float64_t bounding_box[6]; + while (counter < nbr_points) { + // find all points that are together in a leaf oct at the moment + h5_oct_idx_t oct_idx = points[counter].oct; + int first_point = counter++; + assert ( oct_has_level (octree, oct_idx, OCT_USERLEV_LENGTH -1)); + while (counter < nbr_points && oct_idx == points[counter].oct) { + counter++; + } + // check if refinement of octree is necessary (either octant is full or more than maxpoints are in leaf octant) + if (counter - first_point > max_points || h5tpriv_octant_is_full (octree, points[first_point].oct)) { + + TRY (get_bounding_box_of_octant(octree, points[first_point].oct, bounding_box)); + TRY (recursive_ref_points ( + octree, + points[first_point].oct, + bounding_box, + &points[first_point], + counter - first_point, + max_points)); + } + + } + } + TRY (end_refine_octants (octree, points, nbr_points)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t H5t_refine_w_points (h5t_octree_t* octree, h5_oct_point_t* points, h5_int32_t nbr_points, h5_int32_t max_points) { + return refine_w_points (octree, points, nbr_points, max_points); +} +static int +bounding_box_contains_point ( + h5_float64_t* bounding_box, + h5_oct_point_t* point + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "bounding_box=%p, point=%p", bounding_box, point); + if ( bounding_box[0] <= point->x && + bounding_box[3] > point->x && + bounding_box[1] <= point->y && + bounding_box[4] > point->y && + bounding_box[2] <= point->z && + bounding_box[5] > point->z + ) { + H5_PRIV_FUNC_LEAVE (1); + } else { + H5_PRIV_FUNC_LEAVE (0); + } + H5_PRIV_FUNC_RETURN (H5_ERR); +} +static h5_err_t +get_bounding_box_of_octant ( + h5t_octree_t* const octree, + h5_oct_idx_t oct_idx, + h5_float64_t* bounding_box + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d, bounding_box=%p", octree, oct_idx, bounding_box); + + // get level and allocate memory to store all ancestors + h5_lvl_idx_t level = get_oct_level (octree, oct_idx); + h5_oct_idx_t* ancestors = NULL; + TRY (ancestors = h5_calloc (level + 1, sizeof (*ancestors))); + + // retrieve all ancestors + int i = 0; + ancestors[i++] = oct_idx; + h5_oct_idx_t parent = get_parent (octree, oct_idx); + + while (parent >= 0) { + ancestors[i++] = parent; + parent = get_parent (octree, parent); + } + // get bounding box of octree + memcpy (bounding_box, octree->bounding_box, 6 * sizeof (*bounding_box)); + + // calculate recursively the bounding box of oct_idx + h5_oct_orient_t direction = 0; + while (--i > 0) { + direction = ancestors[i-1] - get_children(octree, ancestors[i]); + TRY (get_new_bounding_box(bounding_box, bounding_box, direction)); + } + TRY (h5_free (ancestors)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t +H5t_get_bounding_box_of_octant (h5t_octree_t* const octree, h5_oct_idx_t oct_idx, h5_float64_t* bounding_box) { + return get_bounding_box_of_octant (octree, oct_idx, bounding_box); +} + +static h5_oct_idx_t +find_leafoctant_of_point ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_float64_t* bounding_box, + h5_oct_point_t* point + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d, point=%p", octree, oct_idx, point); + + // if point is not contained in octree return error + if (!bounding_box_contains_point (bounding_box, point)) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INVAL); + } + h5_oct_idx_t ret_oct_idx = oct_idx; + // if octant has children find the child that contains it and search -> recursively + if (octree->octants[oct_idx].child_idx != -1) { + oct_idx = octree->octants[oct_idx].child_idx; + h5_float64_t new_bb[6]; + for (int i = 0; i < 8; i++) { + TRY (get_new_bounding_box(bounding_box, new_bb, i)); + if (bounding_box_contains_point (new_bb, point)) { + TRY (ret_oct_idx = find_leafoctant_of_point (octree, oct_idx + i, new_bb, point)); + break; + } + } + } + + H5_PRIV_FUNC_RETURN (ret_oct_idx); +} +h5_oct_idx_t +H5t_find_leafoctant_of_point (h5t_octree_t* octree, h5_oct_idx_t oct_idx, h5_float64_t* bounding_box, h5_oct_point_t* point) { + return find_leafoctant_of_point (octree, oct_idx, bounding_box, point); +} + + +/* + * if points are assigned to octants which have children, points get assigned to leaf level octants + */ +static h5_err_t +add_points_to_leaf ( + h5t_octree_t* octree, + h5_oct_point_t* points, + h5_int32_t nbr_points) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, points=%p, nbr_points=%d", octree, points, nbr_points); + h5_float64_t bounding_box[6]; + for (int i = 0; i < nbr_points; i++) { + TRY (get_bounding_box_of_octant (octree, points[i].oct, bounding_box)); + TRY (points[i].oct = find_leafoctant_of_point (octree, points[i].oct, bounding_box, &points[i])); + } + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t H5t_add_points_to_leaf (h5t_octree_t* octree, h5_oct_point_t* points, h5_int32_t nbr_points) { + return add_points_to_leaf (octree, points, nbr_points); +} +/* + * Get siblings + */ +static h5_err_t +get_siblings( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_idx_t* siblings_idx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d, siblings_idx=%p", octree, oct_idx, siblings_idx); + + + if (oct_idx == 0) { + /*** root node has no siblings***/ + H5_PRIV_FUNC_LEAVE (H5_ERR_INVAL); + } else { + h5_oct_idx_t parent_idx = octree->octants[oct_idx].parent_idx; + *siblings_idx = octree->octants[parent_idx].child_idx; + } + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + * Get sibling + */ +static h5_oct_idx_t +get_sibling( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d", octree, oct_idx); + assert (oct_idx >0); + H5_PRIV_FUNC_RETURN (octree->octants[octree->octants[oct_idx].parent_idx].child_idx); +} +h5_oct_idx_t H5t_get_sibling(h5t_octree_t* octree, h5_oct_idx_t oct_idx) { + return get_sibling(octree, oct_idx); +} + +#if 0 +/* + * returns memory usage per processor + */ +static h5_err_t +mem_usage ( + h5t_octree_t* octree, + h5_int32_t* mem_use + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, mem_use=%p", octree, mem_use); + *mem_use = sizeof (*octree) + (sizeof (*(octree->octants)) + octree->size_userdata) * octree->nbr_alloc_oct; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif + +#if 0 +/* + * free neigh memory + */ +static h5_err_t +free_neigh ( + h5_oct_idx_t* neighbors, + h5_oct_idx_t* ancestor_of_neigh + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "neighbors=%p, ancestor_of_neigh=%p", neighbors, ancestor_of_neigh); + TRY (h5_free (neighbors)); + TRY (h5_free (ancestor_of_neigh)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif + +/* + * compare func for qsort bsearch + */ +int compare_oct_idx(const void *p_a, const void *p_b) +{ +return *(h5_oct_idx_t*)p_a - *(h5_oct_idx_t*)p_b; +} +/* + * add oct_idx to array if it doesn't exists yet (without sorting) + */ +static h5_err_t +add_neigh ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_idx_t* neigh, + h5_oct_idx_t* num_neigh + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "octree=%p, oct_idx=%d, ancestor_of_neigh=%p, nbr_anc_of_neigh=%d", + octree, oct_idx, + neigh, *num_neigh); + int i = 0; + for (; i < *num_neigh; i++) { + if (oct_idx == neigh[i]) { + H5_PRIV_FUNC_LEAVE (H5_SUCCESS); + } + } + + neigh[*num_neigh] = oct_idx; + (*num_neigh)++; + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * add ancestor to array if it doesn't exists yet (sort ancestors) + */ +static h5_err_t +add_ancestor ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_idx_t* ancestor_of_neigh, + h5_oct_idx_t* nbr_anc_of_neigh + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "octree=%p, oct_idx=%d, ancestor_of_neigh=%p, nbr_anc_of_neigh=%d", + octree, oct_idx, + ancestor_of_neigh, *nbr_anc_of_neigh); + + + if ( bsearch (&oct_idx, ancestor_of_neigh, (size_t) *nbr_anc_of_neigh, sizeof (*nbr_anc_of_neigh), compare_oct_idx) == NULL) { + ancestor_of_neigh[*nbr_anc_of_neigh] = oct_idx; + (*nbr_anc_of_neigh)++; + qsort(ancestor_of_neigh, (size_t) *nbr_anc_of_neigh, sizeof (*nbr_anc_of_neigh), compare_oct_idx); + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * get ancestors of octant + */ +static h5_err_t +get_ancestors ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_idx_t* ancestor_of_neigh, + h5_oct_idx_t* nbr_anc_of_neigh + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "octree=%p, oct_idx=%d, ancestor_of_neigh=%p, nbr_anc_of_neigh=%d", + octree, oct_idx, + ancestor_of_neigh, *nbr_anc_of_neigh); + h5_oct_idx_t parent_idx = oct_idx; + while ((parent_idx = get_parent (octree, parent_idx)) != -1 ) { + TRY (add_ancestor (octree, parent_idx, ancestor_of_neigh, nbr_anc_of_neigh)); + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * get children with given orientation on certain level + */ +static h5_err_t +get_kids_with_orient ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_idx_t* neighbors, + h5_oct_idx_t* nbr_neigh, + h5_oct_idx_t* ancestor_of_neigh, + h5_oct_idx_t* nbr_anc_of_neigh, + h5_oct_level_t userlevel, + h5_int32_t orient, + h5_int32_t direction, + h5_int32_t ifsibling + ); + +static h5_err_t +get_kids_with_orient ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_idx_t* neighbors, + h5_oct_idx_t* nbr_neigh, + h5_oct_idx_t* ancestor_of_neigh, + h5_oct_idx_t* nbr_anc_of_neigh, + h5_oct_level_t userlevel, + h5_int32_t orient, + h5_int32_t direction, + h5_int32_t ifsibling + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "octree=%p, oct_idx=%d, neighbors=%p, nbr_neigh=%d," + " ancestor_of_neigh=%p, nbr_anc_of_neigh=%d," + " userlevel=%d, orient=%d, direction=%d", + octree, oct_idx, neighbors, *nbr_neigh, + ancestor_of_neigh, *nbr_anc_of_neigh, + userlevel, orient, direction); + assert (*nbr_neigh > -1); + assert (*nbr_neigh < OCT_MAX_NEIGHBORS); + assert (*nbr_anc_of_neigh > -1); + assert (*nbr_anc_of_neigh < OCT_MAX_NEIGHBORS); + assert (oct_idx > 0); + + if (oct_has_level (octree, oct_idx, userlevel)) { + // octant is neighbor on correct level + neighbors[*nbr_neigh] = oct_idx; + (*nbr_neigh)++; + TRY (get_ancestors (octree, oct_idx, ancestor_of_neigh, nbr_anc_of_neigh)); + + } else { + + // add octant as ancestor and go to children + h5_oct_idx_t children_oct_idx = get_children (octree, oct_idx); + if (children_oct_idx == -1) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INTERNAL); + } + for (int i = 0; i < 8; i++) { + if ( (ifsibling && (i & direction) == (orient & direction)) || + (!ifsibling && (i & direction) != (orient & direction))) { + // check chlidrens children + TRY (get_kids_with_orient (octree, + children_oct_idx + i, + neighbors, + nbr_neigh, + ancestor_of_neigh, + nbr_anc_of_neigh, + userlevel, + orient, + direction, + ifsibling)); + } + + + } + } + + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + +/* + * get nearest common ancestor + * returns -1 on geom boundary + */ +static h5_err_t +get_nca ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_dir_t direction, + h5_oct_orient_t* orient_child_nca, + h5_oct_idx_t* nca + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d, direction=%d, orient_child_nca=%p nca=%p", + octree, oct_idx, direction, orient_child_nca, nca); + // TODO maybe check that siblings don't fullfill requirement + h5_oct_idx_t parent_idx = get_parent (octree, oct_idx); + assert (parent_idx > -1); + h5_oct_orient_t orient = get_orient (octree, oct_idx); + h5_oct_orient_t parent_orient = get_orient (octree, parent_idx); + memcpy (&orient_child_nca[0],&orient, sizeof (orient)); + *nca = -1; + int counter = 1; + while (octree->octants[parent_idx].parent_idx != -1) { + parent_orient = get_orient (octree, parent_idx); + memcpy (&orient_child_nca[counter++],&parent_orient, sizeof (parent_orient)); + if ((orient & direction) != (parent_orient & direction)) { + // oct_idx is sibling of neighbors + *nca = get_parent (octree, parent_idx); + parent_orient = get_orient (octree, *nca); + memcpy (&orient_child_nca[counter++],&parent_orient, sizeof (parent_orient)); + break; + } + parent_idx = get_parent (octree, parent_idx); + } + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * get the child with given orientation, return -1 if no children + */ + +static h5_oct_idx_t +get_child_with_orient ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_orient_t orient + ) { + if (octree->octants[oct_idx].child_idx == -1) { + return -1; + } else { + return octree->octants[oct_idx].child_idx + orient; + } +} + + +/* + * get the smallest possible neighbor up to the same octree level & userlevel + */ +static h5_err_t +get_equal_sized_neigh ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_dir_t direction, + h5_oct_orient_t* sibling_orient, + h5_oct_idx_t nca, + h5_oct_idx_t* neigh, + h5_oct_level_t userlevel + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d, direction=%d, sibling_orient=%p" + ", nca=%d, neigh=%p, userlevel=%d", + octree, + oct_idx, + direction, + sibling_orient, + nca, + neigh, + userlevel); + int orient_idx = get_oct_level (octree, oct_idx) - get_oct_level (octree, nca) -1; + h5_oct_idx_t child = get_child_with_orient (octree, nca, sibling_orient[orient_idx--] ^ direction); + h5_oct_orient_t child_orient= 0; + + while ((get_oct_level (octree, oct_idx) > get_oct_level (octree, child)) // neighbor is still coarser + && (oct_has_level (octree, child, userlevel ) == 0) ) { // userlevel not reached + + child_orient = sibling_orient[orient_idx--] ^ direction; + if ( (child = get_child_with_orient (octree, child, child_orient)) == -1 ) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INVAL); + } + } + *neigh = child; + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +static h5_err_t +check_neigh_cand ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_idx_t* neig, + h5_oct_idx_t* num_neigh + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d, neig=%p, num_neigh=%p, ", + octree, oct_idx, neig, num_neigh); + int if_check_fails_is_int_error = 0; + if (*num_neigh > 1) { + if_check_fails_is_int_error = 1; + } + h5_float64_t bb[6]; + get_bounding_box_of_octant(octree, oct_idx, bb); + + for (int i = 0; i < *num_neigh; i++) { + h5_float64_t n_bb[6]; + get_bounding_box_of_octant(octree, neig[i], n_bb); + if (bb[0] > n_bb[3] || bb[3] < n_bb[0] || + bb[1] > n_bb[4] || bb[4] < n_bb[1] || + bb[2] > n_bb[5] || bb[5] < n_bb[2] ) { + // should be deleted + if (if_check_fails_is_int_error) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INTERNAL); + } else { + *num_neigh = 0; + } + } + + } + + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + +static h5_err_t +add_common_neigh ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_idx_t* neigh, + h5_oct_idx_t* num_neigh, + h5_oct_idx_t* x_neigh, + h5_oct_idx_t num_x_neigh, + h5_oct_idx_t* y_neigh, + h5_oct_idx_t num_y_neigh + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d, neig=%p, num_neigh=%p, ", + octree, oct_idx, neigh, num_neigh); + h5_oct_idx_t num_cand = 0; + for (int i = 0; i < num_x_neigh; i++) { + h5_oct_idx_t neigh_idx = x_neigh[i]; + for (int j = 0; j < num_y_neigh; j++) { + if (neigh_idx == y_neigh[j] && neigh_idx != oct_idx) { + // edge neighbor candidate is found + num_cand = 1; + TRY (check_neigh_cand (octree, oct_idx, &neigh_idx, &num_cand)); + if (num_cand == 1) { + // add to neigh + TRY (add_neigh (octree,neigh_idx, neigh, num_neigh)); + break; + } + } + } + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +// // TODO put in separate function +// h5_oct_idx_t num_cand = 0; + // find entries that are contained in x, y and z + + + + +h5_err_t +get_tmp_dir_neigh ( + h5t_octree_t* octree, + h5_oct_idx_t size, + h5_oct_idx_t* oct_idxs, + h5_oct_idx_t** neigh, + h5_oct_idx_t* num_neigh, + h5_oct_idx_t** anc, + h5_oct_idx_t* num_anc, + h5_oct_idx_t* num_alloc, + h5_oct_level_t userlevel + ); + +h5_err_t +get_edge_dir_neigh ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_idx_t tmp_oct_idx, + h5_oct_dir_t tmp_dir, + h5_oct_idx_t* neighbors, + h5_oct_idx_t* num_neigh, + h5_oct_idx_t* anc, + h5_oct_idx_t* num_anc, + h5_oct_level_t userlevel + ); + +/* + * get face neighbors of octant + */ +static h5_err_t +get_neighbors ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_idx_t** neighbors, + h5_oct_idx_t* nbr_neigh, + h5_oct_idx_t** ancestor_of_neigh, + h5_oct_idx_t* nbr_anc_of_neigh, + h5_oct_idx_t kind_of_neigh, // subdim of neighborhood 1 face neigh, 2 edge neigh, 3 vertex neigh WARNING 2 may also return some vertex edges + h5_oct_level_t userlevel + ) { + + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d, neighbors=%p, nbr_neigh=%d, " + "ancestor_of_neigh=%p, nbr_anc_of_neigh=%d, userlevel=%d", + octree, oct_idx, neighbors, *nbr_neigh, + ancestor_of_neigh, *nbr_anc_of_neigh, userlevel); + + assert (kind_of_neigh > 0); + assert (kind_of_neigh < 4); + // check if oct_idx has userlevel + if (oct_has_level (octree, oct_idx, userlevel) == 0 ) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INVAL); + } + + h5_oct_orient_t orient = get_orient (octree, oct_idx); +// h5_oct_idx_t parent_oct_idx = octree->octants[oct_idx].parent_idx; + h5_oct_idx_t siblings; + + h5_oct_orient_t* orient_child_nca = NULL; + TRY (orient_child_nca = h5_calloc (get_oct_level(octree, oct_idx) + 1, sizeof (*orient_child_nca))); + + TRY (get_siblings (octree, oct_idx, &siblings)); + TRY (*neighbors = h5_alloc (*neighbors, OCT_MAX_NEIGHBORS * sizeof (**neighbors))); + memset (*neighbors, 0, OCT_MAX_NEIGHBORS * sizeof (**neighbors) ); + TRY (*ancestor_of_neigh = h5_alloc (*ancestor_of_neigh, OCT_MAX_NEIGHBORS * sizeof (**neighbors))); + memset (*ancestor_of_neigh, 0, OCT_MAX_NEIGHBORS * sizeof (**neighbors) ); + *nbr_neigh = 0; + *nbr_anc_of_neigh = 0; + h5_oct_idx_t tmp_oct_idx, nearest_common_anc; + h5_oct_dir_t tmp_dir; + h5_oct_idx_t old_num_neigh = 0; + h5_oct_idx_t num_neigh_per_dir[6]; + h5_int32_t ifsibling = -1; + // handle siblings + + //sibling in X + tmp_oct_idx = siblings + (orient ^ 1); + tmp_dir = 1; + ifsibling = 1; + TRY (get_kids_with_orient (octree, + tmp_oct_idx, + *neighbors, + nbr_neigh, + *ancestor_of_neigh, + nbr_anc_of_neigh, + userlevel, + orient, + tmp_dir, + ifsibling)); + +// //get other neighbors in X + TRY (get_nca (octree, oct_idx, tmp_dir, orient_child_nca, &nearest_common_anc)); + if (nearest_common_anc != -1) { + + TRY (get_equal_sized_neigh (octree, oct_idx, tmp_dir, orient_child_nca, nearest_common_anc, &tmp_oct_idx, userlevel)); + if (get_sibling (octree, tmp_oct_idx) == get_sibling (octree, oct_idx)) { + ifsibling = 1; + } else { + ifsibling = 0; + } + + TRY (get_kids_with_orient (octree, + tmp_oct_idx, + *neighbors, + nbr_neigh, + *ancestor_of_neigh, + nbr_anc_of_neigh, + userlevel, + orient, + tmp_dir, + ifsibling)); + } + num_neigh_per_dir[0] = *nbr_neigh; + memset (orient_child_nca, 0, (get_oct_level(octree, oct_idx) + 1) * sizeof (*orient_child_nca)); + + //sibling in Y + tmp_oct_idx = siblings + (orient ^ 2); + tmp_dir = 2; + ifsibling = 1; + old_num_neigh = *nbr_neigh; + TRY (get_kids_with_orient (octree, + tmp_oct_idx, + *neighbors, + nbr_neigh, + *ancestor_of_neigh, + nbr_anc_of_neigh, + userlevel, + orient, + tmp_dir, + ifsibling)); + +// //get other neighbors in Y + + TRY (get_nca (octree, oct_idx, tmp_dir, orient_child_nca, &nearest_common_anc)); + + if (nearest_common_anc != -1) { + TRY (get_equal_sized_neigh (octree, oct_idx, tmp_dir, orient_child_nca, nearest_common_anc, &tmp_oct_idx, userlevel)); + if (get_sibling (octree, tmp_oct_idx) == get_sibling (octree, oct_idx)) { + ifsibling = 1; + } else { + ifsibling = 0; + } + TRY (get_kids_with_orient (octree, + tmp_oct_idx, + *neighbors, + nbr_neigh, + *ancestor_of_neigh, + nbr_anc_of_neigh, + userlevel, + orient, + tmp_dir, + ifsibling)); + } + num_neigh_per_dir[1] = *nbr_neigh - old_num_neigh; + memset (orient_child_nca, 0, (get_oct_level(octree, oct_idx) + 1) * sizeof (*orient_child_nca)); + + //sibling in Z + tmp_oct_idx = siblings + (orient ^ 4); + tmp_dir = 4; + ifsibling = 1; + old_num_neigh = *nbr_neigh; + TRY (get_kids_with_orient (octree, + tmp_oct_idx, + *neighbors, + nbr_neigh, + *ancestor_of_neigh, + nbr_anc_of_neigh, + userlevel, + orient, + tmp_dir, + ifsibling)); + +// //get other neighbors in Z + TRY (get_nca (octree, oct_idx, tmp_dir, orient_child_nca, &nearest_common_anc)); + if (nearest_common_anc != -1) { + TRY (get_equal_sized_neigh (octree, oct_idx, tmp_dir, orient_child_nca, nearest_common_anc, &tmp_oct_idx, userlevel)); + if (get_sibling (octree, tmp_oct_idx) == get_sibling (octree, oct_idx)) { + ifsibling = 1; + } else { + ifsibling = 0; + } + TRY (get_kids_with_orient (octree, + tmp_oct_idx, + *neighbors, + nbr_neigh, + *ancestor_of_neigh, + nbr_anc_of_neigh, + userlevel, + orient, + tmp_dir, + ifsibling)); + } + num_neigh_per_dir[2] = *nbr_neigh - old_num_neigh; + TRY (h5_free (orient_child_nca)); + + // get ancestors of siblings + TRY (get_ancestors (octree, oct_idx, *ancestor_of_neigh, nbr_anc_of_neigh)); + + if (kind_of_neigh > 1) { + // edge neighbors + h5_oct_idx_t* x_neigh = NULL; + h5_oct_idx_t* y_neigh = NULL; + h5_oct_idx_t* z_neigh = NULL; + + h5_oct_idx_t* x_anc = NULL; + h5_oct_idx_t* y_anc = NULL; + h5_oct_idx_t* z_anc = NULL; + + h5_oct_idx_t num_x_neigh = 0; + h5_oct_idx_t num_y_neigh = 0; + h5_oct_idx_t num_z_neigh = 0; + + h5_oct_idx_t num_x_anc = 0; + h5_oct_idx_t num_y_anc = 0; + h5_oct_idx_t num_z_anc = 0; + + h5_oct_idx_t num_x_alloc = 0; + h5_oct_idx_t num_y_alloc = 0; + h5_oct_idx_t num_z_alloc = 0; + + TRY (get_tmp_dir_neigh (octree, + num_neigh_per_dir[0], + &(*neighbors)[0], + &x_neigh, &num_x_neigh, + &x_anc, &num_x_anc, + &num_x_alloc, + userlevel + )); + + + TRY (get_tmp_dir_neigh (octree, + num_neigh_per_dir[1], + &(*neighbors)[num_neigh_per_dir[0]], + &y_neigh, &num_y_neigh, + &y_anc, &num_y_anc, + &num_y_alloc, + userlevel + )); + + TRY (get_tmp_dir_neigh (octree, + num_neigh_per_dir[2], + &(*neighbors)[num_neigh_per_dir[0]+ num_neigh_per_dir[1]], + &z_neigh, &num_z_neigh, + &z_anc, &num_z_anc, + &num_z_alloc, + userlevel + )); + + old_num_neigh = *nbr_neigh; + TRY (add_common_neigh (octree,oct_idx, *neighbors, nbr_neigh, x_neigh, num_x_neigh, y_neigh, num_y_neigh)); + num_neigh_per_dir[3] = *nbr_neigh - old_num_neigh; + old_num_neigh = *nbr_neigh; + TRY (add_common_neigh (octree,oct_idx, *neighbors, nbr_neigh, x_neigh, num_x_neigh, z_neigh, num_z_neigh)); + num_neigh_per_dir[4] = *nbr_neigh - old_num_neigh; + old_num_neigh = *nbr_neigh; + TRY (add_common_neigh (octree,oct_idx, *neighbors, nbr_neigh, z_neigh, num_z_neigh, y_neigh, num_y_neigh)); + num_neigh_per_dir[5] = *nbr_neigh - old_num_neigh; + // check that all anc have been added + for (int i = 0; i < *nbr_neigh; i++) { + TRY (get_ancestors (octree, (*neighbors)[i], *ancestor_of_neigh, nbr_anc_of_neigh)); + } + TRY (h5_free (x_neigh)); + TRY (h5_free (y_neigh)); + TRY (h5_free (z_neigh)); + + TRY (h5_free (x_anc)); + TRY (h5_free (y_anc)); + TRY (h5_free (z_anc)); + } + + if (kind_of_neigh > 2) { + // idea + // get all neig of edge neigh, if one is neigh of every edge direction it should be a point neighbor + + + h5_oct_idx_t* x_neigh = NULL; + h5_oct_idx_t* y_neigh = NULL; + h5_oct_idx_t* z_neigh = NULL; + + h5_oct_idx_t* x_anc = NULL; + h5_oct_idx_t* y_anc = NULL; + h5_oct_idx_t* z_anc = NULL; + + h5_oct_idx_t num_x_neigh = 0; + h5_oct_idx_t num_y_neigh = 0; + h5_oct_idx_t num_z_neigh = 0; + + h5_oct_idx_t num_x_anc = 0; + h5_oct_idx_t num_y_anc = 0; + h5_oct_idx_t num_z_anc = 0; + + h5_oct_idx_t num_x_alloc = 0; + h5_oct_idx_t num_y_alloc = 0; + h5_oct_idx_t num_z_alloc = 0; + + h5_oct_idx_t num_face_neigh = num_neigh_per_dir[0] + num_neigh_per_dir[1] + num_neigh_per_dir[2]; + + TRY (get_tmp_dir_neigh (octree, + num_neigh_per_dir[3], + &(*neighbors)[num_face_neigh], + &x_neigh, &num_x_neigh, + &x_anc, &num_x_anc, + &num_x_alloc, + userlevel + )); + + TRY (get_tmp_dir_neigh (octree, + num_neigh_per_dir[4], + &(*neighbors)[num_face_neigh + num_neigh_per_dir[3]], + &y_neigh, &num_y_neigh, + &y_anc, &num_y_anc, + &num_y_alloc, + userlevel + )); + + TRY (get_tmp_dir_neigh (octree, + num_neigh_per_dir[5], + &(*neighbors)[num_face_neigh + num_neigh_per_dir[3]+ num_neigh_per_dir[4]], + &z_neigh, &num_z_neigh, + &z_anc, &num_z_anc, + &num_z_alloc, + userlevel + )); + + + // TODO put in separate function + h5_oct_idx_t num_cand = 0; + // find entries that are contained in x, y and z + for (int i = 0; i < num_x_neigh; i++) { + h5_oct_idx_t neigh_idx = x_neigh[i]; + for (int j = 0; j < num_y_neigh; j++) { + if (neigh_idx == y_neigh[j]) { + for (int k = 0; k < num_z_neigh; k++) { + if (neigh_idx == z_neigh[k] && neigh_idx != oct_idx) { + // edge neighbor candidate is found + num_cand = 1; + TRY (check_neigh_cand (octree, oct_idx, &neigh_idx, &num_cand)); + if (num_cand == 1) { + // add to neigh + TRY (add_neigh (octree,neigh_idx, *neighbors, nbr_neigh)); + TRY (get_ancestors(octree, neigh_idx, *ancestor_of_neigh, nbr_anc_of_neigh)); + } + } + } + } + } + } + // There is a very strange case, where it is possible to miss vertex neighbor + // namely if on one edge there is no edge neighbor but there still exists a vertex only neighbor + // therefore a dirty hack: + for (int i = 0; i < num_x_neigh; i++) { + num_cand = 1; + h5_oct_idx_t neigh_idx = x_neigh[i]; + TRY (check_neigh_cand (octree, oct_idx, &neigh_idx, &num_cand)); + if (num_cand == 1 && neigh_idx != oct_idx) { + // add to neigh + TRY (add_neigh (octree,neigh_idx, *neighbors, nbr_neigh)); + TRY (get_ancestors(octree, neigh_idx, *ancestor_of_neigh, nbr_anc_of_neigh)); + } + } + for (int i = 0; i < num_y_neigh; i++) { + num_cand = 1; + h5_oct_idx_t neigh_idx = y_neigh[i]; + TRY (check_neigh_cand (octree, oct_idx, &neigh_idx, &num_cand)); + if (num_cand == 1 && neigh_idx != oct_idx) { + // add to neigh + TRY (add_neigh (octree,neigh_idx, *neighbors, nbr_neigh)); + TRY (get_ancestors(octree, neigh_idx, *ancestor_of_neigh, nbr_anc_of_neigh)); + } + } + for (int i = 0; i < num_z_neigh; i++) { + num_cand = 1; + h5_oct_idx_t neigh_idx = z_neigh[i]; + TRY (check_neigh_cand (octree, oct_idx, &neigh_idx, &num_cand)); + if (num_cand == 1 && neigh_idx != oct_idx) { + // add to neigh + TRY (add_neigh (octree,neigh_idx, *neighbors, nbr_neigh)); + TRY (get_ancestors(octree, neigh_idx, *ancestor_of_neigh, nbr_anc_of_neigh)); + } + } + + // check that all anc have been added + for (int i = 0; i < *nbr_neigh; i++) { + TRY (get_ancestors (octree, (*neighbors)[i], *ancestor_of_neigh, nbr_anc_of_neigh)); + } + TRY (h5_free (x_neigh)); + TRY (h5_free (y_neigh)); + TRY (h5_free (z_neigh)); + + TRY (h5_free (x_anc)); + TRY (h5_free (y_anc)); + TRY (h5_free (z_anc)); + } + + + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t H5t_get_neighbors ( h5t_octree_t* octree, h5_oct_idx_t oct_idx, h5_oct_idx_t** neighbors, h5_oct_idx_t* nbr_neigh, h5_oct_idx_t** ancestor_of_neigh, h5_oct_idx_t* nbr_anc_of_neigh, h5_oct_idx_t kind_of_neigh, h5_oct_level_t userlevel) { + return get_neighbors (octree, oct_idx, neighbors, nbr_neigh, ancestor_of_neigh, nbr_anc_of_neigh, kind_of_neigh, userlevel); +} + +/* + * function used to get edge neighbors + */ + +h5_err_t +get_edge_dir_neigh ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + h5_oct_idx_t tmp_oct_idx, + h5_oct_dir_t tmp_dir, + h5_oct_idx_t* neighbors, + h5_oct_idx_t* num_neigh, + h5_oct_idx_t* anc, + h5_oct_idx_t* num_anc, + h5_oct_level_t userlevel + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octree); + + h5_oct_idx_t* neig_candidates = NULL; + TRY (neig_candidates = h5_calloc (OCT_MAX_NEIGHBORS , sizeof (*neig_candidates))); + memset (neig_candidates, 0, OCT_MAX_NEIGHBORS * sizeof (*neig_candidates) ); + h5_oct_idx_t* anc_neig_cand = NULL; + TRY (anc_neig_cand = h5_calloc (OCT_MAX_NEIGHBORS , sizeof (*anc_neig_cand))); + memset (anc_neig_cand, 0, OCT_MAX_NEIGHBORS * sizeof (*anc_neig_cand) ); + h5_oct_idx_t num_cand = 0; + h5_oct_idx_t num_anc_cand = 0; + h5_oct_orient_t orient = get_orient(octree, oct_idx); + h5_int32_t ifsibling =0; // WARNING is not set properly below + h5_oct_orient_t* orient_child_nca = NULL; + TRY (orient_child_nca = h5_calloc (get_oct_level(octree, oct_idx) + 1, sizeof (*orient_child_nca))); + + + h5_oct_idx_t nearest_common_anc = -1; + + TRY (get_kids_with_orient (octree, + tmp_oct_idx, + neighbors, + num_neigh, + anc, + num_anc, + userlevel, + orient, + tmp_dir, + ifsibling)); + + //get other neighbors in edge direction + TRY (get_nca (octree, oct_idx, tmp_dir, orient_child_nca, &nearest_common_anc)); + if (nearest_common_anc != -1) { + + TRY (get_equal_sized_neigh (octree, oct_idx, tmp_dir, orient_child_nca, nearest_common_anc, &tmp_oct_idx, userlevel)); + + TRY (get_kids_with_orient (octree, + tmp_oct_idx, + neig_candidates, + &num_cand, + anc_neig_cand, + &num_anc_cand, + userlevel, + orient, + tmp_dir, + ifsibling)); + + check_neigh_cand (octree, oct_idx, neig_candidates, &num_cand); + if (num_cand == 0) { + num_anc_cand = 0; + } + for (int i = 0; i < num_cand; i++) { + neighbors[(*num_neigh)++] = neig_candidates[i]; + TRY (get_ancestors(octree, neig_candidates[i], anc, num_anc)); + } + num_cand = 0; + num_anc_cand = 0; + } + TRY (h5_free (orient_child_nca)); + TRY (h5_free (neig_candidates)); + TRY (h5_free (anc_neig_cand)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + +h5_err_t +get_tmp_dir_neigh ( + h5t_octree_t* octree, + h5_oct_idx_t size, + h5_oct_idx_t* oct_idxs, + h5_oct_idx_t** neigh, + h5_oct_idx_t* num_neigh, + h5_oct_idx_t** anc, + h5_oct_idx_t* num_anc, + h5_oct_idx_t* num_alloc, + h5_oct_level_t userlevel + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octree); + h5_oct_idx_t* tmp_neigh = NULL; + h5_oct_idx_t num_tmp_neigh = 0; + h5_oct_idx_t* tmp_anc = NULL; + h5_oct_idx_t num_tmp_anc = 0; + // get neigh of x-y edge neigh + for (int i = 0; i < size; i++) { + h5_oct_idx_t curr_idx = oct_idxs[i]; + get_neighbors (octree, curr_idx, &tmp_neigh, &num_tmp_neigh, &tmp_anc, &num_tmp_anc, 1, userlevel); + + // alloc enough mem in glb array + if (num_tmp_neigh + *num_neigh > *num_alloc || + num_tmp_anc + *num_anc > *num_alloc) { // alloc enough mem in x_neigh or x_neigh_anc + TRY (*neigh = h5_alloc (*neigh, (((int)*num_alloc) + OCT_MAX_NEIGHBORS) * sizeof (**neigh))); + TRY (*anc = h5_alloc (*anc, ((int)(*num_alloc) + OCT_MAX_NEIGHBORS) * sizeof (**anc))); + *num_alloc += OCT_MAX_NEIGHBORS; + } + // copy values to global array + for (int j = 0; j < num_tmp_neigh; j++) { + add_neigh (octree, tmp_neigh[j], *neigh, num_neigh); + } + // copy values to global array + for (int j = 0; j < num_tmp_anc; j++) { + add_ancestor (octree, tmp_anc[j], *anc, num_anc); + } + num_tmp_anc = 0; + num_tmp_neigh = 0; + } + TRY (h5_free (tmp_neigh)); + TRY (h5_free (tmp_anc)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + +/* + * iterates octree iterators + * return oct_idx of next octant or -1 if traverse is finished + */ +static h5_oct_idx_t +iterate_oct ( + h5t_oct_iterator_t* iter + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "iter=%p", iter); + h5_oct_userlev_t userlevels = 0; + h5_int32_t found = 0; + h5t_oct_iter_t* it = (h5t_oct_iter_t*) iter; + if (it->current_octant != -1) { + if (it->current_octant == -2) { + it->current_octant = -1; + } + it->current_octant++; + while (it->current_octant <= it->octree->current_oct_idx && !found) { + + userlevels = it->octree->octants[it->current_octant].userlevels; + if ((userlevels & (1 << it->level) )== 1 << it->level) { + // current oct idx points to a leaf octant + found = 1; + it->current_octant--; + } + it->current_octant++; + } + if ( it->current_octant > it->octree->current_oct_idx) { + it->current_octant = -1; + } + } + H5_PRIV_FUNC_RETURN (it->current_octant); +} +h5_oct_idx_t H5t_iterate_oct (h5t_oct_iterator_t* iter) { + return iterate_oct (iter); +} + +static h5_err_t +init_oct_iterator ( + h5t_octree_t* octree, + h5t_oct_iterator_t** iter, + h5_oct_level_t level + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, iter=%p, level=%d", octree, iter, level); + if (*iter != NULL) { + TRY (h5_free (*iter)); + } + TRY (*iter = h5_calloc (1, sizeof (h5t_oct_iter_t))); + h5t_oct_iter_t* it = (h5t_oct_iter_t*) (*iter); + it->iter = iterate_oct; + it->current_octant = -2; + it->octree = octree; + it->level = level; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t H5t_init_oct_iterator (h5t_octree_t* octree, h5t_oct_iterator_t** iter, h5_oct_level_t level) { + return init_oct_iterator (octree, iter, level); +} + +static h5_err_t +init_leafoct_iterator ( + h5t_octree_t* octree, + h5t_oct_iterator_t** iter + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, iter=%p", octree, iter); + init_oct_iterator (octree, iter, OCT_USERLEV_LENGTH - 1); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t H5t_init_leafoct_iterator (h5t_octree_t* octree, h5t_oct_iterator_t** iter) { + return init_leafoct_iterator (octree, iter); +} + +static h5_err_t +end_iterate_oct ( + h5t_oct_iterator_t* iter + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "iter=%p", iter); + TRY (h5_free (iter)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t H5t_end_iterate_oct (h5t_oct_iterator_t* iter) { + return end_iterate_oct (iter); +} + +static h5_oct_idx_t +get_num_oct_leaflevel ( + h5t_octree_t* octree + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p", octree); + h5t_oct_iterator_t* iter = NULL; + TRY (init_leafoct_iterator (octree, &iter)); + h5_oct_idx_t counter = 0; + while (iterate_oct (iter) != -1) { + counter++; + } + end_iterate_oct (iter); + H5_PRIV_FUNC_RETURN (counter); +} +h5_oct_idx_t H5t_get_num_oct_leaflevel (h5t_octree_t* octree) { + return get_num_oct_leaflevel (octree); +} + +h5_oct_idx_t H5t_get_num_octants (h5t_octree_t* octree) { + return octree->current_oct_idx +1; +} +/* + * complete level + */ +static h5_err_t +complete_level( + h5t_octree_t* octree, + h5_oct_level_t level + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, level=%d", octree, level); + // IDEA go through level, and make all siblings & parents +siblings as on level + // then then just keep finest level + // check should be successful after complete_level + update_internal (octree); + + h5t_oct_iterator_t* iterator = NULL; + init_oct_iterator (octree, &iterator, level); + h5_oct_idx_t octant = -1; + h5_oct_idx_t parent = -1; + h5_oct_idx_t siblings = -1; + h5_int32_t done; + set_userlevel_int (octree, 0, level); + while ((octant = iterate_oct (iterator)) != -1) { + + if (oct_has_level (octree, octant, level) && octant > 0) { + // set siblings and parent to level + get_siblings (octree,octant, &siblings); + if (siblings != -1 && !(siblings < octant && oct_has_level (octree, siblings, level))) { + set_userlevel_int (octree, siblings++, level); + set_userlevel_int (octree, siblings++, level); + set_userlevel_int (octree, siblings++, level); + set_userlevel_int (octree, siblings++, level); + set_userlevel_int (octree, siblings++, level); + set_userlevel_int (octree, siblings++, level); + set_userlevel_int (octree, siblings++, level); + set_userlevel_int (octree, siblings++, level); + } else { + // octant and it's parents have already been set to level, therefore avoid setting again + } + done = 0; + parent = octant; + while ((parent=get_parent(octree, parent)) != -1 && done == 0){ + if (oct_has_level (octree, parent, level)){ + done = 1; + } else { + get_siblings (octree, parent, &siblings); + if(siblings != -1){ + set_userlevel_int (octree, siblings++, level); + set_userlevel_int (octree, siblings++, level); + set_userlevel_int (octree, siblings++, level); + set_userlevel_int (octree, siblings++, level); + set_userlevel_int (octree, siblings++, level); + set_userlevel_int (octree, siblings++, level); + set_userlevel_int (octree, siblings++, level); + set_userlevel_int (octree, siblings++, level); + } + } + } + } + + } + end_iterate_oct (iterator); + // remove multiple levels on parents + iterator = NULL; + init_leafoct_iterator (octree, &iterator); + done = 0; + while ((octant = iterate_oct(iterator)) != -1) { + parent = octant; + while (oct_has_level (octree, parent, level) == 0 && parent != -1) { + parent = get_parent(octree, parent); + } + if (parent == -1){ + H5_PRIV_FUNC_LEAVE (H5_ERR_INTERNAL ); + } + done = 0; + // mark all parents of parent as not on level + while ((parent = get_parent (octree, parent)) != -1 && done == 0) { + if (oct_has_level (octree, parent, level) == 0) { + done = 1; + } + remove_userlevel_int (octree, parent, level); + } + } + end_iterate_oct (iterator); + + clear_level_internal (octree); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +H5t_complete_userlevel(h5t_octree_t* octree, h5_oct_level_t level) { + return complete_level(octree,level); +} + +#if 0 +/* + * check level + */ +// BUG does not work properly yet +static h5_err_t +check_level ( + h5t_octree_t* octree, + h5_oct_level_t level + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, level=%d", octree, level); + // idea go from leaf level octants up to root. exactly one time they should hit the level! + h5t_oct_iterator_t* iterator = NULL; + init_leafoct_iterator (octree, &iterator); + h5_oct_idx_t octant = -1; + h5_oct_idx_t parent = -1; + h5_int32_t counter = 0; + while ((octant = iterate_oct (iterator)) != -1){ + counter = 0; + if (oct_has_level (octree, octant, level)) { + counter++; + } + while ((parent=get_parent (octree, octant)) != -1){ + if (oct_has_level (octree, parent, level)) { + counter++; + } + } + if (counter != 1){ + H5_PRIV_FUNC_LEAVE (H5_ERR_INVAL); + } + } + end_iterate_oct (iterator); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif + +/* + * set bounding box for root octant + */ +static h5_err_t +set_bounding_box ( + h5t_octree_t* octree, + h5_float64_t* bounding_box + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, bounding_box=%p", octree, bounding_box); + if ((bounding_box[0] >= bounding_box[3]) || + (bounding_box[1] >= bounding_box[4]) || + (bounding_box[2] >= bounding_box[5]) + ) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INVAL); + } + + memcpy(octree->bounding_box, bounding_box, 6 * sizeof (*bounding_box)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t H5t_set_bounding_box ( h5t_octree_t* octree, h5_float64_t* bounding_box) { + return set_bounding_box (octree, bounding_box); +} + +static h5_float64_t* +get_bounding_box ( + h5t_octree_t* const octree + ) { + return octree->bounding_box; +} +h5_float64_t* H5t_get_bounding_box (h5t_octree_t* const octree) { + return get_bounding_box (octree); +} +/* + * func sceleton + */ +static h5_err_t +func_name ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d", octree, oct_idx); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t H5t_func_name (h5t_octree_t* octree, h5_oct_idx_t oct_idx) { + return func_name (octree, oct_idx); +} + +#endif diff --git a/src/h5core/h5t_octree_private.h b/src/h5core/h5t_octree_private.h new file mode 100644 index 0000000..2a6cd9e --- /dev/null +++ b/src/h5core/h5t_octree_private.h @@ -0,0 +1,180 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5T_OCTREE_PRIVATE_H +#define __H5T_OCTREE_PRIVATE_H + +#include "h5core/h5_types.h" +#include "h5core/h5t_octree.h" + +// iterators +#if defined(PARALLEL_IO) +#include +#endif + +#define OCT_MAX_NEIGHBORS 1000 + +struct h5_oct_point { + h5_float64_t x; + h5_float64_t y; + h5_float64_t z; + h5_oct_idx_t oct; + h5_glb_idx_t elem; +}; + +// Iterators +struct h5t_oct_iterator { + h5t_octree_t* octree; + h5_oct_idx_t (*iter)(struct h5t_oct_iterator* iter); +}; + +/* + * Inititialization methods for octree + */ +struct h5t_getter_oct_methods; +struct h5t_init_oct_methods; + +/* + * All methods provided by the octree + */ + +typedef struct h5t_oct_methods { + struct h5t_getter_oct_methods* get; +// struct h5t_set_oct_methods* set; +// struct h5t_iter_oct_methods* iter; + struct h5t_init_oct_methods* init; +} h5t_oct_methods_t; + +/* + * Define Octant data type + */ +struct h5_octant { + h5_oct_idx_t idx; + h5_oct_idx_t parent_idx; + h5_oct_idx_t child_idx; + h5_lvl_idx_t level_idx; // first 3 bits for type x,y,z forth bit for user data changed +// h5_float64_t bounding_box[6]; + h5_int32_t processor; + h5_oct_userlev_t userlevels; + +}; + +/* + * Define octree data type + */ +struct h5_octree { + /*** variables ***/ + h5_int32_t size_userdata; + MPI_Comm comm; + + /*** octants ***/ + h5t_octant_t* octants; + void* userdata; + h5_oct_idx_t current_oct_idx; + h5_oct_idx_t nbr_alloc_oct; + h5_oct_idx_t ref_oct_idx; + // during refinement: ref_oct_idx == current_oct_idx before refinement, otherwise -1 + h5_float64_t bounding_box[6]; + /* */ + h5_int32_t maxpoints; + +}; + +typedef struct { + h5t_octree_t* octree; + h5_oct_idx_t (*iter)(struct h5t_oct_iterator* iter); + h5_oct_idx_t current_octant; + h5_oct_level_t level; +} h5t_oct_iter_t; + +///* +// * Getter methods working on a octree +// */ +//typedef struct h5t_getter_oct_methods { +// h5_oct_idx_t (*get_parent)(h5t_octree_t* const, +// const h5_oct_idx_t); +// h5_oct_idx_t (*get_children)(h5t_octree_t* const, +// const h5_oct_idx_t); +// +//}; +// +//typedef struct h5t_init_oct_methods { +// h5_err_t (*init_octree)(h5t_octree_t*, h5_int32_t, h5_float64_t*); +//}; + +/*** type ids' for compound types ***/ +typedef struct h5_oct_dtypes { + MPI_Datatype mpi_octant; +} h5_oct_dta_types_t; + +h5_oct_dta_types_t h5_oct_dta_types; + +h5_err_t H5t_create_mpi_type_octant ( void ); + +// Setter functions +h5_err_t H5t_set_userlevel (h5t_octree_t* octree, h5_oct_idx_t oct_idx, h5_oct_level_t level); +h5_err_t H5t_set_bounding_box(h5t_octree_t* octree, h5_float64_t* bounding_box); +h5_err_t H5t_set_proc (h5t_octree_t* octree, h5_oct_idx_t oct_idx, h5_int32_t proc); +h5_err_t H5t_set_proc_int (h5t_octree_t* octree, h5_oct_idx_t oct_idx, h5_int32_t proc); + +h5_err_t H5t_init_octree (h5t_octree_t** octree, h5_int32_t size_userdata, h5_float64_t* const bounding_box, h5_int32_t maxpoints, const MPI_Comm comm); +h5_err_t H5t_refine_w_points (h5t_octree_t* octree, h5_oct_point_t* points, h5_int32_t nbr_points, h5_int32_t max_points); +h5_err_t H5t_add_points_to_leaf (h5t_octree_t* octree, h5_oct_point_t* points, h5_int32_t nbr_points); + +h5_err_t H5t_read_octree (h5t_octree_t** octree, h5_oct_idx_t current_oct_idx, h5_int32_t size_userdata, h5_int32_t maxpoints, h5t_octant_t** octants, void** userdata, const MPI_Comm comm); + +// Getter functions +h5_oct_level_t H5t_get_userlevel (h5t_octree_t* octree, h5_oct_idx_t oct_idx); +h5_oct_idx_t H5t_get_sibling(h5t_octree_t* octree, h5_oct_idx_t oct_idx); +h5_oct_idx_t H5t_get_children (h5t_octree_t* const octree, const h5_oct_idx_t oct_idx); +h5_oct_idx_t H5t_get_parent (h5t_octree_t* const octree, const h5_oct_idx_t oct_idx); +h5_err_t H5t_get_userdata_r (h5t_octree_t* octree, h5_oct_idx_t oct_idx, void** userdata); +h5_err_t H5t_get_userdata_rw (h5t_octree_t* octree, h5_oct_idx_t oct_idx, void** userdata); +h5_err_t H5t_get_neighbors ( h5t_octree_t* octree, h5_oct_idx_t oct_idx, h5_oct_idx_t** neighbors, h5_oct_idx_t* nbr_neigh, h5_oct_idx_t** ancestor_of_neigh, h5_oct_idx_t* nbr_anc_of_neigh, h5_oct_idx_t kind_of_neigh, h5_oct_level_t userlevel); +h5_err_t H5t_get_point_neighbors ( h5t_octree_t* octree, h5_oct_idx_t oct_idx, h5_oct_idx_t** neighbors, h5_oct_idx_t* nbr_neigh, h5_oct_idx_t** ancestor_of_neigh, h5_oct_idx_t* nbr_anc_of_neigh, h5_oct_level_t userlevel); +h5_oct_idx_t H5t_get_num_oct_leaflevel (h5t_octree_t* octree); +h5_oct_idx_t H5t_get_num_octants (h5t_octree_t* octree); + + +h5_int32_t H5t_get_proc (h5t_octree_t* octree, h5_oct_idx_t oct_idx); +int H5t_get_maxpoints (h5t_octree_t* const octree); +h5_float64_t* H5t_get_bounding_box (h5t_octree_t* const octree); +h5_err_t H5t_get_bounding_box_of_octant (h5t_octree_t* const octree, h5_oct_idx_t oct_idx, h5_float64_t* bounding_box); + +h5_err_t H5t_complete_userlevel(h5t_octree_t* octree, h5_oct_level_t level); + +h5_err_t H5t_set_maxpoints (h5t_octree_t* const octree, int maxpoints); + +h5_err_t H5t_update_userdata (h5t_octree_t* const octree); +h5_err_t H5t_update_internal (h5t_octree_t* const octree); + +h5_oct_idx_t H5t_iterate_oct (h5t_oct_iterator_t* iter); +h5_err_t H5t_init_oct_iterator (h5t_octree_t* octree, h5t_oct_iterator_t** iter, h5_oct_level_t level); +h5_err_t H5t_init_leafoct_iterator (h5t_octree_t* octree, h5t_oct_iterator_t** iter); +h5_err_t H5t_end_iterate_oct (h5t_oct_iterator_t* iter); + +h5_err_t H5t_free_octree (h5t_octree_t* octree); +h5_err_t H5t_write_octree ( h5t_mesh_t* const m); + + + +h5_oct_idx_t H5t_find_leafoctant_of_point (h5t_octree_t* octree, h5_oct_idx_t oct_idx, h5_float64_t* bounding_box, h5_oct_point_t* point); + +h5_oct_level_t H5t_oct_has_level (h5t_octree_t* octree, h5_oct_idx_t oct_idx, h5_oct_level_t level); + +// for debug purposes only +h5_err_t plot_octants (h5t_octree_t* octree); +h5_err_t plot_octant_anc (h5t_octree_t* octree, h5_oct_idx_t oct_idx); + +h5_err_t plot_leaf_octants (h5t_octree_t* octree); +void print_array (h5_int32_t* neigh, h5_oct_idx_t nbr_neigh, int rank); +#endif + + + diff --git a/src/h5core/h5t_readwrite.c b/src/h5core/h5t_readwrite.c new file mode 100644 index 0000000..16095a3 --- /dev/null +++ b/src/h5core/h5t_readwrite.c @@ -0,0 +1,3005 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include // for the use of sleep +#if defined (PARALLEL_IO) +//#define WITH_PARALLEL_H5FED +#endif + +//#if defined (WITH_PARALLEL_H5FED) // WARNING just used for eclipse to index all code... +#ifdef PARALLEL_IO +#include +#endif +#include +//#endif + +#include "h5_attribs_private.h" +#include "h5_hdf5_private.h" + +#include "h5_model_private.h" +#include "h5t_types_private.h" +#include "h5t_access_private.h" +#include "h5t_core_private.h" +#include "h5core/h5t_map.h" + +int preferred_direction = 0; +// 0 x direction +// 1 y direction +// 2 z direction + +int dont_use_parmetis = 0; +// 0 use parmetis +// 1 distribute with morton ordering +// 2 distribute geometrically with preferred direction + + +#include "h5core/h5.h" +#include "h5t_types_private.h" +#include "h5t_model_private.h" +#include "h5t_map_private.h" +#include "h5t_adjacencies_private.h" +#include "h5t_readwrite_private.h" +#include "h5t_store_private.h" +#include "h5t_core_private.h" +#include "h5_mpi_private.h" + +#include + +//TODO this is a bugfix remove after xfer_prop fix has been done! +void +set_xfer_prop_to (const h5_file_p file, hid_t prop) { + file->props->xfer_prop = prop; +} + +void +set_xfer_prop_to2 (h5t_mesh_t* const m, hid_t prop) { + m->f->props->xfer_prop = prop; +} + +static hid_t +open_space_all ( + h5t_mesh_t* const m, + const hid_t dataset_id + ) { + UNUSED_ARGUMENT (m); + UNUSED_ARGUMENT (dataset_id); + return H5S_ALL; +} + +int +hidxmap_cmp ( + const void* __a, + const void* __b + ) { + h5_idxmap_el_t* a = (h5_idxmap_el_t*)__a; + h5_idxmap_el_t* b = (h5_idxmap_el_t*)__b; + return b->glb_idx - a->glb_idx; +} + +unsigned int +hidxmap_compute_hval ( + const void* __item + ) { + h5_idxmap_el_t* item = (h5_idxmap_el_t*)__item; + uint16_t* key = (uint16_t*)&item->glb_idx; + unsigned int count = sizeof (item->glb_idx) / sizeof (uint16_t); + unsigned int hval = count; + while (count--) { + if (*key) { + hval <<= 6; + hval += *key; + } + key++; + } + return hval; +} + +/* + Write vertices: + * either we write a new dataset + * or we append data to this dataset + * appending means, a new level has been added + * existing vertices will never be changed! + + */ +static h5_err_t +write_vertices ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + assert (m->num_leaf_levels > 0); + + // quick hack for serial case (for the time being writes are serial anyway) + for (size_t i = 0; i < m->num_leaf_levels; i++) { + m->num_glb_vertices[i] = m->num_loc_vertices[i]; + } + + m->dsinfo_vertices.dims[0] = m->num_loc_vertices[m->num_leaf_levels-1]; + TRY( h5priv_write_dataset_by_name ( + m, + m->f, + m->mesh_gid, + &m->dsinfo_vertices, + open_space_all, + open_space_all, + m->vertices) ); + + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__num_vertices__", + H5T_NATIVE_INT64, + m->num_glb_vertices, + m->num_leaf_levels, + 1)); + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__num_b_vertices__", + H5T_NATIVE_INT64, + m->num_b_vtx, + m->num_leaf_levels, + 1)); + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__first_b_vertices__", + H5T_NATIVE_INT64, + m->first_b_vtx, + m->num_leaf_levels, + 1)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#ifdef PARALLEL_IO + +h5_err_t +add_chunk_to_list ( + h5t_mesh_t* const m, + h5_loc_idxlist_t** list, + h5_oct_idx_t oct_idx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, list=%p, oct_idx=%d", m, list, oct_idx); + h5t_oct_userdata_t* userdata; + TRY (H5t_get_userdata_r (m->octree, oct_idx,(void **) &userdata)); + for (int i = 0; i < OCT_USERDATA_SIZE; i++) { + if (userdata->idx[i] > -1) { + h5priv_search_in_loc_idxlist(list, (h5_loc_idx_t)userdata->idx[i]); + } + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +int compare_chk_idx(const void *p_a, const void *p_b) +{ +return ((*(h5_chk_idx_t*)p_a) - (*(h5_chk_idx_t*)p_b)); +} + +h5_err_t +h5tpriv_get_list_of_chunks_to_write ( + h5t_mesh_t* const m, + h5_chk_idx_t** list, + int* counter + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p list=%p, counter=%p", m, list, counter); + h5_chk_idx_t num_chunks = m->chunks->curr_idx + 1; // Is that ok? yes if update is correct + + int rank = m->f->myproc; + int size_list = num_chunks; + TRY ( *list = h5_calloc (num_chunks, sizeof (**list))); + *counter = 0; + h5_loc_idxlist_t* loc_list = NULL; //WARNING works only if chk_idx == loc_idx + TRY (h5priv_alloc_loc_idxlist (&loc_list, size_list)); + + // go through chunks and get those that belong to this proc + for (h5_loc_idx_t i = 0; i < num_chunks; i++) { + if (H5t_get_proc (m->octree, m->chunks->chunks[i].oct_idx) == rank ) { + TRY (h5priv_search_in_loc_idxlist (&loc_list, i)); + } + } + *counter = loc_list->num_items; + for (int i = 0; i< loc_list->num_items; i++) { + (*list)[i] = (h5_chk_idx_t)loc_list->items[i]; + } +// memcpy (*list, loc_list->items, sizeof(**list) * loc_list->num_items); + TRY (h5priv_free_loc_idxlist (&loc_list)); + + if (size_list < *counter) { + h5_debug ("Overflow of list_of_chunks"); + H5_PRIV_FUNC_LEAVE (H5_ERR_INTERNAL); + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif +static h5_err_t +exchange_g2l_vtx_map ( + h5t_mesh_t* const m, + h5_idxmap_t* map, + h5_glb_idx_t** range, + h5_glb_idx_t** glb_vtx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p map=%p, range=%p, glb_vtx=%p", m, map, range, glb_vtx); +#ifdef PARALLEL_IO + // alloc/get range + TRY (*range = h5_calloc (m->f->nprocs + 1, sizeof (**range))); + TRY (h5tpriv_get_ranges (m,*range, map->num_items, 0)); + + //alloc glb_vtx + TRY (*glb_vtx = h5_calloc ((*range)[m->f->nprocs], sizeof (**glb_vtx))); + h5_glb_idx_t* sendbuf = NULL; + TRY (sendbuf = h5_calloc (map->num_items, sizeof (*sendbuf))); + int* recvcount = NULL; + int* recvdisp = NULL; + TRY (recvcount = h5_calloc (m->f->nprocs , sizeof (*recvcount))); + TRY (recvdisp = h5_calloc (m->f->nprocs , sizeof (*recvdisp))); + for (int i = 0; i < m->f->nprocs; i++) { + recvdisp[i] = (int) (*range)[i]; + recvcount[i] = (int) ((*range)[i+1] - (*range)[i]); + } + for (int i = 0; i < map->num_items; i++) { + sendbuf[i] = map->items[i].glb_idx; + } + + TRY (h5priv_mpi_allgatherv ( + sendbuf, + (int)map->num_items, + MPI_LONG, + *glb_vtx, + recvcount, + recvdisp, + MPI_LONG, + m->f->props->comm)); +#endif + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +int sort_glb_idx(const void *p_a, const void *p_b) +{ + return (*(h5_glb_idx_t*)p_a) - (*(h5_glb_idx_t*)p_b); +} + +/* + * instead of bsearch it returns the first element that fulfills compare(key,element) == 0 in an unsorted array + * we don't want to sort array since it's also containing a permutation + */ +void * linsearch (const void *key, void *array, size_t count, size_t size, + comparison_fn_t compare) { + void* pointer = array; + for (int i = 0; i < count; i++) { + if (compare.compare(key,pointer) == 0) { + return pointer; + break; + } + pointer += size; + } + return NULL; +} + +h5_err_t +remove_item_from_idxmap ( + h5_idxmap_t* map, + int item_idx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "map=%p, item_idx=%d", map, item_idx); + assert(item_idx < map->num_items); + + memmove(&map->items[item_idx], &map->items[item_idx + 1], (map->num_items - 1 - item_idx) * sizeof (*map->items)); + map->num_items--; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * Check if any proc with lower rank already writes a vtx that this proc has planed to write + * if so remove it from the map. Only the proc with the lowest rank writes the vertex + */ +static h5_err_t +check_multiple_vtx_writes ( + h5t_mesh_t* const m, + h5_idxmap_t* map, + h5_glb_idx_t* range, + h5_glb_idx_t* glb_vtx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p map=%p, range=%p, glb_vtx=%p", m, map, range, glb_vtx); + if (m->f->myproc == 0) { + H5_PRIV_FUNC_LEAVE (H5_SUCCESS); + } + h5_glb_idx_t num_glb_vtx = range[m->f->myproc]; + // sort glb_vtx up to my vtx + qsort (glb_vtx,num_glb_vtx, sizeof (*glb_vtx), sort_glb_idx); + + h5_glb_idx_t* key = NULL; + +// comparison_fn_t comp_func; +// comp_func.compare = sort_glb_idx; + for (int i = 0; i < map->num_items; i++) { + h5_glb_idx_t* retval = NULL; + key = &map->items[i].glb_idx; + retval = bsearch (key, glb_vtx, num_glb_vtx, sizeof (*glb_vtx), sort_glb_idx); + if (retval != NULL) { + // vertex already exist on proc with lower rank + TRY (remove_item_from_idxmap (map, i)); + i--; // same position should be check again + } + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_int32_t +find_proc_to_write ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx + ) { + H5_PRIV_FUNC_ENTER (int, "m=%p ", m); +#ifdef PARALLEL_IO + h5_glb_idx_t glb_idx = h5tpriv_get_loc_elem_glb_idx (m, elem_idx); + for (int i = 0; i < m->chunks->num_alloc; i++) { + if ( glb_idx >= m->chunks->chunks[i].elem && + glb_idx < m->chunks->chunks[i].elem + m->chunks->chunks[i].num_elems) { + H5_PRIV_FUNC_LEAVE (H5t_get_proc (m->octree, m->chunks->chunks[i].oct_idx)); + } + } +#endif + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * function returns a map with all the vtx that should be written by this proc + * + * first get all vtx that span elems that are written by this proc + * + * exchange the map and find which ones have to be written locally + */ +static h5_err_t +get_map_vertices_write ( + h5t_mesh_t* const m, + h5_idxmap_t* map + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, map=%p", m, map); +#ifdef PARALLEL_IO + h5_chk_idx_t* list_of_chunks; + int num_chunks = 0; + TRY (h5tpriv_get_list_of_chunks_to_write (m, &list_of_chunks, &num_chunks)); + + /* for the time being we use the hash table only for a fast test + whether a global index has already been added to the map or not. */ + h5_hashtable_t htab; + TRY (h5priv_hcreate ((map->size << 2) / 3, &htab, + hidxmap_cmp, hidxmap_compute_hval, NULL)); + + int num_vertices = h5tpriv_ref_elem_get_num_vertices (m); + + // go through chunks + for (int i = 0; i < num_chunks; i++) { + h5_chk_idx_t chk_idx = list_of_chunks[i]; + h5_glb_idx_t glb_elem_idx = m->chunks->chunks[chk_idx].elem; + h5_chk_size_t num_elem = m->chunks->chunks[chk_idx].num_elems; + for (int j = 0; j < num_elem; j++) { // go through elements + h5_loc_idx_t loc_elem_idx = h5t_map_glb_elem_idx2loc(m, glb_elem_idx + j); + h5_loc_idx_t* vertices = h5tpriv_get_loc_elem_vertex_indices(m, loc_elem_idx); + for (int k = 0; k < num_vertices; k++) { + // get glb vertices + h5_glb_idx_t glb_vidx = m->vertices[vertices[k]].idx; + + // add index temporarly to map ... + map->items[map->num_items] = (h5_idxmap_el_t) {glb_vidx, vertices[k]}; + // ... and check whether it has already been added + h5_idxmap_el_t* retval; + h5priv_hsearch (&map->items[map->num_items], + H5_ENTER, (void**)&retval, &htab); + if (retval == &map->items[map->num_items]) { + // new entry in hash table thus in map + map->num_items++; + } + + } + } + } + TRY (h5priv_hdestroy (&htab)); + h5priv_sort_idxmap (map); + + h5_glb_idx_t* range = NULL; + h5_glb_idx_t* glb_vtx = NULL; + // do exchange map + TRY (exchange_g2l_vtx_map(m, map, &range, &glb_vtx)); + + // check your vertices if they already appear on a proc with lower rank + // if they appear, delete them from this map + TRY (check_multiple_vtx_writes (m, map, range, glb_vtx)); + + + h5priv_sort_idxmap (map); + TRY (h5_free (range)); + TRY (h5_free (glb_vtx)); +#endif + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +//TODO maybe use ifdef to have name without _chk +static h5_err_t +write_vertices_chk ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + assert (m->num_leaf_levels > 0); +#ifdef PARALLEL_IO + hid_t dset_id; + TRY (dset_id = hdf5_open_dataset (m->mesh_gid, m->dsinfo_vertices.name)); + hid_t mspace_id; + hid_t dspace_id; + + + h5_idxmap_t map_r; + TRY (h5priv_new_idxmap (&map_r, m->num_loc_vertices[m->num_leaf_levels-1] + 128)); + h5_idxmap_t* map = &map_r; + get_map_vertices_write (m, map); + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + // create memspace + hsize_t num_loc_vertices = m->num_loc_vertices[m->leaf_level]; + TRY (mspace_id = hdf5_create_dataspace(1, &num_loc_vertices, NULL)); + // add memspace + hsize_t hstride = 1; + H5S_seloper_t seloper = H5S_SELECT_SET; // first selection + for (hsize_t i = 0; i < map->num_items; i++) { + hsize_t hstart = map->items[i].loc_idx; + hsize_t hcount = 1; + while (map->items[i].loc_idx+1 == map->items[i+1].loc_idx && + i+1 < map->num_items) {// WARINIG make sure +1 is right here + i++; hcount++; + } + TRY (hdf5_select_hyperslab_of_dataspace ( + mspace_id, + seloper, + &hstart, &hstride, &hcount, + NULL)); + seloper = H5S_SELECT_OR; + } + + + // create diskspace and select subset + hsize_t num_glb_vertices = m->num_glb_vertices[m->num_leaf_levels-1]; + m->dsinfo_vertices.dims[0] = num_glb_vertices; + TRY (dspace_id = hdf5_get_dataset_space (dset_id)); + TRY (hdf5_set_dataset_extent (dset_id, &num_glb_vertices)); + H5Sset_extent_simple(dspace_id, 1,m->dsinfo_vertices.dims, NULL); //TODO WRITE WRAPPER + + seloper = H5S_SELECT_SET; // first selection + for (hsize_t i = 0; i < map->num_items; i++) { + hsize_t hstart = map->items[i].glb_idx; + hsize_t hcount = 1; + while (map->items[i].glb_idx+1 == map->items[i+1].glb_idx && + i+1 < map->num_items) { // WARINIG make sure +1 is right here + i++; hcount++; + } + TRY (hdf5_select_hyperslab_of_dataspace ( + dspace_id, + seloper, + &hstart, &hstride, &hcount, + NULL)); + seloper = H5S_SELECT_OR; + } + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); +#if defined(WITH_PARALLEL_H5FED) + TRY (h5priv_start_throttle (m->f)); +#endif + + + TRY( h5priv_write_dataset_by_name_id ( + m->f, + m->mesh_gid, + &m->dsinfo_vertices, + dset_id, + mspace_id, + dspace_id, + m->vertices) ); + + + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__num_vertices__", + H5T_NATIVE_INT64, + m->num_glb_vertices, + m->num_leaf_levels, + 1)); + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__num_b_vertices__", + H5T_NATIVE_INT64, + m->num_b_vtx, + m->num_leaf_levels, + 1)); + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__first_b_vertices__", + H5T_NATIVE_INT64, + m->first_b_vtx, + m->num_leaf_levels, + 1)); + +#if defined(WITH_PARALLEL_H5FED) + TRY (h5priv_end_throttle (m->f)); +#endif + TRY (hdf5_close_dataspace (dspace_id)); + TRY (hdf5_close_dataspace (mspace_id)); + TRY (hdf5_close_dataset (dset_id)); + m->f->empty = 0; +#endif + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#if defined(WITH_PARALLEL_H5FED) +static h5_err_t +write_elems ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + H5_PRIV_FUNC_RETURN (h5_error_not_implemented ()); +} + +#else + +// SERIAL WRITE +static h5_err_t +write_elems ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + assert (m->num_leaf_levels > 0); + + h5_loc_idx_t num_interior_elems = m->num_interior_elems[m->num_leaf_levels-1]; + // alloc and inititalize data in memory + h5_glb_elem_t* glb_elems; + TRY (glb_elems = h5tpriv_alloc_glb_elems (m, num_interior_elems)); + TRY (h5tpriv_init_glb_elems_struct (m, glb_elems)); + + m->dsinfo_elems.dims[0] = num_interior_elems; + TRY (h5priv_write_dataset_by_name ( + m, + m->f, + m->mesh_gid, + &m->dsinfo_elems, + open_space_all, + open_space_all, + glb_elems)); + + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__num_elems__", + H5T_NATIVE_INT64, + m->num_glb_elems, + m->num_leaf_levels, + 1)); + + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__num_leaf_elems__", + H5T_NATIVE_INT64, + m->num_glb_leaf_elems, + m->num_leaf_levels, + 1)); + + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__num_leaf_levels__", + H5T_NATIVE_INT16, + &m->num_leaf_levels, + 1, + 1)); + + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__is_chunked__", + H5T_NATIVE_INT16, + &m->is_chunked, + 1, + 1)); + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__num_weights__", + H5T_NATIVE_INT32, + &m->num_weights, + 1, + 1)); + // release mem + TRY (h5_free (glb_elems)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif +#ifdef PARALLEL_IO +//TODO maybe use ifdef to have name without _chk +static h5_err_t +write_elems_chk ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + assert (m->num_leaf_levels > 0); + + h5_chk_idx_t* chk_list = NULL; + int num_chk = 0; + // get my chunks to write + TRY (h5tpriv_get_list_of_chunks_to_write(m, &chk_list, &num_chk)); + + hsize_t num_elems = 0; + for (int i = 0; i < num_chk; i++) { + num_elems += m->chunks->chunks[chk_list[i]].num_elems; + } + // alloc and inititalize data in memory + h5_glb_elem_t* glb_elems; + TRY (glb_elems = h5tpriv_alloc_glb_elems (m, num_elems)); + TRY (h5tpriv_init_glb_elems_struct_chk (m, glb_elems, chk_list, num_chk)); + + // could check here that glb_elems are in correct order + + hid_t dset_id; + TRY (dset_id = hdf5_open_dataset (m->mesh_gid, m->dsinfo_elems.name)); + hid_t dspace_id; + hid_t mspace_id; + hsize_t hstart = 0; + hsize_t hstride = 1; + hsize_t hcount = num_elems; + TRY (mspace_id = hdf5_create_dataspace (1, &num_elems, NULL)); + TRY (hdf5_select_hyperslab_of_dataspace ( + mspace_id, + H5S_SELECT_SET, + &hstart, &hstride, &hcount, + NULL)); + + + // create diskspace and select subset + hsize_t num_glb_elems = m->num_glb_elems[m->leaf_level]; + m->dsinfo_elems.dims[0] = num_glb_elems; + TRY (dspace_id = hdf5_get_dataset_space (dset_id)); + TRY (hdf5_set_dataset_extent (dset_id, &num_glb_elems)); + H5Sset_extent_simple(dspace_id, 1,m->dsinfo_elems.dims, NULL); //TODO WRITE WRAPPER + + + hsize_t hnext = h5tpriv_get_glb_elem_idx(m, glb_elems, 0); + hsize_t hcurr = 0; + // with those two variables the number of func calls can be reduced 3 times! + H5S_seloper_t seloper = H5S_SELECT_SET; // first selection + for (hsize_t i = 0; i < num_elems; i++) { + hstart = hnext; + hcurr = hnext; + hcount = 1; + while (i + 1 < num_elems && + (hnext = h5tpriv_get_glb_elem_idx(m, glb_elems, i + 1)) == hcurr + 1) { + i++; hcount++; hcurr++; + } + TRY (hdf5_select_hyperslab_of_dataspace ( + dspace_id, + seloper, + &hstart, &hstride, &hcount, + NULL)); + seloper = H5S_SELECT_OR; + } + // TODO add throttle + + TRY (h5priv_write_dataset_by_name_id( + m->f, + m->mesh_gid, + &m->dsinfo_elems, + dset_id, + mspace_id, + dspace_id, + glb_elems)); + + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__num_elems__", + H5T_NATIVE_INT64, + m->num_glb_elems, + m->num_leaf_levels, + 1)); + + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__num_leaf_elems__", + H5T_NATIVE_INT64, + m->num_glb_leaf_elems, + m->num_leaf_levels, + 1)); + + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__num_leaf_levels__", + H5T_NATIVE_INT16, + &m->num_leaf_levels, + 1, + 1)); + + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__is_chunked__", + H5T_NATIVE_INT16, + &m->is_chunked, + 1, + 1)); + + // release mem + TRY (h5_free (glb_elems)); + TRY (h5_free (chk_list)); + + TRY (hdf5_close_dataspace (dspace_id)); + TRY (hdf5_close_dataspace (mspace_id)); + TRY (hdf5_close_dataset (dset_id)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +hid_t +set_chk_memspace ( + h5t_mesh_t* m, + hid_t dataspace_id) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, dataspace_id=%d", m, dataspace_id); + hid_t mspace_id; + TRY (mspace_id = hdf5_create_dataspace (1, m->dsinfo_chunks.dims, NULL)); + + hsize_t hstride = 1; + hsize_t hstart = 0; + hsize_t hcount = m->dsinfo_chunks.dims[0]; + if (m->f->myproc == 0) { + TRY (hdf5_select_hyperslab_of_dataspace ( + mspace_id, + H5S_SELECT_SET, + &hstart, &hstride, &hcount, + NULL)); + } else { + hcount = 0; + TRY (hdf5_select_hyperslab_of_dataspace ( + mspace_id, + H5S_SELECT_SET, + &hstart, &hstride, &hcount, + NULL)); + } + H5_PRIV_FUNC_RETURN (mspace_id); +} + +hid_t +set_chk_diskspace ( + h5t_mesh_t* m, + hid_t dspace_id + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, dataspace_id=%d", m, dspace_id); + + H5Sset_extent_simple(dspace_id, 1,m->dsinfo_chunks.dims, NULL); //TODO WRITE WRAPPER + + hsize_t hstride = 1; + hsize_t hstart = 0; + hsize_t hcount = m->dsinfo_chunks.dims[0]; + if (m->f->myproc == 0) { + TRY (hdf5_select_hyperslab_of_dataspace ( + dspace_id, + H5S_SELECT_SET, + &hstart, &hstride, &hcount, + NULL)); + } else { + hcount = 0; + TRY (hdf5_select_hyperslab_of_dataspace ( + dspace_id, + H5S_SELECT_SET, + &hstart, &hstride, &hcount, + NULL)); + } + H5_PRIV_FUNC_RETURN (dspace_id); +} + +h5_err_t +write_chunks ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + m->dsinfo_chunks.dims[0] = m->chunks->num_alloc; + + + TRY (h5priv_write_dataset_by_name ( + m, + m->f, + m->mesh_gid, + &m->dsinfo_chunks, + set_chk_memspace, + set_chk_diskspace, + m->chunks->chunks)); + + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__num_chunks__", + H5_INT32_T, + &m->chunks->num_alloc, + 1, + 1)); + + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__num_chk_levels__", + H5_INT16_T, // WARNING should maybe be uint + &m->chunks->num_levels, + 1, + 1)); + + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__num_chk_p_level__", + H5_INT32_T, + m->chunks->num_chunks_p_level, + m->chunks->num_levels, + 1)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +hid_t +set_oct_memspace ( + h5t_mesh_t* m, + hid_t dataspace_id) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, dataspace_id=%d", m, dataspace_id); + hid_t mspace_id; + TRY (mspace_id = hdf5_create_dataspace (1, m->dsinfo_octree.dims, NULL)); + + hsize_t hstride = 1; + hsize_t hstart = 0; + hsize_t hcount = m->dsinfo_octree.dims[0]; + if (m->f->myproc == 0) { + TRY (hdf5_select_hyperslab_of_dataspace ( + mspace_id, + H5S_SELECT_SET, + &hstart, &hstride, &hcount, + NULL)); + } else { + hcount = 0; + TRY (hdf5_select_hyperslab_of_dataspace ( + mspace_id, + H5S_SELECT_SET, + &hstart, &hstride, &hcount, + NULL)); + } + H5_PRIV_FUNC_RETURN (mspace_id); +} + +hid_t +set_oct_diskspace ( + h5t_mesh_t* m, + hid_t dspace_id + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, dataspace_id=%d", m, dspace_id); + + H5Sset_extent_simple(dspace_id, 1,m->dsinfo_octree.dims, NULL); //TODO WRITE WRAPPER + + hsize_t hstride = 1; + hsize_t hstart = 0; + hsize_t hcount = m->dsinfo_octree.dims[0]; + if (m->f->myproc == 0) { + TRY (hdf5_select_hyperslab_of_dataspace ( + dspace_id, + H5S_SELECT_SET, + &hstart, &hstride, &hcount, + NULL)); + } else { + hcount = 0; + TRY (hdf5_select_hyperslab_of_dataspace ( + dspace_id, + H5S_SELECT_SET, + &hstart, &hstride, &hcount, + NULL)); + } + H5_PRIV_FUNC_RETURN (dspace_id); +} + +h5_err_t +write_octree ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + + TRY (H5t_update_internal (m->octree)); + TRY (H5t_update_userdata (m->octree)); + + m->dsinfo_octree.dims[0] = m->octree->current_oct_idx + 1; + + TRY (h5priv_write_dataset_by_name ( + m, + m->f, + m->mesh_gid, + &m->dsinfo_octree, + set_oct_memspace, + set_oct_diskspace, + m->octree->octants)); + + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__curr_oct_idx__", + H5_INT32_T, + &m->octree->current_oct_idx, + 1, + 1)); + + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__oct_maxpoints__", + H5_INT32_T, + &m->octree->maxpoints, + 1, + 1)); + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__oct_size_userdata__", + H5_INT32_T, + &m->octree->size_userdata, + 1, + 1)); + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__oct_bounding_box__", + H5_FLOAT64_T, + m->octree->bounding_box, + 6, + 1)); + + if (m->octree->size_userdata > 0) { + m->dsinfo_userdata.dims[0] = m->octree->current_oct_idx + 1; + + TRY (h5priv_write_dataset_by_name ( + m, + m->f, + m->mesh_gid, + &m->dsinfo_userdata, + set_oct_memspace, // should work fine same size as octree + set_oct_diskspace, + m->octree->userdata)); + + + } + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + +hid_t +set_weight_memspace ( + h5t_mesh_t* m, + hid_t dataspace_id) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, dataspace_id=%d", m, dataspace_id); + hid_t mspace_id; + TRY (mspace_id = hdf5_create_dataspace (1, m->dsinfo_weights.dims, NULL)); + + hsize_t hstride = 1; + hsize_t hstart = 0; + hsize_t hcount = m->dsinfo_weights.dims[0]; + if (m->f->myproc == 0) { + TRY (hdf5_select_hyperslab_of_dataspace ( + mspace_id, + H5S_SELECT_SET, + &hstart, &hstride, &hcount, + NULL)); + } else { + hcount = 0; + TRY (hdf5_select_hyperslab_of_dataspace ( + mspace_id, + H5S_SELECT_SET, + &hstart, &hstride, &hcount, + NULL)); + } + H5_PRIV_FUNC_RETURN (mspace_id); +} + +hid_t +set_weight_diskspace ( + h5t_mesh_t* m, + hid_t dspace_id + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, dataspace_id=%d", m, dspace_id); + + H5Sset_extent_simple(dspace_id, 1,m->dsinfo_weights.dims, NULL); //TODO WRITE WRAPPER + + hsize_t hstride = 1; + hsize_t hstart = 0; + hsize_t hcount = m->dsinfo_weights.dims[0]; + if (m->f->myproc == 0) { + TRY (hdf5_select_hyperslab_of_dataspace ( + dspace_id, + H5S_SELECT_SET, + &hstart, &hstride, &hcount, + NULL)); + } else { + hcount = 0; + TRY (hdf5_select_hyperslab_of_dataspace ( + dspace_id, + H5S_SELECT_SET, + &hstart, &hstride, &hcount, + NULL)); + } + H5_PRIV_FUNC_RETURN (dspace_id); +} + +/* + * weights is an array that stores the element weights. c weights per element with n elements, gives a size of c*n. + * where the weights of an element are stored contiguosly. i.e. first weight of second elem is at weights[c*1]. + */ +h5_err_t +write_weights ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + + m->dsinfo_weights.dims[0] = m->num_glb_elems[m->leaf_level] * m->num_weights; + + TRY (h5priv_write_dataset_by_name ( + m, + m->f, + m->mesh_gid, + &m->dsinfo_weights, + set_weight_memspace, + set_weight_diskspace, + m->weights)); + + TRY (h5priv_write_attrib ( + m->mesh_gid, + "__num_weights__", + H5_INT32_T, + &m->num_weights, + 1, + 1)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif +h5_err_t +h5tpriv_write_mesh ( + h5t_mesh_t* const m + ) { + H5_PRIV_API_ENTER (h5_err_t, "m=%p", m); + if (m->mesh_changed) { + if (m->is_chunked) { +#ifdef PARALLEL_IO + if (m->num_weights > 0) { + TRY (write_weights (m)); + } + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + TRY (write_chunks (m)); + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + TRY (write_octree (m)); + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + if (m->f->nprocs > 1) { + TRY (write_vertices_chk (m)); + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + TRY (write_elems_chk (m)); + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + } else { + TRY (write_vertices (m)); + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + TRY (write_elems (m)); + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + } +#endif + } else { + TRY (write_vertices (m)); + TRY (write_elems (m)); + } + + + + } + H5_PRIV_API_RETURN (H5_SUCCESS); +} +// ANCHOR WRITE +/* + Read vertices from file. If map is NULL, read *all* vertices otherwise the + vertices specified in the map. + */ +static h5_err_t +read_vertices ( + h5t_mesh_t* m, + h5_idxmap_t* map + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + hid_t dset_id; + TRY (dset_id = hdf5_open_dataset (m->mesh_gid, m->dsinfo_vertices.name)); + hid_t mspace_id = H5S_ALL; + hid_t dspace_id = H5S_ALL; + + if (map) { + m->num_loc_vertices[m->num_leaf_levels-1] = map->num_items; + m->last_stored_vid = m->num_loc_vertices[m->num_leaf_levels-1] - 1; + TRY (h5tpriv_alloc_loc_vertices (m, map->num_items)); + + // create memspace + hsize_t num_loc_vertices = map->num_items; + TRY (mspace_id = hdf5_create_dataspace(1, &num_loc_vertices, NULL)); + + // create diskspace and select subset + hsize_t num_glb_vertices = m->num_glb_vertices[m->num_leaf_levels-1]; + TRY (dspace_id = hdf5_create_dataspace (1, &num_glb_vertices, NULL)); + hsize_t hstride = 1; + H5S_seloper_t seloper = H5S_SELECT_SET; // first selection + for (hsize_t i = 0; i < map->num_items; i++) { + hsize_t hstart = map->items[i].glb_idx; + hsize_t hcount = 1; + while (map->items[i].glb_idx+1 == map->items[i+1].glb_idx && + i + 1 < map->num_items) {// WARNING check if +1 is correct here + i++; hcount++; + } + TRY (hdf5_select_hyperslab_of_dataspace ( + dspace_id, + seloper, + &hstart, &hstride, &hcount, + NULL)); + seloper = H5S_SELECT_OR; + } + } else { + size_t num_vertices = m->num_glb_vertices[m->num_leaf_levels-1]; + m->last_stored_vid = m->num_glb_vertices[m->num_leaf_levels-1] - 1; + TRY (h5tpriv_alloc_loc_vertices (m, num_vertices)); + } + +#if defined(WITH_PARALLEL_H5FED) + TRY (h5priv_start_throttle (m->f)); +#endif + + TRY (hdf5_read_dataset ( + dset_id, + m->dsinfo_vertices.type_id, + mspace_id, + dspace_id, + m->f->props->xfer_prop, + m->vertices)); +#if defined(WITH_PARALLEL_H5FED) + TRY (h5priv_end_throttle (m->f)); +#endif + TRY (hdf5_close_dataspace (dspace_id)); + TRY (hdf5_close_dataspace (mspace_id)); + TRY (hdf5_close_dataset (dset_id)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static h5_err_t +read_elems ( + h5t_mesh_t* const m, + h5_loc_idx_t start, + h5_loc_idx_t count, + h5_glb_elem_t* glb_elems + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, start=%lld, count=%lld", + m, (long long)start, (long long)count); + + hid_t dset_id; + TRY (dset_id = hdf5_open_dataset (m->mesh_gid, m->dsinfo_elems.name)); + hid_t mspace_id; + hsize_t hcount = (hsize_t)count; + TRY (mspace_id = hdf5_create_dataspace (1, &hcount, NULL)); + + hid_t dspace_id; + hsize_t hstart = (hsize_t)start; + hsize_t hstride = 1; + hsize_t num_glb_elems = m->num_glb_elems[m->num_leaf_levels-1]; + TRY (dspace_id = hdf5_create_dataspace (1, &num_glb_elems, NULL)); + TRY (hdf5_select_hyperslab_of_dataspace ( + dspace_id, + H5S_SELECT_SET, + &hstart, &hstride, &hcount, + NULL)); +#if 0 + // TODO DELETE from here +h5_glb_elem_t* glb_elems2 = glb_elems; + +#if NDEBUG == 0 +sleep (m->f->myproc*2); +for (int i = 0; i < num_glb_elems;i++) { + h5_debug ("\n" + "GLB ELEM\n idx: %d \n" + " parent_idx: %d \n" + " child_idx: %d \n" + " level_idx: %d \n" + " refinement: %d \n" + " flags: %d \n" + " indices: %d %d %d\n" + " neigh_indi: %d %d %d\n\n", + (int)glb_elems2[i].idx, + (int)glb_elems2[i].parent_idx, + (int)glb_elems2[i].child_idx, + (int)glb_elems2[i].level_idx, + (int)glb_elems2[i].refinement, + (int)glb_elems2[i].flags, + (int)((h5_glb_tri_t*)glb_elems2)[i].vertex_indices[0], + (int)((h5_glb_tri_t*)glb_elems2)[i].vertex_indices[1], + (int)((h5_glb_tri_t*)glb_elems2)[i].vertex_indices[2], + (int)((h5_glb_tri_t*)glb_elems2)[i].neighbor_indices[0], + (int)((h5_glb_tri_t*)glb_elems2)[i].neighbor_indices[1], + (int)((h5_glb_tri_t*)glb_elems2)[i].neighbor_indices[2]); +} + +#endif +#endif +// TODO END +#ifdef PARALLEL_IO + TRY (h5priv_start_throttle (m->f)); +#endif + + TRY (hdf5_read_dataset ( + dset_id, + m->dsinfo_elems.type_id, + mspace_id, + dspace_id, + m->f->props->xfer_prop, + glb_elems)); +#ifdef PARALLEL_IO + TRY (h5priv_end_throttle (m->f)); +#endif + + // TODO DELETE from here + +#if 0 +#if NDEBUG == 0 +sleep (m->f->myproc*2); +for (int i = 0; i < num_glb_elems;i++) { + h5_debug ("\n" + "GLB ELEM\n idx: %d \n" + " parent_idx: %d \n" + " child_idx: %d \n" + " level_idx: %d \n" + " refinement: %d \n" + " flags: %d \n" + " indices: %d %d %d\n" + " neigh_indi: %d %d %d\n\n", + (int)glb_elems2[i].idx, + (int)glb_elems2[i].parent_idx, + (int)glb_elems2[i].child_idx, + (int)glb_elems2[i].level_idx, + (int)glb_elems2[i].refinement, + (int)glb_elems2[i].flags, + (int)((h5_glb_tri_t*)glb_elems2)[i].vertex_indices[0], + (int)((h5_glb_tri_t*)glb_elems2)[i].vertex_indices[1], + (int)((h5_glb_tri_t*)glb_elems2)[i].vertex_indices[2], + (int)((h5_glb_tri_t*)glb_elems2)[i].neighbor_indices[0], + (int)((h5_glb_tri_t*)glb_elems2)[i].neighbor_indices[1], + (int)((h5_glb_tri_t*)glb_elems2)[i].neighbor_indices[2]); +} + +#endif +#endif +// TODO END + + TRY (hdf5_close_dataspace (dspace_id)); + TRY (hdf5_close_dataspace (mspace_id)); + TRY (hdf5_close_dataset (dset_id)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + + +#if defined(WITH_PARALLEL_H5FED) +// READ MESH PARALLEL +/* + Partition mesh via dual graph partitioning + + Step 1: Partiton dual graph of mesh, all procs have their global + cell data loaded. + Step 2: Handle ghost- and border cells + Step 3: Read vertices + */ +h5_err_t +part_kway ( + h5t_mesh_t* const m, + h5_glb_elem_t** glb_elems + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + /* + Step 1: + - read num cell/num procs cells + - call partitioner + - each proc must know the number of cells assigned to his + partition on foreign procs. + - send global cell data to right proc + */ + + // compute initial distribution of cells on all procs + int n = m->num_glb_elems[0] / m->f->nprocs; + int r = m->num_glb_elems[0] % m->f->nprocs; + + idx_t* vtxdist; + TRY (vtxdist = h5_calloc (m->f->nprocs+1, sizeof (*vtxdist))); + vtxdist[0] = 0; + h5_debug ("vtxdist[%d]: %d", 0, 0); + for (int i = 1; i < m->f->nprocs+1; i++) { + if (r > 0) { + vtxdist[i] = vtxdist[i-1] + n + 1; + r--; + } else { + vtxdist[i] = vtxdist[i-1] + n; + } + h5_debug ("vtxdist[%d]: %d", i, vtxdist[i]); + } + // read cells only + idx_t start = vtxdist[m->f->myproc]; + idx_t num_interior_elems = vtxdist[m->f->myproc+1] - start; + m->num_interior_elems[0] = m->num_interior_leaf_elems[0] = num_interior_elems; + + h5_glb_elem_t* elems; + TRY (elems = h5tpriv_alloc_glb_elems (m, num_interior_elems)); + + TRY (read_elems (m, start, num_interior_elems, elems)); + + + // setup input for ParMETIS + idx_t* xadj; + idx_t* adjncy; + idx_t* part; + TRY (xadj = h5_calloc (num_interior_elems, sizeof(*xadj))); + TRY (part = h5_calloc (num_interior_elems, sizeof(*part))); + // TODO: 4*num_interior_elems will work for meshes with up to 4 facets only! + TRY (adjncy = h5_calloc (4*num_interior_elems, sizeof(*adjncy))); + idx_t i, j; + int num_facets = h5tpriv_ref_elem_get_num_facets (m); + for (i = 0, j = 0; i < num_interior_elems; i++) { + h5_glb_idx_t* neighbors = h5tpriv_get_glb_elem_neighbors(m, elems, i); + xadj[i] = j; + h5_debug ("xadj[%d]: %d", i, j); + // for all facets + for (int l = 0; l < num_facets; l++) { + if (neighbors[l] < 0) continue; + adjncy[j] = neighbors[l]; + h5_debug ("adjncy[%d]: %d", j, adjncy[j]); + j++; + } + } + xadj[num_interior_elems] = j; + h5_debug ("xadj[%lld]: %d", (long long)num_interior_elems, j); + // now we can call the partitioner + idx_t wgtflag = 0; + idx_t numflag = 0; + idx_t ncon = 1; + idx_t nparts = m->f->nprocs; + real_t* tpwgts; + real_t* ubvec; + idx_t options[] = {1,127,42}; + idx_t edgecut; + h5_debug ("nparts: %d", nparts); + TRY (tpwgts = h5_calloc (nparts, sizeof(*tpwgts))); + TRY (ubvec = h5_calloc (nparts, sizeof(*ubvec))); + for (i = 0; i < nparts; i++) { + tpwgts[i] = 1.0 / (real_t)nparts; + ubvec[i] = 1.05; + } + int rc = ParMETIS_V3_PartKway ( + vtxdist, + xadj, + adjncy, + NULL, // vwgt + NULL, // adjwgt + &wgtflag, + &numflag, + &ncon, + &nparts, + tpwgts, + ubvec, + options, + &edgecut, + part, + &m->f->props.comm + ); + if (rc != METIS_OK) { + H5_PRIV_FUNC_LEAVE( + h5_error (H5_ERR, "ParMETIS failed")); + } + TRY (h5_free (vtxdist)); + TRY (h5_free (xadj)); + TRY (h5_free (adjncy)); + TRY (h5_free (tpwgts)); + TRY (h5_free (ubvec)); + +#if !defined(NDEBUG) + for (i = 0; i < num_interior_elems; i++) { + h5_debug ("part[%d]: %llu", i, (unsigned long long)part[i]); + } +#endif + /* + Now we know the partitioning, but the cells aren't distributed + accordingly. + + Eeach processor knows the number of cells he has to send the other + procs in the group, but still don't how many cells he will receive + from the other procs in the group. + */ + + // So, let's count the number of cells we have to send to each proc. + int* sendcounts; + int* recvcounts; + TRY (sendcounts = h5_calloc (nparts, sizeof(sendcounts[0]))); + TRY (recvcounts = h5_calloc (nparts, sizeof(recvcounts[0]))); + for (i = 0; i < num_interior_elems; i++) { + sendcounts[part[i]]++; + } + // send these numbers to according procs + TRY (h5priv_mpi_alltoall ( + sendcounts, 1, MPI_INT, + recvcounts, 1, MPI_INT, + m->f->props.comm)); + + for (i = 0; i < nparts; i++) { + h5_debug ("sendcounts[%d]: %d", i, sendcounts[i]); + h5_debug ("recvcounts[%d]: %d", i, recvcounts[i]); + } + /* + next step is to scatter the cells to their procs + via an all-to-all communication: + - allocate and setup send buffer + - allocate and setup recv buffer + - setup MPI data type + - scatter all-to-all + */ + + // allocate and initialize send buffer num_interior_elems*sizeof(cell) + h5_glb_elem_t* sendbuf; + TRY (sendbuf = h5tpriv_alloc_glb_elems (m, num_interior_elems)); + int* senddispls; + TRY (senddispls = h5_calloc (m->f->nprocs, sizeof (senddispls[0]))); + + senddispls[0] = 0; + for (i = 0; i < m->f->nprocs-1; i++) { + senddispls[i+1] = senddispls[i] + sendcounts[i]; + sendcounts[i] = 0; + } + sendcounts[i] = 0; + for (i = 0; i < num_interior_elems; i++) { + size_t sendidx = senddispls[part[i]] + sendcounts[part[i]]; + h5tpriv_copy_glb_elems ( + m, + sendbuf, sendidx, + elems, i, 1); + sendcounts[part[i]]++; + } + for (i = 0; i < num_interior_elems; i++) { + h5_debug ("sendbuf[%d]: %lld", i, h5tpriv_get_glb_elem_idx (m, sendbuf, i)); + } + TRY (h5_free (part)); + + // allocate and initialize recv buffer + int* recvdispls; + recvdispls = h5_calloc (m->f->nprocs, sizeof (recvdispls[0])); + recvdispls[0] = 0; + for (i = 0; i < m->f->nprocs-1; i++) { + recvdispls[i+1] = recvdispls[i] + recvcounts[i]; + } + num_interior_elems = recvdispls[i] + recvcounts[i]; + h5_glb_elem_t* recvbuf; + TRY (recvbuf = h5tpriv_alloc_glb_elems (m, num_interior_elems)); + // scatter elems all to all + MPI_Datatype type = h5tpriv_get_mpi_type_of_glb_elem (m); + TRY (h5priv_mpi_alltoallv ( + sendbuf, sendcounts, senddispls, type, + recvbuf, recvcounts, recvdispls, type, + m->f->props.comm)); + for (i = 0; i < num_interior_elems; i++) { + h5_debug ("global cell ID[%d]: %lld", + i, h5tpriv_get_glb_elem_idx (m, recvbuf, i)); + } + TRY (h5_free (sendbuf)); + TRY (h5_free (sendcounts)); + TRY (h5_free (senddispls)); + TRY (h5_free (recvcounts)); + TRY (h5_free (recvdispls)); + + TRY (h5_free (elems)); + *glb_elems = recvbuf; + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + +/* + exchange ghost cells: + idea: send my ghost cells to all procs + 1. compute ghost cells + 2. allgather ghost cell IDs: each proc knows the ghost cell IDs of all procs + 3. compute number of border cells to scatter to each proc + 4. scatter these numbers + 5. build array with (border)cells to scatter (note: we may have to scatter + the same cell to multiple procs) + 6. scatter border cells with alltoallv + */ +h5_err_t +exchange_ghost_cells ( + h5t_mesh_t* const m, + h5_glb_elem_t* glb_elems, + h5_glb_elem_t** ghost_elems, + size_t* num_ghost_elems + ) { + H5_PRIV_API_ENTER (h5_err_t, "m=%p, ghost_elems=%p", m, ghost_elems); + int* sendcounts; + int* senddispls; + int* recvcounts; + int* recvdispls; + int nprocs = m->f->nprocs; + TRY (sendcounts = h5_calloc (nprocs, sizeof(*sendcounts))); + TRY (senddispls = h5_calloc (nprocs, sizeof(*senddispls))); + TRY (recvcounts = h5_calloc (nprocs, sizeof(*recvcounts))); + TRY (recvdispls = h5_calloc (nprocs, sizeof(*recvdispls))); + + // determine my ghost cells + h5_glb_idxlist_t* loc_ghostcell_ids = NULL; + int num_facets = h5tpriv_ref_elem_get_num_facets (m); + for (int i = 0; i < m->num_interior_elems[0]; i++) { + h5_glb_idx_t* neighbors = h5tpriv_get_glb_elem_neighbors(m, glb_elems, i); + for (int facet = 0; facet < num_facets; facet++) { + if (neighbors[facet] == -1) { + // geometric boundary + continue; + } + if (h5priv_search_idxmap (&m->map_elem_g2l, neighbors[facet]) >= 0) { + // neighbor is local + continue; + } + // neighbor is *not* local + TRY (h5priv_search_in_glb_idxlist (&loc_ghostcell_ids, neighbors[facet])); + h5_debug ("ghost cell: %lld", neighbors[facet]); + } + } + // allgather number of ghost cells + int* num_ghostcells; + TRY (num_ghostcells = h5_calloc (nprocs, sizeof(num_ghostcells[0]))); + TRY (mpi_allgather (&loc_ghostcell_ids->num_items, 1, MPI_INT, + num_ghostcells, 1, MPI_INT, m->f->props.comm)); + for (int i = 0; i < nprocs; i++) { + h5_debug ("num_ghostcells[%d] = %d", i, num_ghostcells[i]); + } + + // allgather ghost cell IDs + int num_ghostcells_total = num_ghostcells[0]; + recvdispls[0] = 0; + for (int i = 1; i < nprocs; i++) { + recvdispls[i] = num_ghostcells_total; + num_ghostcells_total += num_ghostcells[i]; + } + h5_glb_id_t* ghostcells; + TRY (ghostcells = h5_calloc (num_ghostcells_total, sizeof(*ghostcells))); + TRY (mpi_allgatherv ( + loc_ghostcell_ids->items, (int)loc_ghostcell_ids->num_items, + MPI_LONG_LONG, + ghostcells, num_ghostcells, recvdispls, + MPI_LONG_LONG, + m->f->props.comm)); + + for (int i = 0; i < num_ghostcells_total; i++) { + h5_debug ("ghostcells[%d] = %lld", i, ghostcells[i]); + } + + // scatter my border cells + // - count and collect border cells we have to scatter + h5_loc_idxlist_t** belem_lists; + TRY (belem_lists = h5_calloc (nprocs, sizeof (*belem_lists))); + h5_loc_idx_t num_elems_to_scatter_total = 0; + for (int proc = 0; proc < nprocs; proc++) { + h5_loc_idxlist_t** list = &belem_lists[proc]; + h5_loc_idx_t last = recvdispls[proc] + num_ghostcells[proc] - 1; + for (int i = recvdispls[proc]; i <= last; i++) { + // is cell with ID local? + h5_loc_idx_t idx; + idx = h5priv_search_idxmap (&m->map_elem_g2l, ghostcells[i]); + if (idx >= 0) { + // yes: we have to send this cell to proc + // add to collection + TRY (h5priv_insert_into_loc_idxlist (list, idx, -1)); + num_elems_to_scatter_total++; + } + } + } + TRY (h5_free (num_ghostcells)); + TRY (h5_free (ghostcells)); + + // - allocate memory for border cells we have to scatter + h5_glb_elem_t* sendbuf; + TRY (sendbuf = h5tpriv_alloc_glb_elems (m, num_elems_to_scatter_total)); + + // - setup send buffer + for (int sendidx = 0, proc = 0; proc < nprocs; proc++) { + h5_loc_idxlist_t* list = belem_lists[proc]; + if (list) { + sendcounts[proc] = list->num_items; + senddispls[proc] = sendidx; + for (size_t i = 0; i < list->num_items; i++, sendidx++) { + // copy glb cell at list->item[i] to sendbuf + h5tpriv_copy_glb_elems ( + m, + sendbuf, sendidx, + glb_elems, + list->items[i], + 1); + } + TRY (h5_free (list)); + } else { // nothing to to for this proc + sendcounts[proc] = 0; + senddispls[proc] = sendidx; + } + } + TRY (h5_free (belem_lists)); + + // - scatter send counts + TRY (h5priv_mpi_alltoall ( + sendcounts, 1, MPI_INT, + recvcounts, 1, MPI_INT, + m->f->props.comm)); + + // compute receive displacements and number of local ghost cells + recvdispls[0] = 0; + for (int proc = 0; proc < nprocs-1; proc++) { + recvdispls[proc+1] = recvdispls[proc] + recvcounts[proc]; + } + int num_loc_ghost_elems = recvdispls[nprocs-1] + recvcounts[nprocs-1]; + + // - scatter ghost cells alltoall + h5_glb_elem_t* recvbuf; + TRY (recvbuf = h5tpriv_alloc_glb_elems (m, num_loc_ghost_elems)); + MPI_Datatype type = h5tpriv_get_mpi_type_of_glb_elem (m); + + TRY (h5priv_mpi_alltoallv ( + sendbuf, sendcounts, senddispls, type, + recvbuf, recvcounts, recvdispls, type, + m->f->props.comm)); + + for (int i = 0; i < num_loc_ghost_elems; i++) { + h5_debug ("global ghost cell ID[%d]: %lld", + i, h5tpriv_get_glb_elem_idx (m, recvbuf, i)); + } + TRY (h5_free (sendbuf)); + + TRY (h5_free (sendcounts)); + TRY (h5_free (senddispls)); + TRY (h5_free (recvcounts)); + TRY (h5_free (recvdispls)); + + *ghost_elems = recvbuf; + *num_ghost_elems = num_loc_ghost_elems; + H5_PRIV_API_RETURN (H5_SUCCESS); +} + + +h5_err_t +h5tpriv_read_mesh ( + h5t_mesh_t* const m + ) { + H5_PRIV_API_ENTER (h5_err_t, "m=%p", m); + h5_glb_elem_t* glb_elems; + TRY (part_kway (m, &glb_elems)); + h5_loc_idx_t num_interior_elems = m->num_interior_elems[0]; + + // add interior elements to global -> local index map + TRY (h5tpriv_init_map_elem_g2l (m, glb_elems, num_interior_elems)); + + // gather ghost cells + h5_glb_elem_t* ghost_elems; + size_t num_ghost_elems; + TRY (exchange_ghost_cells (m, glb_elems, &ghost_elems, &num_ghost_elems)); + m->num_ghost_elems[0] = num_ghost_elems; + + // add ghost cells to global -> local index map + TRY (h5tpriv_init_map_elem_g2l (m, ghost_elems, num_ghost_elems)); + + // define local indices for all vertices of all local elements + size_t size = num_interior_elems+num_ghost_elems; + TRY (h5priv_new_idxmap (&m->map_vertex_g2l, size+128)); + + h5_idxmap_t* map = &m->map_vertex_g2l; + + /* for the time being we use the hash table only for a fast test + whether a global index has already been added to the map or not. */ + h5_hashtable_t htab; + TRY (h5priv_hcreate ((size << 2) / 3, &htab, + hidxmap_cmp, hidxmap_compute_hval, NULL)); + + int num_vertices = h5tpriv_ref_elem_get_num_vertices (m); + for (size_t idx = 0; idx < num_interior_elems; idx++) { + h5_glb_idx_t* vertices = h5tpriv_get_glb_elem_vertices (m, glb_elems, idx); + for (int i = 0; i < num_vertices; i++) { + // add index temporarly to map ... + map->items[map->num_items] = (h5_idxmap_el_t) {vertices[i], 0}; + // ... and check whether it has already been added + h5_idxmap_el_t* retval; + h5priv_hsearch (&map->items[map->num_items], + H5_ENTER, (void**)&retval, &htab); + if (retval == &map->items[map->num_items]) { + // new entry in hash table thus in map + map->num_items++; + } + } + } + // same for ghost cells + for (size_t idx = 0; idx < num_ghost_elems; idx++) { + h5_glb_idx_t* vertices = h5tpriv_get_glb_elem_vertices (m, ghost_elems, idx); + for (int i = 0; i < num_vertices; i++) { + // add index temporarly to map ... + map->items[map->num_items] = (h5_idxmap_el_t) {vertices[i], 0}; + // ... and check whether it has already been added + h5_idxmap_el_t* retval; + h5priv_hsearch (&map->items[map->num_items], + H5_ENTER, (void**)&retval, &htab); + if (retval == &map->items[map->num_items]) { + // new entry in hash table thus in map + map->num_items++; + } + } + } + TRY (h5priv_hdestroy (&htab)); + h5priv_sort_idxmap (map); + for (h5_loc_idx_t i = 0; i < map->num_items; i++) { + map->items[i].loc_idx = i; + } + TRY (read_vertices (m, map)); + + TRY (h5tpriv_alloc_loc_elems (m, 0, num_interior_elems+num_ghost_elems)); + m->num_loaded_levels = 1; + + TRY (h5tpriv_init_loc_elems_struct (m, glb_elems, 0, num_interior_elems, 0)); + TRY (h5tpriv_init_loc_elems_struct (m, ghost_elems, num_interior_elems, num_ghost_elems, H5_GHOST_ENTITY)); + + TRY (h5_free (glb_elems)); + TRY (h5_free (ghost_elems)); + + TRY (h5tpriv_init_elem_flags (m, 0, num_interior_elems+num_ghost_elems)); + + TRY (h5tpriv_update_internal_structs (m, 0)); + H5_PRIV_API_RETURN (H5_SUCCESS); +} +#else + +// THE SERIAL VERSION ... +h5_err_t +h5tpriv_read_mesh ( + h5t_mesh_t* const m + ) { + H5_PRIV_API_ENTER (h5_err_t, "m=%p", m); + // local and global counts are identical in serial case + for (size_t lvl = 0; lvl < m->num_leaf_levels; lvl++) { + m->num_loc_vertices[lvl] = m->num_glb_vertices[lvl]; + m->num_interior_elems[lvl] = m->num_glb_elems[lvl]; + m->num_interior_leaf_elems[lvl] = m->num_glb_leaf_elems[lvl]; + } + + TRY (read_vertices (m, NULL)); + TRY (h5tpriv_rebuild_map_vertex_g2l (m, 0, m->num_leaf_levels-1)); + + h5_loc_idx_t num_interior_elems = m->num_interior_elems[m->num_leaf_levels-1]; + h5_glb_elem_t* glb_elems; + TRY (glb_elems = h5tpriv_alloc_glb_elems (m, num_interior_elems)); + TRY (read_elems (m, 0, num_interior_elems, glb_elems)); + TRY (h5tpriv_alloc_loc_elems (m, 0, num_interior_elems)); + m->num_loaded_levels = m->num_leaf_levels; + + TRY (h5tpriv_init_map_elem_g2l (m, glb_elems, num_interior_elems)); + TRY (h5tpriv_init_loc_elems_struct (m, glb_elems, 0, num_interior_elems, 0, NULL)); + TRY (h5tpriv_update_internal_structs (m, 0)); + TRY (h5tpriv_init_elem_flags (m, 0, num_interior_elems)); + TRY (h5_free (glb_elems)); + + H5_PRIV_API_RETURN (H5_SUCCESS); +} +#endif +#ifdef PARALLEL_IO +static h5_err_t +read_octree ( + h5t_mesh_t* m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + hid_t dset_id, dset_id2; + TRY (dset_id = hdf5_open_dataset (m->mesh_gid, m->dsinfo_octree.name)); + hid_t mspace_id = H5S_ALL; + hid_t dspace_id = H5S_ALL; + + + int oct_size = -1; + int maxpoints = -1; + int size_userdata = -1; + h5_float64_t bounding_box[6]; + TRY (h5priv_read_attrib ( + m->mesh_gid, + "__curr_oct_idx__", + H5_INT32_T, + &oct_size)); + TRY (h5priv_read_attrib ( + m->mesh_gid, + "__oct_maxpoints__", + H5_INT32_T, + &maxpoints)); + TRY (h5priv_read_attrib ( + m->mesh_gid, + "__oct_size_userdata__", + H5_INT32_T, + &size_userdata)); + TRY (h5priv_read_attrib ( + m->mesh_gid, + "__oct_bounding_box__", + H5_FLOAT64_T, + bounding_box)) + h5t_octant_t* octants; + h5t_oct_userdata_t* userdata; + TRY (H5t_read_octree ( + &m->octree, + oct_size, + size_userdata, + maxpoints, + &octants, + (void **) &userdata, + m->f->props->comm)); + TRY (H5t_set_bounding_box (m->octree, bounding_box)); + TRY (h5priv_start_throttle (m->f)); + + TRY (hdf5_read_dataset ( + dset_id, + m->dsinfo_octree.type_id, + mspace_id, + dspace_id, + m->f->props->xfer_prop, + octants)); + + if (size_userdata > 0) { + TRY (dset_id2 = hdf5_open_dataset (m->mesh_gid, m->dsinfo_userdata.name)); + TRY (hdf5_read_dataset ( + dset_id2, + m->dsinfo_userdata.type_id, + mspace_id, + dspace_id, + m->f->props->xfer_prop, + userdata)); + TRY (hdf5_close_dataset (dset_id2)); + } + TRY (h5priv_end_throttle (m->f)); + + + TRY (hdf5_close_dataspace (dspace_id)); + TRY (hdf5_close_dataspace (mspace_id)); + TRY (hdf5_close_dataset (dset_id)); + + + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +static h5_err_t +read_weights ( + h5t_mesh_t* m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + hid_t dset_id; + TRY (dset_id = hdf5_open_dataset (m->mesh_gid, m->dsinfo_weights.name)); + hid_t mspace_id = H5S_ALL; + hid_t dspace_id = H5S_ALL; + + + TRY (h5priv_read_attrib ( + m->mesh_gid, + "__num_weights__", + H5_INT32_T, + &m->num_weights)); + TRY (m->weights = h5_calloc (m->num_weights * m->num_glb_elems[m->num_leaf_levels-1], sizeof (*m->weights))); + if (m->num_weights < 1) { + m->weights = NULL; + } + TRY (h5priv_start_throttle (m->f)); + + TRY (hdf5_read_dataset ( + dset_id, + m->dsinfo_weights.type_id, + mspace_id, + dspace_id, + m->f->props->xfer_prop, + m->weights)); + TRY (h5priv_end_throttle (m->f)); + + // check that weights are > 0 + for (h5_glb_idx_t i = 0; i < m->num_weights * m->num_glb_elems[m->num_leaf_levels-1]; i++) { + if (m->weights[i] < 1) { + h5_debug ("Warning: weight %d from elem %lld was %d ", (int) i%m->num_weights, (long long int) i/m->num_weights, m->weights[i]); + m->weights[i] = 1; + + } + } + + TRY (hdf5_close_dataspace (dspace_id)); + TRY (hdf5_close_dataspace (mspace_id)); + TRY (hdf5_close_dataset (dset_id)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static h5_err_t +read_chunks ( + h5t_mesh_t* m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + hid_t dset_id; + TRY (dset_id = hdf5_open_dataset (m->mesh_gid, m->dsinfo_chunks.name)); + hid_t mspace_id = H5S_ALL; + hid_t dspace_id = H5S_ALL; + + TRY (m->chunks = h5_calloc (1, sizeof (*m->chunks))); + TRY (h5priv_read_attrib ( + m->mesh_gid, + "__num_chunks__", + H5_INT32_T, + &m->chunks->num_alloc)); + m->chunks->curr_idx = m->chunks->num_alloc -1; + TRY (h5priv_read_attrib ( + m->mesh_gid, + "__num_chk_levels__", + H5_INT16_T, + &m->chunks->num_levels)); + + TRY (m->chunks->num_chunks_p_level = h5_calloc (m->chunks->num_levels, sizeof (*m->chunks->num_chunks_p_level))); + + TRY (h5priv_read_attrib ( + m->mesh_gid, + "__num_chk_p_level__", + H5_INT32_T, + m->chunks->num_chunks_p_level)); + TRY (m->chunks->chunks = h5_calloc (m->chunks->num_alloc, sizeof (*m->chunks->chunks))); + + TRY (h5priv_start_throttle (m->f)); + + TRY (hdf5_read_dataset ( + dset_id, + m->dsinfo_chunks.type_id, + mspace_id, + dspace_id, + m->f->props->xfer_prop, + m->chunks->chunks)); + TRY (h5priv_end_throttle (m->f)); + + + TRY (hdf5_close_dataspace (dspace_id)); + TRY (hdf5_close_dataspace (mspace_id)); + TRY (hdf5_close_dataset (dset_id)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + * get weights of octant (i.e. of all elements that belong to a chunk that belongs to the octant or its parents) + * for parent octants a factor is used. therefore the weight of an octant is divided equally onto it's children + */ + +static h5_err_t +get_weights_of_octant ( + h5t_mesh_t* const m, + h5t_octree_t* octree, + h5_oct_idx_t oct_idx, + double factor, + idx_t* weights + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, octree=%p, oct_idx=%d, factor=%4.4f, weights=%p", + m, octree, oct_idx, factor, weights); + + h5t_oct_userdata_t* userdata = NULL; + + TRY (H5t_get_userdata_r (octree, oct_idx, (void**) &userdata)); + for (int i = 0; i < MAX_CHUNKS_PER_OCTANT; i++) { // iterate through all chunks in octant + if (userdata->idx[i] != -1) { + h5_chk_idx_t chk_idx = userdata->idx[i]; + h5_glb_idx_t first_elem = m->chunks->chunks[chk_idx].elem; + h5_glb_idx_t num_elems = m->chunks->chunks[chk_idx].num_elems; + // iterate through all elements in chunk + for (h5_glb_idx_t j = first_elem; j < first_elem + num_elems; j++) { + for (h5_weight_t k = 0; k < m->num_weights; k++) { + weights[k] += (h5_weight_t) (m->weights[j * m->num_weights + k] * factor); + } + } + + } + } // add weights of parents proportionally + while ((oct_idx = H5t_get_parent (octree, oct_idx)) != -1) { + TRY (get_weights_of_octant (m, octree, oct_idx, factor/((double) NUM_OCTANTS), weights)); + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +calc_weights_oct_leaflevel ( + h5t_mesh_t* const m, + idx_t** weights, + h5_oct_idx_t** new_numbering, + h5_oct_idx_t* num_tot_leaf_oct + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, weights=%p, new_numbering=%p", m, weights, new_numbering); + int size = m->f->nprocs; + int rank = m->f->myproc; + + // get number of leaf octants + + TRY (*num_tot_leaf_oct = H5t_get_num_oct_leaflevel (m->octree)); + int counter = 0; + TRY (*new_numbering = h5_calloc (*num_tot_leaf_oct + 1 , sizeof (h5_oct_idx_t))); + + // get range per core + h5_oct_idx_t my_first_octant = -1; + h5_oct_idx_t num_leaf_octants = -1; + num_leaf_octants = *num_tot_leaf_oct / size; + if (rank < (*num_tot_leaf_oct % size)) { + num_leaf_octants++; + } + my_first_octant = (*num_tot_leaf_oct / size) * rank; + if (rank < (*num_tot_leaf_oct % size)) { + my_first_octant += rank; + } else { + my_first_octant += (*num_tot_leaf_oct % size); + } + // iterate through level and get weights + h5t_oct_iterator_t* iter = NULL; + TRY (H5t_init_oct_iterator (m->octree, &iter, m->leaf_level)); + for (int i = 0; i < my_first_octant; i++) { + TRY ((*new_numbering)[counter] = H5t_iterate_oct (iter)); + counter++; + } + TRY (*weights = h5_calloc (num_leaf_octants * m->num_weights, sizeof (**weights))); + idx_t* weights_p = *weights; + h5_oct_idx_t curr_oct_idx = -1; + for (int i = 0; i < num_leaf_octants; i++) { + TRY (curr_oct_idx = H5t_iterate_oct (iter)); + (*new_numbering)[counter] = curr_oct_idx; + counter++; + TRY (get_weights_of_octant (m, m->octree, curr_oct_idx, 1, &weights_p[i * m->num_weights])); + + // make sure weights are at least 1 + for (int j = 0;j < m->num_weights; j++) { + if (weights_p[i * m->num_weights + j] < 1) { + weights_p[i * m->num_weights + j] = 1; + } + } + } + while (((*new_numbering)[counter] = H5t_iterate_oct (iter)) != -1) { + counter++; + } + H5t_end_iterate_oct (iter); + + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t +distribute_octree_parmetis ( + h5t_mesh_t* const m, + idx_t* weights, + h5_oct_idx_t* new_numbering, + h5_oct_idx_t num_tot_leaf_oct + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, weights=%p, new_numbering=%p", m, weights, new_numbering); + + if (num_tot_leaf_oct < m->f->nprocs) { + h5_debug ("Number of leaf octants %d is smaller then number of procs %d ",num_tot_leaf_oct, m->f->nprocs); + assert (num_tot_leaf_oct > m->f->nprocs); + } + + // compute initial distribution of cells on all procs + int n = num_tot_leaf_oct / m->f->nprocs; + int r = num_tot_leaf_oct % m->f->nprocs; + + idx_t* vtxdist = NULL; + idx_t* glb_part = NULL; + + TRY (vtxdist = h5_calloc (m->f->nprocs+1, sizeof (*vtxdist))); + vtxdist[0] = 0; +#if !defined(NDEBUG) + if (h5_debug_level & (1<<5) ) { + h5_debug ("vtxdist[%d]: %d", 0, 0); + } +#endif + for (int i = 1; i < m->f->nprocs+1; i++) { + if (r > 0) { + vtxdist[i] = vtxdist[i-1] + n + 1; + r--; + } else { + vtxdist[i] = vtxdist[i-1] + n; + } +#if !defined(NDEBUG) + if (h5_debug_level & (1<<5) ) { + h5_debug ("vtxdist[%d]: %d", i, vtxdist[i]); + } +#endif + } + TRY (glb_part = h5_calloc (vtxdist[m->f->nprocs], sizeof(*glb_part))); + if (!dont_use_parmetis) { + // // read cells only + idx_t start = vtxdist[m->f->myproc]; + idx_t num_interior_oct = vtxdist[m->f->myproc+1] - start; + + + // setup input for ParMETIS + idx_t* xadj; + idx_t* adjncy; + idx_t* part; + TRY (xadj = h5_calloc (num_interior_oct + 1, sizeof(*xadj))); + TRY (part = h5_calloc (num_interior_oct, sizeof(*part))); + int num_alloc_adj = 4*6*num_interior_oct; + TRY (adjncy = h5_calloc (num_alloc_adj, sizeof(*adjncy))); + + h5_oct_idx_t* neighbors = NULL; + h5_oct_idx_t num_neigh; + h5_oct_idx_t* ancestor_of_neigh = NULL; + h5_oct_idx_t num_anc_of_neigh; + + // plot_octants (m->octree); + idx_t i; + idx_t counter = 0; + for (i = 0; i < num_interior_oct; i++) { + TRY (H5t_get_neighbors (m->octree, new_numbering[start + i], &neighbors, &num_neigh, &ancestor_of_neigh, &num_anc_of_neigh, 1, m->leaf_level)); + if (counter + num_neigh >= num_alloc_adj) { + adjncy = realloc (adjncy, (num_alloc_adj + counter + num_neigh) * sizeof(*adjncy)); // WARNING may alloc too much mem (minimal would be counter + num_neigh) + } + xadj[i+1] = xadj[i] + num_neigh; +#if !defined(NDEBUG) + if (h5_debug_level & (1<<5) ) { + h5_debug ("xadj[%d]: %d", i+1, xadj[i+1]); + } +#endif + for (int k = 0; k < num_neigh; k++) { + int found = 0; + for (int j = 0; j < num_tot_leaf_oct; j++) { + if (new_numbering[j] == neighbors[k]) { + adjncy[counter] = j; +#if !defined(NDEBUG) + if (h5_debug_level & (1<<5) ) { + h5_debug ("adjncy[%d]: %d", counter, adjncy[counter]); + } +#endif + counter++; + found = 1; + } + } + if (found == 0) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INTERNAL); + } + } + } + + + // now we can call the partitioner + idx_t wgtflag = 0; + idx_t numflag = 0; + idx_t ncon = 1; + idx_t* vwgt = NULL; + if (m->num_weights > 0) { + wgtflag = 2; + ncon = m->num_weights; + vwgt = weights; + } + + idx_t nparts = m->f->nprocs; + real_t* tpwgts; + real_t* ubvec; + idx_t options[] = {1,0,42}; + idx_t edgecut; + h5_debug ("nparts: %d", nparts); + TRY (tpwgts = h5_calloc (nparts * ncon, sizeof(*tpwgts))); + TRY (ubvec = h5_calloc (nparts * ncon, sizeof(*ubvec))); + for (i = 0; i < nparts * ncon; i++) { + tpwgts[i] = 1.0 / (real_t)nparts; + ubvec[i] = 1.05; + } + + + int rc = ParMETIS_V3_PartKway ( + vtxdist, + xadj, + adjncy, + vwgt, // vwgt vertex weights + NULL, // adjwgt + &wgtflag, + &numflag, + &ncon, // number of balance constraints + &nparts, + tpwgts, + ubvec, + options, + &edgecut, + part, + &m->f->props->comm + ); + if (rc != METIS_OK) { + H5_PRIV_FUNC_LEAVE( + h5_error (H5_ERR, "ParMETIS failed")); + } + + TRY (h5_free (xadj)); + TRY (h5_free (adjncy)); + TRY (h5_free (tpwgts)); + TRY (h5_free (ubvec)); + +#if !defined(NDEBUG) + if (h5_debug_level & (1<<5) ) { + for (i = 0; i < num_interior_oct; i++) { + h5_debug ("part[%d]: %llu", i, (unsigned long long)part[i]); + } + } +#endif + // instead of updating the whole octree, we just update the new procs locally + // therefore we need the glb_part array + int* recvcounts = NULL; + TRY (recvcounts = h5_calloc (m->f->nprocs, sizeof (*recvcounts))); + for (int i = 0; i < m->f->nprocs; i++) { + recvcounts[i] = vtxdist[i+1]-vtxdist[i]; + } + + TRY (h5priv_mpi_allgatherv (part, + num_interior_oct, + MPI_INT, + glb_part, + recvcounts, + vtxdist, + MPI_INT, + m->f->props->comm)); + TRY (h5_free (part)); + } + if (dont_use_parmetis == 1 ) { // not use parmetis and just distribute octants with morton ordering + int curr_proc = 0; + for (int i = 0; i < vtxdist[m->f->nprocs]; i++) { + while(i >= vtxdist[curr_proc +1]) { + curr_proc++; + } + glb_part[i] = curr_proc; + } + + } + if (dont_use_parmetis == 2) { // distribute geometrically in slices acc to preferred direction. + assert (preferred_direction > -1 && preferred_direction <3); + // calculate slices + h5_float64_t* bb = H5t_get_bounding_box(m->octree); + h5_float64_t glb_min = bb[preferred_direction]; + h5_float64_t glb_max = bb[preferred_direction + 3]; + h5_float64_t slice_length = (glb_max - glb_min) / (h5_float64_t)m->f->nprocs; + h5_float64_t newbb[6]; + // iterate through leave level octants and decide to whom they belong + // WARING this could be more efficient if every proc would take care of + // num_leaf_oct/nproc octants and exchange results + for (int i = 0; i < vtxdist[m->f->nprocs]; i++) { + h5_oct_idx_t oct_idx = new_numbering[i]; + + TRY (H5t_get_bounding_box_of_octant (m->octree, oct_idx, newbb)); + h5_float64_t loc_min = newbb[preferred_direction]; + h5_float64_t loc_max = newbb[preferred_direction + 3]; + h5_float64_t loc_mid = (loc_min + loc_max) / 2.0; + glb_part[i] = (int) ((loc_mid - glb_min)/slice_length); + +// int lower_slice = (int) ((loc_min-glb_min)/slice_length); +// int higher_slice = (int) ((loc_max-glb_min)/slice_length); +// if (!(lower_slice == higher_slice || lower_slice + 1 == higher_slice)) { +// printf (" glb_min %4.4f glb_max %4.4f slice_length %4.4f loc_min %4.4f loc_max %4.4f lower_slice %d higher_slice %d", +// glb_min, glb_max, slice_length, loc_min, loc_max, lower_slice, higher_slice); +// +// assert (lower_slice == higher_slice || lower_slice + 1 == higher_slice); +// +// } +// if (lower_slice == higher_slice) { +// glb_part[i] = lower_slice; +// } else if ( higher_slice *slice_length - (loc_min - glb_min) >= (loc_max-glb_min) - higher_slice *slice_length) { +// // belongs to lower_slice +// glb_part[i] = lower_slice; +// +// } else {// belongs to higher_slice +// glb_part[i] = higher_slice; +// } + + } + } + assert (dont_use_parmetis > -1 && dont_use_parmetis <3); + + for (int i = 0; i < vtxdist[m->f->nprocs]; i++) { + h5_oct_idx_t oct_idx = new_numbering[i]; + TRY (H5t_set_proc_int (m->octree, oct_idx, glb_part[i])); + h5_oct_idx_t parent = oct_idx; + while ((parent = H5t_get_parent (m->octree, parent)) != -1) { + if (H5t_get_children(m->octree, parent) == oct_idx) { + // oct_idx is the first children - so set the proc of the parent to the same as the oct_idx + TRY (H5t_set_proc_int (m->octree, parent, glb_part[i])); + oct_idx = parent; + } else { + // nothing further to do + break; + } + } + + } + + TRY (H5t_update_internal (m->octree)); //should not be necessary anymore but doesn't matter since it just checks if update is necessary + TRY (h5_free (vtxdist)); + + TRY (h5_free (glb_part)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +add_oct_children_to_list ( + h5t_mesh_t* const m, + h5_loc_idxlist_t** oct_list, + h5_oct_idx_t oct_idx) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p list=%p, oct_idx=%d", m, oct_list, oct_idx); + assert (oct_idx > 0); // otherwise we add the whole octree! + h5_oct_idx_t children = H5t_get_children (m->octree, oct_idx); + if (children == -1 ) { + H5_PRIV_FUNC_LEAVE (H5_SUCCESS); + } + // get siblings + h5_oct_idx_t sibling_idx = H5t_get_sibling (m->octree, children); + for (int i = 0; i < NUM_OCTANTS; i++) { + h5priv_search_in_loc_idxlist(oct_list,(h5_loc_idx_t) sibling_idx + i); + TRY (add_oct_children_to_list (m, oct_list,(h5_loc_idx_t) sibling_idx + i)); // TODO it may could be faster to do this + // is a second loop because adding elems just after each other could be beneficial -> maybe extend + // insert to multiple insert... + } + + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + +//h5_err_t +//h5tpriv_get_list_of_chunks_to_read ( +// h5t_mesh_t* const m, +// h5_chk_idx_t** list, +// int* counter +// ) { +// H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p list=%p, counter=%p", m, list, counter); +// +// int rank = m->f->myproc; +// int size_list = m->chunks->curr_idx + 1; +// TRY ( *list = h5_calloc (size_list + 1, sizeof (**list))); // +1 to be on save side for accesses +// *counter = 0; +// +// // go through octree level, get own chunks and parent chunks +// h5t_oct_iterator_t* iter = NULL; +// TRY (H5t_init_oct_iterator (m->octree, &iter, m->leaf_level)); +// +// h5_oct_idx_t oct_idx = -1; +// while ((oct_idx = H5t_iterate_oct (iter)) != -1) { +// if (H5t_get_proc (m->octree, oct_idx) == rank) { +// add_chunk_to_list (m, *list, counter, oct_idx); +// h5_oct_idx_t parent = oct_idx; +// // add parent chunks +// while ((parent = H5t_get_parent (m->octree, parent)) != -1) { +// add_chunk_to_list (m, *list, counter, parent); +// } +// h5_oct_idx_t* neigh = NULL; +// h5_oct_idx_t* anc = NULL; +// h5_oct_idx_t num_neigh = 0; +// h5_oct_idx_t num_anc = 0; +// +// // get neighboring chunks as well +// TRY (H5t_get_neighbors ( +// m->octree, +// oct_idx, +// &neigh, +// &num_neigh, +// &anc, +// &num_anc, +// 3, +// m->leaf_level)); +// for (int i = 0; i < num_neigh; i++) { +// add_chunk_to_list (m, *list, counter, neigh[i]); +// } +// for (int i = 0; i < num_anc; i++) { +// add_chunk_to_list (m, *list, counter, anc[i]); +// // TODO get all children of ancestor on level 1 and ad them as well +// } +// } +// } +// +// TRY (H5t_end_iterate_oct (iter)); +// if (size_list < *counter) { +// h5_debug ("Overflow of list_of_chunks"); +// H5_PRIV_FUNC_LEAVE (H5_ERR_INTERNAL); +// } +// qsort (*list, *counter, sizeof (**list), compare_chk_idx); +// H5_PRIV_FUNC_RETURN (H5_SUCCESS); +//} +/* + Idea: we need to get all octants that belong to this proc including all their parent and children. + (octants that dont have a userlevel should not be added) + This gives us a a domain per proc (which will probably already overlap somewhat). + Concerning the neighbors: we need to get all the neighbors (of the domain) on level 0 and all their children. + */ +h5_err_t +h5tpriv_get_list_of_chunks_to_read ( + h5t_mesh_t* const m, + h5_chk_idx_t** list, + int* counter + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p list=%p, counter=%p", m, list, counter); + int rank = m->f->myproc; + int size_list = m->chunks->curr_idx + 1; + TRY ( *list = h5_calloc (size_list + 1, sizeof (**list))); // +1 to be on save side for accesses + h5_loc_idxlist_t* loc_list = NULL; + TRY (h5priv_alloc_loc_idxlist (&loc_list, size_list+1)); + *counter = 0; + + //WARNING works only if oct_idx = loc_idx + h5_loc_idxlist_t* oct_list = NULL; + TRY (h5priv_alloc_loc_idxlist (&oct_list, H5t_get_num_octants (m->octree)* 2 /m->f->nprocs)); + // go through octree level, get own chunks and parent chunks + h5t_oct_iterator_t* iter = NULL; + for (int i = 0; i < m->num_leaf_levels; i++) { + TRY (H5t_init_oct_iterator (m->octree, &iter, i)); + + // get all octants that belong to this proc + h5_oct_idx_t oct_idx = -1; + while ((oct_idx = H5t_iterate_oct (iter)) != -1) { + if (H5t_get_proc (m->octree, oct_idx) == rank) { + h5priv_search_in_loc_idxlist(&oct_list, (h5_loc_idx_t)oct_idx); + h5_oct_idx_t parent = oct_idx; + // add parent chunks + while ((parent = H5t_get_parent (m->octree, parent)) != -1) { + h5_oct_idx_t parent_idx = -1; + if (H5t_get_userlevel(m->octree, parent) == 0) { + // check if there are any parents that still have a level. + parent_idx = parent; + while ((parent_idx = H5t_get_parent (m->octree, parent_idx)) != -1) { + if (H5t_get_userlevel(m->octree, parent) != 0) { + break; // parent_idx still has a level -> so need parent needs to be added + } + } + if (parent_idx == -1) { + break; // parent_idx is -1 so all parents don't have a level anymore -> don't add + } + } + if (parent_idx != -1) { + h5priv_search_in_loc_idxlist(&oct_list, (h5_loc_idx_t)parent); + } + } + // add children + TRY (add_oct_children_to_list (m, &oct_list, (h5_loc_idx_t)oct_idx)); + } + + } + } + TRY (H5t_end_iterate_oct (iter)); + // get all neighbors + //WARNING works only if oct_idx = loc_idx + h5_loc_idxlist_t* neigh_oct_list = NULL; + TRY (h5priv_alloc_loc_idxlist (&neigh_oct_list, H5t_get_num_octants (m->octree)* 2 /m->f->nprocs)); + h5_oct_idx_t* neigh = NULL; + h5_oct_idx_t* anc = NULL; + for (int i = 0; i < oct_list->num_items; i++) { + + h5_oct_idx_t num_neigh = 0; + h5_oct_idx_t num_anc = 0; + + if ((H5t_get_userlevel (m->octree,(h5_oct_idx_t) oct_list->items[i]) & 1) == 1) { + // get neighbors + TRY (H5t_get_neighbors ( + m->octree, + (h5_oct_idx_t) oct_list->items[i], + &neigh, + &num_neigh, + &anc, + &num_anc, + 3, + 0)); + } + // TODO avoid any that have no level themselfs and above! + for (int i = 0; i < num_neigh; i++) { + h5priv_search_in_loc_idxlist(&neigh_oct_list, (h5_loc_idx_t)neigh[i]); + // add children + TRY (add_oct_children_to_list (m, &neigh_oct_list, (h5_loc_idx_t)neigh[i])); + } +// for (int i = 0; i < num_anc; i++) { +// h5priv_search_in_loc_idxlist(&neigh_oct_list, anc[i]); +// // add children +// TRY (add_oct_children_to_list (m, &neigh_oct_list, anc[i])); +// } + // add octants to chunk_list + add_chunk_to_list (m, &loc_list,(h5_oct_idx_t) oct_list->items[i]); + } + // add neighbors to chunk_list + for (int i = 0; i < neigh_oct_list->num_items; i++) { + add_chunk_to_list (m, &loc_list,(h5_oct_idx_t) neigh_oct_list->items[i]); + } + + for (int i = 0; i < loc_list->num_items; i++) { + (*list)[i] = (h5_chk_idx_t) loc_list->items[i]; + } + *counter = loc_list->num_items; + h5priv_free_loc_idxlist(&loc_list); + + TRY (h5_free (neigh)); + TRY (h5_free (anc)); + TRY (h5priv_free_loc_idxlist (&oct_list)); + TRY (h5priv_free_loc_idxlist (&neigh_oct_list)); + if (size_list < *counter) { + h5_debug ("Overflow of list_of_chunks"); + H5_PRIV_FUNC_LEAVE (H5_ERR_INTERNAL); + } + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + * returns a list of processors for assigning proc to each element + */ + +h5_err_t +get_list_of_proc ( + h5t_mesh_t* const m, + h5_int32_t* my_procs, + h5_chk_idx_t* list, + int num_chunks + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, my_procs=%p, list=%p", m, my_procs, list); + int counter = 0; + for (int i = 0; i < num_chunks; i++) { + h5_glb_idx_t num = m->chunks->chunks[list[i]].num_elems; + int proc = H5t_get_proc(m->octree, m->chunks->chunks[list[i]].oct_idx); + for (int j = 0; j < num; j++) { + my_procs[counter] = proc; + counter++; + } + } + + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +// for (hsize_t i = 0; i < map->num_items; i++) { +// hsize_t hstart = map->items[i].glb_idx; +// hsize_t hcount = 1; +// while (map->items[i].glb_idx+1 == map->items[i+1].glb_idx && +// i < map->num_items) { +// i++; hcount++; +// } +// TRY (hdf5_select_hyperslab_of_dataspace ( +// dspace_id, +// seloper, +// &hstart, &hstride, &hcount, +// NULL)); +// seloper = H5S_SELECT_OR; +// } +h5_lvl_idx_t +get_level_of_chk_idx ( + h5t_mesh_t* const m, + h5_chk_idx_t chk_idx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, chk_idx=%d", m, chk_idx); + assert (chk_idx > -1); + int nbr_chunks = m->chunks->num_chunks_p_level[0]; + for (int i = 0; i < m->chunks->num_levels; i++) { + if (chk_idx < nbr_chunks) { + H5_PRIV_FUNC_LEAVE (i); + } else { + if (i+1 < m->chunks->num_levels) { + nbr_chunks += m->chunks->num_chunks_p_level[i + 1]; + } + } + } + H5_PRIV_FUNC_RETURN (-2); + // should be much simpler then that! +// // get oct_idx +// h5_oct_idx_t oct_idx = m->chunks->chunks[chk_idx].oct_idx; +// void* pointer; +// +// TRY (H5t_get_userdata_r (m->octree, oct_idx, &pointer)); //TRY gives unresolved?? +// h5t_oct_userdata_t* userdata = (h5t_oct_userdata_t*)pointer; +// int i = 0; +// for (; i < OCT_USERDATA_SIZE; i++) { +// if (userdata->idx[i] == chk_idx) { +// break; +// } +// } +// if (i >= OCT_USERDATA_SIZE) { +// H5_PRIV_FUNC_LEAVE ( +// h5_error (H5_ERR_INTERNAL, "Chunk %d should be in octant %d but it was not found", chk_idx, oct_idx)); +// } +// +// int position = 0; +// h5_oct_level_t usr_lvl = H5t_get_userlevel (m->octree, oct_idx); +// h5_lvl_idx_t level = -1; +// while (i >= 0) { +// while (position < OCT_USERLEV_LENGTH) { +// if ((usr_lvl & (1 << position)) == (1 << position)) { +// i--; +// break; +// } +// } +// position++; +// } +// +// if (i != -1 || position == OCT_USERLEV_LENGTH) { +// H5_PRIV_FUNC_LEAVE ( +// h5_error (H5_ERR_INTERNAL, "Userlevel in octant %d are not set correctly. Userlevel: %d", oct_idx, usr_lvl)); +// } else { +// level = position - 1; +// } + + +} + +h5_err_t +read_chunked_elements ( + h5t_mesh_t* const m, + h5_glb_elem_t** glb_elems, + h5_int32_t** my_procs + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + // find chunks to read + h5_chk_idx_t* list_of_chunks = NULL; + int num_interior_chunks = 0; + + TRY (h5tpriv_get_list_of_chunks_to_read (m, &list_of_chunks, &num_interior_chunks)); + + + for (int i = 0; i < num_interior_chunks; i++) { + // set number of vertices and elements + h5_lvl_idx_t level = get_level_of_chk_idx (m, list_of_chunks[i]); + assert (level > -1); + m->num_interior_elems[level] += m->chunks->chunks[list_of_chunks[i]].num_elems; + } + m->num_interior_leaf_elems[0] = m->num_interior_elems[0]; + for (int i = 1; i < m->num_leaf_levels; i++) { + m->num_interior_leaf_elems[i] = m->num_interior_leaf_elems[i-1] + + m->num_interior_elems[i] - + m->num_interior_elems[i] / h5tpriv_get_num_new_elems (m); + m->num_interior_elems[i] += m->num_interior_elems[i-1]; + } + int num_interior_elems = m->num_interior_elems[m->num_leaf_levels -1]; + + + TRY (*glb_elems = h5tpriv_alloc_glb_elems (m, num_interior_elems)); + + TRY (*my_procs = h5_calloc (num_interior_elems, sizeof (**my_procs))); + + // get list of proc to assign to each element + TRY (get_list_of_proc (m, *my_procs, list_of_chunks, num_interior_chunks)); + + hid_t dset_id; + TRY (dset_id = hdf5_open_dataset (m->mesh_gid, m->dsinfo_elems.name)); + hid_t mspace_id; + + // create memspace + hsize_t hcount = (hsize_t) num_interior_elems; + TRY (mspace_id = hdf5_create_dataspace (1, &hcount, NULL)); + + //create dspace + hid_t dspace_id; + H5S_seloper_t seloper = H5S_SELECT_SET; // first selection + hsize_t hstride = 1; + hsize_t num_glb_elems = m->num_glb_elems[m->num_leaf_levels-1]; + TRY (dspace_id = hdf5_create_dataspace (1, &num_glb_elems, NULL)); + hsize_t hstart = -1; + m->dsinfo_elems.dims[0] = num_interior_elems; + + for (hsize_t i = 0; i < num_interior_chunks; i++) { + hstart = (hsize_t)m->chunks->chunks[list_of_chunks[i]].elem; + hcount = (hsize_t)m->chunks->chunks[list_of_chunks[i]].num_elems; + while (i + 1 < num_interior_chunks && + hstart + hcount == m->chunks->chunks[list_of_chunks[i+1]].elem) { // WARNING make sure list has one free element in the back otherwise seg fault + hcount += (hsize_t)m->chunks->chunks[list_of_chunks[i+1]].num_elems; + i++; + } + TRY (hdf5_select_hyperslab_of_dataspace ( + dspace_id, + seloper, + &hstart, &hstride, &hcount, + NULL)); + seloper = H5S_SELECT_OR; + } + +#ifdef PARALLEL_IO + TRY (h5priv_start_throttle (m->f)); +#endif + TRY (hdf5_read_dataset ( + dset_id, + m->dsinfo_elems.type_id, + mspace_id, + dspace_id, + m->f->props->xfer_prop, + *glb_elems)); +#ifdef PARALLEL_IO + TRY (h5priv_end_throttle (m->f)); +#endif + TRY (hdf5_close_dataspace (dspace_id)); + TRY (hdf5_close_dataspace (mspace_id)); + TRY (hdf5_close_dataset (dset_id)); + + +#if NDEBUG == 0 + if (h5_debug_level & (1<<6) ) { + sleep (m->f->myproc*2); + for (int i = 0; i < num_interior_elems;i++) { + h5_debug ("\n" + "[proc %d] D: ELEM\n" + "[proc %d] D: idx: %d \n" + "[proc %d] D: parent_idx: %d \n" + "[proc %d] D: child_idx: %d \n" + "[proc %d] D: level_idx: %d \n" + "[proc %d] D: refinement: %d \n" + "[proc %d] D: flags: %d \n" + "[proc %d] D: indices: %d %d %d\n" + "[proc %d] D: neigh_indi: %d %d %d\n\n",m->f->myproc, + m->f->myproc, (int)((h5_glb_tri_t*)(*glb_elems))[i].idx, + m->f->myproc, (int)((h5_glb_tri_t*)(*glb_elems))[i].parent_idx, + m->f->myproc, (int)((h5_glb_tri_t*)(*glb_elems))[i].child_idx, + m->f->myproc, (int)((h5_glb_tri_t*)(*glb_elems))[i].level_idx, + m->f->myproc, (int)((h5_glb_tri_t*)(*glb_elems))[i].refinement, + m->f->myproc, (int)((h5_glb_tri_t*)(*glb_elems))[i].flags, + m->f->myproc, (int)((h5_glb_tri_t*)(*glb_elems))[i].vertex_indices[0], + (int)((h5_glb_tri_t*)(*glb_elems))[i].vertex_indices[1], + (int)((h5_glb_tri_t*)(*glb_elems))[i].vertex_indices[2], + m->f->myproc, (int)((h5_glb_tri_t*)(*glb_elems))[i].neighbor_indices[0], + (int)((h5_glb_tri_t*)(*glb_elems))[i].neighbor_indices[1], + (int)((h5_glb_tri_t*)(*glb_elems))[i].neighbor_indices[2]); + } + } + +#endif + + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +#endif +// The chunked version +h5_err_t +h5tpriv_read_chunked_mesh ( + h5t_mesh_t* const m + ) { + H5_PRIV_API_ENTER (h5_err_t, "m=%p", m); +#ifdef PARALLEL_IO + + TRY (read_octree (m)); + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + TRY (read_chunks (m)); + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + if (m->num_weights > 0) { + TRY (read_weights (m)); + } else { + m->weights = NULL; + } + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); +// if (m->f->myproc == 0) { +// plot_leaf_octants(m->octree); +// sleep (30); +// } else { +// sleep (30); +// } + h5_oct_idx_t* new_numbering = NULL; + idx_t* weights = NULL; + h5_oct_idx_t num_tot_leaf_oct = -1; + TRY (calc_weights_oct_leaflevel (m, &weights, &new_numbering, &num_tot_leaf_oct)); + + TRY (distribute_octree_parmetis (m, weights, new_numbering, num_tot_leaf_oct)); + TRY (h5_free (weights)); + + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + + h5_glb_elem_t* glb_elems; + h5_int32_t* my_procs; + TRY (read_chunked_elements (m, &glb_elems, &my_procs)); + + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + + h5_loc_idx_t num_interior_elems = m->num_interior_elems[m->leaf_level]; + // add interior elements to global -> local index map + TRY (h5tpriv_init_map_elem_g2l (m, glb_elems, num_interior_elems)); + + TRY (h5tpriv_alloc_loc_elems (m, 0, num_interior_elems)); + m->num_loaded_levels = m->num_leaf_levels; + + // define local indices for all vertices of all local elements + size_t size = m->num_interior_elems[m->leaf_level] *4 + 128; // TODO do we know smth about how many vtx? + TRY (h5priv_new_idxmap (&m->map_vertex_g2l, size)); + + h5_idxmap_t* map = &m->map_vertex_g2l; + + /* for the time being we use the hash table only for a fast test + whether a global index has already been added to the map or not. */ + h5_hashtable_t htab; + TRY (h5priv_hcreate ((size << 2) / 3, &htab, + hidxmap_cmp, hidxmap_compute_hval, NULL)); + + int num_vertices = h5tpriv_ref_elem_get_num_vertices (m); + for (size_t idx = 0; idx < num_interior_elems; idx++) { + h5_glb_idx_t* vertices = h5tpriv_get_glb_elem_vertices (m, glb_elems, idx); + + for (int i = 0; i < num_vertices; i++) { + // add index temporarly to map ... + map->items[map->num_items] = (h5_idxmap_el_t) {vertices[i], 0}; + // ... and check whether it has already been added + h5_idxmap_el_t* retval = NULL; + h5priv_hsearch (&map->items[map->num_items], + H5_ENTER, (void**)&retval, &htab); + if (retval == &map->items[map->num_items]) { + // new entry in hash table thus in map + map->num_items++; + h5_lvl_idx_t level = h5tpriv_get_glb_elem_level (m, glb_elems, idx); + m->num_loc_vertices[level]++; + } + } + } + TRY (h5priv_hdestroy (&htab)); + + for (int i = 1; i < m->num_leaf_levels; i++) { + m->num_loc_vertices[i] += m->num_loc_vertices[i-1]; + } + + h5priv_sort_idxmap (map); + for (h5_loc_idx_t i = 0; i < map->num_items; i++) { + map->items[i].loc_idx = i; + } + TRY (read_vertices (m, map)); + + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + + m->num_loaded_levels = m->num_leaf_levels; + // calculate which elem belongs to which proc + TRY (h5tpriv_init_loc_elems_struct (m, glb_elems, 0, num_interior_elems, 0, my_procs)); + TRY (h5tpriv_init_elem_flags (m, 0, num_interior_elems)); + + TRY (h5tpriv_update_internal_structs (m, 0)); //TODO check if that should be 0 or m->leaf_level + TRY (h5_free (glb_elems)); + + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); +#endif + H5_PRIV_API_RETURN (H5_SUCCESS); +} + + + +static int +cmp_glb_idx ( + const void* x, + const void* y + ) { + if (*(h5_glb_idx_t*)x < *(h5_glb_idx_t*)y) return -1; + if (*(h5_glb_idx_t*)x > *(h5_glb_idx_t*)y) return 1; + + return 0; +} + + +static h5_err_t +read_elems_part ( + h5t_mesh_t* const m, + h5_glb_elem_t** glb_elems, + h5_glb_idx_t* elem_indices, // in + h5_glb_idx_t dim // in + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + + m->num_interior_elems[0] = dim; + m->num_interior_leaf_elems[0] = dim; + + h5_glb_elem_t* elems; + TRY (elems = h5tpriv_alloc_glb_elems (m, dim)); + + qsort (elem_indices, dim, sizeof(*elem_indices), cmp_glb_idx); + + // create memspace + hsize_t num_elems = dim; + hid_t mspace_id; + TRY (mspace_id = hdf5_create_dataspace(1, &num_elems, NULL)); + + // create diskspace and select subset + hsize_t num_glb_elems = m->num_glb_elems[m->num_leaf_levels-1]; + hid_t dspace_id; + TRY (dspace_id = hdf5_create_dataspace (1, &num_glb_elems, NULL)); + hsize_t hstride = 1; + H5S_seloper_t seloper = H5S_SELECT_SET; // first selection + for (hsize_t i = 0; i < dim; i++) { + hsize_t hstart = elem_indices[i]; + hsize_t hcount = 1; + while (elem_indices[i]+1 == elem_indices[i+1] && i < dim) { + i++; hcount++; + } + if (hstart+hcount > num_glb_elems) { + H5_PRIV_FUNC_LEAVE ( + h5_error ( + H5_ERR_H5FED, + "invalid selection: start=%lld, count=%lld", + (long long)hstart, (long long)hcount)); + } + TRY (hdf5_select_hyperslab_of_dataspace ( + dspace_id, + seloper, + &hstart, &hstride, &hcount, + NULL)); + seloper = H5S_SELECT_OR; + } + hid_t dset_id; + TRY (dset_id = hdf5_open_dataset (m->mesh_gid, m->dsinfo_elems.name)); + TRY (hdf5_read_dataset ( + dset_id, + m->dsinfo_elems.type_id, + mspace_id, + dspace_id, + m->f->props->xfer_prop, + elems)); + TRY (hdf5_close_dataspace (dspace_id)); + TRY (hdf5_close_dataspace (mspace_id)); + TRY (hdf5_close_dataset (dset_id)); + + *glb_elems = elems; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +h5tpriv_read_mesh_part ( + h5t_mesh_t* const m, + h5_glb_idx_t* elem_indices, + h5_glb_idx_t num_elems + ) { + H5_PRIV_API_ENTER (h5_err_t, "m=%p", m); +#ifdef PARALLEL_IO + TRY (h5priv_mpi_barrier (m->f->props->comm)); // octree + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + TRY (h5priv_mpi_barrier (m->f->props->comm)); // chunks + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + TRY (h5priv_mpi_barrier (m->f->props->comm)); // weights + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + TRY (h5priv_mpi_barrier (m->f->props->comm)); // distribute chunks + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); +#endif + h5_glb_elem_t* glb_elems; + TRY (read_elems_part (m, &glb_elems, elem_indices, num_elems)); + h5_loc_idx_t num_interior_elems = m->num_interior_elems[0]; + h5_loc_idx_t num_ghost_elems = m->num_ghost_elems[0] = 0; +#ifdef PARALLEL_IO + TRY (h5priv_mpi_barrier (m->f->props->comm)); // read elems + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); +#endif + // add interior elements to global -> local index map + TRY (h5tpriv_init_map_elem_g2l (m, glb_elems, num_interior_elems)); + + // define local indices for all vertices of all local elements + size_t size = 3*(num_interior_elems + num_ghost_elems) + 128; // added times 3 for random read of elems + TRY (h5priv_new_idxmap (&m->map_vertex_g2l, size)); + + h5_idxmap_t* map = &m->map_vertex_g2l; + + /* for the time being we use the hash table only for a fast test + whether a global index has already been added to the map or not. */ + h5_hashtable_t htab; + TRY (h5priv_hcreate ((size << 2) / 3, &htab, + hidxmap_cmp, hidxmap_compute_hval, NULL)); + + int num_vertices = h5tpriv_ref_elem_get_num_vertices (m); + for (size_t idx = 0; idx < num_interior_elems; idx++) { + h5_glb_idx_t* vertices = h5tpriv_get_glb_elem_vertices (m, glb_elems, idx); + for (int i = 0; i < num_vertices; i++) { + // add index temporarly to map ... + map->items[map->num_items] = (h5_idxmap_el_t) {vertices[i], 0}; + // ... and check whether it has already been added + h5_idxmap_el_t* retval; + h5priv_hsearch (&map->items[map->num_items], + H5_ENTER, (void**)&retval, &htab); + if (retval == &map->items[map->num_items]) { + // new entry in hash table thus in map + map->num_items++; + } + } + } + TRY (h5priv_hdestroy (&htab)); + h5priv_sort_idxmap (map); + for (h5_loc_idx_t i = 0; i < map->num_items; i++) { + map->items[i].loc_idx = i; + } + TRY (read_vertices (m, map)); + TRY (h5tpriv_alloc_loc_elems (m, 0, num_interior_elems+num_ghost_elems)); + m->num_loaded_levels = 1; +#ifdef PARALLEL_IO + TRY (h5priv_mpi_barrier (m->f->props->comm)); // read vtx + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); +#endif + TRY (h5tpriv_init_loc_elems_struct (m, glb_elems, 0, num_interior_elems, 0, NULL)); + TRY (h5tpriv_init_elem_flags (m, 0, num_interior_elems+num_ghost_elems)); + TRY (h5tpriv_update_internal_structs (m, 0)); + + TRY (h5_free (glb_elems)); +#ifdef PARALLEL_IO + TRY (h5priv_mpi_barrier (m->f->props->comm)); // init update + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); +#endif + H5_PRIV_API_RETURN (H5_SUCCESS); +} + + diff --git a/src/h5core/h5t_readwrite_private.h b/src/h5core/h5t_readwrite_private.h new file mode 100644 index 0000000..3869b93 --- /dev/null +++ b/src/h5core/h5t_readwrite_private.h @@ -0,0 +1,147 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5T_READWRITE_PRIVATE_H +#define __H5T_READWRITE_PRIVATE_H + +#include "h5core/h5_types.h" +#include "h5t_types_private.h" + +struct h5t_read_methods { + h5_err_t (*init_loc_elems_struct)(h5t_mesh_t* const, + const h5_glb_elem_t*cosnt, + const h5_loc_idx_t, + const h5_loc_idx_t, + const h5_uint32_t, + const h5_int32_t* my_proc); + h5_err_t (*init_elem_flags)(h5t_mesh_t* const, h5_loc_idx_t, h5_loc_idx_t); + h5_err_t (*init_map_elem_g2l)(h5t_mesh_t* const, h5_glb_elem_t* + const, const h5_loc_idx_t); + h5_err_t (*init_glb_elems_struct)(h5t_mesh_t* const, const h5_glb_elem_t*const); + h5_err_t (*init_glb_elems_struct_chk)(h5t_mesh_t* const, const h5_glb_elem_t*const, h5_chk_idx_t* ,int); +}; + +extern struct h5t_read_methods h5tpriv_read_trim_methods; +extern struct h5t_read_methods h5tpriv_read_tetm_methods; + +h5_err_t +h5tpriv_read_mesh ( + h5t_mesh_t* const m + ); +h5_err_t +h5tpriv_read_chunked_mesh ( + h5t_mesh_t* const m + ); +h5_err_t +h5tpriv_read_mesh_part ( + h5t_mesh_t* const m, + h5_glb_idx_t* elem_indices, + h5_glb_idx_t dim + ); + +h5_err_t +h5tpriv_write_mesh ( + h5t_mesh_t* const m + ); + +static inline h5_err_t +h5tpriv_init_loc_elems_struct ( + h5t_mesh_t* const m, + const h5_glb_elem_t* const elems, + const h5_loc_idx_t from_idx, + const h5_loc_idx_t count, + const h5_uint32_t flags, + const h5_int32_t* my_proc + ) { + return m->methods->read->init_loc_elems_struct (m, elems, from_idx, count, flags, my_proc); +} + +static inline h5_err_t +h5tpriv_init_elem_flags ( + h5t_mesh_t* const m, + const h5_loc_idx_t from, + const h5_loc_idx_t count + ) { + return m->methods->read->init_elem_flags (m, from, count); +} + +static inline h5_err_t +h5tpriv_init_map_elem_g2l ( + h5t_mesh_t* const m, + h5_glb_elem_t* elems, + const h5_loc_idx_t count + ) { + return m->methods->read->init_map_elem_g2l (m, elems, count); +} + +static inline h5_err_t +h5tpriv_init_glb_elems_struct ( + h5t_mesh_t* const m, + const h5_glb_elem_t* const glb_elems + ) { + return m->methods->read->init_glb_elems_struct (m, glb_elems); +} + +static inline h5_err_t +h5tpriv_init_glb_elems_struct_chk ( + h5t_mesh_t* const m, + const h5_glb_elem_t* const glb_elems, + h5_chk_idx_t* list, + int num_items + ) { + return m->methods->read->init_glb_elems_struct_chk (m, glb_elems, list, num_items); +} + + +h5_err_t +h5tpriv_get_list_of_chunks_to_write ( + h5t_mesh_t* const m, + h5_chk_idx_t** list, + int* counter + ); + +h5_err_t +h5tpriv_get_list_of_chunks_to_read ( + h5t_mesh_t* const m, + h5_chk_idx_t** list, + int* counter + ); + +h5_int32_t +find_proc_to_write ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx + ); + +//TODO this is a bugfix remove after xfer_prop fix has been done! +void +set_xfer_prop_to (const h5_file_p file, hid_t prop); +void +set_xfer_prop_to2 (h5t_mesh_t* const m, hid_t prop); + +// TODO move this to appropriate place +typedef struct { + int (*compare) (const void *p_a, const void *p_b); +} comparison_fn_t; + +void * linsearch (const void *key, void *array, size_t count, size_t size, + comparison_fn_t compare); + +unsigned int +hidxmap_compute_hval ( + const void* __item + ); + +int +hidxmap_cmp ( + const void* __a, + const void* __b + ); + +#endif diff --git a/src/h5core/h5t_readwrite_tetm.c b/src/h5core/h5t_readwrite_tetm.c new file mode 100644 index 0000000..8a36a3f --- /dev/null +++ b/src/h5core/h5t_readwrite_tetm.c @@ -0,0 +1,214 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5t_types_private.h" +#include "h5t_map_private.h" +#include "h5t_model_private.h" +#include "h5t_readwrite_private.h" + +#include "h5core/h5t_map.h" +/* + initialize local element structure + */ +static h5_err_t +init_loc_elems_struct ( + h5t_mesh_t* const m, + const h5_glb_elem_t* const elems, + const h5_loc_idx_t from_idx, + const h5_loc_idx_t count, + const h5_uint32_t flags, + const h5_int32_t* my_proc + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, elems=%p, from_idx=%lld, count=%lld, flags=%xu", + m, elems, (long long)from_idx, (long long)count, flags); + + int num_vertices = h5tpriv_ref_elem_get_num_vertices (m); + int num_facets = h5tpriv_ref_elem_get_num_facets (m); + h5_loc_tet_t* loc_elem = (h5_loc_tet_t*)m->loc_elems + from_idx; + h5_glb_tet_t* glb_elem = (h5_glb_tet_t*)elems; + h5_glb_tet_t* last = glb_elem + count; + int counter = 0; + + for (; glb_elem < last; loc_elem++, glb_elem++, counter++) { + // global element index + loc_elem->glb_idx = glb_elem->idx; + + // local parent index + loc_elem->parent_idx = h5t_map_glb_elem_idx2loc (m, glb_elem->parent_idx); + + // local child index + loc_elem->child_idx = h5t_map_glb_elem_idx2loc (m, glb_elem->child_idx); + + // level idx + loc_elem->level_idx = glb_elem->level_idx; + + // refinement level + loc_elem->refinement = glb_elem->refinement; + + // flags + loc_elem->flags = glb_elem->flags | flags; + + // proc + if (my_proc == NULL) { + loc_elem->my_proc = -1; + } else { + loc_elem->my_proc = my_proc[counter]; + } + + // vertex indices + TRY( h5t_map_global_vertex_indices2local ( + m, + glb_elem->vertex_indices, + num_vertices, + loc_elem->vertex_indices) ); + + // neighbor indices + h5t_map_glb_elem_indices2loc ( + m, + glb_elem->neighbor_indices, + num_facets, + loc_elem->neighbor_indices); + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +#define H5_LOC_ELEM_T h5_loc_tet_t + +/* + Set flags on local elements: + geometric border + processor border + + Note: + ghost elements must already be marked! + */ +static h5_err_t +init_elem_flags ( + h5t_mesh_t* const m, + const h5_loc_idx_t from, + const h5_loc_idx_t count + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, from=%lld, count=%lld", + m, (long long)from, (long long)count); + + int num_facets = h5tpriv_ref_elem_get_num_facets (m); + + H5_LOC_ELEM_T* elems = ((H5_LOC_ELEM_T*)m->loc_elems); + H5_LOC_ELEM_T* elem = ((H5_LOC_ELEM_T*)m->loc_elems) + from; + H5_LOC_ELEM_T* end = elem + count; + + while (elem < end) { + for (int i = 0; i < num_facets; i++) { + if (elem->neighbor_indices[i] == -1) { + elem->flags |= H5_GEOBORDER_ENTITY; + } + if (elem->flags & H5_GHOST_ENTITY) { + continue; // if ghost, we are done + } + // elem is not ghost so it must be interior (for the time + // being we have no overlap + elem->flags |= H5_INTERIOR_ENTITY; + if (elem->neighbor_indices[i] < -1 || + (elems[elem->neighbor_indices[i]].flags & H5_GHOST_ENTITY)) { + // if neighbor is < -1 we do not have ghost cells and cell + // is border cell + // if neighbor is ghost, cell is border cell + elem->flags |= H5_BORDER_ENTITY; + } + } + elem++; + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Add entries to global to local index map of elements. + */ +static h5_err_t +init_map_elem_g2l ( + h5t_mesh_t* const m, + h5_glb_elem_t* elems, + const h5_loc_idx_t count + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, count=%lld", + m, (long long)count); + h5_idxmap_t* map = &m->map_elem_g2l; + + /* alloc mem for global to local ID mapping */ + TRY (h5priv_grow_idxmap (map, count)); + h5_loc_idx_t offs = map->num_items; + + h5_idxmap_el_t* item = &map->items[map->num_items]; + h5_glb_tet_t* elem = (h5_glb_tet_t*)elems; + + for (h5_loc_idx_t i = 0; i < count; elem++, i++, item++) { + item->glb_idx = elem->idx; + item->loc_idx = i + offs; + map->num_items++; + } + h5priv_sort_idxmap (map); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Setup data structure to be written on disk. We always write the hole mesh. + */ +static h5_err_t +init_glb_elems_struct ( + h5t_mesh_t* const m, + const h5_glb_elem_t* const glb_elems + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + h5_loc_idx_t num_interior_elems = m->num_interior_elems[m->num_leaf_levels-1]; + + // simple in serial runs: global index = local index + h5_loc_tet_t* loc_elem = (h5_loc_tet_t*)m->loc_elems; + h5_glb_tet_t* glb_elem = (h5_glb_tet_t*)glb_elems; + h5_loc_tet_t* end = loc_elem + num_interior_elems; + + while (loc_elem < end) { + glb_elem->idx = loc_elem->glb_idx; + glb_elem->parent_idx = loc_elem->parent_idx; + glb_elem->child_idx = loc_elem->child_idx; + glb_elem->level_idx = loc_elem->level_idx; + glb_elem->refinement = loc_elem->refinement; + glb_elem->flags = 0; + for (int i = 0; i < 4; i++) { + glb_elem->vertex_indices[i] = loc_elem->vertex_indices[i]; + glb_elem->neighbor_indices[i] = loc_elem->neighbor_indices[i]; + } + loc_elem++; + glb_elem++; + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static h5_err_t +init_glb_elems_struct_chk ( + h5t_mesh_t* const m, + const h5_glb_elem_t* const glb_elems, + h5_chk_idx_t* chk_list, + int num_chk + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + H5_PRIV_FUNC_LEAVE (H5_ERR_NOT_IMPLEMENTED); + // TODO just copy from readwrite_trim and replace 3 indices with 4... + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +struct h5t_read_methods h5tpriv_read_tetm_methods = { + init_loc_elems_struct, + init_elem_flags, + init_map_elem_g2l, + init_glb_elems_struct, + init_glb_elems_struct_chk, +}; diff --git a/src/h5core/h5t_readwrite_trim.c b/src/h5core/h5t_readwrite_trim.c new file mode 100644 index 0000000..40d2353 --- /dev/null +++ b/src/h5core/h5t_readwrite_trim.c @@ -0,0 +1,253 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5t_types_private.h" +#include "h5t_map_private.h" +#include "h5t_model_private.h" +#include "h5t_readwrite_private.h" +#include "h5t_access_private.h" + +#include "h5core/h5t_map.h" + +#define H5_GLB_ELEM_T h5_glb_tri_t +#define H5_LOC_ELEM_T h5_loc_tri_t + +/* + initialize local element structure + */ +static h5_err_t +init_loc_elems_struct ( + h5t_mesh_t* const m, + const h5_glb_elem_t* const elems, + const h5_loc_idx_t from_idx, + const h5_loc_idx_t count, + const h5_uint32_t flags, + const h5_int32_t* my_proc + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, elems=%p, from_idx=%lld, count=%lld, flags=%xu", + m, elems, (long long)from_idx, (long long)count, flags); + + int num_vertices = h5tpriv_ref_elem_get_num_vertices (m); + int num_facets = h5tpriv_ref_elem_get_num_facets (m); + H5_LOC_ELEM_T* loc_elem = (H5_LOC_ELEM_T*)m->loc_elems + from_idx; + H5_GLB_ELEM_T* glb_elem = (H5_GLB_ELEM_T*)elems; + H5_GLB_ELEM_T* last = glb_elem + count; + int counter = 0; + + for (; glb_elem < last; loc_elem++, glb_elem++, counter++) { + // global element index + loc_elem->glb_idx = glb_elem->idx; + + // local parent index + loc_elem->parent_idx = h5t_map_glb_elem_idx2loc (m, glb_elem->parent_idx); + + // local child index + loc_elem->child_idx = h5t_map_glb_elem_idx2loc (m, glb_elem->child_idx); + + // level idx + loc_elem->level_idx = glb_elem->level_idx; + + // refinement level + loc_elem->refinement = glb_elem->refinement; + + // flags + loc_elem->flags = glb_elem->flags | flags; + + // proc + if (my_proc == NULL) { + loc_elem->my_proc = -1; + } else { + loc_elem->my_proc = my_proc[counter]; + } + + // vertex indices + TRY (h5t_map_global_vertex_indices2local ( + m, + glb_elem->vertex_indices, + num_vertices, + loc_elem->vertex_indices)); + + // neighbor indices + h5t_map_glb_elem_indices2loc ( + m, + glb_elem->neighbor_indices, + num_facets, + loc_elem->neighbor_indices); + + } + m->last_stored_eid = from_idx + count -1; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static h5_err_t +init_elem_flags ( + h5t_mesh_t* const m, + const h5_loc_idx_t from, + const h5_loc_idx_t count + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, from=%lld, count=%lld", + m, (long long)from, (long long)count); + + int num_facets = h5tpriv_ref_elem_get_num_facets (m); + + H5_LOC_ELEM_T* elems = ((H5_LOC_ELEM_T*)m->loc_elems); + H5_LOC_ELEM_T* elem = ((H5_LOC_ELEM_T*)m->loc_elems) + from; + H5_LOC_ELEM_T* end = elem + count; + + while (elem < end) { + for (int i = 0; i < num_facets; i++) { + if (elem->neighbor_indices[i] == -1) { + elem->flags |= H5_GEOBORDER_ENTITY; + } + if (elem->flags & H5_GHOST_ENTITY) { + continue; // if ghost, we are done + } + // elem is not ghost so it must be interior (for the time + // being we have no overlap + elem->flags |= H5_INTERIOR_ENTITY; + + if (elem->neighbor_indices[i] <= -1 || // added <= istead of < + (elems[elem->neighbor_indices[i]].flags & H5_GHOST_ENTITY)) { //TODO invalid access probably elem->neighbor_indices[i] == -1 + // if neighbor is < -1 we do not have ghost cells and cell + // is border cell + // if neighbor is ghost, cell is border cell + elem->flags |= H5_BORDER_ENTITY; + } + } + elem++; + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static h5_err_t +init_map_elem_g2l ( + h5t_mesh_t* const m, + h5_glb_elem_t* elems, + h5_loc_idx_t count + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, count=%lld", + m, (long long)count); + h5_idxmap_t* map = &m->map_elem_g2l; + + /* alloc mem for global to local ID mapping */ + TRY (h5priv_grow_idxmap (map, map->num_items+count)); + h5_loc_idx_t offs = map->num_items; + + h5_idxmap_el_t* item = &map->items[map->num_items]; + H5_GLB_ELEM_T* elem = (H5_GLB_ELEM_T*)elems; + + for (h5_loc_idx_t i = 0; i < count; elem++, i++, item++) { + item->glb_idx = elem->idx; + item->loc_idx = i + offs; + map->num_items++; + } + h5priv_sort_idxmap (map); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Setup data structure to be written on disk. We always write the hole mesh. + */ +static h5_err_t +init_glb_elems_struct ( + h5t_mesh_t* const m, + const h5_glb_elem_t* const glb_elems + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + h5_loc_idx_t num_interior_elems = m->num_interior_elems[m->num_leaf_levels-1]; + + // simple in serial runs: global index = local index + H5_LOC_ELEM_T* loc_elem = (H5_LOC_ELEM_T*)m->loc_elems; + H5_GLB_ELEM_T* glb_elem = (H5_GLB_ELEM_T*)glb_elems; + H5_LOC_ELEM_T* end = loc_elem + num_interior_elems; + + while (loc_elem < end) { + glb_elem->idx = loc_elem->glb_idx; + glb_elem->parent_idx = loc_elem->parent_idx; + glb_elem->child_idx = loc_elem->child_idx; + glb_elem->level_idx = loc_elem->level_idx; + glb_elem->refinement = loc_elem->refinement; + glb_elem->flags = 0; + for (int i = 0; i < 3; i++) { + glb_elem->vertex_indices[i] = loc_elem->vertex_indices[i]; + glb_elem->neighbor_indices[i] = loc_elem->neighbor_indices[i]; + } + loc_elem++; + glb_elem++; + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +//TODO maybe use ifdef to have name without _chk +static h5_err_t +init_glb_elems_struct_chk ( + h5t_mesh_t* const m, + const h5_glb_elem_t* const glb_elems, + h5_chk_idx_t* chk_list, + int num_chk + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + + h5_chk_idx_t chk_idx = -1; + h5_chk_size_t num_elems = -1; + h5_size_t counter = 0; + for (int i = 0; i < num_chk; i++) { + chk_idx = chk_list[i]; + num_elems = m->chunks->chunks[chk_idx].num_elems; // num_elems per chunk + h5_glb_idx_t glb_idx = m->chunks->chunks[chk_idx].elem; + for (h5_chk_size_t j = 0; j < num_elems; j++) { + // get local element + h5_loc_idx_t loc_idx = h5t_map_glb_elem_idx2loc(m, glb_idx); + H5_LOC_ELEM_T* loc_elem = &((H5_LOC_ELEM_T*)m->loc_elems)[loc_idx]; + H5_GLB_ELEM_T* glb_elem = &((H5_GLB_ELEM_T*)glb_elems)[counter]; + glb_elem->idx = loc_elem->glb_idx; + glb_elem->parent_idx = loc_elem->parent_idx > -1 ? + h5tpriv_get_loc_elem_glb_idx(m, loc_elem->parent_idx) : loc_elem->parent_idx; + glb_elem->child_idx = loc_elem->child_idx > -1 ? + h5tpriv_get_loc_elem_glb_idx(m, loc_elem->child_idx) : loc_elem->child_idx; + glb_elem->level_idx = loc_elem->level_idx; + glb_elem->refinement = loc_elem->refinement; + glb_elem->flags = 0; // TODO is that correct? why do we then store it? + for (int i = 0; i < 3; i++) { + glb_elem->vertex_indices[i] = loc_elem->vertex_indices[i] > -1 ? + m->vertices[loc_elem->vertex_indices[i]].idx :loc_elem->vertex_indices[i]; + + if (loc_elem->neighbor_indices[i] > -1) { + glb_elem->neighbor_indices[i] = ((H5_LOC_ELEM_T*)m->loc_elems)[loc_elem->neighbor_indices[i]].glb_idx; + } else { + if (loc_elem->neighbor_indices[i] < -1) {// if elem not locally available we store the - (glb_idx + 2) + glb_elem->neighbor_indices[i] = -( loc_elem->neighbor_indices[i] + 2); //TODO is there a func or makro that does that? + } else { + glb_elem->neighbor_indices[i] = loc_elem->neighbor_indices[i]; // geometrical border + } + } + } + counter++; + glb_idx++; + } + + } + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + + + + +struct h5t_read_methods h5tpriv_read_trim_methods = { + init_loc_elems_struct, + init_elem_flags, + init_map_elem_g2l, + init_glb_elems_struct, + init_glb_elems_struct_chk, +}; diff --git a/src/h5core/h5t_ref_elements.c b/src/h5core/h5t_ref_elements.c new file mode 100644 index 0000000..5de609b --- /dev/null +++ b/src/h5core/h5t_ref_elements.c @@ -0,0 +1,223 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5t_types_private.h" +#include "h5t_model_private.h" +#include "h5t_ref_elements_private.h" + +/* + information we can retrieve from the reference element: + - number of vertices per sub-entity (1) + - vertex indices of all sub-elements + - upward connectivity + - which co-dim 1 entities are connected to a given vertex + - which co-dim 2 entities are connected to a given vertex + - which co-dim 1 entities are connected to a given co-dim 2 entity + - downward connectivity + - vertex coordinates + + get_conn(face, dim, dim) -> list + + for dim 3 reference elements: + get_conn(0, 3, 0) -> 0, 1, 2, 3 (all vertices) + get_conn(0, 3, 1) -> 0, 1, 2, 3, 4, 5 (all edges) + get_conn(0, 3, 2) -> 0, 1, 2, 3 (all facets) + get_conn(0, 3, 3) -> 0 + get_conn(i, 2, 0) -> vertices of facet i + get_conn(i, 2, 1) -> edges of facet i + get_conn(i, 2, 2) -> facets connected to facet i + get_conn(i, 2, 3) -> 0 + get_conn(i, 1, 0) -> vertices of edge i + get_conn(i, 1, 1) -> edges connected to edge i + get_conn(i, 1, 2) -> facets connected to edge i + get_conn(i, 1, 3) -> 0 + get_conn(i, 0, 0) -> i + get_conn(i, 0, 1) -> edges connected to vertex i + get_conn(i, 0, 2) -> facets connected to vertex i + get_conn(i, 0, 3) -> 0 + + (1) For triangle and tetrahedral meshes the number of vertices is + identical for all sub-entities within the same dimension. This is not + true for other grids (like prismen) + + + face: All kinds of sub-elements: vertices, edges, triangles ... + facet: co-dim 1 face + entities: all elements and faces of a grid + */ + +/* + 2 + ** + * * + * * + * * + * * + * * + * * + 1 2 + * * + * * + * * + * * + * * + * * + * * + 0 * * * * * * * 0 * * * * * * *1 + + */ + +const h5t_ref_elem_t h5t_tri_ref_elem = { + 2, // dimension + { + H5T_TYPE_VERTEX, + H5T_TYPE_EDGE, + H5T_TYPE_TRIANGLE, + }, + { + 3, // #vertices + 3, // #edges + 1 // #triangles + }, + { // number of vertices per entity + [0] = {1, 1, 1}, // #vertices of vertices + [1] = {2, 2, 2}, // #vertices of edges + [2] = {3} // #vertices of trinagles + }, + { // connection count + [0][0] = {1, 1, 1}, + [0][1] = {2, 2, 2}, + [0][2] = {1, 1, 1}, + + [1][0] = {2, 2, 2}, + [1][1] = {3, 3, 3}, + [1][2] = {1, 1, 1}, + + [2][0] = {3,-1,-1}, + [2][1] = {3,-1,-1}, + [2][2] = {3,-1,-1}, + }, + { // connectivity + // vertex to vertices/edges/triangles + [0][0] = {{0}, {1}, {2}}, + [0][1] = {{0,1}, {0,2}, {1,2}}, + [0][2] = {{0}, {0}, {0}}, + + // edge to vertices/edges/triangles + [1][0] = {{0,1}, {0,2}, {1,2}}, + [1][1] = {{0,1,2}, {0,1,2}, {0,1,2}}, + [1][2] = {{0}, {0}, {0}}, + + // triangle to vertices/edges/triangles + [2][0] = {{0,1,2}}, + [2][1] = {{0,1,2}}, + [2][2] = {{0,1,2}}, + }, + { // coordinates + {0.0, 0.0}, + {1.0, 0.0}, + {0.0, 1.0} + } +}; + +/* + 3 + ** + ** * + * * * + * * * + * * * + * 5 * + * * * + 3 * 4 + * 2 * 3 * + * 2 * + * * * * + * * * * + * 1 0 2 * + * * * * + ** ** + 0 * * * * * * * 0 * * * * * * *1 + + Front face is {0,1,3} with id 1 + */ + +const h5t_ref_elem_t h5t_tet_ref_elem = { + 3, // dimension + { + H5T_TYPE_VERTEX, + H5T_TYPE_EDGE, + H5T_TYPE_TRIANGLE, + H5T_TYPE_TET, + }, + { + 4, // #vertices + 6, // #edges + 4, // #triangles + 1 // #tetrahedra + }, + { // number of vertices per sub-element + [0] = {1,1,1,1}, // #vertices of vertices + [1] = {2,2,2,2,2,2}, // #vertices of edges + [2] = {3,3,3,3}, // #vertices of trinagles + [3] = {4} // #vertices of tets + }, + { // connection count + [0][0] = {1, 1, 1, 1,-1,-1}, + [0][1] = {3, 3, 3, 3,-1,-1}, + [0][2] = {3, 3, 3, 3,-1,-1}, + [0][3] = {1, 1, 1, 1,-1,-1}, + + [1][0] = {2, 2, 2, 2, 2, 2}, + [1][1] = {5, 5, 5, 5, 5, 5}, + [1][2] = {2, 2, 2, 2, 2, 2}, + [1][3] = {1, 1, 1, 1, 1, 1}, + + [2][0] = {3, 3, 3, 3,-1,-1}, + [2][1] = {3, 3, 3, 3,-1,-1}, + [2][2] = {4, 4, 4, 4,-1,-1}, + [2][3] = {1, 1, 1, 1,-1,-1}, + + [3][0] = {4,-1,-1,-1,-1,-1}, + [3][1] = {6,-1,-1,-1,-1,-1}, + [3][2] = {4,-1,-1,-1,-1,-1}, + [3][3] = {1,-1,-1,-1,-1,-1}, + }, + { // connectivity + // vertex to vertices/edges/triangles/tetrahedron + [0][0] = {{0}, {1}, {2}, {3}}, + [0][1] = {{0,1,3}, {0,2,4}, {1,2,5}, {3,4,5}}, + [0][2] = {{0,1,2}, {0,1,3}, {0,2,3}, {1,2,3}}, + [0][3] = {{0}, {0}, {0}, {0}}, + + // edges to vertices/edges/triangles/tetrahedron + [1][0] = {{0,1}, {0,2}, {1,2}, {0,3}, {1,3}, {2,3}}, + [1][1] = {{0,1,2,3,4}, {0,1,2,3,5}, {0,1,2,4,5}, {0,1,3,4,5}, {0,2,3,4,5}, {1,2,3,4,5}}, + [1][2] = {{0,1}, {0,2}, {0,3}, {1,2}, {1,3}, {2,3}}, + [1][3] = {{0}, {0}, {0}, {0}, {0}, {0}}, + + // triangle to vertices/edges/triangle/tetrahedron + [2][0] = {{0,1,2}, {0,1,3}, {0,2,3}, {1,2,3}}, + [2][1] = {{0,1,2}, {0,3,4}, {1,3,5}, {2,4,5}}, + [2][2] = {{0,1,2,3}, {0,1,2,3}, {0,1,2,3}, {0,1,2,3}}, + [2][3] = {{0}, {0}, {0}, {0}}, + + // tetrahedron to vertices/edges/triangle/tetrahedron + [3][0] = {{0,1,2,3}}, + [3][1] = {{0,1,2,3,4,5}}, + [3][2] = {{0,1,2,3}}, + [3][2] = {{0}} + }, + { // coordinates + {0.0, 0.0, 0.0}, + {1.0, 0.0, 0.0}, + {0.0, 1.0, 0.0}, + {0.0, 0.0, 1.0} + } +}; diff --git a/src/h5core/h5t_ref_elements_private.h b/src/h5core/h5t_ref_elements_private.h new file mode 100644 index 0000000..6579a11 --- /dev/null +++ b/src/h5core/h5t_ref_elements_private.h @@ -0,0 +1,73 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5T_REF_ELEMENTS_PRIVATE_H +#define __H5T_REF_ELEMENTS_PRIVATE_H + +#include "h5core/h5_types.h" + +#define H5T_MAX_DIM 3 +#define H5T_MAX_FACES 6 // edges in tetrahedron +#define H5T_MAX_VERTICES 4 // tetrahedron + +struct h5t_ref_elem { + int dim; + int entity_types[H5T_MAX_DIM+1]; + int num_faces[H5T_MAX_DIM+1]; + int num_vertices_of_face[H5T_MAX_DIM+1][H5T_MAX_FACES]; + int connect_count[H5T_MAX_DIM+1][H5T_MAX_DIM+1][H5T_MAX_FACES]; + int connect[H5T_MAX_DIM+1][H5T_MAX_DIM+1][H5T_MAX_FACES][H5T_MAX_FACES]; + h5_float64_t coords[H5T_MAX_VERTICES][H5T_MAX_DIM]; +}; + +typedef struct h5t_ref_elem h5t_ref_elem_t; + +extern const h5t_ref_elem_t h5t_tet_ref_elem; +extern const h5t_ref_elem_t h5t_tri_ref_elem; + +#ifdef __cplusplus +} +#endif + +#define h5tpriv_ref_elem_get_num_vertices(this) (this->ref_elem->num_faces[0]) + +#define h5tpriv_ref_elem_get_num_edges(this) (this->ref_elem->num_faces[1]) + +#define h5tpriv_ref_elem_get_num_facets(this) \ + (this->ref_elem->num_faces[this->ref_elem->dim - 1]) + +#define h5tpriv_ref_elem_get_num_faces(this, dim) (this->ref_elem->num_faces[dim]) + +#define h5tpriv_ref_elem_get_dim(this) (this->ref_elem->dim) + +#define h5tpriv_ref_elem_get_entity_type(this,dim) \ + (this->ref_elem->entity_types[dim]) + +#define h5tpriv_ref_elem_get_vertex_idx(this, dim, face_idx, i) \ + (h5_loc_idx_t)(this->ref_elem->connect[dim][0][face_idx][i]) + +#define h5tpriv_ref_elem_get_edge_idx(this, dim, face_idx, i) \ + (h5_loc_idx_t)(this->ref_elem->connect[dim][1][face_idx][i]) + +#define h5tpriv_ref_elem_get_triangle_idx(this, dim, face_idx, i) \ + (h5_loc_idx_t)(this->ref_elem->connect[dim][2][face_idx][i]) + +#define h5tpriv_ref_elem_get_num_facets_to_vertex(this, i) \ + ((h5_loc_idx_t)this->ref_elem->connect_count[this->ref_elem->dim-1][0][i]) + +#define h5tpriv_ref_elem_get_num_facets_to_edge(this, i) \ + ((h5_loc_idx_t)this->ref_elem->connect_count[this->ref_elem->dim-1][1][i]) + +#define h5tpriv_ref_elem_get_facet_to_vertex(this, i, j) \ + ((h5_loc_idx_t)this->ref_elem->connect[this->ref_elem->dim-1][0][i][j]) + +#define h5tpriv_ref_elem_get_facet_to_edge(this, i, j) \ + ((h5_loc_idx_t)this->ref_elem->connect[this->ref_elem->dim-1][1][i][j]) + +#endif diff --git a/src/h5core/h5t_retrieve.c b/src/h5core/h5t_retrieve.c new file mode 100644 index 0000000..c525c17 --- /dev/null +++ b/src/h5core/h5t_retrieve.c @@ -0,0 +1,364 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5t_types_private.h" +#include "h5t_errorhandling_private.h" +#include "h5t_map_private.h" +#include "h5t_model_private.h" +#include "h5t_access_private.h" +#include "h5t_tags_private.h" +#include "h5t_retrieve_private.h" + +#include "h5core/h5.h" +#include "h5core/h5t_map.h" + +/* + Skip elements which have been refined on a level <= the current one. + */ +static h5_err_t +iter_leaf_elem_idx ( + h5t_leaf_iterator_t* iter + ) { + h5_loc_elem_t* el; + do { + iter->elem_idx++; + if (iter->elem_idx >= iter->mesh->num_interior_elems[iter->leaf_level]) { + return H5_NOK; // done + } + el = h5tpriv_get_loc_elem (iter->mesh, iter->elem_idx); + } while (!h5tpriv_is_leaf_elem (iter->mesh, el)); + return H5_SUCCESS; +} + +static h5_loc_id_t +iterate_leaf_elems ( + h5t_iterator_t* iter + ) { + h5t_leaf_iterator_t* it = (h5t_leaf_iterator_t*)iter; + if ( iter_leaf_elem_idx (it) == H5_NOK) { + return H5_NOK; + } + int dim = h5tpriv_ref_elem_get_dim (it); + h5_loc_id_t type_id = h5tpriv_ref_elem_get_entity_type (it, dim); + return h5tpriv_build_entity_id (type_id, 0, it->elem_idx ); +} + +static h5_loc_id_t +iterate_geom_boundary_elems ( + h5t_iterator_t* iter + ) { + h5t_leaf_iterator_t* it = (h5t_leaf_iterator_t*)iter; + do { + if ( iter_leaf_elem_idx (it) == H5_NOK) { + return H5_NOK; + } + } while (!h5tpriv_is_geom_boundary_elem (it->mesh, it->elem_idx)); + int dim = h5tpriv_ref_elem_get_dim (it); + h5_loc_id_t type_id = h5tpriv_ref_elem_get_entity_type (it, dim); + return h5tpriv_build_entity_id (type_id, 0, it->elem_idx ); +} + +/* + Iterate boundary facets (co-dim 1 entities). + */ +static h5_loc_id_t +iterate_boundary_facets ( + h5t_iterator_t* iter + ) { + H5_PRIV_FUNC_ENTER (h5_loc_id_t, "iter=%p", iter); + h5t_leaf_iterator_t* it = (h5t_leaf_iterator_t*)iter; + int num_facets = h5tpriv_ref_elem_get_num_facets (it) - 1; + int dim = h5tpriv_ref_elem_get_dim (it) - it->codim; + do { + if (it->face_idx >= num_facets) { + h5_loc_id_t elem_id; + TRY( elem_id = iterate_geom_boundary_elems (iter) ); + if (elem_id == H5_NOK) { + H5_PRIV_FUNC_LEAVE (H5_NOK); // done! + } + it->elem_idx = h5tpriv_get_elem_idx (elem_id); + it->face_idx = 0; + } else { + it->face_idx++; + } + } while (!h5tpriv_is_boundary_facet (it->mesh, it->elem_idx, it->face_idx)); + int type = h5tpriv_ref_elem_get_entity_type (it, dim); + H5_PRIV_FUNC_RETURN (h5tpriv_build_entity_id (type, it->face_idx, it->elem_idx)); +} + +/*! + Travere entities with co-dim > 0 + */ +static h5_loc_id_t +iterate_leaf_faces ( + h5t_iterator_t* iter + ) { + H5_PRIV_FUNC_ENTER (h5_loc_id_t, "iter=%p", iter); + h5t_leaf_iterator_t* it = (h5t_leaf_iterator_t*)iter; + h5_loc_idlist_t* entry; + int dim = h5tpriv_ref_elem_get_dim (it) - it->codim; + int num_faces = h5tpriv_ref_elem_get_num_faces (it, dim) - 1; + int i = -1; + do { + if (it->face_idx >= num_faces) { + if (iter_leaf_elem_idx (it) == H5_NOK) { + H5_PRIV_FUNC_LEAVE (H5_NOK); // done! + } + it->face_idx = 0; + } else { + it->face_idx++; + } + // Skip already visited faces: + + // 1. Get list of all elements with this face. Actually we + // retrieve a list of entities sorted by the element index. + TRY( (it->find)(it->mesh, it->face_idx, it->elem_idx, &entry) ); + + // 2. Go to first element in list which is on current level + i = -1; + h5_loc_elem_t *el; + do { + i++; + h5_loc_idx_t idx = h5tpriv_get_elem_idx (entry->items[i]); + el = h5tpriv_get_loc_elem (it->mesh, idx); + } while (!h5tpriv_is_leaf_elem (it->mesh, el)); + + // 3. Face already visited if + } while (it->elem_idx > h5tpriv_get_elem_idx(entry->items[i])); + /* + note: in above test it->elem_idx is always greater or equal to the + compared index. It cannot be smaller since it->elem_idx is on the + current level and the element index of entry->items[i] is the smallest + element index with the given face on the current level. + */ + H5_PRIV_FUNC_RETURN (entry->items[i]); +} + +/* + Iterate boundary faces with co-dim > 1 + */ +static h5_loc_id_t +iterate_boundary_faces ( + h5t_iterator_t* iter + ) { + H5_PRIV_FUNC_ENTER (h5_loc_id_t, "iter=%p", iter); + h5t_leaf_iterator_t* it = (h5t_leaf_iterator_t*)iter; + // TODO!!! + int dim = h5tpriv_ref_elem_get_dim (it) - it->codim; + int num_faces = h5tpriv_ref_elem_get_num_faces (it, dim) - 1; + do { + // iterate to next boundary face + do { + // first iterate over all faces of element, if done + // goto next element + if (it->face_idx >= num_faces) { + h5_loc_id_t elem_id; + TRY( elem_id = iterate_geom_boundary_elems (iter) ); + if (elem_id == H5_NOK) { + H5_PRIV_FUNC_LEAVE (H5_NOK); // done! + } + it->face_idx = 0; + } else { + it->face_idx++; + } + } while (!h5tpriv_is_boundary_face ( + it->mesh, dim, it->elem_idx, it->face_idx)); + // Skip already visited faces + } while (0); + H5_PRIV_FUNC_RETURN (h5_error_internal ()); +} + +static h5_loc_id_t +iterate_tags ( + h5t_iterator_t* iter + ) { + H5_PRIV_FUNC_ENTER (h5_loc_id_t, "iter=%p", iter); + UNUSED_ARGUMENT (iter); +#if 0 + h5t_tagsel_t* tags; + do { + if (iter->subentity_idx >= 14) { + iter->elem_idx++; + iter->subentity_idx = 0; + } else { + iter->subentity_idx++; + } + tags = iter->tagset->elems[iter->elem_idx]; + } while ((tags == NULL) || (tags->idx[iter->subentity_idx])); +#endif + H5_PRIV_FUNC_RETURN (h5_error_internal ()); +} + +h5_err_t +h5t_init_leaf_iterator ( + h5t_iterator_t* iter, + h5t_mesh_t* m, + int codim + ) { + H5_CORE_API_ENTER (h5_err_t, "iter=%p, m=%p, codim=%d", iter, m, codim); + h5t_leaf_iterator_t* it = (h5t_leaf_iterator_t*)iter; + it->mesh = m; + it->face_idx = 999; + it->elem_idx = -1; + it->codim = codim; + it->leaf_level = m->leaf_level; + it->ref_elem = m->ref_elem; + + if (it->codim > 0) { + it->iter = iterate_leaf_faces; + } else if (it->codim == 0) { + it->iter = iterate_leaf_elems; + } + TRY (h5tpriv_init_entity_iterator (m, iter, codim)); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5t_init_boundary_face_iterator ( + h5t_iterator_t* iter, + h5t_mesh_t* m, + int codim + ) { + H5_CORE_API_ENTER (h5_err_t, "iter=%p, m=%p, codim=%d", iter, m, codim); + h5t_leaf_iterator_t* it = (h5t_leaf_iterator_t*)iter; + it->mesh = m; + it->face_idx = 999; // something > max number of faces + it->elem_idx = -1; + it->codim = codim; + it->leaf_level = m->leaf_level; + it->ref_elem = m->ref_elem; + + if (it->codim <= 0 || it->codim > it->ref_elem->dim) { + H5_CORE_API_LEAVE (h5tpriv_inval_codim (codim, 1, it->ref_elem->dim)); + } else if (it->codim == 1) { + it->iter = iterate_boundary_facets; + } + else if (it->codim > 1) { + it->iter = iterate_boundary_faces; + } + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5t_init_mtag_iterator ( + h5t_iterator_t* iter, + h5t_mesh_t* m, + const char* name + ) { + H5_CORE_API_ENTER (h5_err_t, "iter=%p, m=%p, name='%s'", iter, m, name); + h5t_tag_iterator_t* it = (h5t_tag_iterator_t*)iter; + it->mesh = m; + TRY (h5t_open_mtagset (m, name, &it->tagset)); + it->elem_idx = -1; + it->subentity_idx = 999; + it->level_idx = m->leaf_level; + it->iter = iterate_tags; + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5t_release_entity_iterator ( + h5t_iterator_t* iter + ) { + H5_CORE_API_ENTER (h5_err_t, "iter=%p", iter); + H5_CORE_API_RETURN (h5_free (iter)); +} + +h5_loc_id_t +h5t_iterate_entities ( + h5t_iterator_t* iter + ) { + H5_CORE_API_ENTER (h5_err_t, "iter=%p", iter); + H5_CORE_API_RETURN (iter->iter (iter)); +} + +h5_err_t +h5t_end_iterate_entities ( + h5t_iterator_t* iter + ) { + H5_CORE_API_ENTER (h5_err_t, "iter=%p", iter); + memset (iter, 0, sizeof(*iter)); + h5t_leaf_iterator_t* it = (h5t_leaf_iterator_t*)iter; + it->face_idx = -1; + it->elem_idx = -1; + it->codim = -1; + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5t_get_vertex_coords_by_index ( + h5t_mesh_t* const m, + h5_loc_idx_t vertex_index, + h5_float64_t P[3] + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, vertex_index=%llu, P=%p", + m, + (long long unsigned)vertex_index, + P); + h5_loc_vertex_t *vertex = &m->vertices[vertex_index]; + memcpy ( P, &vertex->P, sizeof ( vertex->P ) ); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5t_get_vertex_coords_by_id ( + h5t_mesh_t* const m, + h5_loc_id_t vertex_id, + h5_float64_t P[3] + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, vertex_id=%llu, P=%p", + m, + (long long unsigned)vertex_id, + P); + h5_loc_idx_t vertex_index; + TRY (h5tpriv_get_vertex_index_of_vertex (m, vertex_id, &vertex_index)); + TRY (h5t_get_vertex_coords_by_index (m, vertex_index, P)); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5t_get_vertex_by_id ( + h5t_mesh_t* const m, + const h5_loc_id_t vertex_id, + h5_glb_idx_t* glb_idx, + h5_float64_t* P[] + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, vertex_id=%lld, glb_idx=%p, P[]=%p", + m, (long long)vertex_id, glb_idx, P); + // get loc index of vertex + h5_loc_idx_t idx; + TRY (h5t_get_loc_vertex_index_of_vertex (m, vertex_id, &idx)); + *glb_idx = m->vertices[idx].idx; + *P = m->vertices[idx].P; + H5_CORE_API_RETURN (H5_SUCCESS); +} + + +h5_err_t +h5t_get_neighbor_indices ( + h5t_mesh_t* const m, + h5_loc_id_t entity_id, + h5_loc_idx_t* neighbor_indices + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, entity_id=%llu, neighbor_indices=%p", + m, + (long long unsigned)entity_id, + neighbor_indices); + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + h5_loc_idx_t* indices = h5tpriv_get_loc_elem_neighbor_indices (m, elem_idx); + int num_facets = h5tpriv_ref_elem_get_num_facets (m); + for (int i = 0; i < num_facets; i++) { + neighbor_indices[i] = indices[i]; + } + H5_CORE_API_RETURN (H5_SUCCESS); +} diff --git a/src/h5core/h5t_retrieve_private.h b/src/h5core/h5t_retrieve_private.h new file mode 100644 index 0000000..54e5bb4 --- /dev/null +++ b/src/h5core/h5t_retrieve_private.h @@ -0,0 +1,34 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5T_RETRIEVE_PRIVATE_H +#define __H5T_RETRIEVE_PRIVATE_H + +#include "h5core/h5_types.h" +#include "h5t_types_private.h" +#include "h5core/h5t_retrieve.h" + +struct h5t_retrieve_methods { + h5_err_t (*init_entity_iterator)( + h5t_iterator_t*, const int); +}; + +extern struct h5t_retrieve_methods h5tpriv_trim_retrieve_methods; +extern struct h5t_retrieve_methods h5tpriv_tetm_retrieve_methods; + +static inline h5_err_t +h5tpriv_init_entity_iterator ( + h5t_mesh_t* m, + h5t_iterator_t* const iter, + const int codim + ) { + return m->methods->retrieve->init_entity_iterator (iter, codim); +} + +#endif diff --git a/src/h5core/h5t_retrieve_tetm.c b/src/h5core/h5t_retrieve_tetm.c new file mode 100644 index 0000000..5fe7cfb --- /dev/null +++ b/src/h5core/h5t_retrieve_tetm.c @@ -0,0 +1,47 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5t_types_private.h" +#include "h5t_errorhandling_private.h" +#include "h5t_core_private.h" +#include "h5t_map_private.h" +#include "h5t_model_private.h" +#include "h5t_access_private.h" +#include "h5t_tags_private.h" +#include "h5t_retrieve_private.h" + +static h5_err_t +init_entity_iterator ( + h5t_iterator_t* const iter, + const int codim + ) { + h5t_leaf_iterator_t* it = (h5t_leaf_iterator_t*)iter; + switch (it->ref_elem->dim - codim) { + case 0: // iterate vertices + it->find = h5tpriv_find_tv2; + break; + case 1: // iterate edges + it->find = h5tpriv_find_te2; + break; + case 2: // iterate faces + it->find = h5tpriv_find_td2; + break; + case 3: // iterate elems + it->find = NULL; + break; + default: + return h5_error_internal (); + } + return H5_SUCCESS; +} + +struct h5t_retrieve_methods h5tpriv_tetm_retrieve_methods = { + init_entity_iterator +}; + diff --git a/src/h5core/h5t_retrieve_trim.c b/src/h5core/h5t_retrieve_trim.c new file mode 100644 index 0000000..8b2d834 --- /dev/null +++ b/src/h5core/h5t_retrieve_trim.c @@ -0,0 +1,43 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5t_types_private.h" +#include "h5t_errorhandling_private.h" +#include "h5t_core_private.h" +#include "h5t_map_private.h" +#include "h5t_model_private.h" +#include "h5t_access_private.h" +#include "h5t_tags_private.h" +#include "h5t_retrieve_private.h" + +static h5_err_t +init_entity_iterator ( + h5t_iterator_t* iter, + const int codim + ) { + h5t_leaf_iterator_t* it = (h5t_leaf_iterator_t*)iter; + switch (h5tpriv_ref_elem_get_dim (it) - codim) { + case 0: // iterate vertices + it->find = h5tpriv_find_tv2; + break; + case 1: // iterate edges + it->find = h5tpriv_find_te2; + break; + case 2: // iterate elems + it->find = NULL; + break; + default: + return h5_error_internal (); + } + return H5_SUCCESS; +} + +struct h5t_retrieve_methods h5tpriv_trim_retrieve_methods = { + init_entity_iterator +}; diff --git a/src/h5core/h5t_store.c b/src/h5core/h5t_store.c new file mode 100644 index 0000000..aeeb983 --- /dev/null +++ b/src/h5core/h5t_store.c @@ -0,0 +1,2744 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5_errorhandling_private.h" +#include "h5t_types_private.h" +#include "h5t_errorhandling_private.h" +#include "h5t_access_private.h" +#include "h5t_core_private.h" +#include "h5t_map_private.h" +#include "h5t_model_private.h" +#include "h5t_store_private.h" +#include "h5t_core_private.h" +#include "h5t_readwrite_private.h" +#include "h5_init_private.h" +#include "h5_mpi_private.h" + +#include "h5core/h5t_map.h" + +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) + +int max_num_elems_p_chunk = 120; // minimum is 4 for triangle meshes and +// 8 for thetrahedral meshes + +#ifdef PARALLEL_IO +// that probably doesn't belong here... //TODO put in right place + print variables +h5_edge_list_t* +h5tpriv_init_edge_list ( + h5_int32_t num_alloc + ) { + + h5_edge_list_t* list = NULL; + list = h5_calloc (1, sizeof (*list)); + list->num_alloc = num_alloc; + list->num_items = 0; + list->items = h5_calloc (num_alloc, sizeof (*list->items)); + return list; +} +h5_err_t +h5tpriv_free_edge_list ( + h5_edge_list_t* list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "list=%p", list); + TRY (h5_free (list->items)); + list->items = NULL; + TRY (h5_free(list)); + list = NULL; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t +h5tpriv_grow_edge_list ( + h5_edge_list_t* list, + h5_int32_t size + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "list=%p", list); + assert (list->num_alloc + size >= 0); + if (size < 0) { + h5_debug ("Warning: you are shrinking the edge_list!"); + } + if (size == 0) { + h5_debug ("Warning: you are not growing the edge_list!"); + } + TRY ( list->items = h5_alloc(list->items, (list->num_alloc + size) * sizeof (*list->items))); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + * compare edge_list_elem + */ +int compare_edge_list_elem(const void *p_a, const void *p_b) { + h5t_edge_list_elem_t* elem_a = ((h5t_edge_list_elem_t*) p_a); + h5t_edge_list_elem_t* elem_b = ((h5t_edge_list_elem_t*) p_b); + + if (elem_a->vtx1 - elem_b->vtx1 != 0) { + return elem_a->vtx1 - elem_b->vtx1; + } else { + if (elem_a->vtx2 - elem_b->vtx2 != 0) { + return elem_a->vtx2 - elem_b->vtx2; + } + } + return elem_a->proc - elem_b->proc; +} +h5_err_t +h5tpriv_uniquify_edge_list ( + h5_edge_list_t* list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "list=%p", list); + if (list->num_items == 0) { + H5_PRIV_FUNC_LEAVE (H5_SUCCESS); + } + h5t_edge_list_elem_t* old_elem = list->items; + int num_old_elems = list->num_items; + list->items = h5_calloc (list->num_alloc, sizeof (*list->items)); + memcpy (&list->items[0], &old_elem[0], sizeof (*list->items)); + list->num_items = 1; + for (int i = 1; i < num_old_elems; i++) { + int comp = compare_edge_list_elem (&list->items[list->num_items-1], &old_elem[i] ); + if (comp > 0) { // element in old_elem is smaller then last elem in list + H5_PRIV_FUNC_LEAVE (H5_ERR_INVAL); // probably list wasn't sorted + } + if (comp < 0) { + memcpy (&list->items[list->num_items++], &old_elem[i], sizeof (*list->items)); + } + } + TRY (h5_free (old_elem)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +h5tpriv_sort_edge_list ( + h5_edge_list_t* list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "list=%p", list); + qsort(list->items,list->num_items, sizeof (*list->items), compare_edge_list_elem); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + +h5_int32_t +h5tpriv_find_edge_list ( + h5_edge_list_t* list, + h5t_edge_list_elem_t* elem + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "list=%p", list); + + comparison_fn_t comp_func; + comp_func.compare = compare_edge_list_elem; + // need linear search because we want to know first elem that hits. + h5t_edge_list_elem_t* retval = linsearch (elem, list->items ,list->num_items, sizeof (*list->items), comp_func); + if (retval == NULL) { + H5_PRIV_FUNC_LEAVE (list->num_items); + } + H5_PRIV_FUNC_RETURN (retval - list->items); // TODO check if that works +} +h5_err_t +h5tpriv_add_edge_list ( + h5_edge_list_t* list, + h5_glb_idx_t vtx1, + h5_glb_idx_t vtx2, + h5_loc_idx_t new_vtx, + h5_int32_t proc + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "list=%p", list); + h5t_edge_list_elem_t elem; + elem.vtx1 = vtx1 < vtx2 ? vtx1 : vtx2; // vtx1 < vtx2 always! + elem.vtx2 = vtx1 > vtx2 ? vtx1 : vtx2; + elem.new_vtx = (h5_glb_idx_t) new_vtx; // problem => first we would like to store loc_idx and later the glb_idx therefore cast here + // alternative would be to store two variables... + elem.proc = -1; + + // add edge + if (list->num_alloc == list->num_items) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INVAL); + } + list->items[list->num_items].vtx1 = elem.vtx1; + list->items[list->num_items].vtx2 = elem.vtx2; + list->items[list->num_items].new_vtx = elem.new_vtx; + list->items[list->num_items++].proc = proc; + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +//END TODO put in right place + print variables + +h5_err_t +h5tpriv_calc_chunk_statistic ( + h5t_mesh_t* const m, + FILE* file + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + if (file == NULL || m->chunks == NULL) { + H5_PRIV_FUNC_LEAVE (H5_SUCCESS); + } + fprintf (file, "# printing chunk statistics of file \n"); + fprintf (file, "# num_levels level max_elem num_chunks elems_p_level minfill maxfill avg_p_level avg_fill_p_level \n"); + int counter = 0; + h5_glb_idx_t* num_elems_p_level = NULL; + TRY (num_elems_p_level = h5_calloc (m->chunks->num_levels +1, sizeof (*num_elems_p_level))); + h5_glb_idx_t* min_elems_p_level = NULL; + TRY (min_elems_p_level = h5_calloc (m->chunks->num_levels +1, sizeof (*min_elems_p_level))); + h5_glb_idx_t* max_elems_p_level = NULL; + TRY (max_elems_p_level = h5_calloc (m->chunks->num_levels +1, sizeof (*max_elems_p_level))); + h5_float64_t* avg_p_level = NULL; + TRY (avg_p_level = h5_calloc (m->chunks->num_levels +1, sizeof (*avg_p_level))); + h5_float64_t* avgfill_p_level = NULL; + TRY (avgfill_p_level = h5_calloc (m->chunks->num_levels +1, sizeof (*avg_p_level))); + min_elems_p_level[ m->chunks->num_levels] = m->chunks->chunks[counter].num_elems; + max_elems_p_level[ m->chunks->num_levels] = m->chunks->chunks[counter].num_elems; + for (int i = 0; i < m->chunks->num_levels; i++) { + // calc avg + min_elems_p_level[i] = m->chunks->chunks[counter].num_elems; + max_elems_p_level[i] = m->chunks->chunks[counter].num_elems; + for (int j = 0; j < m->chunks->num_chunks_p_level[i]; j++) { + num_elems_p_level[i] += m->chunks->chunks[counter].num_elems; + num_elems_p_level[m->chunks->num_levels] += m->chunks->chunks[counter].num_elems; + min_elems_p_level[i] > m->chunks->chunks[counter].num_elems ? min_elems_p_level[i] = m->chunks->chunks[counter].num_elems : 0; + max_elems_p_level[i] < m->chunks->chunks[counter].num_elems ? max_elems_p_level[i] = m->chunks->chunks[counter].num_elems : 0; + counter++; + } + avg_p_level[i] = num_elems_p_level[i] / (double) m->chunks->num_chunks_p_level[i]; + avgfill_p_level[i] = avg_p_level[i] / max_num_elems_p_chunk; + min_elems_p_level[m->chunks->num_levels] > min_elems_p_level[i] ? min_elems_p_level[m->chunks->num_levels] = min_elems_p_level[i] : 0; + max_elems_p_level[m->chunks->num_levels] < max_elems_p_level[i] ? max_elems_p_level[m->chunks->num_levels] = max_elems_p_level[i] : 0; + } + avg_p_level[m->chunks->num_levels] = num_elems_p_level[m->chunks->num_levels] / (double) counter; + avgfill_p_level[m->chunks->num_levels] = avg_p_level[m->chunks->num_levels] / max_num_elems_p_chunk; + for (int i = 0; i <= m->chunks->num_levels; i++) { + if (i == m->chunks->num_levels) { + fprintf (file, " %6d %6d %9d %9d %10lld %10lld %10lld %10.4f %10.4f #avg over whole mesh\n\n", + m->chunks->num_levels, i, max_num_elems_p_chunk, counter, + (long long int) num_elems_p_level[i],(long long int)min_elems_p_level[i], + (long long int)max_elems_p_level[i],avg_p_level[i],avgfill_p_level[i]); + } else { + fprintf (file, " %6d %6d %9d %9d %10lld %10lld %10lld %10.4f %10.4f \n", + m->chunks->num_levels, i, max_num_elems_p_chunk, m->chunks->num_chunks_p_level[i], + (long long int) num_elems_p_level[i],(long long int)min_elems_p_level[i], + (long long int)max_elems_p_level[i],avg_p_level[i],avgfill_p_level[i]); + } + + } + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + * Calculate the global vertex range for the new vertices + * range[i] = first glb idx of proc i + * range[nproc] = next glb idx to assign + */ +h5_err_t +h5tpriv_get_vtx_ranges ( + h5t_mesh_t* const m, + h5_glb_idx_t* range + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, range=%p", m, range); + h5_glb_idx_t sendbuf = m->last_stored_vid - m->last_stored_vid_before_ref; + + TRY (h5priv_mpi_allgather ( + &sendbuf, + 1, + MPI_LONG, + &range[1], + 1, + MPI_LONG, + m->f->props->comm)); + + // set start of new vtx idx (because if leaf_level != 0 it was increased already) + if (m->leaf_level == 0) { + range[0] = 0; + } else { + range[0] = m->num_glb_vertices[m->leaf_level-1]; + } + // calc range + for (int i = 1; i <= m->f->nprocs; i++) { + range[i] += range[i-1]; + } + + if (m->leaf_level == 0) { + m->num_glb_vertices[0] = range[m->f->myproc]; + } else { + m->num_glb_vertices[m->leaf_level-1] = range[m->f->myproc]; + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif +/* + Assign unique global indices to vertices. + */ +static h5_err_t +assign_global_vertex_indices ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + h5_loc_idx_t local_idx = (m->leaf_level == 0) ? + 0 : m->num_loc_vertices[m->leaf_level-1]; + + +#ifdef PARALLEL_IO + // exchange num vertices and calc range + h5_glb_idx_t* range = NULL; + TRY (range = h5_calloc (m->f->nprocs + 1, sizeof (*range))); + TRY (h5tpriv_get_vtx_ranges (m, range)); + int counter = 0; + for (;local_idx < m->num_loc_vertices[m->num_leaf_levels-1]; + local_idx++, counter++) { + m->vertices[local_idx].idx = range[m->f->myproc] + counter; + } + if (counter + range[m->f->myproc] != range[m->f->myproc + 1]) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INTERNAL); + } + TRY (h5_free (range)); +#else + /* + simple in serial runs: global_id = local_id + */ + + for (; + local_idx < m->num_loc_vertices[m->num_leaf_levels-1]; + local_idx++) { + m->vertices[local_idx].idx = local_idx; + } +#endif + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * there is a different version needed for after the refinement because + * not all vertices need to get a glb_idx from this proc + */ + +static h5_err_t +assign_global_vertex_indices_chk ( + h5t_mesh_t* const m, + h5_loc_idxlist_t* vtx_list, // list with vertices that don't need to be assigned + h5_glb_idx_t* vtx_range + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, vtx_list=%p, vtx_range=%p", m, vtx_list, vtx_range); + h5_loc_idx_t local_idx = (m->leaf_level == 0) ? + 0 : m->num_loc_vertices[m->leaf_level-1]; // should not be 0 since only after ref... + + int counter = 0; + for (;local_idx < m->num_loc_vertices[m->num_leaf_levels-1]; + local_idx++) { + + h5_loc_idx_t retval = h5priv_find_in_loc_idxlist (vtx_list, local_idx); + if (retval < 0) { + // idx needs to be assigned. + m->vertices[local_idx].idx = vtx_range[m->f->myproc] + counter; + counter++; + } + } + if (counter + vtx_range[m->f->myproc] != vtx_range[m->f->myproc + 1]) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INTERNAL); + } + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/*! + Assign unique global indices to new elements. + */ +static h5_err_t +assign_glb_elem_indices ( + h5t_mesh_t* const m + ) { + /* + simple in serial runs: global index = local index + */ + h5_loc_idx_t loc_idx = (m->leaf_level == 0) ? 0 : m->num_interior_elems[m->leaf_level-1]; + + for (; loc_idx < m->num_interior_elems[m->leaf_level]; loc_idx++) { + h5tpriv_set_loc_elem_glb_idx (m, loc_idx, loc_idx); + } + + return H5_SUCCESS; +} + +/*! + Assign unique global indices to new elements. + */ +static h5_err_t +assign_glb_elem_indices_chk ( //TODO use ifdef instead of new func name + h5t_mesh_t* const m, + h5_glb_idx_t* range + ) { + + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, range=%p", m, range); + + h5_loc_idx_t loc_idx = (m->leaf_level == 0) ? 0 : m->num_interior_elems[m->leaf_level-1]; + int counter = 0; + for (; loc_idx < m->num_interior_elems[m->leaf_level]; loc_idx++, counter++) { + h5tpriv_set_loc_elem_glb_idx (m, loc_idx, range[m->f->myproc] + counter); + } + + if (counter + range[m->f->myproc] != range[m->f->myproc + 1]) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INTERNAL); + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); + +} + + +h5_lvl_idx_t +h5tpriv_add_level ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_lvl_idx_t, "m=%p", m); + CHECK_WRITABLE_MODE(m->f); + + m->leaf_level = m->num_leaf_levels++; + m->num_loaded_levels = m->num_leaf_levels; + + TRY (m->num_glb_vertices = h5_alloc (m->num_glb_vertices, m->num_leaf_levels*sizeof (*m->num_glb_vertices))); + TRY (m->num_loc_vertices = h5_alloc (m->num_loc_vertices, m->num_leaf_levels*sizeof (*m->num_loc_vertices))); + + TRY (m->num_b_vtx = h5_alloc (m->num_b_vtx, m->num_leaf_levels*sizeof (*m->num_b_vtx))); + TRY (m->first_b_vtx = h5_alloc (m->first_b_vtx, m->num_leaf_levels*sizeof (*m->first_b_vtx))); + + TRY (m->num_glb_elems = h5_alloc (m->num_glb_elems, m->num_leaf_levels*sizeof (*m->num_glb_elems))); + TRY (m->num_glb_leaf_elems = h5_alloc (m->num_glb_leaf_elems, m->num_leaf_levels*sizeof (*m->num_glb_leaf_elems))); + TRY (m->num_interior_elems = h5_alloc (m->num_interior_elems, m->num_leaf_levels*sizeof (*m->num_interior_elems))); + TRY (m->num_interior_leaf_elems = h5_alloc (m->num_interior_leaf_elems, m->num_leaf_levels*sizeof (*m->num_interior_leaf_elems))); + TRY (m->num_ghost_elems = h5_alloc (m->num_ghost_elems, m->num_leaf_levels*sizeof (*m->num_ghost_elems))); + + m->num_glb_vertices[m->leaf_level] = -1; + m->num_loc_vertices[m->leaf_level] = -1; + + m->num_glb_elems[m->leaf_level] = -1; + m->num_glb_leaf_elems[m->leaf_level] = -1; + m->num_interior_elems[m->leaf_level] = -1; + m->num_interior_leaf_elems[m->leaf_level] = -1; + m->num_ghost_elems[m->leaf_level] = 0; + + if (m->leaf_level == 0) { + /* nothing stored yet */ + m->last_stored_vid = -1; + m->last_stored_eid = -1; + m->last_stored_vid_before_ref = -1; + m->last_stored_eid_before_ref = -1; + } else { + assert (m->last_stored_vid == m->num_loc_vertices[m->leaf_level - 1] - 1); + assert (m->last_stored_eid == m->num_interior_elems[m->leaf_level - 1] - 1); + } + + H5_CORE_API_RETURN (m->leaf_level); +} + +/*! + Allocate memory for (more) vertices. + */ +h5_err_t +h5t_begin_store_vertices ( + h5t_mesh_t* const m, + const h5_size_t num + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p, num=%llu", m, (long long unsigned)num); + if (m->leaf_level < 0) { + H5_CORE_API_LEAVE (h5tpriv_error_undef_level()); + } + h5_size_t cur_num_loc_vertices = (m->leaf_level > 0 ? + m->num_loc_vertices[m->leaf_level-1] : 0); + m->last_stored_vid = cur_num_loc_vertices - 1; + m->last_stored_vid_before_ref = m->last_stored_vid; + m->num_loc_vertices[m->leaf_level] = cur_num_loc_vertices+num; + m->dsinfo_vertices.dims[0] = cur_num_loc_vertices+num; + H5_CORE_API_RETURN (h5tpriv_alloc_loc_vertices (m, cur_num_loc_vertices+num)); +} + +h5_loc_idx_t +h5t_store_vertex ( + h5t_mesh_t* const m, /*!< file handle */ + const h5_glb_idx_t glb_id, /*!< global vertex id from mesher or -1 */ + const h5_float64_t P[3] /*!< coordinates */ + ) { + H5_CORE_API_ENTER (h5_loc_idx_t, + "m=%p, glb=id=%lld, P=%p", + m, + (long long)glb_id, + P); + + // more than allocated + if (m->last_stored_vid+1 >= m->num_loc_vertices[m->leaf_level]) + H5_CORE_API_LEAVE (HANDLE_H5_OVERFLOW_ERR( + m->num_loc_vertices[m->leaf_level])); + + h5_loc_idx_t local_idx = ++m->last_stored_vid; + h5_loc_vertex_t *vertex = &m->vertices[local_idx]; + vertex->idx = glb_id; /* ID from mesher, replaced later!*/ + memcpy (&vertex->P, P, sizeof (vertex->P)); + H5_CORE_API_RETURN (local_idx); +} + +h5_err_t +h5t_end_store_vertices ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p", m); + + m->num_loc_vertices[m->leaf_level] = m->last_stored_vid+1; + TRY (assign_global_vertex_indices (m)); + TRY (h5tpriv_rebuild_map_vertex_g2l_partial (m)); + m->last_stored_vid_before_ref = -1; + H5_CORE_API_RETURN (H5_SUCCESS); +} + +/*! + Initialize everything so that we can begin to store elements. + + \param[in] f file handle + \param[in] num number of elements to add + */ +h5_err_t +h5t_begin_store_elems ( + h5t_mesh_t* const m, + const h5_size_t num, + const h5_weight_t num_weights + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, num=%llu, num_weights=%d", + m, (long long unsigned)num, num_weights); + + h5_debug ("begin storing %llu elements", (long long)num); + size_t cur = m->leaf_level > 0 ? m->num_interior_elems[m->leaf_level-1] : 0; + m->last_stored_eid = cur - 1; + size_t new = num + cur; + m->dsinfo_elems.dims[0] = new; + + m->num_interior_elems[m->leaf_level] = new; + + m->num_interior_leaf_elems[m->leaf_level] = m->leaf_level > 0 ? + num + m->num_interior_leaf_elems[m->leaf_level-1] : num; + + m->num_weights = num_weights; + if (m->leaf_level == 0) { + TRY (m->weights = h5_calloc(num_weights * num, sizeof (* m->weights) )); + if (m->num_weights < 1) { + m->weights = NULL; + } + } else { + // we don't now how many glb elems -> alloc needs to be later + } + + m->last_stored_eid_before_ref = m->last_stored_eid; + + H5_CORE_API_RETURN (h5tpriv_alloc_loc_elems (m, cur, new)); +} + + +/*! + Store element. The vertices are given via their local indices. + + \param[in] f File handle. + \param[in] elem_idx_of_parent Local indexd of the parent element + or \c -1. + \param[in] vertices Local vertex indices defining the + tetrahedron. + */ +h5_loc_idx_t +h5t_store_elem ( + h5t_mesh_t* const m, + const h5_loc_idx_t parent_idx, + const h5_loc_idx_t* vertex_indices, + const h5_weight_t* weights + ) { + H5_CORE_API_ENTER (h5_loc_idx_t, + "m=%p, parent_idx=%lld, vertex_indices=%p, weights=%p", + m, + (long long)parent_idx, + vertex_indices, + weights); + + /* more than allocated? */ + if ( m->last_stored_eid+1 >= m->num_interior_elems[m->leaf_level] ) + H5_CORE_API_LEAVE ( + HANDLE_H5_OVERFLOW_ERR (m->num_interior_elems[m->leaf_level])); + + /* check parent id */ + if ((m->leaf_level == 0 && parent_idx != -1) || + (m->leaf_level > 0 && parent_idx < 0) || + (m->leaf_level > 0 + && parent_idx >= m->num_interior_elems[m->leaf_level-1]) + ) { + H5_CORE_API_LEAVE ( + HANDLE_H5_PARENT_ID_ERR (parent_idx)); + } + + /* store elem data (but neighbors) */ + h5_loc_idx_t elem_idx = ++m->last_stored_eid; + h5tpriv_set_loc_elem_parent_idx (m, elem_idx, parent_idx); + h5tpriv_set_loc_elem_child_idx (m, elem_idx, -1); + h5tpriv_set_loc_elem_level_idx (m, elem_idx, m->leaf_level); + + // get ptr to local vertices store + h5_loc_idx_t* loc_vertex_indices = h5tpriv_get_loc_elem_vertex_indices ( + m, elem_idx); + int num_vertices = h5tpriv_ref_elem_get_num_vertices (m); + memcpy (loc_vertex_indices, vertex_indices, + sizeof (*vertex_indices)*num_vertices); + + + if (m->leaf_level > 0) { + /* add edges to map edges -> elements */ + h5_loc_idx_t face_idx; + int num_faces = h5tpriv_ref_elem_get_num_edges (m); + for (face_idx = 0; face_idx < num_faces; face_idx++) { + // add edges to neighbour struct + TRY (h5tpriv_enter_te2 (m, face_idx, elem_idx, NULL)); + } + } + if (weights != NULL && m->leaf_level == 0) { + memcpy (&m->weights[elem_idx * m->num_weights], weights, sizeof (*m->weights) * m->num_weights); + for (int i = 0; i < m->num_weights; i++) { + if (m->weights[elem_idx * m->num_weights + i] < 1) { + m->weights[elem_idx * m->num_weights + i] = 1; + } + } + } + H5_CORE_API_RETURN (elem_idx); +} +h5_loc_idx_t +h5t_store_elem2 ( + h5t_mesh_t* const m, + const h5_loc_idx_t parent_idx, + const h5_loc_idx_t* vertex_indices, + const h5_weight_t* weights + ) { + H5_CORE_API_ENTER (h5_loc_idx_t, + "m=%p, parent_idx=%lld, vertex_indices=%p, weights=%p", + m, + (long long)parent_idx, + vertex_indices, + weights); + h5t_store_elem (m, parent_idx, vertex_indices, weights); + h5_loc_idx_t* loc_vertex_indices = h5tpriv_get_loc_elem_vertex_indices ( + m, m->last_stored_eid); + int num_vertices = h5tpriv_ref_elem_get_num_vertices (m); + TRY (h5tpriv_sort_local_vertex_indices (m, loc_vertex_indices, num_vertices)); + H5_CORE_API_RETURN (m->last_stored_eid); +} +/* + Rebuild mapping of global element indices to their local indices. + */ +h5_err_t +rebuild_map_elem_g2l ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + if (m->num_leaf_levels <= 0) H5_PRIV_API_LEAVE (H5_SUCCESS); + + h5_idxmap_t* map = &m->map_elem_g2l; + h5_loc_idx_t loc_idx = m->leaf_level > 0 ? m->num_interior_elems[m->leaf_level-1] : 0; + h5_loc_idx_t num_interior_elems = m->num_interior_elems[m->num_leaf_levels-1]; + + /* (re-)alloc mem for global to local ID mapping */ + TRY (h5priv_grow_idxmap (map, num_interior_elems)); + + h5_idxmap_el_t *item = &map->items[loc_idx]; + for (; loc_idx < num_interior_elems; loc_idx++, item++) { + item->glb_idx = h5tpriv_get_loc_elem_glb_idx (m, loc_idx); + item->loc_idx = loc_idx; + map->num_items++; + } + h5priv_sort_idxmap (map); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + Rebuild mapping of global element indices to their local indices. + */ +h5_err_t +rebuild_map_elem_g2l_partial ( // we need that to update map for the refined elems before we have the + // refined elements from the other proces + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + if (m->num_leaf_levels <= 0) H5_PRIV_API_LEAVE (H5_SUCCESS); + + h5_idxmap_t* map = &m->map_elem_g2l; + h5_loc_idx_t loc_idx = m->last_stored_eid_before_ref +1; + h5_loc_idx_t num_interior_elems = m->last_stored_eid - m->last_stored_eid_before_ref; + + /* (re-)alloc mem for global to local ID mapping */ + TRY (h5priv_grow_idxmap (map, map->size + num_interior_elems)); + + h5_idxmap_el_t *item = &map->items[loc_idx]; + for (; loc_idx <= m->last_stored_eid ; loc_idx++, item++) { + item->glb_idx = h5tpriv_get_loc_elem_glb_idx (m, loc_idx); + item->loc_idx = loc_idx; + map->num_items++; + } + assert (map->size >= map->num_items); + h5priv_sort_idxmap (map); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +h5t_end_store_elems ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p", m); + h5_debug ("end storing elements"); + m->num_interior_elems[m->leaf_level] = m->last_stored_eid+1; + m->num_glb_elems[m->leaf_level] = m->last_stored_eid+1; + m->num_glb_leaf_elems[m->leaf_level] = m->num_interior_leaf_elems[m->leaf_level]; + m->last_stored_eid_before_ref = -1; + + /* assign global indices to new indices */ + TRY (assign_glb_elem_indices (m)); + + /* rebuild map: global index -> local_index */ + TRY (rebuild_map_elem_g2l (m)); + + /* mesh specific finalize */ + TRY (m->methods->store->end_store_elems (m)); + + H5_CORE_API_RETURN (H5_SUCCESS); +} +/* + * linear search trough chunks to find chk_idx which contains element + */ +static h5_err_t +h5tpriv_find_chk_of_elem ( + h5t_mesh_t* m, + h5_loc_id_t id, + h5_chk_idx_t* chk_idx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, id=%lld, chk_idx=%p", m, (long long int)id, chk_idx); + h5_glb_idx_t glb_idx = h5tpriv_get_loc_elem_glb_idx (m, h5tpriv_get_elem_idx (id)); + + // calc total num chunks + h5_chk_idx_t total_num_chunks = 0; + for (int i = 0; i < m->chunks->num_levels; i++) { + total_num_chunks += m->chunks->num_chunks_p_level[i]; + } + for (h5_chk_idx_t i = 0; i < total_num_chunks; i++) { + if (glb_idx >= m->chunks->chunks[i].elem && + glb_idx < m->chunks->chunks[i].elem + m->chunks->chunks[i].num_elems) { + // elem is contained in chunk + *chk_idx = i; + H5_PRIV_FUNC_LEAVE (H5_SUCCESS); + } + + } + H5_PRIV_FUNC_RETURN (H5_ERR_INVAL); +} +/* + * compare chk_idx + */ +int compare_vtx_chk_list(const void *p_a, const void *p_b) { + return ((h5t_vtx_chk_list_t*) p_a)->chk - ((h5t_vtx_chk_list_t*) p_b)->chk; +} + +#ifdef CHUNKING_OF_VTX +static h5_err_t +h5tpriv_calc_vtx_permutation ( + h5t_mesh_t* m, + h5t_vtx_chk_list_t* permut + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, permut=%p", m, permut); + h5t_vtx_chk_list_t* b_vtx = NULL; // boundary vertices + TRY (b_vtx = h5_calloc (m->num_loc_vertices[m->leaf_level], sizeof (*b_vtx))); + memset (b_vtx, -1,m->num_loc_vertices[m->leaf_level]*sizeof (*b_vtx)); + + h5_chk_idx_t* chk_idx_of_vtx = NULL; // allows us also to sort vtx acc to chunks + TRY (chk_idx_of_vtx = h5_calloc (m->num_loc_vertices[m->leaf_level], sizeof (*chk_idx_of_vtx))); + h5_loc_idx_t counter = 0; + h5_loc_idx_t b_counter = 0; + h5_loc_idlist_t* list = NULL; + + + for (h5_loc_idx_t i = 0; i < m->num_loc_vertices[m->leaf_level]; i++) { + // get list of elems for vertex i + TRY (h5tpriv_find_tv3 (m, i, &list)); + h5_chk_idx_t old_chk_idx = -1; + h5_chk_idx_t chk_idx = -1; + int done = 0; + for (int j = 0; j < list->num_items; j++) { + TRY ( h5tpriv_find_chk_of_elem (m, list->items[j], &chk_idx)); + if (j == 0) { + old_chk_idx = chk_idx; + } + if (old_chk_idx != chk_idx) { + // vtx is a chunk boundary vtx + b_vtx[b_counter++].vtx = i; + done = 1; + break; + } + + } + if (!done) { + // vtx is a inner chunk vtx + permut[counter].vtx = i; + permut[counter++].chk = chk_idx; + } + } + if (counter + b_counter != m->num_loc_vertices[m->leaf_level]) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INTERNAL); + } + // sort vtx acc to chunk + qsort (permut, counter, sizeof (*permut), compare_vtx_chk_list); + + memcpy (&permut[counter], b_vtx, b_counter * sizeof (*permut)); + + m->num_b_vtx[0] = b_counter; + m->first_b_vtx[0] = counter; + + TRY (h5_free (b_vtx)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + * calculate the reverse permutation access old_idx gives new_idx + */ +static h5_err_t +h5tpriv_calc_vtx_revpermutation ( + h5t_mesh_t* m, + h5t_vtx_chk_list_t* permut, + h5t_vtx_chk_list_t* rev_permut + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, permut=%p, rev_permut=%p", m, permut, rev_permut); + for (int i = 0; i < m->num_loc_vertices[m->leaf_level]; i++) { + h5_loc_idx_t vtx = permut[i].vtx; + rev_permut[vtx].vtx = i; + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif // CHUNKING_OF_VTX + +// used to chunk vtx +//static h5_err_t +//h5tpriv_store_vtx_range_to_chk ( +// h5t_mesh_t* m, +// h5t_vtx_chk_list_t* permut +// ) { +// H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, permut=%p", m, permut); +// assert (m->f->nprocs == 1); +// int counter = 0; +// h5_chk_idx_t chk_idx = -1; +// h5_glb_idx_t first_vtx = -1; +// for (int i = 0; i < m->num_loc_vertices[m->leaf_level]; i++) { +// first_vtx = i; +// chk_idx = permut[i].chk; +// counter = 1; +// while (i + 1 < m->num_loc_vertices[m->leaf_level] && chk_idx == permut[i+1].chk) { +// counter++; +// i++; +// } +// if (chk_idx != -1) { +// m->chunks->chunks[chk_idx].vtx = first_vtx; +// m->chunks->chunks[chk_idx].num_vtx = counter; +// } +// } +// H5_PRIV_FUNC_RETURN (H5_SUCCESS); +//} + + +h5_err_t +h5t_end_store_ckd_elems ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p", m); + h5_debug ("end storing elements"); +#ifdef PARALLEL_IO + m->num_interior_elems[m->leaf_level] = m->last_stored_eid+1; + m->num_glb_elems[m->leaf_level] = m->last_stored_eid+1;// only works for serial case + m->num_glb_leaf_elems[m->leaf_level] = m->num_interior_leaf_elems[m->leaf_level]; + + if (m->leaf_level == 0) { + // calculate midpoints of elements + h5_oct_point_t* midpoints; + TRY (midpoints = h5_calloc (m->num_glb_elems[0], sizeof (*midpoints))); + h5_loc_idx_t curr_midp = 0; + + h5_float64_t bb[6]; // for calculating bounding box + int num_faces = h5tpriv_ref_elem_get_num_edges (m); + int num_vertices = h5tpriv_ref_elem_get_num_vertices (m); + + for (h5_loc_idx_t i = 0; i < m->num_glb_elems[0]; i++) { + h5_loc_idx_t* indices; //[4] = {-1, -1, -1, -1}; + indices = h5tpriv_get_loc_elem_vertex_indices (m, i); + h5_float64_t midpoint[3] = {0, 0, 0}; + h5_float64_t P[3]; + + for (int j = 0; j < num_vertices; j++) { + TRY (h5t_get_vertex_coords_by_index (m, indices[j], P)); + midpoint[0] += P[0]; + midpoint[1] += P[1]; + midpoint[2] += P[2]; + if (i == 0 && j == 0) { + bb[0] = P[0]; + bb[1] = P[1]; + bb[2] = P[2]; + bb[3] = P[0]; + bb[4] = P[1]; + bb[5] = P[2]; + } else { + bb[0] = (P[0] < bb[0]) ? P[0] : bb[0]; + bb[1] = (P[1] < bb[1]) ? P[1] : bb[1]; + bb[2] = (P[2] < bb[2]) ? P[2] : bb[2]; + bb[3] = (P[0] > bb[3]) ? P[0] : bb[3]; + bb[4] = (P[1] > bb[4]) ? P[1] : bb[4]; + bb[5] = (P[2] > bb[5]) ? P[2] : bb[5]; + } + } + midpoints[curr_midp].x = midpoint[0] / 3.0; + midpoints[curr_midp].y = midpoint[1] / 3.0; + midpoints[curr_midp].z = midpoint[2] / 3.0; + midpoints[curr_midp].oct = -1; + midpoints[curr_midp].elem = i; + curr_midp++; + } + + bb[3] += 0.1; + + bb[4] += 0.1; + + bb[5] += 0.1; + + TRY (H5t_set_bounding_box (m->octree, bb)); + + TRY (H5t_set_maxpoints (m->octree, max_num_elems_p_chunk/ h5tpriv_get_num_new_elems(m))); + + TRY (H5t_refine_w_points(m->octree, midpoints, m->num_glb_elems[0], max_num_elems_p_chunk)); + + TRY (H5t_add_points_to_leaf (m->octree, midpoints, m->num_glb_elems[0])); + + // set octree userlevel + h5t_oct_iterator_t* iter = NULL; + + TRY (H5t_init_leafoct_iterator (m->octree, &iter)); + + h5_oct_idx_t oct_idx; + while ((oct_idx = H5t_iterate_oct (iter)) != -1) { + TRY (H5t_set_userlevel (m->octree, oct_idx, 0)); + } + TRY (H5t_end_iterate_oct (iter)); + + TRY (H5t_update_internal (m->octree)); + // reorder elements + // midpoints where already ordered according to octants (i.e. chunks) + + h5_loc_idx_t size = m->num_interior_elems[m->leaf_level]; + h5_loc_elem_t* loc_elems = m->loc_elems; + m->loc_elems = NULL; + TRY (h5tpriv_alloc_loc_elems (m, 0, size)); + + //TODO include ordering in subchunks + h5_loc_idx_t* loc_vertex_indices; + h5_loc_idx_t* old_loc_vertex_indices; + // could get a problem is no element is added + h5_chk_idx_t num_chunks = 1; + h5_oct_idx_t old_idx = midpoints[0].oct; + + h5_weight_t* old_weights = m->weights; + TRY (m->weights = h5_calloc(m->num_weights * m->num_glb_elems[0], sizeof (* m->weights) )); + if (m->num_weights < 1) { + m->weights = NULL; + } + h5t_oct_count_list_t oct_c_list; + oct_c_list.num_items = 0; + oct_c_list.size = size; + TRY (oct_c_list.items = h5_calloc (size, sizeof (*oct_c_list.items))); + oct_c_list.items[oct_c_list.num_items++].oct = midpoints[0].oct; + int running_counter = 0; + // copy the elements into the right order + for (int i = 0; i < size; i++) { + if (midpoints[i].oct != old_idx) { + // this will be a new chunk + num_chunks++; + old_idx = midpoints[i].oct; + oct_c_list.items[oct_c_list.num_items].oct = old_idx; + oct_c_list.items[oct_c_list.num_items-1].count = i - running_counter; + running_counter = i; + oct_c_list.num_items++; + } + // permute weights + memcpy(&m->weights[i*m->num_weights], + &old_weights[midpoints[i].elem *m->num_weights], + sizeof (*m->weights) * m->num_weights); + + loc_vertex_indices = h5tpriv_get_loc_elem_vertex_indices (m, i); + + old_loc_vertex_indices = h5tpriv_get_loc_elem_vertex_indices_of_array (m, midpoints[i].elem, loc_elems); + + h5tpriv_set_loc_elem_parent_idx (m, i, -1); + h5tpriv_set_loc_elem_child_idx (m, i, -1); + h5tpriv_set_loc_elem_level_idx (m, i, m->leaf_level); + + memcpy (loc_vertex_indices, old_loc_vertex_indices, num_vertices * sizeof (*loc_vertex_indices)); + + /* add edges to map edges -> elements */ + h5_loc_idx_t face_idx; + + for (face_idx = 0; face_idx < num_faces; face_idx++) { + // add edges to neighbour struct + TRY (h5tpriv_enter_te2 (m, face_idx, i, NULL)); + } + + } + oct_c_list.items[oct_c_list.num_items-1].count = size - running_counter; + + // free loc_elems + TRY (h5_free (loc_elems)); + + // free old_weights + TRY (h5_free (old_weights)); + + // set up chunk structure + TRY (h5tpriv_init_chunks (m)); + + TRY (h5tpriv_grow_chunks (m, num_chunks)); + + // create chunks + h5_glb_idx_t elem_range[2]; + elem_range[0] = 0; + elem_range[1] = m->num_glb_elems[m->leaf_level]; + h5_glb_idx_t chk_range[2]; + chk_range[0] = 0; + chk_range[1] = num_chunks; + TRY (h5tpriv_store_chunks (m, &oct_c_list, num_chunks, elem_range, chk_range)); + TRY (h5_free (oct_c_list.items)); + + h5t_oct_userdata_t* userdata = NULL; + //store userdata to chunks + for (int j = 0; j < num_chunks; j++) { + TRY (H5t_get_userdata_rw (m->octree, m->chunks->chunks[j].oct_idx,(void **) &userdata)); + userdata->idx[0] = (h5_chk_idx_t) j; + } + + TRY (H5t_update_userdata (m->octree)); + TRY (h5_free (midpoints)); + } + + + + /* assign global indices to new indices */ + TRY (assign_glb_elem_indices (m)); + + /* rebuild map: global index -> local_index */ + TRY (rebuild_map_elem_g2l (m)); + + /* mesh specific finalize */ + TRY (m->methods->store->end_store_elems (m)); + + +#ifdef CHUNKING_OF_VTX + // abbandon chunking of vtx for time reasons + if (m->leaf_level == 0) { + // sort vertices + //calculate permutation + h5t_vtx_chk_list_t* permut = NULL; + TRY (permut = h5_calloc (m->num_loc_vertices[m->leaf_level], sizeof (*permut))); + memset (permut, -1,m->num_loc_vertices[m->leaf_level]*sizeof (*permut)); + TRY (h5tpriv_calc_vtx_permutation (m, permut)); + + h5t_vtx_chk_list_t* rev_permut = NULL; // here is the reverse permutation + TRY (rev_permut = h5_calloc (m->num_loc_vertices[m->leaf_level], sizeof (*rev_permut))); + + TRY (h5tpriv_calc_vtx_permutation (m, permut)); + + TRY (h5tpriv_calc_vtx_revpermutation (m, permut, rev_permut)); + + // permute vertices + h5_loc_vertex_t* vertices = m->vertices; + m->vertices = NULL; + TRY (h5tpriv_alloc_loc_vertices (m, *m->num_loc_vertices)); + for (h5_loc_idx_t i = 0; i < *m->num_loc_vertices; i++) { + memcpy (&m->vertices[i], &vertices[permut[i].vtx], sizeof (*vertices)); + } + TRY (h5_free (vertices)); + TRY (assign_global_vertex_indices (m)); + TRY (h5_free (m->map_vertex_g2l.items)); + m->map_vertex_g2l.items = NULL; + size_t size = m->num_loc_vertices[m->leaf_level] + 128; + TRY (h5priv_new_idxmap (&m->map_vertex_g2l, size)); + TRY (h5tpriv_rebuild_map_vertex_g2l (m, m->leaf_level, m->leaf_level)); + m->last_stored_vid_before_ref = -1; + // update elements + + // permute vertex_indices + for (h5_loc_idx_t i = 0; i < *m->num_glb_elems; i++) { + h5_loc_idx_t* vertex_indices = NULL; + int num_vtx = h5tpriv_ref_elem_get_num_vertices(m); + vertex_indices = h5tpriv_get_loc_elem_vertex_indices (m, i); + for (int j = 0; j < num_vtx; j++) { + vertex_indices[j] = rev_permut[vertex_indices[j]].vtx; + } + TRY (h5tpriv_sort_local_vertex_indices (m, vertex_indices, num_vtx)); + + // TODO is this necessary or already done with end store elems + /* add edges to map edges -> elements */ + h5_loc_idx_t face_idx; + int num_faces = h5tpriv_ref_elem_get_num_edges (m); + for (face_idx = 0; face_idx < num_faces; face_idx++) { + // add edges to neighbour struct + TRY (h5tpriv_enter_te2 (m, face_idx, i, NULL)); + } + + } + // store vtx info to chunks + TRY (h5tpriv_store_vtx_range_to_chk (m, permut)); +// /* mesh specific finalize */ +// TRY (m->methods->store->end_store_elems (m)); + } +#endif // CHUNKING_OF_VTX + +#endif + H5_CORE_API_RETURN (H5_SUCCESS); +} + +#ifdef PARALLEL_IO +h5_err_t +h5tpriv_find_oct_proc_of_point ( + h5t_mesh_t* m, + h5_loc_idx_t loc_idx, + h5_oct_point_t* point, + h5_int32_t* proc + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, loc_idx=%lld, point=%p, proc=%d", m, (long long int)loc_idx, point,*proc); + h5_loc_idx_t* indices = h5tpriv_get_loc_elem_vertex_indices (m, loc_idx); + h5_float64_t midpoint[3] = {0, 0, 0}; + h5_float64_t P[3]; + int num_vertices = h5tpriv_ref_elem_get_num_vertices (m); + + for (int j = 0; j < num_vertices; j++) { + TRY (h5t_get_vertex_coords_by_index (m, indices[j], P)); + midpoint[0] += P[0]; + midpoint[1] += P[1]; + midpoint[2] += P[2]; + } + point->x = midpoint[0] / ((double) num_vertices); + point->y = midpoint[1] / ((double) num_vertices); + point->z = midpoint[2] / ((double) num_vertices); + + point->elem = -1; + // check in which octant the new elems would be + TRY (point->oct = H5t_find_leafoctant_of_point (m->octree, 0, H5t_get_bounding_box (m->octree), point)); + // get proc of octant + *proc = H5t_get_proc (m->octree, point->oct); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +int compare_midpoint_oct (const void *p_a, const void *p_b) { + return ((h5_oct_point_t*) p_a)->oct - ((h5_oct_point_t*) p_b)->oct; +} +/* + * Update the marked_entities list such that it contains all elements that are + * going to be refined with the current proc + */ +h5_err_t +h5tpriv_mark_chk_elems_to_refine ( + h5t_mesh_t* const m, + h5_glb_idxlist_t* glb_list, + h5_oct_point_t* midpoint_list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, glb_list=%p", m, glb_list); + // clear marked_entities list + TRY (h5priv_free_loc_idlist (&m->marked_entities)); + TRY (h5priv_alloc_loc_idlist (&m->marked_entities, MAX_NUM_ELEMS_TO_REFINE_LOCALLY)); + + h5_glb_idx_t glb_idx = -1; + h5_loc_idx_t loc_idx = -1; + h5_oct_point_t point; + int counter = 0; + // go through all elems + for (int i = 0; i < glb_list->num_items; i++) { + glb_idx = glb_list->items[i]; + + // check if element is locally available (if not some other proc needs to refine it) + loc_idx = h5t_map_glb_elem_idx2loc(m, glb_idx); + if (loc_idx >= 0) { + // check in which octant the element is + h5_int32_t proc = -1; + TRY (h5tpriv_find_oct_proc_of_point (m, loc_idx, &point, &proc)); //TODO maybe use hash table here!!! + + if (proc == m->f->myproc && // needs to be in my octant + h5priv_find_in_loc_idlist(m->marked_entities, loc_idx) < 0 && // not already in list + h5tpriv_get_loc_elem_child_idx (m, loc_idx) == -1) { // not refined already + // element is in octant of this proc, add to marked list + TRY (h5priv_search_in_loc_idlist (&m->marked_entities, loc_idx)); + + midpoint_list[counter].x = point.x; + midpoint_list[counter].y = point.y; + midpoint_list[counter].z = point.z; + midpoint_list[counter].oct = point.oct; + midpoint_list[counter].elem = h5tpriv_get_loc_elem_glb_idx(m, loc_idx); + counter++; + } + } + } + // sort midpoint list such that they are aligned according to octants + qsort (midpoint_list, counter, sizeof (*midpoint_list), compare_midpoint_oct); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif +/* + Mark entity for further processing (e.g. refinement). + */ +h5_err_t +h5t_mark_entity ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p, entity_id=%llu", + m, (long long unsigned)entity_id); + H5_CORE_API_RETURN (h5priv_insert_into_loc_idlist (&m->marked_entities, entity_id, -1)); +} + +h5_err_t +h5t_pre_refine ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p", m); + H5_CORE_API_RETURN (m->methods->store->pre_refine (m)); +} +#ifdef PARALLEL_IO +//TODO maybe use ifdef to have name without _chk +h5_err_t +h5t_pre_refine_chk ( + h5t_mesh_t* const m, + h5_glb_idxlist_t** glb_list, + h5_oct_point_t** point_list + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p", m); + // exchange list of marked entities + TRY (*point_list = h5_calloc (m->num_glb_leaf_elems[m->leaf_level-1], sizeof (**point_list))); // alloc for maximal num elems to refine + + TRY (h5priv_exchange_loc_list_to_glb (m, glb_list)); + h5_glb_idxlist_t* glb_marked_entities = *glb_list; + + // decide which elements this proc has to refine + TRY (h5tpriv_mark_chk_elems_to_refine (m, glb_marked_entities, *point_list)); + + //TODO maybe check that sum of m->marked_entities->num_items over all proc is equal to glb_marked_entities->num_items + // this would find out if there is a problem with loading neighboring chunks... + + H5_CORE_API_RETURN (m->methods->store->pre_refine (m)); +} +#endif +/* + Refine previously marked elements. + */ +h5_err_t +h5t_refine_marked_elems ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p", m); + int i; + for (i = 0; i < m->marked_entities->num_items; i++) { + TRY (h5tpriv_refine_elem (m, m->marked_entities->items[i])); + } + H5_CORE_API_RETURN (H5_SUCCESS); +} + +#ifdef PARALLEL_IO +/* + * Calculate the global entity range + * range[i] = first glb entity of proc i + * range[nproc] = next idx to assign + */ +h5_err_t +h5tpriv_get_ranges ( + h5t_mesh_t* const m, + h5_glb_idx_t* range, + h5_glb_idx_t mycount, + h5_glb_idx_t glb_start + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, range=%p, mycount=%lld, glb_start=%lld", m, range, (long long int) mycount, (long long int) glb_start); + + TRY (h5priv_mpi_allgather ( + &mycount, + 1, + MPI_LONG, + &range[1], + 1, + MPI_LONG, + m->f->props->comm)); + + range[0] = glb_start; + + for (int i = 1; i <= m->f->nprocs; i++) { + range[i] += range[i-1]; + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + * Calculate the global element range for the new elements + * range[i] = first glb element of proc i + * range[nproc] = next idx to assign + */ +h5_err_t +h5tpriv_get_elem_ranges ( + h5t_mesh_t* const m, + h5_glb_idx_t* range + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, range=%p", m, range); + h5_glb_idx_t sendbuf = m->marked_entities->num_items * h5tpriv_get_num_new_elems (m); + TRY (h5priv_mpi_allgather ( + &sendbuf, + 1, + MPI_LONG, + &range[1], + 1, + MPI_LONG, + m->f->props->comm)); + + range[0] = m->leaf_level > 0 ? m->num_glb_elems[m->leaf_level-1] : 0; // TODo check if correct + + for (int i = 1; i <= m->f->nprocs; i++) { + range[i] += range[i-1]; + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * Check if edge is on proc border. If yes also check that it hasn't been refined yet and the other proc + * is also refining his element. + */ +int +check_edge ( + h5t_mesh_t* const m, + const h5_loc_idx_t face_idx, + const h5_loc_idx_t elem_idx, + h5_glb_idxlist_t* glb_elems + ) { + H5_PRIV_FUNC_ENTER (h5_loc_idx_t, + "m=%p, face_idx=%lld, elem_idx=%lld, glb_elems=%p", + m, (long long)face_idx, (long long)elem_idx, glb_elems); + h5_loc_idlist_t* retval; + // get all elements sharing the given edge + TRY (h5tpriv_find_te2 (m, face_idx, elem_idx, &retval)); + + size_t i; + for (i = 0; i < retval->num_items; i++) { + // check weather the found element has been refined + h5_loc_id_t kids[2] = {-1,-1}; + TRY (h5tpriv_get_loc_entity_children (m, retval->items[i], kids)); + if (kids[0] >= 0) { + // element has been refined + H5_PRIV_FUNC_LEAVE (0); + } + h5_loc_id_t el_id1 = retval->items[i]; + h5_chk_idx_t chk_idx1 = -1; + h5_loc_id_t el_id2 = h5tpriv_build_entity_id( + h5tpriv_ref_elem_get_entity_type(m, h5tpriv_ref_elem_get_dim (m) -1), + face_idx, + elem_idx ); + h5_chk_idx_t chk_idx2 = -2; + TRY (h5tpriv_find_chk_of_elem (m, el_id1, &chk_idx1)); + TRY (h5tpriv_find_chk_of_elem (m, el_id2, &chk_idx2)); + if (chk_idx1 == chk_idx2) { + H5_PRIV_FUNC_LEAVE (0); + } +// // BUG this works depending on what is my_proc interior elems or interior_chunks +//// // check weather the found element is owned by the same proc +//// if (m->loc_elems[elem_idx].my_proc == m->loc_elems[retval->items[i]].my_proc) { +//// // element is on same proc +//// +//// } +// // check if it is going to be refined +// if (h5priv_find_in_glb_idxlist(glb_elems, m->loc_elems[h5tpriv_get_elem_idx(retval->items[i])].glb_idx) < 0 ) { +// // element is not going to be refined +// H5_PRIV_FUNC_LEAVE (0); +// } +// // check if it is on this proc +// if (h5priv_find_in_loc_idlist(m->marked_entities, retval->items[i]) >= 0 ) { +// // element is on same proc +// H5_PRIV_FUNC_LEAVE (0); +// } + } + + + H5_PRIV_FUNC_RETURN (1); +} +h5_loc_idx_t +get_new_vtx_of_edge( + h5t_mesh_t* const m, + h5_loc_id_t loc_id + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, loc_id=%lld", + m, (long long int)loc_id); + + h5_loc_id_t kids[2] = {-1,-1}; + TRY (h5tpriv_get_loc_entity_children (m, loc_id, kids)); + if (kids[0] >= 0) { + // element has been refined, return bisecting point + h5_loc_idx_t edge0[2], edge1[2]; + TRY (h5t_get_loc_vertex_indices_of_edge (m, kids[0], edge0)); + TRY (h5t_get_loc_vertex_indices_of_edge (m, kids[1], edge1)); + if ((edge0[0] == edge1[0]) || (edge0[0] == edge1[1])) { + H5_PRIV_FUNC_LEAVE (edge0[0]); + } else { + H5_PRIV_FUNC_LEAVE (edge0[1]); + } + } + H5_PRIV_FUNC_RETURN (H5_ERR_INTERNAL); //edge that should be refined in not refined +} +/* + * Go through elements and find boundary edges that were refined on this proc. + * we try to find edges that are shared with non-local elements (they could have + * been refined) or if one of the local elements was refined on a different proc + */ +h5_err_t +h5tpriv_find_boundary_edges ( // todo maybe put some part into another function... + h5t_mesh_t* const m, + h5_glb_idxlist_t* glb_elems, + h5_edge_list_t* list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, glb_elems=%p, list=%p", + m, glb_elems, list); + // go through marked elements + h5_loc_idx_t elem_idx = -1; + for (int i = 0; i < m->marked_entities->num_items; i++) { + elem_idx = h5tpriv_get_elem_idx( m->marked_entities->items[i]); + int num_faces = h5tpriv_ref_elem_get_num_facets(m); + for (int j = 0; j < num_faces; j++) { + h5_loc_idlist_t* retval = NULL; + // get all elements sharing the given edge + TRY (h5tpriv_find_te2 (m, j, elem_idx, &retval)); + + // check if it is a border edge //TODO does not work yet since flags are not set properly but as long as we have all surounding elems it's not a problem -> i.e. tetrahedrals + if (retval->flags == H5_BORDER_ENTITY && 0) { + // add to edgelist + h5_glb_idx_t vertices[2]; + h5t_get_glb_vertex_indices_of_entity (m, retval->items[0], vertices); + + // we need to get the edge_id of elem_idx (other elems may not be refined + // and therefore can not return the splitting vertex + int l = 0; + for (; l < retval->num_items; l++) { + if (elem_idx == h5tpriv_get_elem_idx (retval->items[l])) { + break; + } + } + assert (l < retval->num_items); + h5_loc_idx_t loc_new_vtx = get_new_vtx_of_edge(m, retval->items[l]); + assert (loc_new_vtx > -1); + + TRY (h5tpriv_add_edge_list (list ,vertices[0], vertices[1], loc_new_vtx, m->f->myproc)); + continue; + } + // check if one of the neighbors (locally available) was refined on a different proc + for (int k = 0; k < retval->num_items; k++) { + h5_loc_idx_t neigh_idx = h5tpriv_get_elem_idx (retval->items[k]); + if (neigh_idx == elem_idx) { + continue; + } + h5_glb_idx_t neigh_glb_idx = h5tpriv_get_loc_elem_glb_idx(m, neigh_idx); + h5_loc_idx_t idx = h5priv_find_in_glb_idxlist(glb_elems, neigh_glb_idx); + if (idx < 0) { + // element has not been refined + continue; + } else { + // check if it was refined on this proc + int proc = -1; + h5_oct_point_t point; + TRY (h5tpriv_find_oct_proc_of_point (m, neigh_idx, &point, &proc)); + if (m->f->myproc != proc) { + // element was refined on different proc + // add to edgelist + h5_glb_idx_t vertices[2]; + h5t_get_glb_vertex_indices_of_entity (m, retval->items[k], vertices); + + // we need to get the edge_id of elem_idx (other elems may not be refined + // and therefore can not return the splitting vertex + int l = 0; + for (; l < retval->num_items; l++) { + if (elem_idx == h5tpriv_get_elem_idx (retval->items[l])) { + break; + } + } + assert (l < retval->num_items); + h5_loc_idx_t loc_new_vtx = get_new_vtx_of_edge(m, retval->items[l]); + assert (loc_new_vtx > -1); + TRY (h5tpriv_add_edge_list (list ,vertices[0], vertices[1],loc_new_vtx, m->f->myproc)); + break; + } + } + + } + } + } + // sort & uniquify + TRY (h5tpriv_sort_edge_list (list)); + TRY (h5tpriv_uniquify_edge_list (list)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + * exchange boundary edges info + */ +h5_err_t +exchange_boundary_edge_list ( + h5t_mesh_t* const m, + h5_edge_list_t* b_edges, + h5_edge_list_t* glb_b_edges + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); // TODO + + int* recvcounts = NULL; + TRY (recvcounts = h5_calloc (m->f->nprocs, sizeof (*recvcounts))); + int* recvdisp = NULL; + TRY (recvdisp = h5_calloc (m->f->nprocs + 1, sizeof (*recvdisp))); + TRY (h5priv_mpi_allgather ( + &b_edges->num_items, + 1, + MPI_INT, + recvcounts, + 1, + MPI_INT, + m->f->props->comm)); + int tot_num_b_edges = 0; + recvdisp[0] = 0; + for (int i = 0; i < m->f->nprocs; i++) { + tot_num_b_edges += recvcounts[i]; + recvdisp[i+1] = recvcounts[i] + recvdisp[i]; + } + if (tot_num_b_edges > 0) { + TRY (h5tpriv_grow_edge_list (glb_b_edges, tot_num_b_edges)); + + TRY (h5priv_mpi_allgatherv ( + b_edges->items, + b_edges->num_items, + h5_dta_types.mpi_edge_list_elem, + glb_b_edges->items, + recvcounts, + recvdisp, + h5_dta_types.mpi_edge_list_elem, + m->f->props->comm)); + + glb_b_edges->num_items = tot_num_b_edges; + h5tpriv_sort_edge_list(glb_b_edges); + } + TRY (h5_free(recvcounts)); + TRY (h5_free(recvdisp)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t +set_exchanged_glb_idx ( + h5t_mesh_t* const m, + h5_edge_list_t* list, + h5_edge_list_t* glb_list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); // TODO + + for (int i = 0; i < list->num_items; i++) { + if ( list->items[i].proc != m->f->myproc) { + h5_int32_t retval = h5tpriv_find_edge_list(glb_list,&list->items[i]); + assert (retval != glb_list->num_items); + m->vertices[list->items[i].new_vtx].idx = glb_list->items[retval].new_vtx; + } + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * find local edges in glb list and find out which proc sets glb_idx + */ +h5_err_t +find_edges_in_boundary_edge_list ( + h5_edge_list_t* list, + h5_edge_list_t* glb_list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "list=%p, glb_list=%p", list, glb_list); + h5_int32_t idx = -1; + for (int i = 0; i < list->num_items; i++) { + h5t_edge_list_elem_t* retval = bsearch (&list->items[i], glb_list->items,glb_list->num_items, sizeof(*list->items), compare_edge_list_elem ); + assert (retval != NULL); //all items in list are copied from glb_list so retval can't be NULL + + idx =(int) (retval - glb_list->items); + // if there was another proc with lower rank that refined the same edge, the edge would lie at position idx - 1 + // so we try to find lowest proc that has refined edge i + h5t_edge_list_elem_t edge; + edge.vtx1 = list->items[i].vtx1; + edge.vtx2 = list->items[i].vtx2; + edge.proc = 0; + while (idx > 0 && + compare_edge_list_elem (&glb_list->items[idx-1], &edge) >= 0) { + idx--; + } + list->items[i].proc = glb_list->items[idx].proc; + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * set glb_idx of new vertex into edge list -> will be exchanged to other procs + */ +h5_err_t +set_glb_idx_edge_list ( + h5t_mesh_t* m, + h5_edge_list_t* list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, list=%p",m ,list); + for (int i = 0; i < list->num_items; i++) { + if (list->items[i].proc == m->f->myproc) { + list->items[i].new_vtx = m->vertices[list->items[i].new_vtx].idx; + assert (list->items[i].new_vtx != -1); + } + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * at the moment either split weights equally to children or assign equal as parent + */ +static h5_err_t +update_weight_children ( + h5t_mesh_t* m, + h5_weight_t* parent_weight, + h5_weight_t* children_weight) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p",m ); + int num_new_elems = h5tpriv_get_num_new_elems (m); + + if (UPDATE_WEIGHTS == 1) { // split + for (int j = 0; j < m->num_weights; j++) { + children_weight[j] = MAX (1, parent_weight[j]/num_new_elems); + } + + } + if (UPDATE_WEIGHTS == 2) { // copy + for (int j = 0; j < m->num_weights; j++) { + children_weight[j] = parent_weight[j]; + } + } + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + * function to set weights after refinement automatically + */ +static h5_err_t +h5tpriv_set_local_weights ( + h5t_mesh_t* m, + h5_glb_idx_t* range + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, range=%p",m ,range); + + for (h5_glb_idx_t idx = range[m->f->myproc]; idx < range[m->f->myproc + 1]; idx++) { + // get loc_idx of elem + h5_loc_idx_t loc_idx = h5t_map_glb_elem_idx2loc (m, idx); + assert (loc_idx >= 0); + h5_loc_idx_t parent_idx = h5tpriv_get_loc_elem_parent_idx (m, loc_idx); + h5_glb_idx_t parent_glb_idx = h5tpriv_get_loc_elem_glb_idx (m, parent_idx); + h5_weight_t* parent_weight = NULL; + h5_weight_t* children_weight = NULL; + parent_weight = &m->weights[parent_glb_idx * m->num_weights]; + children_weight = &m->weights[idx * m->num_weights]; + TRY (update_weight_children (m, parent_weight, children_weight)); + } + + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * function to update weights after refinement + */ +static h5_err_t +h5tpriv_exchange_weights ( + h5t_mesh_t* m, + h5_glb_idx_t* range + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, range=%p",m ,range); + + int* recvcounts = h5_calloc (m->f->nprocs, sizeof (* recvcounts)); + int* recvdisp = h5_calloc (m->f->nprocs, sizeof (* recvdisp)); + + for (int i = 0; i < m->f->nprocs; i++) { + recvdisp[i] = (int) range[i] * m->num_weights; + recvcounts[i] = (int) (range[i+1]- range[i]) * m->num_weights; + + } + + int sendcount = (range[m->f->myproc + 1] - range[m->f->myproc]) * m->num_weights; + h5_weight_t* sendbuf = h5_calloc (sendcount, sizeof (*sendbuf)); + + memcpy (sendbuf, &m->weights[range[m->f->myproc] * m->num_weights], sendcount * sizeof (*sendbuf)); + + TRY (h5priv_mpi_allgatherv ( + sendbuf, + sendcount, + MPI_INT, + m->weights, + recvcounts, + recvdisp, + MPI_INT, + m->f->props->comm)); + for (h5_glb_idx_t i = 0; i < range[m->f->nprocs] * m->num_weights; i++ ) { + assert (m->weights[i] > 0); + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Refine previously marked elements. + */ +h5_err_t +h5t_refine_marked_elems_chk ( + h5t_mesh_t* const m, + h5_glb_idxlist_t* glb_elems, + h5_oct_point_t* midpoints + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p", m); + int num_midpoints = m->marked_entities->num_items; + + // refine octree + TRY (H5t_refine_w_points (m->octree, midpoints, num_midpoints, H5t_get_maxpoints (m->octree))); + + // sort midpoint list such that they are aligned according to octants + qsort (midpoints, num_midpoints, sizeof (*midpoints), compare_midpoint_oct); + + // set octree userlevel + h5t_oct_iterator_t* iter = NULL; + + TRY (H5t_init_leafoct_iterator (m->octree, &iter)); + + h5_oct_idx_t oct_idx; + while ((oct_idx = H5t_iterate_oct (iter)) != -1) { + if (H5t_get_proc (m->octree, oct_idx) == m->f->myproc) { + TRY (H5t_set_userlevel (m->octree, oct_idx, m->leaf_level)); + } + } + TRY (H5t_end_iterate_oct (iter)); + TRY (H5t_update_internal (m->octree)); + + // get elem ranges + h5_glb_idx_t* elem_range = NULL; + TRY (elem_range = h5_calloc (m->f->nprocs + 1, sizeof (*elem_range))); + + //TODO use generic get_range function + TRY (h5tpriv_get_elem_ranges (m, elem_range)); + + // CHUNKS + h5_chk_idx_t num_chunks = 1; + + h5t_oct_count_list_t oct_c_list; // list has contains all octants and number of elems per octant + oct_c_list.num_items = 0; + oct_c_list.size = num_midpoints; + TRY (oct_c_list.items = h5_calloc (num_midpoints, sizeof (*oct_c_list.items))); + + h5_oct_idx_t old_idx = -1; + if (num_midpoints > 0) { + old_idx = midpoints[0].oct; + oct_c_list.items[oct_c_list.num_items++].oct = old_idx; + } else { + num_chunks = 0; + } + + + int running_counter = 0; + // calc number of chunks + for (int i = 0; i < num_midpoints; i++) { + if (midpoints[i].oct != old_idx) { + // point i will be in a new chunk + num_chunks++; + old_idx = midpoints[i].oct; + oct_c_list.items[oct_c_list.num_items].oct = old_idx; + oct_c_list.items[oct_c_list.num_items-1].count = i - running_counter; + running_counter = i; + oct_c_list.num_items++; + } + } + oct_c_list.items[oct_c_list.num_items-1].count = num_midpoints - running_counter; + // calc chunk range + h5_glb_idx_t* chk_range = NULL; + TRY (chk_range = h5_calloc (m->f->nprocs + 1, sizeof (*chk_range))); + TRY (h5tpriv_get_ranges (m, chk_range, num_chunks, m->chunks->curr_idx + 1)); + + // get total number of chunks + int tot_num_chunks = 0; + + tot_num_chunks = chk_range[m->f->nprocs] - chk_range[0]; + // alloc mem for chunks + TRY (h5tpriv_grow_chunks (m, tot_num_chunks)); + + // create chunks + TRY (h5tpriv_store_chunks (m, &oct_c_list, num_chunks, elem_range, chk_range)); + + // update newly created chunks + TRY (h5tpriv_update_chunks (m, chk_range)); + + h5t_oct_userdata_t* userdata = NULL; + //store userdata to octree + for (int j = chk_range[m->f->myproc]; j < chk_range[m->f->myproc + 1]; j++) { + assert ( H5t_get_proc (m->octree, m->chunks->chunks[j].oct_idx) == m->f->myproc); + TRY (H5t_get_userdata_rw (m->octree, m->chunks->chunks[j].oct_idx,(void **) &userdata)); + if (userdata->idx[0] == -1) { + userdata->idx[0] = (h5_chk_idx_t) j; + } else if (userdata->idx[1] == -1) { + userdata->idx[1] = (h5_chk_idx_t) j; + } else if (userdata->idx[2] == -1) { + userdata->idx[2] = (h5_chk_idx_t) j; + } else if (userdata->idx[3] == -1) { + userdata->idx[3] = (h5_chk_idx_t) j; + } else { + H5_CORE_API_LEAVE (H5_ERR_INTERNAL); + } + } + + TRY (H5t_update_userdata (m->octree)); + + + // refine elements + for (int i = 0; i < num_midpoints; i++) { + TRY (h5tpriv_refine_elem (m, h5t_map_glb_elem_idx2loc(m,midpoints[i].elem))); // needs to be ordered acc to octants + } + TRY (h5_free (oct_c_list.items)); + TRY (h5_free (elem_range)); + TRY (h5_free (chk_range)); + H5_CORE_API_RETURN (H5_SUCCESS); +} +/* + * This function checks if there is the possibility to add another chunk to an octant + */ +int +h5tpriv_octant_is_full ( + h5t_octree_t* octree, + h5_oct_idx_t oct_idx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "octree=%p, oct_idx=%d", octree, oct_idx); + h5t_oct_userdata_t* userdata = NULL; + TRY (H5t_get_userdata_r (octree, oct_idx,(void **) &userdata)); + if (userdata->idx[3] == -1) { + H5_PRIV_FUNC_LEAVE (0) + } + H5_PRIV_FUNC_RETURN (1); +} + +/* + * only compares the glb_idx of a vertex + */ +int compare_glb_vertex (const void *p_a, const void *p_b) { + return ((h5_glb_vertex_t*) p_a)->idx - ((h5_glb_vertex_t*) p_b)->idx; +} +/* + * find vertex in list and return num_vtx if not in list + * list needs to be sorted + */ +static int +h5tpriv_find_vertex_in_list ( + h5t_mesh_t* const m, + h5_glb_idx_t vtx_idx, + h5_glb_vertex_t* vtx_list, + int num_vtx + ) { + h5_glb_vertex_t key; + key.idx = vtx_idx; + + h5_glb_vertex_t* retval = bsearch (&key, vtx_list, num_vtx, sizeof (*retval), compare_glb_vertex); + if (retval == NULL) { + return num_vtx; + } + return retval - vtx_list; +} +static h5_err_t +h5tpriv_sort_vertex_list ( + h5_glb_vertex_t* vtx_list, + int num_vtx + ) { + qsort (vtx_list, num_vtx, sizeof(*vtx_list), compare_glb_vertex); + return (H5_SUCCESS); +} + + + +int comp_vtx_coord (void* p_a, void* p_b) { + h5_glb_vertex_t* a = (h5_glb_vertex_t*)p_a; + h5_glb_vertex_t* b = (h5_glb_vertex_t*)p_b; + + if (a->idx != b->idx) { + return a->idx != b->idx; + } else { + if (a->P[0] != b->P[0]) { + return a->P[0] != b->P[0]; + } else { + if (a->P[1] != b->P[1]) { + return a->P[1] != b->P[1]; + } else { + if (a->P[2] != b->P[2]) { + return a->P[2] != b->P[2]; + } else { + return 0; + } + } + } + } +} + +static h5_err_t +h5tpriv_add_glb_vertex_to_list ( + h5t_mesh_t* const m, + h5_glb_idx_t vtx_idx, + h5_glb_vertex_t* glb_vtx, + h5_glb_idx_t num_glb_vtx, + h5_glb_vertex_t* vtx_list, + int* num_vtx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + h5_loc_idx_t loc_idx = h5tpriv_find_vertex_in_list (m, vtx_idx, glb_vtx, num_glb_vtx); + assert (loc_idx > -1 ); + assert (loc_idx < num_glb_vtx); + memcpy (&vtx_list[*num_vtx], &glb_vtx[loc_idx], sizeof (*vtx_list)); + (*num_vtx)++; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + +static h5_err_t +h5tpriv_init_glb_vtx_struct_chk ( + h5t_mesh_t* const m, + h5_glb_elem_t* glb_elems, + int num_glb_elems, + h5_glb_vertex_t* vtx_list, + int* num_vtx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + // todo could be optimised by using a hashtab for glb_idx_list instead of map + int num_vertices = h5tpriv_ref_elem_get_num_vertices(m); + + h5_idxmap_t map_s; + TRY (h5priv_new_idxmap (&map_s, num_vertices * num_glb_elems)); + h5_idxmap_t* map = &map_s; + + h5_hashtable_t htab; + TRY (h5priv_hcreate (((num_vertices * num_glb_elems) << 2) / 3, &htab, + hidxmap_cmp, hidxmap_compute_hval, NULL)); + + for (int i = 0; i < num_glb_elems; i++) { + h5_glb_idx_t* vtx_idx = h5tpriv_get_glb_elem_vertices(m, glb_elems, i); + + for (int j = 0; j < num_vertices; j++) { + // add index temporarly to map ... + map->items[map->num_items] = (h5_idxmap_el_t) {vtx_idx[j], 0}; + // ... and check whether it has already been added + h5_idxmap_el_t* retval; + h5priv_hsearch (&map->items[map->num_items], + H5_ENTER, (void**)&retval, &htab); + + if (retval == &map->items[map->num_items]) { // not in list + // new entry in hash table thus in map + map->num_items++; + //todo optimise by copy in the end (copy consequtive vtx together) + h5_loc_idx_t loc_idx = h5t_map_global_vertex_idx2local (m, vtx_idx[j]); + assert (loc_idx > -1 && loc_idx <= m->last_stored_vid); + memcpy (&vtx_list[*num_vtx], &m->vertices[loc_idx], sizeof (*vtx_list)); + (*num_vtx)++; + } + } + } + TRY (h5priv_hdestroy (&htab)); + TRY (h5_free (map->items)); + TRY (h5tpriv_sort_vertex_list (vtx_list, *num_vtx)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +// little bit different funtion since it's used to store and not to load... +static h5_err_t +h5tpriv_init_glb_vtx_struct_chk2 ( + h5t_mesh_t* const m, + h5_glb_elem_t* glb_elems, + int num_glb_elems, + h5_glb_vertex_t* glb_vtx, + int num_glb_vtx, + h5_glb_vertex_t* vtx_list, + int* num_vtx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + // todo could be optimised by using a hashtab for glb_idx_list instead of map + int num_vertices = h5tpriv_ref_elem_get_num_vertices(m); + h5_idxmap_t* map = &m->map_vertex_g2l; + if (map->size <= map->num_items) { + h5priv_grow_idxmap (map, map->size +10); // 1 should be enough + } + + + h5_hashtable_t htab; + TRY (h5priv_hcreate (((num_vertices * num_glb_elems) << 2) / 3, &htab, + hidxmap_cmp, hidxmap_compute_hval, NULL)); + + for (int i = 0; i < num_glb_elems; i++) { + h5_glb_idx_t* vtx_idx = h5tpriv_get_glb_elem_vertices(m, glb_elems, i); + + for (int j = 0; j < num_vertices; j++) { + // add index temporarly to map ... + map->items[map->num_items] = (h5_idxmap_el_t) {vtx_idx[j], 0}; + // ... and check whether it has already been added + h5_idxmap_el_t* retval; + h5priv_hsearch (&map->items[map->num_items], + H5_ENTER, (void**)&retval, &htab); + + if (retval == &map->items[map->num_items]) { // not in list + // new entry in hash table + h5tpriv_add_glb_vertex_to_list(m, vtx_idx[j], glb_vtx, num_glb_vtx, vtx_list, num_vtx); + + } + } + } + TRY (h5priv_hdestroy (&htab)); + TRY (h5tpriv_sort_vertex_list (vtx_list, *num_vtx)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + * there are already all local & neighbor chunks in the list + * we remove all chunks that are not on m->leaf_level, and + * from neighbors + */ + +static h5_err_t +get_list_of_chunks_to_retrieve ( + h5t_mesh_t* const m, + h5_chk_idx_t* list, + int* num_list + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + + // retrieve only chunks from this level + int tmp_counter = 0; + for (int i = 0; i < *num_list; i++) { + if (list[i] > m->chunks->curr_idx - m->chunks->num_chunks_p_level[m->leaf_level] && // only the chunks stored on the last level + H5t_get_proc (m->octree, m->chunks->chunks[list[i]].oct_idx) != m->f->myproc) { + list[tmp_counter] = list[i]; + tmp_counter++; + } + } + *num_list = tmp_counter; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +static h5_err_t +exchange_glb_elem_glb_vtx ( + h5t_mesh_t* const m, + h5_glb_elem_t* glb_elems, + int num_glb_elems, + h5_glb_elem_t** tot_glb_elems, + int* num_tot_glb_elems, + h5_glb_vertex_t* glb_vtx, + int num_glb_vtx, + h5_glb_vertex_t** tot_glb_vtx, + int* num_tot_glb_vtx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + + h5_glb_idx_t* e_range = h5_calloc (m->f->nprocs +1, sizeof (*e_range)); + TRY (h5tpriv_get_ranges(m, e_range, (h5_glb_idx_t) num_glb_elems, 0)); + + h5_glb_idx_t* v_range = h5_calloc (m->f->nprocs +1, sizeof (*v_range)); + TRY (h5tpriv_get_ranges(m, v_range, (h5_glb_idx_t) num_glb_vtx, 0)); + + int* e_recvcounts = h5_calloc (m->f->nprocs, sizeof (* e_recvcounts)); + int* v_recvcounts = h5_calloc (m->f->nprocs, sizeof (* v_recvcounts)); + + int* e_recvdisp = h5_calloc (m->f->nprocs, sizeof (* e_recvdisp)); + int* v_recvdisp = h5_calloc (m->f->nprocs, sizeof (* v_recvdisp)); + + for (int i = 0; i < m->f->nprocs; i++) { + e_recvdisp[i] = (int) e_range[i]; + v_recvdisp[i] = (int) v_range[i]; + e_recvcounts[i] = (int) (e_range[i+1]- e_range[i]); + v_recvcounts[i] = (int) (v_range[i+1]- v_range[i]); + } + *num_tot_glb_elems = e_range[m->f->nprocs]; + TRY (*tot_glb_elems = h5tpriv_alloc_glb_elems(m, *num_tot_glb_elems)); + + *num_tot_glb_vtx = v_range[m->f->nprocs]; + *tot_glb_vtx = h5_calloc (*num_tot_glb_vtx, sizeof (**tot_glb_vtx)); + + + TRY (h5priv_mpi_allgatherv ( + glb_elems, + num_glb_elems, + h5tpriv_get_mpi_type_of_glb_elem(m), + *tot_glb_elems, + e_recvcounts, + e_recvdisp, + h5tpriv_get_mpi_type_of_glb_elem(m), + m->f->props->comm)); + + TRY (h5priv_mpi_allgatherv ( + glb_vtx, + num_glb_vtx, + h5_dta_types.mpi_glb_vtx, + *tot_glb_vtx, + v_recvcounts, + v_recvdisp, + h5_dta_types.mpi_glb_vtx, + m->f->props->comm)); + + TRY (h5tpriv_sort_vertex_list (*tot_glb_vtx, *num_tot_glb_vtx)); + TRY (h5tpriv_sort_glb_elems (m, *tot_glb_elems, (size_t)*num_tot_glb_elems)); + + // free mem + TRY (h5_free (e_recvcounts)); + TRY (h5_free (v_recvcounts)); + TRY (h5_free (e_recvdisp)); + TRY (h5_free (v_recvdisp)); + TRY (h5_free (e_range)); + TRY (h5_free (v_range)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + * compare chk_idx + */ +int compare_chk_list(const void *p_a, const void *p_b) { + return ((h5t_chunk_t*) p_a)->idx - ((h5t_chunk_t*) p_b)->idx; +} + +h5_err_t +store_exchanged_elems ( + h5t_mesh_t* const m, + h5_chk_idx_t* chk_list, + int num_chk_list, + h5_glb_elem_t* glb_elems, + int num_glb_elems, + h5_glb_vertex_t* glb_vtx, + int num_glb_vtx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + + qsort (chk_list, num_chk_list, sizeof (*chk_list), compare_chk_list); + + // calc how many new elems + int num_new_elems = 0; + for (int i = 0; i < num_chk_list; i++) { + num_new_elems += m->chunks->chunks[chk_list[i]].num_elems; + } + TRY (h5tpriv_alloc_loc_elems (m, m->num_interior_elems[m->leaf_level], m->num_interior_elems[m->leaf_level] + num_new_elems)); + + // extract glb elems that should be stored + h5_glb_elem_t* new_elems = NULL; + h5_loc_idx_t new_elems_c = 0; // counter + + // temporary idx list so we don't have to search in glb_elems. glb_elems should be sorted! + h5_glb_idxlist_t* glb_list = NULL; + h5priv_alloc_glb_idxlist (&glb_list, num_glb_elems); + for (int i = 0; i < num_glb_elems; i++) { + glb_list->items[i] = h5tpriv_get_glb_elem_idx (m, glb_elems, i); + } + glb_list->num_items = num_glb_elems; + + int* proc = h5_calloc (num_new_elems, sizeof (*proc)); + int proc_counter = 0; + TRY (new_elems = h5tpriv_alloc_glb_elems(m, num_new_elems)); + for (int i = 0; i < num_chk_list; i++) { + int num_elems = m->chunks->chunks[chk_list[i]].num_elems; + int chk_proc = H5t_get_proc (m->octree, m->chunks->chunks[chk_list[i]].oct_idx ); + + h5_glb_idx_t glb_idx = m->chunks->chunks[chk_list[i]].elem; + h5_loc_idx_t loc_idx = h5priv_find_in_glb_idxlist (glb_list, glb_idx); + assert (loc_idx > -1); + assert (h5tpriv_get_glb_elem_idx (m,glb_elems, loc_idx) == glb_idx); + + TRY(h5tpriv_copy_glb_elems(m, new_elems, new_elems_c, glb_elems, loc_idx, num_elems)); + new_elems_c += num_elems; + while (proc_counter < new_elems_c) { + + proc[proc_counter] = chk_proc; // TODO may need to be changed after we have lb + proc_counter++; + } + } + assert (new_elems_c == num_new_elems); + + + // create list of new glb_vtx + h5_glb_vertex_t* new_vtx = h5_calloc(new_elems_c * 4, sizeof (*new_vtx));// TODO should be by far enough -> could be optimzed + int new_vtx_c = 0; + + + // TODO maybe this function could be extended and used instead of the stuff below + //TRY (h5tpriv_init_glb_vtx_struct_chk (m, new_elems, new_elems_c, new_vtx, &new_vtx_c)); + // extract glb vertices that should be stored + TRY (h5tpriv_init_glb_vtx_struct_chk2 (m, new_elems, new_elems_c, + glb_vtx, num_glb_vtx, new_vtx, &new_vtx_c)); +// int num_vertices = h5tpriv_ref_elem_get_num_vertices(m); +// for (int i = 0; i < new_elems_c; i++) { +// h5_glb_idx_t* vertices = h5tpriv_get_glb_elem_vertices(m, new_elems, i); +// for (int j = 0; j < num_vertices; j++) { +// // check if vertex is already locally available +// int idx = -1; +// TRY (idx = h5tpriv_find_glb_idx_in_map (&m->map_vertex_g2l, vertices[j])); +// if (idx == m->map_vertex_g2l.num_items) { // locally not available +// // add at end and sort later +// h5tpriv_add_glb_vertex_to_list(m, vertices[j], glb_vtx, num_glb_vtx, new_vtx, &new_vtx_c); +// } +// } +// } +// TRY (h5tpriv_sort_vertex_list (new_vtx, new_vtx_c)); + + // store vertices + + TRY (h5tpriv_alloc_loc_vertices (m, new_vtx_c + m->last_stored_vid + 1)); // maybe somewhat more? + memcpy (&m->vertices[m->last_stored_vid + 1], new_vtx, new_vtx_c * sizeof (*new_vtx)); + m->last_stored_vid += new_vtx_c; + + // rebuild map vtx + TRY (h5priv_grow_idxmap (&m->map_vertex_g2l, new_vtx_c + m->map_vertex_g2l.size)); + TRY (h5tpriv_rebuild_map_vertex_g2l_partial (m)); + + + // store elems + TRY (h5priv_grow_idxmap (&m->map_elem_g2l, num_new_elems + m->map_elem_g2l.size)); + TRY (h5tpriv_init_loc_elems_struct (m, new_elems, m->num_interior_elems[m->leaf_level], num_new_elems, 0, proc)); + + // rebuild map elems + TRY (rebuild_map_elem_g2l_partial (m)); + + TRY (h5tpriv_init_elem_flags (m, m->num_interior_elems[m->leaf_level], num_new_elems)); + + m->num_interior_elems[m->leaf_level] += num_new_elems; + + TRY (h5_free (new_elems)); + TRY (h5_free (new_vtx)); + TRY (h5_free (proc)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif + +h5_err_t +h5t_post_refine ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p", m); + TRY (h5t_end_store_vertices (m)); + TRY (h5t_end_store_elems (m)); + H5_CORE_API_RETURN (h5priv_free_loc_idlist (&m->marked_entities)); +} + + +#ifdef PARALLEL_IO + +h5_err_t +h5t_post_refine_chk ( + h5t_mesh_t* const m, + h5_glb_idxlist_t* marked_glb_elems + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p", m); + h5_debug("post_refine_chk"); + // get boundary edges + h5_edge_list_t* b_edges = h5tpriv_init_edge_list(h5tpriv_ref_elem_get_num_edges(m) * m->marked_entities->num_items); + TRY (h5tpriv_find_boundary_edges (m, marked_glb_elems, b_edges)); + + // exchange boundary edges + h5_edge_list_t* glb_b_edges = h5tpriv_init_edge_list(0); + TRY (exchange_boundary_edge_list (m, b_edges, glb_b_edges)); + + // find out which edges are split by other procs (i.e. with lower rank) + // set proc in b_edges to proc who sets glb_idx + TRY (find_edges_in_boundary_edge_list (b_edges, glb_b_edges)); + + + // calc vertex range, num loc vertices = (num new vertices - vertices to be set by other proc) + int num_vtx_not_named = 0; + for (int i = 0; i < b_edges->num_items; i++) { + b_edges->items[i].proc != m->f->myproc ? num_vtx_not_named++ : 0; + } + h5_glb_idx_t* vtx_range = NULL; + TRY (vtx_range = h5_calloc (m->f->nprocs + 1, sizeof (*vtx_range))); + TRY (h5tpriv_get_ranges(m, vtx_range, m->last_stored_vid - m->last_stored_vid_before_ref - num_vtx_not_named, m->num_glb_vertices[m->leaf_level-1])); + + // assign glb vtx idx + m->num_loc_vertices[m->leaf_level] = m->last_stored_vid+1; + + // make list of loc vtx that don't get a glb_idx from this proc + h5_loc_idxlist_t* vtx_list = NULL; + TRY (h5priv_alloc_loc_idxlist(&vtx_list, b_edges->num_items)); + for (int i = 0; i < b_edges->num_items; i++) { + if (b_edges->items[i].proc != m->f->myproc) { + TRY (h5priv_search_in_loc_idxlist (&vtx_list, (h5_loc_idx_t)b_edges->items[i].new_vtx)); + } + } + + TRY (assign_global_vertex_indices_chk (m, vtx_list, vtx_range)); + + // set glb_idx in b_edge list + TRY (set_glb_idx_edge_list (m, b_edges)); + + // exchange glb_idx of vertices + TRY (exchange_boundary_edge_list (m, b_edges, glb_b_edges)); + // TODO could be more efficient by only sending the glb_idx around entries around + // but one would need to create a new list... + + // set exchanged glb_idx + TRY (set_exchanged_glb_idx (m, b_edges, glb_b_edges)); + + // rebuild map g2l + TRY (h5priv_grow_idxmap (&m->map_vertex_g2l, m->map_vertex_g2l.num_items + m->last_stored_vid - m->last_stored_vid_before_ref)); + TRY (h5tpriv_rebuild_map_vertex_g2l_partial (m)); + m->last_stored_vid_before_ref = m->last_stored_vid; + // this is replacing TRY (h5t_end_store_vertices (m)); + // since we need a special assign glb_idx + + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + + // get elem ranges + h5_glb_idx_t* elem_range = NULL; + TRY (elem_range = h5_calloc (m->f->nprocs + 1, sizeof (*elem_range))); + + //TODO use generic get_range function + TRY (h5tpriv_get_elem_ranges (m, elem_range)); + + m->num_interior_elems[m->leaf_level] = m->last_stored_eid+1; // TODO needs to be reset after exchange + m->num_glb_elems[m->leaf_level] = elem_range[m->f->nprocs]; + m->num_glb_leaf_elems[m->leaf_level] = m->num_glb_leaf_elems[m->leaf_level - 1] + + (h5tpriv_get_num_new_elems(m) - 1) * (m->num_glb_elems[m->leaf_level]- m->num_glb_elems[m->leaf_level-1]); + // idea: after ref we have the same number of leaf elems + all refined elems - elems that were refined + + /* assign global indices to new indices */ + TRY (assign_glb_elem_indices_chk (m, elem_range)); + + + /* rebuild map: global index -> local_index */ + TRY (rebuild_map_elem_g2l_partial (m)); + m->last_stored_eid_before_ref = m->last_stored_eid; + + + // weights + h5_debug("weights"); + if (m->num_weights < 1) { + m->weights = NULL; + } else { + TRY ( m->weights = h5_alloc (m->weights, elem_range[m->f->nprocs] * m->num_weights * sizeof (*m->weights))); + + // set local weights + TRY (h5tpriv_set_local_weights (m, elem_range)); + + // exchange weights + TRY (h5tpriv_exchange_weights (m, elem_range)); + } + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + // get list of new chunks + h5_chk_idx_t* chk_send_list = NULL; + int counter = 0; + TRY (h5tpriv_get_list_of_chunks_to_write (m, &chk_send_list, &counter)); + + // send only chunks from this level + int tmp_counter = 0; + for (int i = 0; i < counter; i++) { + if (chk_send_list[i] > m->chunks->curr_idx - m->chunks->num_chunks_p_level[m->leaf_level]) { // only the chunks stored on the last level + chk_send_list[tmp_counter] = chk_send_list[i]; + tmp_counter++; + } + } + // TODO this should be optimized only really needed chunks should be sent around + + counter = tmp_counter; + // create glb_chunks + h5_glb_elem_t* glb_elems = NULL; + int num_glb_elems = m->num_interior_elems[m->leaf_level] - m->num_interior_elems[m->leaf_level-1]; + TRY (glb_elems = h5tpriv_alloc_glb_elems(m, num_glb_elems)); + TRY (h5tpriv_init_glb_elems_struct_chk(m, glb_elems, chk_send_list, counter)); + + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + // create list of glb_vtx + h5_glb_vertex_t* glb_vtx = NULL; + h5_int32_t num_glb_vtx = 0; + TRY (glb_vtx = h5_calloc (4 * num_glb_elems, sizeof (*glb_vtx))); // TODO should be by far enough -> could be optimzed + TRY (h5tpriv_init_glb_vtx_struct_chk (m, glb_elems, num_glb_elems, glb_vtx, &num_glb_vtx)); + + // get list of chunks to retrieve + h5_chk_idx_t* chk_list_read = NULL; + int num_chk_list_read = 0; + TRY (h5tpriv_get_list_of_chunks_to_read(m, &chk_list_read, &num_chk_list_read)); + TRY (get_list_of_chunks_to_retrieve (m, chk_list_read, &num_chk_list_read)); + + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + // exchange cells and vertices + h5_glb_elem_t* tot_glb_elems = NULL; + h5_glb_vertex_t* tot_glb_vtx = NULL; + int num_tot_glb_elems = 0; + int num_tot_glb_vtx = 0; + TRY (exchange_glb_elem_glb_vtx (m, glb_elems, num_glb_elems, + &tot_glb_elems, &num_tot_glb_elems, + glb_vtx, num_glb_vtx, + &tot_glb_vtx, &num_tot_glb_vtx)); + TRY (h5_free (glb_elems)); // doesn't that create mem leak? + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + + h5_debug("store exchanged elems"); + // store elems & vertices + TRY (store_exchanged_elems (m, chk_list_read, num_chk_list_read, tot_glb_elems, num_tot_glb_elems, tot_glb_vtx, num_tot_glb_vtx)); + + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + + // set variables elems + m->num_glb_elems[m->leaf_level] = m->num_glb_elems[m->leaf_level - 1] + num_tot_glb_elems ; + m->num_glb_leaf_elems[m->leaf_level] = m->num_glb_leaf_elems[m->leaf_level - 1] + + num_tot_glb_elems /h5tpriv_get_num_new_elems(m) * (h5tpriv_get_num_new_elems(m) - 1) ; + + m->num_interior_elems[m->leaf_level] = m->last_stored_eid + 1; + m->num_interior_leaf_elems[m->leaf_level] = m->num_interior_leaf_elems[m->leaf_level-1] + + ((m->num_interior_elems[m->leaf_level] - m->num_interior_elems[m->leaf_level-1])/h5tpriv_get_num_new_elems(m) ) * + (h5tpriv_get_num_new_elems(m) - 1); // can it be calc easier? + m->last_stored_eid_before_ref = -1; + + + // set variables vtx + m->num_glb_vertices[m->leaf_level] = vtx_range[m->f->nprocs]; + m->num_loc_vertices[m->leaf_level] = m->last_stored_vid + 1; + m->last_stored_vid_before_ref = -1; + + // update parent elems + // idea go through all refined elem (they know their parent) and set parent.child_idx to their idx + // if it is done backwards always the first child will be stored finally -> is optimizable + for (int i = m->last_stored_eid; i >= m->num_interior_elems[m->leaf_level - 1]; i--) { + h5_loc_idx_t parent_idx = h5tpriv_get_loc_elem_parent_idx (m, i); + if (parent_idx > -1) { // there can be elems with on the chunk border that don't have their parents locally available + // those were refined on a different proc but exchanged to this proc. + assert (h5tpriv_get_loc_elem_child_idx (m, parent_idx) == -1 || + h5tpriv_get_loc_elem_child_idx (m, parent_idx) == i + 1 || + h5tpriv_get_loc_elem_child_idx (m, parent_idx) > i - 4); + TRY (h5tpriv_set_loc_elem_child_idx (m, parent_idx, i)); + } + } + h5_debug("end store elems"); + /* mesh specific finalize */ + TRY (m->methods->store->end_store_elems (m)); + + + + // WARNING elements on boundary chunks that lay on proc boundary may not have enough information + // to update the neighborhood correctly. a possibility would be to send them around again (the proc + // who owns their chunk has all necessary neighboring chunks i.e. chan update them properly) + + + //since we need special versions of this function, it was already implemented above + // i don't know if there is a nice way to separate it also in parallel... + // TRY (h5t_end_store_elems (m)); + + // memory cleanup + + TRY (h5_free (vtx_range)); + + TRY (h5_free (chk_list_read)); + TRY (h5priv_free_glb_idxlist (&marked_glb_elems)); + + + marked_glb_elems = NULL; + H5_CORE_API_RETURN (h5priv_free_loc_idlist (&m->marked_entities)); + +} + +#endif +h5_err_t +h5t_begin_refine_elems ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p", m); + + TRY (h5tpriv_add_level (m)); + /* + Pre-allocate space for items to avoid allocating small pieces of + memory. + */ + TRY (h5priv_alloc_loc_idlist (&m->marked_entities, MAX_NUM_ELEMS_TO_REFINE_LOCALLY)); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5t_end_refine_elems ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p", m); + if (m->is_chunked) { +#ifdef PARALLEL_IO + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + h5_glb_idxlist_t* glb_list = NULL; + h5_oct_point_t* midpoints = NULL; + TRY (h5t_pre_refine_chk (m, &glb_list, &midpoints)); + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + TRY (h5t_refine_marked_elems_chk (m, glb_list, midpoints)); + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); + TRY (h5_free (midpoints)); + midpoints = NULL; + TRY (h5t_post_refine_chk (m, glb_list)); + m->mesh_changed = 1; + TRY (h5priv_mpi_barrier (m->f->props->comm)); + m->timing.measure[m->timing.next_time++] = MPI_Wtime(); +#endif + } else { + TRY (h5t_pre_refine (m)); + TRY (h5t_refine_marked_elems (m)); + TRY (h5t_post_refine (m)); + m->mesh_changed = 1; + } + + H5_CORE_API_RETURN (H5_SUCCESS); +} + + +h5_err_t +h5tpriv_init_chunks ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + + if (m->chunks != NULL) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INVAL); + } + TRY (m->chunks = h5_calloc (1, sizeof (*m->chunks))); + m->chunks->curr_idx = -1; + m->chunks->num_alloc = -1; + m->chunks->num_levels = -1; + m->chunks->num_chunks_p_level = NULL; + m->chunks->chunks = NULL; + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +h5tpriv_grow_chunks ( + h5t_mesh_t* const m, + h5_chk_idx_t const size + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, size=%d", m, size); + if (m->chunks->chunks == NULL ) { + m->chunks->num_alloc = size; + m->chunks->num_levels = 1; + TRY (m->chunks->chunks = h5_calloc (size, sizeof (*m->chunks->chunks))); + TRY (m->chunks->num_chunks_p_level = h5_calloc ( + m->chunks->num_levels, + sizeof (*m->chunks->num_chunks_p_level))); + m->chunks->num_chunks_p_level[0] = size; + } else { + m->chunks->num_alloc += size; + m->chunks->num_levels++; + TRY (m->chunks->chunks = h5_alloc (m->chunks->chunks, (m->chunks->num_alloc)* sizeof (*m->chunks->chunks))); + TRY (m->chunks->num_chunks_p_level = h5_alloc ( + m->chunks->num_chunks_p_level, + m->chunks->num_levels * sizeof (*m->chunks->num_chunks_p_level))); + m->chunks->num_chunks_p_level[m->chunks->num_levels - 1] = size; + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +h5tpriv_store_chunks ( + h5t_mesh_t* const m, + h5t_oct_count_list_t* list, + h5_chk_idx_t num_chunks, + h5_glb_idx_t* elem_range, + h5_glb_idx_t* chk_range + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, list=%p, num_chunks=%d, " + "elem_range=%p, chk_range=%p", m, list, num_chunks, elem_range, chk_range); + + if (list->num_items <= 0) { + assert (chk_range[m->f->myproc+1] - chk_range[m->f->myproc] == 0); + assert (elem_range[m->f->myproc+1] - elem_range[m->f->myproc] == 0); + assert (num_chunks == 0); + H5_PRIV_FUNC_LEAVE (H5_SUCCESS); + } + int counter = 0; + h5_chk_weight_t weight = 0; + h5_oct_idx_t oct_idx = -1; + //h5_lvl_idx_t level = m->leaf_level; + int tot_loc_elem = 0; + for (int i = 0; i < list->num_items; i++) { + + oct_idx = list->items[i].oct; + counter = list->items[i].count; + if (m->leaf_level > 0) { + counter *= h5tpriv_get_num_new_elems (m); + } + TRY (h5tpriv_create_chunk (m, oct_idx, elem_range[m->f->myproc] + tot_loc_elem, weight, counter, chk_range)); + tot_loc_elem += counter; + } + + if ((m->chunks->curr_idx + 1 != chk_range[m->f->myproc + 1]) || + (tot_loc_elem != elem_range[m->f->myproc + 1] - elem_range[m->f->myproc])) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INTERNAL); + } + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +h5_err_t +h5tpriv_create_chunk ( + h5t_mesh_t* m, + h5_oct_idx_t const oct_idx, + h5_glb_idx_t const first_elem, + h5_chk_weight_t const weight, + h5_chk_size_t num_elems, + h5_glb_idx_t* chk_range + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, oct_idx=%d, first_elem=%lld, weight=%lld, num_elems=%d", + m, oct_idx,(long long) first_elem, (long long) weight, num_elems); + + if (m->chunks->curr_idx + 1 > m->chunks->num_alloc) { + H5_PRIV_FUNC_LEAVE (H5_ERR_INTERNAL); + } + if (chk_range == NULL) { + m->chunks->curr_idx++; + } else { + // set curr_idx to beginn of chk_range if not there + if (m->chunks->curr_idx < chk_range[m->f->myproc]) { + m->chunks->curr_idx = (h5_chk_idx_t) chk_range[m->f->myproc]; + } else { + // otherwise already in right range, just add one + m->chunks->curr_idx++; + } + // check that curr_idx doesn't leave range + assert (m->chunks->curr_idx < chk_range[m->f->myproc + 1]); + } + + + m->chunks->chunks[m->chunks->curr_idx].idx = m->chunks->curr_idx; + m->chunks->chunks[m->chunks->curr_idx].oct_idx = oct_idx; + m->chunks->chunks[m->chunks->curr_idx].elem = first_elem; +// m->chunks->chunks[m->chunks->curr_idx].elems_subchk = NULL; + m->chunks->chunks[m->chunks->curr_idx].weight = weight; + m->chunks->chunks[m->chunks->curr_idx].num_elems = num_elems; +// m->chunks->chunks[m->chunks->curr_idx].vtx = -2; // TODO remove from chunks +// m->chunks->chunks[m->chunks->curr_idx].num_vtx = -2; // TODO remove from chunks + + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +#ifdef PARALLEL_IO +/* + * exchange newly created chunks + */ + +h5_err_t +h5tpriv_update_chunks ( + h5t_mesh_t* m, + h5_glb_idx_t* chk_range + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, chk_range=%p", m, chk_range); + // range is already known + int sendcount = chk_range[m->f->myproc + 1 ] - chk_range[m->f->myproc]; + + // sendbuffer + h5t_chunk_t* sendbuf = NULL; + TRY (sendbuf = h5_calloc (sendcount, sizeof (*sendbuf))); + memcpy(sendbuf, &m->chunks->chunks[chk_range[m->f->myproc]], sendcount * sizeof (*m->chunks->chunks)); + + + // recvbuf + int* recvdisp = NULL; + int* recvcount = NULL; + TRY (recvdisp = h5_calloc (m->f->nprocs, sizeof (*recvdisp))); + TRY (recvcount = h5_calloc (m->f->nprocs, sizeof (*recvcount))); + recvdisp[0] = 0; + recvcount[0] = chk_range[1] - chk_range[0]; + for (int i = 1; i < m->f->nprocs; i++) { + recvdisp[i] = chk_range[i] - chk_range[0]; + recvcount[i] = chk_range[i + 1 ] - chk_range[i]; + } + + h5priv_mpi_allgatherv( + sendbuf, + sendcount, + h5_dta_types.mpi_chunk, + &m->chunks->chunks[chk_range[0]], + recvcount, + recvdisp, + h5_dta_types.mpi_chunk, + m->f->props->comm); + + m->chunks->curr_idx = chk_range[m->f->nprocs] -1; + TRY (h5_free (sendbuf)); + TRY (h5_free (recvdisp)); + TRY (h5_free (recvcount)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + +h5_err_t +h5tpriv_free_chunks ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + + if (m->chunks != NULL) { + TRY (h5_free (m->chunks->chunks)); + TRY (h5_free (m->chunks->num_chunks_p_level)); + TRY (h5_free (m->chunks)); + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +h5tpriv_print_chunks ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + h5_debug ("\nPrinting chunks: \n curr_idx: %d\n num_alloc: %d\n num_levels: %d\n\n", + m->chunks->curr_idx, + m->chunks->num_alloc, + m->chunks->num_levels); + for (int i = 0; i <= m->chunks->curr_idx; i++) { + h5_debug ("\nchunk: %d \n oct_idx: %d \n elem: %lld \n weight:%lld \n num_elems: %d\n\n", + m->chunks->chunks[i].idx, + m->chunks->chunks[i].oct_idx, + (long long) m->chunks->chunks[i].elem, + (long long) m->chunks->chunks[i].weight, + m->chunks->chunks[i].num_elems + ); + } + + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +h5_err_t +h5tpriv_print_oct_userdata ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + h5_debug ("\nPrinting oct_userdata: \n curr_idx: %d\n", + m->octree->current_oct_idx); + for (int i = 0; i <= m->octree->current_oct_idx; i++) { + h5_debug ("\n oct_idx: %d \n %d - %d - %d - %d \n\n", + i, + ((h5t_oct_userdata_t*)m->octree->userdata)[i].idx[0], + ((h5t_oct_userdata_t*)m->octree->userdata)[i].idx[1], + ((h5t_oct_userdata_t*)m->octree->userdata)[i].idx[2], + ((h5t_oct_userdata_t*)m->octree->userdata)[i].idx[3] + ); + } + + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +#endif +#if 0 +// index set for DUNE +h5_err_t +h5t_create_index_set ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p", m); + int codim; + int dim = h5tpriv_ref_elem_get_dim (m); + // todo: check tagset already exist + TRY (h5t_add_mtagset (m, "__IndexSet__", H5_INT64_T)); + + for (codim = 0; codim <= dim; codim++) { + h5_glb_idx_t idx = 0; + h5t_leaf_iterator_t it; + h5_glb_id_t entity_id; + TRY (h5t_init_leaf_iterator ((h5t_iterator_t*)&it, m, codim)); + while ((entity_id = it.iter(f, (h5t_iterator_t*)&it)) >= 0) { + TRY (h5t_set_mtag_by_name (f, "__IndexSet__", entity_id, 1, &idx)); + } + } + H5_CORE_API_RETURN (H5_SUCCESS); +} +#endif diff --git a/src/h5core/h5t_store_private.h b/src/h5core/h5t_store_private.h new file mode 100644 index 0000000..9f17596 --- /dev/null +++ b/src/h5core/h5t_store_private.h @@ -0,0 +1,85 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5T_STORE_PRIVATE_H +#define __H5T_STORE_PRIVATE_H + +#include "h5core/h5_types.h" +#include "h5t_types_private.h" +#include "h5core/h5t_store.h" + +struct h5t_store_methods { + h5_err_t (*alloc_loc_elems)(h5t_mesh_t* const, const size_t, const size_t); + h5_err_t (*pre_refine)(h5t_mesh_t* const); + h5_loc_idx_t (*refine_elem)(h5t_mesh_t* const, const h5_loc_idx_t); + int (*get_num_new_elems)(void); + h5_err_t (*end_store_elems)(h5t_mesh_t* const); +}; + +extern struct h5t_store_methods h5tpriv_trim_store_methods; +extern struct h5t_store_methods h5tpriv_tetm_store_methods; + +h5_lvl_idx_t +h5tpriv_add_level (h5t_mesh_t* const); + +static inline h5_err_t +h5tpriv_alloc_loc_elems ( + h5t_mesh_t* const m, + const size_t cur, + const size_t new + ) { + return m->methods->store->alloc_loc_elems (m, cur, new); +} + +static inline h5_loc_idx_t +h5tpriv_refine_elem ( + h5t_mesh_t * const m, + const h5_loc_idx_t elem_idx + ) { + return m->methods->store->refine_elem (m, elem_idx); +} + +static inline int +h5tpriv_get_num_new_elems ( + h5t_mesh_t * const m + ) { + return m->methods->store->get_num_new_elems (); +} + +h5_err_t +h5tpriv_init_chunks (h5t_mesh_t* const); + +h5_err_t +h5tpriv_grow_chunks (h5t_mesh_t* const, h5_chk_idx_t const size); + +h5_err_t +h5tpriv_store_chunks (h5t_mesh_t* const m, h5t_oct_count_list_t* list, h5_chk_idx_t num_chunks, h5_glb_idx_t* elem_range, h5_glb_idx_t* chk_range); + +h5_err_t +h5tpriv_create_chunk (h5t_mesh_t* m, h5_oct_idx_t const oct_idx, h5_glb_idx_t const first_elem, h5_chk_weight_t const weight, h5_chk_size_t num_elems, h5_glb_idx_t* chk_range); + +h5_err_t +h5tpriv_update_chunks (h5t_mesh_t* m, h5_glb_idx_t* chk_range); + +h5_err_t +h5tpriv_free_chunks (h5t_mesh_t* const m); + +h5_err_t +h5tpriv_print_chunks (h5t_mesh_t* const m); + +h5_err_t +h5tpriv_mark_chk_elems_to_refine (h5t_mesh_t* const m, h5_glb_idxlist_t* glb_marked_entities, h5_oct_point_t* midpoint_list); + +int +h5tpriv_octant_is_full (h5t_octree_t* octree, h5_oct_idx_t oct_idx); + +h5_err_t +h5tpriv_get_ranges (h5t_mesh_t* const m, h5_glb_idx_t* range, h5_glb_idx_t mycount, h5_glb_idx_t glb_start); + +#endif diff --git a/src/h5core/h5t_store_tetm.c b/src/h5core/h5t_store_tetm.c new file mode 100644 index 0000000..14f269d --- /dev/null +++ b/src/h5core/h5t_store_tetm.c @@ -0,0 +1,342 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5t_types_private.h" +#include "h5t_errorhandling_private.h" +#include "h5t_access_private.h" +#include "h5t_adjacencies_private.h" +#include "h5t_core_private.h" +#include "h5t_map_private.h" +#include "h5t_model_private.h" +#include "h5t_readwrite_private.h" +#include "h5t_store_private.h" + +#include "h5core/h5t_map.h" + +static h5_err_t +alloc_loc_elems ( + h5t_mesh_t* const m, + const size_t cur, // currently allocated + const size_t new // new size + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, cur=%zu, new=%zu", m, cur, new); + + /* alloc mem for local data of elements */ + TRY ( m->loc_elems = h5_alloc ( + m->loc_elems, + new * sizeof (h5_loc_tet_t) ) ); + memset ( + (h5_loc_tet_t*)m->loc_elems + cur, + -1, + (new-cur) * sizeof (h5_loc_tet_t) ); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + +/*! + Refine edge. Store vertex, if new. + + Function can be used with tetrahedral and triangle meshes. + + \return local index of vertex + */ +static h5_loc_idx_t +bisect_edge ( + h5t_mesh_t* const m, + const h5_loc_idx_t face_idx, + const h5_loc_idx_t elem_idx + ) { + H5_PRIV_FUNC_ENTER (h5_loc_idx_t, + "m=%p, face_idx=%lld, elem_idx=%lld", + m, (long long)face_idx, (long long)elem_idx); + h5_loc_idlist_t* retval; + /* + get all elements sharing the given edge + */ + TRY (h5tpriv_find_te2 (m, face_idx, elem_idx, &retval)); + /* + check wether one of the found elements has been refined + */ + size_t i; + for (i = 0; i < retval->num_items; i++) { + h5_loc_id_t kids[2] = {-1,-1}; + TRY (h5tpriv_get_loc_entity_children (m, retval->items[i], kids)); + if (kids[0] >= 0) { + // element has been refined, return bisecting point + h5_loc_idx_t edge0[2], edge1[2]; + TRY( h5t_get_loc_vertex_indices_of_edge (m, kids[0], edge0) ); + TRY( h5t_get_loc_vertex_indices_of_edge (m, kids[1], edge1) ); + if ((edge0[0] == edge1[0]) || (edge0[0] == edge1[1])) { + H5_PRIV_FUNC_LEAVE (edge0[0]); // return first vertex + } else { + H5_PRIV_FUNC_LEAVE (edge0[1]); // return second vertex + } + } + } + /* + None of the elements has been refined -> add new vertex. + */ + h5_loc_idx_t indices[2]; + TRY( h5t_get_loc_vertex_indices_of_edge2 (m, face_idx, elem_idx, indices) ); + h5_float64_t* P0 = m->vertices[indices[0]].P; + h5_float64_t* P1 = m->vertices[indices[1]].P; + h5_float64_t P[3]; + + P[0] = (P0[0] + P1[0]) / 2.0; + P[1] = (P0[1] + P1[1]) / 2.0; + P[2] = (P0[2] + P1[2]) / 2.0; + + H5_PRIV_FUNC_RETURN (h5t_store_vertex (m, -1, P)); // return idx of new vertex +} + +/* + When calling this function, we know the number of elements to refine. But + we don't now the number of new vertices we will get. We have to compute + this number or just to guess it. + + Let n be the number of elements to refine and L the number of boundary faces of the + disconnected areas to be refined. Let l be the number of edges on + + For triangle grids the upper limit of new vertices is 3n and the lower limit + 3/2n + 3/2. The exact number is 3/2n + 1/2L. + The number of inner vertices is (3n-L)/2 and the boundary vertices L. + + similar for tetrahedrals but calc also include boundary edges... +// For tetrahedral grids the upper limit is 6n and the lower limit is 3n+3. +// The exact number is 3n + 3l. + + To get the real number of vertices to add, we either have to compute the + number of disconnected areas (which is quiet expensive), try to guess it + (which is impossible) or just set a limit. In most cases the number of + disconnected areas will be "small". + + For the time being we set the maximum number of boundary to 64. + */ +static h5_err_t +pre_refine_tet ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + unsigned int num_interior_elems_to_refine = m->marked_entities->num_items; + TRY (h5t_begin_store_vertices (m, num_interior_elems_to_refine*3 + 192)); + TRY (h5t_begin_store_elems (m, num_interior_elems_to_refine*8, m->num_weights)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/*! + Refine tetrahedron \c elem_idx. This function implements a "red refinement" + as described by J. Bey in "Tetrahedral grid refinement", Computing 55 + (1995), pp. 355-378 + + \return Local id of first new tetrahedron or \c -1 + */ +static h5_loc_idx_t +refine_tet ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + H5_PRIV_FUNC_ENTER (h5_loc_idx_t, + "m=%p, elem_idx=%lld", + m, (long long)elem_idx); + h5_loc_idx_t vertices[10]; + h5_loc_idx_t elem_idx_of_first_child; + h5_loc_tet_t* el = (h5_loc_tet_t*)m->loc_elems + elem_idx; + + if ( el->child_idx >= 0 ) + H5_PRIV_FUNC_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "Tetrahedron %lld already refined.", + (long long)elem_idx )); + vertices[0] = el->vertex_indices[0]; + vertices[1] = el->vertex_indices[1]; + vertices[2] = el->vertex_indices[2]; + vertices[3] = el->vertex_indices[3]; + + vertices[4] = bisect_edge (m, 0, elem_idx); // edge (0,1) + vertices[5] = bisect_edge (m, 1, elem_idx); // edge (0,2) + vertices[6] = bisect_edge (m, 2, elem_idx); // edge (1,2) + vertices[7] = bisect_edge (m, 3, elem_idx); // edge (0,3) + vertices[8] = bisect_edge (m, 4, elem_idx); // edge (1,3) + vertices[9] = bisect_edge (m, 5, elem_idx); // edge (2,3) + + // add new tets + h5_loc_idx_t new_elem[4]; + + // child 0 + new_elem[0] = vertices[0]; // vertex 0 + new_elem[1] = vertices[4]; // split point (0,1) + new_elem[2] = vertices[5]; // split point (0,2) + new_elem[3] = vertices[7]; // split point (0,3) + TRY( elem_idx_of_first_child = h5t_store_elem (m, elem_idx, new_elem, NULL) ); //TODO check use of h5t_store_elem2 + + // child 1 + new_elem[0] = vertices[4]; // split point (0,1) + new_elem[1] = vertices[1]; // vertex 1 + new_elem[2] = vertices[6]; // split point (1,2) + new_elem[3] = vertices[8]; // split point (1,3) + TRY( h5t_store_elem (m, elem_idx, new_elem, NULL) ); //TODO check use of h5t_store_elem2 + + // child 2 + new_elem[0] = vertices[5]; // split point (0,2) + new_elem[1] = vertices[6]; // split point (1,2) + new_elem[2] = vertices[2]; // vertex 2 + new_elem[3] = vertices[9]; // split point (2,3) + TRY( h5t_store_elem (m, elem_idx, new_elem, NULL) ); //TODO check use of h5t_store_elem2 + + // child 3 + new_elem[0] = vertices[7]; // split point (0,3) + new_elem[1] = vertices[8]; // split point (1,3) + new_elem[2] = vertices[9]; // split point (2,3) + new_elem[3] = vertices[3]; // vertex 3 + TRY( h5t_store_elem (m, elem_idx, new_elem, NULL) );//TODO check use of h5t_store_elem2 + + // child 4 + new_elem[0] = vertices[4]; // split point (0,1) + new_elem[1] = vertices[5]; // split point (0,2) + new_elem[2] = vertices[6]; // split point (1,2) + new_elem[3] = vertices[8]; // split point (1,3) + TRY( h5t_store_elem (m, elem_idx, new_elem, NULL) );//TODO check use of h5t_store_elem2 + + // child 5 + new_elem[0] = vertices[4]; // split point (0,1) + new_elem[1] = vertices[5]; // split point (0,2) + new_elem[2] = vertices[7]; // split point (0,3) + new_elem[3] = vertices[8]; // split point (1,3) + TRY( h5t_store_elem (m, elem_idx, new_elem, NULL) );//TODO check use of h5t_store_elem2 + + // child 6 + new_elem[0] = vertices[5]; // split point (0,2) + new_elem[1] = vertices[6]; // split point (1,2) + new_elem[2] = vertices[8]; // split point (1,3) + new_elem[3] = vertices[9]; // split point (2,3) + TRY( h5t_store_elem (m, elem_idx, new_elem, NULL) );//TODO check use of h5t_store_elem2 + + // child 7 + new_elem[0] = vertices[5]; // split point (0,2) + new_elem[1] = vertices[7]; // split point (0,3) + new_elem[2] = vertices[8]; // split point (1,3) + new_elem[3] = vertices[9]; // split point (2,3) + TRY( h5t_store_elem (m, elem_idx, new_elem, NULL) );//TODO check use of h5t_store_elem2 + + ((h5_loc_tet_t*)m->loc_elems)[elem_idx].child_idx = elem_idx_of_first_child; + m->num_interior_leaf_elems[m->leaf_level]--; + + H5_PRIV_FUNC_RETURN (elem_idx_of_first_child); +} + +static inline h5_loc_idx_t +compute_neighbor_of_face ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx, + const h5_loc_idx_t face_idx + ) { + H5_PRIV_FUNC_ENTER (h5_loc_idx_t, + "m=%p, elem_idx=%lld, face_idx=%lld", + m, (long long)elem_idx, (long long)face_idx); + h5_loc_idlist_t* td; + h5_loc_idx_t neighbor_idx = -2; + + do { + TRY( h5tpriv_find_td2 ( + m, + face_idx, + elem_idx, + &td) ); + if (td == NULL) { + H5_PRIV_FUNC_LEAVE (h5_error_internal ()); + } + if (td->num_items == 1) { + // neighbor is coarser or face is on the boundary + elem_idx = ((h5_loc_tet_t*)m->loc_elems)[elem_idx].parent_idx; + if (elem_idx == -1) { + // we are on the level of the macro grid + neighbor_idx = -1; + } + } else if (td->num_items == 2) { + // neighbor has same level of coarsness + if (h5tpriv_get_elem_idx(td->items[0]) == elem_idx) { + neighbor_idx = h5tpriv_get_elem_idx (td->items[1]); + } else { + neighbor_idx = h5tpriv_get_elem_idx (td->items[0]); + } + + } else { + H5_PRIV_FUNC_LEAVE (h5_error_internal ()); + } + } while (neighbor_idx < -1); + H5_PRIV_FUNC_RETURN (neighbor_idx); +} + +/* + Compute neighbors for elements on given level. + */ +static inline h5_err_t +compute_neighbors_of_elems ( + h5t_mesh_t* const m, + h5_lvl_idx_t level + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, level=%d", m, level); + if (level < 0 || level >= m->num_leaf_levels) { + H5_PRIV_FUNC_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "level idx %lld out of bound, must be in [%lld,%lld]", + (long long)level, + (long long)0, + (long long)m->num_leaf_levels)); + } + h5_loc_idx_t elem_idx = level == 0 ? 0 : m->num_interior_elems[level-1]; + const h5_loc_idx_t last_idx = m->num_interior_elems[level] - 1; + h5_loc_tet_t *el = (h5_loc_tet_t*)m->loc_elems + elem_idx; + while (elem_idx <= last_idx) { + h5_loc_idx_t face_idx = 0; + for (; face_idx < 4; face_idx++) { + el->neighbor_indices[face_idx] = + compute_neighbor_of_face (m, elem_idx, face_idx); + } + elem_idx++; + el++; + } + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * returns number of newly created tetrahedra when refining a tetrahedral + */ +static int +get_num_new_tetrahedra ( + void + ) { + return 8; +} + +static h5_err_t +end_store_elems ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + + h5_loc_idx_t start_idx = (m->leaf_level > 0) ? m->num_interior_elems[m->leaf_level-1] : 0; + h5_loc_idx_t count = m->num_interior_elems[m->leaf_level] - start_idx; + + TRY( h5tpriv_update_internal_structs (m, m->leaf_level) ); + TRY( compute_neighbors_of_elems (m, m->leaf_level) ); + TRY( h5tpriv_init_elem_flags (m, start_idx, count) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +struct h5t_store_methods h5tpriv_tetm_store_methods = { + alloc_loc_elems, + pre_refine_tet, + refine_tet, + get_num_new_tetrahedra, + end_store_elems, +}; diff --git a/src/h5core/h5t_store_trim.c b/src/h5core/h5t_store_trim.c new file mode 100644 index 0000000..ba0b4d4 --- /dev/null +++ b/src/h5core/h5t_store_trim.c @@ -0,0 +1,292 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5t_types_private.h" +#include "h5t_errorhandling_private.h" +#include "h5t_access_private.h" +#include "h5t_adjacencies_private.h" +#include "h5t_core_private.h" +#include "h5t_map_private.h" +#include "h5t_model_private.h" +#include "h5t_readwrite_private.h" +#include "h5t_store_private.h" + +#include "h5core/h5t_map.h" + +static h5_err_t +alloc_loc_elems ( + h5t_mesh_t* const m, + const size_t cur, + const size_t new + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, cur=%zu, new=%zu", m, cur, new); + + /* alloc mem for local data of elements */ + TRY (m->loc_elems = h5_alloc ( + m->loc_elems, + new * sizeof (h5_loc_tri_t))); + memset ( + (h5_loc_tri_t*)m->loc_elems + cur, + -1, + (new-cur) * sizeof (h5_loc_tri_t)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/* + Bisect edge and return local vertex index of the bisecting point. + */ +static h5_loc_idx_t +bisect_edge ( + h5t_mesh_t* const m, + const h5_loc_idx_t face_idx, + const h5_loc_idx_t elem_idx + ) { + H5_PRIV_FUNC_ENTER (h5_loc_idx_t, + "m=%p, face_idx=%lld, elem_idx=%lld", + m, (long long)face_idx, (long long)elem_idx); + h5_loc_idlist_t* retval; + // get all elements sharing the given edge + TRY (h5tpriv_find_te2 (m, face_idx, elem_idx, &retval)); + // check weather one of the found elements has been refined + size_t i; + for (i = 0; i < retval->num_items; i++) { +// // check if it is shared boundary edge that has been refined already +// if (num_b_edges > 0) { +// h5_glb_idx_t my_glb_idx = m->loc_elems[elem_idx].glb_idx; +// for (int j = 0; j < num_b_edges; j++) { +// if (b_edges[j].idx == my_glb_idx && +// b_edges[j].face_idx == face_idx) { +// H5_PRIV_FUNC_LEAVE (b_edges[j].vtx); +// } +// } +// } + h5_loc_id_t kids[2] = {-1,-1}; + TRY (h5tpriv_get_loc_entity_children (m, retval->items[i], kids)); + if (kids[0] >= 0) { + // element has been refined, return bisecting point + h5_loc_idx_t edge0[2], edge1[2]; + TRY (h5t_get_loc_vertex_indices_of_edge (m, kids[0], edge0)); + TRY (h5t_get_loc_vertex_indices_of_edge (m, kids[1], edge1)); + if ((edge0[0] == edge1[0]) || (edge0[0] == edge1[1])) { + H5_PRIV_FUNC_LEAVE (edge0[0]); + } else { + H5_PRIV_FUNC_LEAVE (edge0[1]); + } + } + } + /* + None of the elements has been refined -> add new vertex. + */ + h5_loc_idx_t indices[2]; + TRY( h5t_get_loc_vertex_indices_of_edge2 (m, face_idx, elem_idx, indices) ); + h5_float64_t* P0 = m->vertices[indices[0]].P; + h5_float64_t* P1 = m->vertices[indices[1]].P; + h5_float64_t P[3]; + + P[0] = (P0[0] + P1[0]) / 2.0; + P[1] = (P0[1] + P1[1]) / 2.0; + P[2] = (P0[2] + P1[2]) / 2.0; + + H5_PRIV_FUNC_RETURN (h5t_store_vertex (m, -1, P)); +} + +/* + Please read note about number of new vertices in tetrahedral + mesh implementation. + */ +static h5_err_t +pre_refine_triangle ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + unsigned int num_interior_elems_to_refine = m->marked_entities->num_items; + TRY (h5t_begin_store_vertices (m, num_interior_elems_to_refine*3 + 64)); + TRY (h5t_begin_store_elems (m, num_interior_elems_to_refine*4, m->num_weights)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/*! + Refine triangle \c local_eid + + \return Local index of first new triangle or \c H5_ERR + */ +static h5_loc_idx_t +refine_triangle ( + h5t_mesh_t* const m, + const h5_loc_idx_t elem_idx + ) { + H5_PRIV_FUNC_ENTER (h5_loc_idx_t, + "m=%p, elem_idx=%lld", + m, (long long)elem_idx); + h5_loc_idx_t vertices[6]; // local vertex indices + h5_loc_idx_t elem_idx_of_first_child; + h5_loc_tri_t* el = (h5_loc_tri_t*)m->loc_elems + elem_idx; + + if (el->child_idx >= 0) + H5_PRIV_FUNC_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "Element %lld already refined.", + (long long)elem_idx)); + + vertices[0] = el->vertex_indices[0]; + vertices[1] = el->vertex_indices[1]; + vertices[2] = el->vertex_indices[2]; + + vertices[3] = bisect_edge (m, 0, elem_idx); + vertices[4] = bisect_edge (m, 1, elem_idx); + vertices[5] = bisect_edge (m, 2, elem_idx); + + h5_loc_idx_t new_elem[3]; + + new_elem[0] = vertices[0]; // V[0] < V[3] , V[4] + new_elem[1] = vertices[3]; + new_elem[2] = vertices[4]; + TRY( elem_idx_of_first_child = h5t_store_elem (m, elem_idx, new_elem, NULL) ); + + new_elem[0] = vertices[3]; // V[3] < V[1] , V[5] + new_elem[1] = vertices[1]; + new_elem[2] = vertices[5]; + TRY( h5t_store_elem (m, elem_idx, new_elem, NULL) ); + + new_elem[0] = vertices[4]; // V[4] < V[5] , V[2] + new_elem[1] = vertices[5]; + new_elem[2] = vertices[2]; + TRY( h5t_store_elem (m, elem_idx, new_elem, NULL) ); + + new_elem[0] = vertices[3]; // V[3] < V[4] , V[5] + new_elem[1] = vertices[5]; + new_elem[2] = vertices[4]; // TODO check if that ordering is correct! + TRY( h5t_store_elem (m, elem_idx, new_elem, NULL) ); + + ((h5_loc_tri_t*)m->loc_elems)[elem_idx].child_idx = elem_idx_of_first_child; + m->num_interior_leaf_elems[m->leaf_level]--; + + H5_PRIV_FUNC_RETURN (elem_idx_of_first_child); +} + +static inline h5_loc_idx_t +compute_neighbor_of_face ( + h5t_mesh_t* const m, + h5_loc_idx_t elem_idx, + const h5_loc_idx_t face_idx + ) { + H5_PRIV_FUNC_ENTER (h5_loc_idx_t + , "m=%p, elem_idx=%lld, face_idx=%lld", + m, (long long)elem_idx, (long long)face_idx); + h5_loc_idlist_t* te; + h5_loc_idx_t neighbor_idx = -2; + + do { + TRY( h5tpriv_find_te2 ( + m, + face_idx, + elem_idx, + &te) ); + if (te == NULL) { + H5_PRIV_FUNC_LEAVE (h5_error_internal ()); + } + if (te->num_items == 1) { + h5_loc_idx_t old_elem_idx = elem_idx; + // neighbor is coarser or face is on the boundary + elem_idx = ((h5_loc_tri_t*)m->loc_elems)[elem_idx].parent_idx; + if (elem_idx == -1) { + // we are on the level of the macro grid + neighbor_idx = -1; + } + if (elem_idx < -1) { // this should only happen if we are on the boarder + // of a loaded chunk and the parent is on a different chunk + if (h5_debug_level >= 6) { + h5_debug ("Elem %d is on different proc than its parent %d \n" + "therefore neighborhood idx is not correct resolved", old_elem_idx, elem_idx); + } + assert (m->f->myproc != find_proc_to_write (m, old_elem_idx)); + H5_PRIV_FUNC_LEAVE (~0); //TODO what is a resonable output here? + } + } else if (te->num_items == 2) { + // neighbor has same level of coarsness + if (h5tpriv_get_elem_idx(te->items[0]) == elem_idx) { + neighbor_idx = h5tpriv_get_elem_idx (te->items[1]); + } else { + neighbor_idx = h5tpriv_get_elem_idx (te->items[0]); + } + + } else { + printf ("elem %d face %d num_items %d", elem_idx, face_idx, te->num_items); + H5_PRIV_FUNC_LEAVE (h5_error_internal ()); + } + } while (neighbor_idx < -1); + H5_PRIV_FUNC_RETURN (neighbor_idx); +} + +/* + Compute neighbors for elements on given level. + */ +static inline h5_err_t +compute_neighbors_of_elems ( + h5t_mesh_t* const m, + h5_lvl_idx_t level + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p, level=%d", m, level); + if (level < 0 || level >= m->num_leaf_levels) { + H5_PRIV_FUNC_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "level idx %lld out of bound, must be in [%lld,%lld]", + (long long)level, + (long long)0, + (long long)m->num_leaf_levels)); + } + h5_loc_idx_t elem_idx = level == 0 ? 0 : m->num_interior_elems[level-1]; + const h5_loc_idx_t last_idx = m->num_interior_elems[level] - 1; + h5_loc_tri_t *el = (h5_loc_tri_t*)m->loc_elems + elem_idx; + while (elem_idx <= last_idx) { + h5_loc_idx_t face_idx = 0; + for (; face_idx < 3; face_idx++) { + el->neighbor_indices[face_idx] = + compute_neighbor_of_face (m, elem_idx, face_idx); + } + elem_idx++; + el++; + } + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} +/* + * returns number of newly created triangles when refining a triangle + */ +static int +get_num_new_triangles ( + void + ) { + return 4; +} +static h5_err_t +end_store_elems ( + h5t_mesh_t* const m + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "m=%p", m); + + h5_loc_idx_t start_idx = (m->leaf_level > 0) ? m->num_interior_elems[m->leaf_level-1] : 0; + h5_loc_idx_t count = m->num_interior_elems[m->leaf_level] - start_idx; + + TRY( h5tpriv_update_internal_structs (m, m->leaf_level) ); + TRY( compute_neighbors_of_elems (m, m->leaf_level) ); + TRY( h5tpriv_init_elem_flags (m, start_idx, count) ); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +struct h5t_store_methods h5tpriv_trim_store_methods = { + alloc_loc_elems, + pre_refine_triangle, + refine_triangle, + get_num_new_triangles, + end_store_elems, +}; diff --git a/src/h5core/h5t_tags.c b/src/h5core/h5t_tags.c new file mode 100644 index 0000000..5a50501 --- /dev/null +++ b/src/h5core/h5t_tags.c @@ -0,0 +1,896 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5t_types_private.h" +#include "h5core/h5t_map.h" + +#include "h5core/h5.h" + +#include "h5_va_macros.h" + +#include "h5_attribs_private.h" +#include "h5_hdf5_private.h" + +#include "h5_model_private.h" +#include "h5t_access_private.h" +#include "h5t_map_private.h" +#include "h5t_model_private.h" +#include "h5t_tags_private.h" + +#include "h5_init_private.h" + +#include + +static h5_err_t +read_dataset ( + h5t_mesh_t* const m, + const h5_file_p f, + hid_t dset_id, + h5_dsinfo_t* dsinfo, + hid_t (*set_mspace)(h5t_mesh_t*,hid_t), + hid_t (*set_dspace)(h5t_mesh_t*,hid_t), + void* const data + ) { + H5_PRIV_API_ENTER (h5_err_t, + "f=%p, dset_id=%d (%s), dsinfo=%p, set_mspace=%p, " + "set_dspace=%p, data=%p", + f, dset_id, hdf5_get_objname(dset_id), + dsinfo, + set_mspace, set_dspace, data); + + hid_t mspace_id; + hid_t dspace_id; + + TRY (mspace_id = (*set_mspace)(m, dset_id)); + TRY (dspace_id = (*set_dspace)(m, dset_id)); +#ifdef PARALLEL_IO + TRY (h5priv_start_throttle (f)); +#endif + TRY (hdf5_read_dataset ( + dset_id, + dsinfo->type_id, + mspace_id, + dspace_id, + f->props->xfer_prop, + data)); +#ifdef PARALLEL_IO + TRY (h5priv_end_throttle (f)); +#endif + TRY (hdf5_close_dataspace (dspace_id)); + TRY (hdf5_close_dataspace (mspace_id)); + + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +static hid_t +open_space_all ( + h5t_mesh_t* const m, + const hid_t dataset_id + ) { + UNUSED_ARGUMENT (m); + UNUSED_ARGUMENT (dataset_id); + return H5S_ALL; +} + +/*! + Get number of tagsets + */ +h5_ssize_t +h5t_get_num_mtagsets ( + h5t_mesh_t* const m + ) { + H5_CORE_API_ENTER (h5_ssize_t, "m=%p", m); + h5_ssize_t num_mtagsets = 0; + h5_err_t exists = 0; + TRY (exists = h5priv_link_exists (m->mesh_gid, "Tags")); + if (!exists) H5_CORE_API_LEAVE (0); + + hid_t loc_id; + TRY (loc_id = h5priv_open_group (0, m->mesh_gid, "Tags")); + TRY (num_mtagsets = hdf5_get_num_groups (loc_id)); + TRY (hdf5_close_group (loc_id)); + + H5_CORE_API_RETURN (num_mtagsets); + +} + +static h5_err_t +get_tagset_info ( + const hid_t loc_id, + const h5_size_t idx, + char name[], + const h5_size_t len_name, + h5_int64_t* const type + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "loc_id=%d, idx=%llu, name=%p, len_name=%llu, type=%p", + loc_id, (long long unsigned)idx, name, + (long long unsigned)len_name, type); + + hid_t tags_id, tag_id, dset_id; + // open ctn with all tags + TRY (tags_id = hdf5_open_group (loc_id, "Tags")); + // get name of tag given by idx + TRY (hdf5_get_name_of_group_by_idx (tags_id, idx, name, len_name)); + // open this tag + TRY (tag_id = hdf5_open_group (tags_id, name)); + // determine type of dataset with values + TRY (dset_id = hdf5_open_dataset (tag_id, "values")); + hid_t type_; + TRY (type_ = hdf5_get_dataset_type (dset_id)); + TRY (*type = h5priv_normalize_h5_type (type_)); + + TRY (hdf5_close_dataset (dset_id)); + TRY (hdf5_close_group (tag_id)); + TRY (hdf5_close_group (tags_id)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/*! + Get information about tagset given by index: + name + type + */ +h5_err_t +h5t_get_mtagset_info ( + h5t_mesh_t* const m, + const h5_size_t idx, + char name[], + const h5_size_t len_name, + h5_int64_t* const type + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, idx=%llu, name=%p, len_name=%llu, type=%p", + m, (long long unsigned)idx, name, + (long long unsigned)len_name, type); + + + H5_CORE_API_RETURN (get_tagset_info(m->mesh_gid, idx, name, len_name, type)); +} + +/*! + Check whether taget exists. + */ +h5_err_t +h5t_mtagset_exists ( + h5t_mesh_t* const m, + const char name[] + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p, name=%s", m, name); + H5_CORE_API_RETURN (h5priv_link_exists (m->mesh_gid, "Tags", name)); +} + +static h5_err_t +new_tagset ( + h5t_mesh_t* const m, + hid_t parent_gid, + const char name[], + h5_id_t type, + h5t_tagset_t** rtagset + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "m=%p, name='%s', type=%llu, rtagset=%p", + m, name, (long long unsigned)type, rtagset); + + h5t_tagset_t* tagset = NULL; + size_t size = (m->num_interior_elems[m->num_leaf_levels-1] - 1) * sizeof(*tagset->elems) + + sizeof(*tagset); + TRY (tagset = h5_calloc (1, size)); + + TRY (tagset->name = h5_strdup (name)); + tagset->m = m; + tagset->parent_gid = parent_gid; + tagset->type = type; + tagset->num_interior_elems = m->num_interior_elems[m->num_leaf_levels-1]; + tagset->scope.min_level = 32767; + tagset->scope.max_level = -1; + TRY (h5priv_search_strlist (&m->mtagsets, name)); + + *rtagset = tagset; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/*! + Create a new tagset + */ +h5_err_t +h5t_create_mtagset ( + h5t_mesh_t* const m, + const char name[], + const h5_id_t type, + h5t_tagset_t** set + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, name='%s', type=%llu, set=%p", + m, name, (long long unsigned)type, set); + // validate name + if (name == NULL || name[0] == '\0') { + H5_PRIV_FUNC_LEAVE ( + h5_error (H5_ERR_INVAL, "Invalid name" )); + } + + // validate type + if (type != H5_INT64_T && type != H5_FLOAT64_T) { + H5_PRIV_FUNC_LEAVE ( + h5_error (H5_ERR_INVAL, "Unsupported data type." )); + } + + // check if a tagset with given name already exists + h5_err_t exists; + TRY (exists = h5priv_link_exists (m->mesh_gid, "Tags", name)); + if (exists || h5priv_find_strlist (m->mtagsets, name) >= 0) + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_H5FED, + "Cannot create tagset '%s': Tagset exists", name)); + + + H5_CORE_API_RETURN (new_tagset (m, m->mesh_gid, name, type, set)); +} + +static int +find_face_id ( + h5t_tageleminfo_t* eleminfo, + h5_loc_idx_t face_id + ) { + if (eleminfo->num_tags == 0) return -1; + h5t_taginfo_t* taginfo = eleminfo->ti; + register int low = 0; + register int high = eleminfo->num_tags-1; + while (low <= high) { + register int mid = (low + high) / 2; + register int diff = taginfo[mid].face_id - face_id; + if (diff > 0) + high = mid -1; + else if (diff < 0) + low = mid + 1; + else + return mid; + } + return -(low+1); +} + + +static h5_err_t +remove_tag ( + h5t_tagset_t* tagset, + const h5_loc_idx_t face_id, + const h5_loc_idx_t elem_idx + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "tagset=%p, face_id=%lld, elem_idx=%lld", + tagset, (long long)face_id, (long long)elem_idx); + if (tagset->elems[elem_idx] == NULL) { + H5_PRIV_FUNC_LEAVE ( + h5_warn ( + "Tag %s not set for face %llx of element %lld", + tagset->name, + (long long)face_id, + (long long)elem_idx)); + } + h5t_tageleminfo_t* eleminfo = tagset->elems[elem_idx]; + + // remove values + int idx = find_face_id (eleminfo, face_id); + if (idx < 0) { + H5_PRIV_FUNC_LEAVE ( + h5_warn ( + "Tag %s not set for face %llx of element %lld", + tagset->name, + (long long)face_id, + (long long)elem_idx)); + } + h5t_taginfo_t* ti = &eleminfo->ti[idx]; + + tagset->num_values -= ti->val_dim; + memmove (tagset->values + ti->val_idx, + tagset->values + ti->val_idx + ti->val_dim, + (tagset->num_values - idx) * sizeof (tagset->values[0])); + + // remove tag info for this entity + memmove (ti, + ti + 1, + (eleminfo->num_tags-idx-1)*sizeof (ti[0]) ); + + // we don't resize the eleminfo structure!!! + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static h5_err_t +add_tag ( + h5t_tagset_t *tagset, + const int idx, + const h5_loc_idx_t face_id, + const h5_loc_idx_t elem_idx, + const size_t dim, + void* val + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "tagset=%p, idx=%d, face_id=%lld, elem_idx=%lld, dim=%zu, val=%p", + tagset, idx, (long long)face_id, (long long)elem_idx, dim, val); + // insert new taginfo + h5t_tageleminfo_t* eleminfo = tagset->elems[elem_idx]; + TRY (eleminfo = tagset->elems[elem_idx] = h5_alloc ( + tagset->elems[elem_idx], + sizeof (*eleminfo) + + eleminfo->num_tags * sizeof (eleminfo->ti[0]))); + h5t_taginfo_t* ti = &eleminfo->ti[idx]; + memmove (ti + 1, + ti, + (eleminfo->num_tags - idx) * sizeof(*ti)); + eleminfo->num_tags++; + ti->face_id = (short)face_id; + ti->val_dim = dim; + + // append values + TRY (tagset->values = h5_alloc ( + tagset->values, + (tagset->num_values+dim) * sizeof (*tagset->values))); + memcpy (tagset->values + tagset->num_values, + val, + dim*sizeof (*tagset->values)); + ti->val_idx = tagset->num_values; + tagset->num_values += dim; + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +overwrite_tag ( + h5t_tagset_t* tagset, + const int idx, + const h5_loc_idx_t elem_idx, + void* val + ) { + h5t_tageleminfo_t* eleminfo = tagset->elems[elem_idx]; + h5t_taginfo_t* ti = &eleminfo->ti[idx]; + + memcpy (tagset->values + ti->val_idx, + val, + ti->val_dim * sizeof (*ti) ); + return H5_SUCCESS; +} + +/*! + Set tag for entity in current mesh. + */ +static h5_err_t +set_tag ( + h5t_tagset_t* tagset, + const h5_loc_idx_t face_id, + const h5_loc_idx_t elem_idx, + const size_t dim, + void* val + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, + "tagset=%p, face_id=%lld, elem_idx=%lld, dim=%zu, val=%p", + tagset, (long long)face_id, (long long)elem_idx, dim, val); + if (tagset->elems[elem_idx] == NULL) { + TRY (tagset->elems[elem_idx] = h5_calloc ( + 1, sizeof (*tagset->elems))); + } + h5t_tageleminfo_t* eleminfo = tagset->elems[elem_idx]; + int i = find_face_id (eleminfo, face_id); + h5t_taginfo_t* ti = eleminfo->ti + i; + if (i >= 0 && dim != ti->val_dim) { + /* + Overwrite existing value with new dimension. + This is a very unusual case. + */ + TRY (remove_tag (tagset, face_id, elem_idx)); + TRY (add_tag (tagset, i, face_id, elem_idx, dim, val)); + } else if (i >= 0 && dim == ti->val_dim) { + TRY (overwrite_tag (tagset, i, elem_idx, val)); + } else { // i < 0 + TRY (add_tag (tagset, -i-1, face_id, elem_idx, dim, val)); + tagset->num_entities++; + } + if (tagset->m->leaf_level < tagset->scope.min_level) { + tagset->scope.min_level = tagset->m->leaf_level; + } + if (tagset->m->leaf_level > tagset->scope.max_level) { + tagset->scope.max_level = tagset->m->leaf_level; + } + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + +static h5_err_t +read_tagset ( + h5t_tagset_t* const tagset + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "tagset=%p", tagset); + hid_t loc_id = 0; + + // open HDF5 group + + TRY (loc_id = h5priv_open_group (0, tagset->parent_gid, "Tags", tagset->name)); + + // read datasets: + + // "elems" + h5t_glb_tag_idx_t* elems; + size_t num_interior_elems = 0; + + hid_t dset_id; + TRY (dset_id = hdf5_open_dataset (loc_id, "elems")); + TRY (num_interior_elems = hdf5_get_npoints_of_dataset (dset_id)); + TRY (elems = h5_calloc (num_interior_elems, sizeof(*elems))); + h5_dsinfo_t dsinfo; + memset (&dsinfo, 0, sizeof (dsinfo)); + dsinfo.type_id = h5_dta_types.h5t_glb_tag_idx_t; + TRY (h5priv_read_dataset ( + tagset->m->f, + dset_id, + &dsinfo, + open_space_all, + open_space_all, + elems)); + TRY (hdf5_close_dataset (dset_id)); + num_interior_elems--; + + // "entities" + h5t_glb_tag_idx_t* entities; + size_t ent_idx = 0; + size_t num_entities = 0; + TRY (dset_id = hdf5_open_dataset (loc_id, "entities")); + TRY (num_entities = hdf5_get_npoints_of_dataset (dset_id)); + TRY (entities = h5_calloc (num_entities, sizeof(*entities))); + TRY (read_dataset ( + tagset->m, + tagset->m->f, + dset_id, + &dsinfo, + open_space_all, open_space_all, + entities)); + TRY (hdf5_close_dataset (dset_id)); + num_entities--; + + // "values" + h5_int64_t* vals; + size_t num_vals = 0; + TRY (dset_id = hdf5_open_dataset (loc_id, "values")); + TRY (num_vals = hdf5_get_npoints_of_dataset (dset_id)); + TRY (vals = h5_calloc (num_vals, sizeof (*vals))); + TRY (dsinfo.type_id = hdf5_get_dataset_type (dset_id)); + TRY (read_dataset ( + tagset->m, + tagset->m->f, + dset_id, + &dsinfo, + open_space_all, open_space_all, + vals)); + TRY (hdf5_close_dataset (dset_id )); + tagset->type = h5priv_normalize_h5_type (dsinfo.type_id); + + /* + add tagset and set values + */ + + h5_int64_t scope; + TRY (h5priv_read_attrib (loc_id, "__scope_min__", H5_INT64_T, &scope)); + tagset->scope.min_level = scope; + TRY (h5priv_read_attrib (loc_id, "__scope_max__", H5_INT64_T, &scope)); + tagset->scope.max_level = scope; + + for (ent_idx = 0; ent_idx < num_entities; ent_idx++) { + h5t_glb_tag_idx_t *entity = &entities[ent_idx]; + size_t dim = (entity+1)->idx - entity->idx; + // map global face id and global element idx to local + h5_loc_idx_t face_id; + h5_loc_idx_t elem_idx; + h5_glb_idx_t glb_elem_idx = h5tpriv_get_elem_idx (entity->eid); + elem_idx = h5t_map_glb_elem_idx2loc (tagset->m, glb_elem_idx); + assert (elem_idx >= 0); + face_id = h5tpriv_get_face_id (entity->eid); + TRY (set_tag ( + tagset, + face_id, + elem_idx, + dim, + &vals[entity->idx])); + } + TRY (h5_free (elems)); + TRY (h5_free (entities)); + TRY (h5_free (vals)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/*! + Open existing tagset given by \c name. + */ +h5_err_t +h5t_open_mtagset ( + h5t_mesh_t* const m, + const char name[], + h5t_tagset_t** set + ) { + H5_CORE_API_ENTER (h5_err_t, + "m=%p, name='%s', set=%p", + m, name, set); + // validate name + if (name == NULL || name[0] == '\0') { + H5_PRIV_FUNC_LEAVE ( + h5_error (H5_ERR_INVAL, "Invalid name" )); + } + + // check if a tagset with given name exists + h5_err_t exists; + TRY (exists = h5priv_link_exists (m->mesh_gid, "Tags", name)); + if (!exists) H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "Cannot open tagset '%s': No such tagset ", name)); + + // check if tagset has already been opened + if (h5priv_find_strlist (m->mtagsets, name) >= 0) H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "Cannot open tagset '%s': Already open ", name)); + + + TRY (new_tagset (m, m->mesh_gid, name, -1, set)); + TRY (read_tagset (*set)); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +/* + Write tagset to disk. + */ +static h5_err_t +write_tagset ( + h5t_tagset_t* tagset + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "tagset=%p", tagset); + h5t_tageleminfo_t** eleminfos = tagset->elems; + hid_t group_id; + h5t_glb_tag_idx_t* elems = NULL; // in memory dataset + h5t_glb_tag_idx_t* elem = NULL; // reference an element in elems + h5_loc_idx_t num_interior_elems = 0; + h5t_glb_tag_idx_t* entities = NULL; // in memory dataset + h5t_glb_tag_idx_t* entity = NULL; // reference an element in entities + h5t_tagval_t* values = NULL; // in memory dataset + + h5_loc_idx_t elem_idx = 0; + h5_loc_idx_t entity_idx = 0; + h5_loc_idx_t val_idx = 0; + + h5t_mesh_t* m = tagset->m; + if (m->num_leaf_levels <= 0) { + H5_PRIV_FUNC_LEAVE (H5_SUCCESS); // nothing to do + } + num_interior_elems = m->num_interior_elems[m->num_leaf_levels-1]; + if (num_interior_elems == 0 || tagset->num_entities == 0) { + H5_PRIV_FUNC_LEAVE (H5_SUCCESS); // nothing to do + } + // allocate memory per element (plus 1) + TRY (elems = h5_calloc (num_interior_elems+1, sizeof(*elems))); + elem = elems; + + // allocate memory per entity (plus 1) + TRY (entities = h5_calloc (tagset->num_entities+1, sizeof(*entities)) ); + entity = entities; + + // allocate memory for all values + TRY (values = h5_calloc (tagset->num_values, sizeof(*values)) ); + + // build data structures in memory + while (elem < elems+num_interior_elems) { + elem->eid = elem_idx; + elem->idx = entity_idx; + h5t_tageleminfo_t* eleminfo = *eleminfos; + + // loop over all tagged faces of this element + int ti_idx; + for (ti_idx = 0; eleminfo && ti_idx < eleminfo->num_tags; ti_idx++) { + h5t_taginfo_t* ti = eleminfo->ti+ti_idx; + h5_glb_idx_t glb_elem_idx = h5tpriv_get_loc_elem_glb_idx ( + m, elem_idx); + entity->eid = h5tpriv_build_entity_id ( + 0, (h5_glb_id_t)ti->face_id, glb_elem_idx); + entity->idx = val_idx; + + // copy values + memcpy (values + val_idx, + &tagset->values[ti->val_idx], + ti->val_dim * sizeof (*values)); + val_idx += ti->val_dim; + entity_idx++; + entity++; + } + elem_idx++; + eleminfos++; + elem++; + } + elem->eid = -1; // last entry + tagset->num_entities = elem->idx = entity_idx; + entity->eid = -1; + tagset->num_values = entity->idx = val_idx; + + // write data + TRY (group_id = h5priv_open_group ( + 1, + tagset->parent_gid, + "Tags", + tagset->name)); + h5_dsinfo_t dsinfo; + memset (&dsinfo, 0, sizeof(dsinfo)); + dsinfo.rank = 1; + dsinfo.max_dims[0] = H5S_UNLIMITED; + dsinfo.chunk_dims[0] = 4096; + dsinfo.access_prop = H5P_DEFAULT; + + strcpy (dsinfo.name, "elems"); + dsinfo.dims[0] = num_interior_elems + 1; + dsinfo.type_id = h5_dta_types.h5t_glb_tag_idx_t; + TRY (dsinfo.create_prop = hdf5_create_property (H5P_DATASET_CREATE)); + TRY (hdf5_set_chunk_property (dsinfo.create_prop, dsinfo.rank, + dsinfo.chunk_dims)); + + TRY (h5priv_write_dataset_by_name ( + m, + m->f, + group_id, + &dsinfo, + open_space_all, open_space_all, + elems)); + + strcpy (dsinfo.name, "entities"); + dsinfo.dims[0] = tagset->num_entities + 1; + + TRY (h5priv_write_dataset_by_name ( + m, + m->f, + group_id, + &dsinfo, + open_space_all, open_space_all, + entities)); + + strcpy (dsinfo.name, "values"); + dsinfo.dims[0] = tagset->num_values; + dsinfo.type_id = h5_dta_types.h5_int64_t; + + TRY (h5priv_write_dataset_by_name ( + m, + m->f, + group_id, + &dsinfo, + open_space_all, open_space_all, + values)); + h5_int64_t scope = tagset->scope.min_level; + TRY (h5priv_write_attrib (group_id, "__scope_min__", H5_INT64_T, &scope, 1, 1)); + scope = tagset->scope.max_level; + TRY (h5priv_write_attrib (group_id, "__scope_max__", H5_INT64_T, &scope, 1, 1)); + + TRY (hdf5_close_group (group_id)); + TRY (h5_free (elems)); + TRY (h5_free (entities)); + TRY (h5_free (values)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + + +/* + Release a tag-set + */ +static inline h5_err_t +release_mtagset ( + h5t_tagset_t* tagset + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "tagset=%p", tagset); + unsigned int i; + // release per element structures + for (i = 0; i < tagset->num_interior_elems; i++) { + if (tagset->elems[i] != NULL) { + TRY (h5_free (tagset->elems[i])); + } + } + // remove from book-keeping list in mesh + TRY (h5priv_remove_strlist(tagset->m->mtagsets, tagset->name)); + + // release other memory + TRY (h5_free (tagset->name)); + TRY (h5_free (tagset->values)); + TRY (h5_free (tagset)); + + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/*! + Close tagset. + + Write data to disk, if something as been changed, and release memory. + */ +h5_err_t +h5t_close_mtagset ( + h5t_tagset_t* tagset + ) { + H5_CORE_API_ENTER (h5_err_t, "tagset=%p", tagset); + if (tagset->changed) { + TRY (write_tagset (tagset)); + } + TRY (release_mtagset (tagset)); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +/*! + Delete tagset on disk. + + Note: + There may be a copy in memory! This copy is still accessable, even + changes are possible. Since data are written on close, the tagset will + be created again. + We should implement something to avoid this! We have a similiar problem, + if the user opens the dataset more than once. + */ + +/*! + Remove a tagset from the current mesh. + + \param[in] f file handle + \param[in] name name of tagset to remove + + \return H5_SUCCESS or error code + */ +static h5_err_t +remove_tagset ( + const hid_t tagsets_id, + const char name[] + ) { + H5_PRIV_FUNC_ENTER (h5_err_t, "tagsets_id=%d, name=%s", tagsets_id, name); + hid_t loc_id; + TRY (loc_id = hdf5_open_group (tagsets_id, name)); + TRY (hdf5_delete_link (loc_id, "elems", H5P_DEFAULT)); + TRY (hdf5_delete_link (loc_id, "entities", H5P_DEFAULT)); + TRY (hdf5_delete_link (loc_id, "values", H5P_DEFAULT)); + TRY (hdf5_close_group (loc_id)); + TRY (hdf5_delete_link (tagsets_id, name, H5P_DEFAULT)); + H5_PRIV_FUNC_RETURN (H5_SUCCESS); +} + +/*! + Remove a tagset from the current mesh. + + \param[in] f file handle + \param[in] name name of tagset to remove + + \return H5_SUCCESS or error code + */ +h5_err_t +h5t_remove_mtagset ( + h5t_mesh_t* const m, + const char name[] + ) { + H5_CORE_API_ENTER (h5_err_t, "m=%p, name='%s'", m, name); + + // check if tagset has a copy in memory + if (h5priv_find_strlist (m->mtagsets, name) >= 0) H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "Cannot remove tagset '%s': Still open ", name)); + + hid_t loc_id; + TRY (loc_id = hdf5_open_group (m->mesh_gid, "Tags")); + TRY (remove_tagset (loc_id, name)); + TRY (hdf5_close_group (loc_id)); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +/*! + Set tag. + */ +h5_err_t +h5t_set_tag ( + h5t_tagset_t* const tagset, + const h5_loc_id_t entity_id, + const h5_size_t size, + void* val + ) { + H5_CORE_API_ENTER (h5_err_t, + "tagset=%p, entity_id=%lld, size=%llu, val=%p", + tagset, + (long long)entity_id, + (long long unsigned)size, + val); + h5_loc_idx_t face_id = h5tpriv_get_face_id (entity_id); + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + TRY (set_tag (tagset, face_id, elem_idx, size, val)); + tagset->changed = 1; + H5_CORE_API_RETURN (H5_SUCCESS); +} + +static inline h5_err_t +get_idx_of_tagval ( + const h5t_tagset_t* tagset, + const h5_loc_id_t entity_id, + int* taginfo_idx, + h5_loc_idx_t* val_idx + ) { + h5_loc_idx_t face_id = h5tpriv_get_face_id (entity_id); + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + h5t_tageleminfo_t* eleminfo = tagset->elems[elem_idx]; + if (eleminfo == NULL) { + return H5_NOK; // not tagged + } + *taginfo_idx = find_face_id (eleminfo, face_id); + if (*taginfo_idx < 0) { + return H5_NOK; // not tagged + } + *val_idx = eleminfo->ti[*taginfo_idx].val_idx; + return H5_SUCCESS; +} + +/*! + Get tag for entity in given tagset. Untagged entities inherit tags from + their closest parent. + + \param[in] tagset tagset + \param[in] entity_id id of entity + \param[out] size size of value + \param[out] vals tag value + + \return H5_SUCCESS or error code + */ +h5_loc_id_t +h5t_get_tag ( + const h5t_tagset_t* tagset, + const h5_loc_id_t entity_id, + h5_size_t* const dim, + void* const values + ) { + H5_CORE_API_ENTER (h5_err_t, + "tagset=%p, entity_id=%lld, dim=%p, values=%p", + tagset, + (long long)entity_id, + dim, + values); + if (tagset->m->leaf_level < tagset->scope.min_level) { + H5_CORE_API_LEAVE (H5_NOK); // entity not tagged + } + h5_loc_id_t id = entity_id; + h5_err_t h5err; + int ti_idx = 0; + h5_loc_idx_t val_idx = 0; + // query entity while not tagged and parent exists + while ((h5err = get_idx_of_tagval (tagset, id, &ti_idx, &val_idx)) < 0 && + (id = h5tpriv_get_loc_entity_parent (tagset->m, id)) >= 0) ; + + if (h5err < 0) + H5_CORE_API_LEAVE (H5_NOK); // entity not tagged + + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (id); + h5t_taginfo_t* ti = &tagset->elems[elem_idx]->ti[ti_idx]; + h5t_tagval_t* v = tagset->values; + if (*dim > ti->val_dim || values == NULL) { + *dim = ti->val_dim; + } + if (values != NULL) { + memcpy (values, v + val_idx, *dim*sizeof(*v) ); + } + H5_CORE_API_RETURN (id); +} + +/*! + Remove tag from entity + + \param[in] tagset pointer to tagset + \param[in] entity_id local entity id + */ +h5_err_t +h5t_remove_tag ( + h5t_tagset_t* tagset, + const h5_loc_id_t entity_id + ) { + H5_CORE_API_ENTER (h5_err_t, + "tagset=%p, entity_id=%lld", + tagset, (long long)entity_id); + h5_loc_idx_t face_id = h5tpriv_get_face_id (entity_id); + h5_loc_idx_t elem_idx = h5tpriv_get_elem_idx (entity_id); + H5_CORE_API_RETURN (remove_tag (tagset, face_id, elem_idx)); +} + diff --git a/src/h5core/h5t_tags_private.h b/src/h5core/h5t_tags_private.h new file mode 100644 index 0000000..9eb0ead --- /dev/null +++ b/src/h5core/h5t_tags_private.h @@ -0,0 +1,102 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5T_TAGS_PRIVATE_H +#define __H5T_TAGS_PRIVATE_H + +#include + +#include "h5core/h5_types.h" +#include "h5core/h5t_tags.h" + +/* + * Tags can be assigned to all entities of a mesh + * Tag values are arrays of int64 or float64 + * Complex numbers can be stored as array of float64 with even dimension + * Tags are addressed via a name and the entity id. + * Tags with the same name are called a "tagset" + * Tagsets can be used to store time/step-constant data. These tagsets are + called "m-tagsets" and are assigned directly to a mesh. + * Tagsets can be used to store data which may change from step to step. + These tagsets are called "s-tagsets" and are assigned to a mesh and a + (time-)step. + + ToDo + * Scalar values + */ + + +/* + Tags are addressed via name and entity id. We access a tag very indirect: + First we lookup for the name of the tagset in a hash table. The value of the + hash entry gives us information about the data type stored in this tagset, + whether this tagset has been changed or not and a pointer to another data + structure. This data structure keeps information about tags within the given + tagset per element. + */ + + +/* + All tags of an element are stored in an array of the below defined + structure + */ +typedef struct { + union { + h5_float64_t f; + h5_int64_t i; + } item; +} h5t_tagval_t; + + +/* + + */ +typedef struct { + int16_t face_id; // face id: type and face index + uint16_t val_dim; // dim of value for this entity + uint32_t val_idx; // index of first value +} h5t_taginfo_t; + +typedef struct { + int32_t num_tags; + h5t_taginfo_t ti[1]; +} h5t_tageleminfo_t; + +struct h5t_tagset { + char* name; // name of tagset + hid_t parent_gid; + h5t_mesh_t* m; + + unsigned int changed; // flag tagset changed, ... + struct { + h5_lvl_idx_t min_level; + h5_lvl_idx_t max_level; + } scope; + h5_id_t type; // int64 or float64 + h5_loc_idx_t num_entities; // number of tagged entities + h5_loc_idx_t num_values; // number of values + h5_loc_idx_t num_interior_elems; // number of elements in tagset + h5t_tagval_t* values; // ptr to array of tag values + h5t_tageleminfo_t* elems[1]; // per element structure +}; + +typedef struct { + h5_glb_id_t eid; // global entity id + h5_glb_idx_t idx; // global index +} h5t_glb_tag_idx_t; + +typedef struct { + h5_loc_id_t eid; // local entity id + h5_loc_idx_t idx; // local index +} h5t_loc_tag_idx_t; + + +h5_err_t h5tpriv_write_mtags (h5t_mesh_t* const); +h5_err_t h5tpriv_read_tag_container ( h5t_mesh_t* const, h5t_tagcontainer_t*); +#endif diff --git a/src/h5core/h5t_types_private.h b/src/h5core/h5t_types_private.h new file mode 100644 index 0000000..f760fc5 --- /dev/null +++ b/src/h5core/h5t_types_private.h @@ -0,0 +1,330 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5T_TYPES_PRIVATE_H +#define __H5T_TYPES_PRIVATE_H + +#include "h5core/h5_types.h" +#include "h5_types_private.h" +#include "h5_hsearch_private.h" +#include "h5_maps_private.h" + +#include "h5t_ref_elements_private.h" + +#include "h5_readwrite_private.h" +#include "h5t_octree_private.h" + + +typedef struct h5_glb_vertex { + h5_glb_idx_t idx; + h5_coord3d_t P; +} h5_glb_vertex_t; + +typedef struct h5_glb_vertex h5_loc_vertex_t; + + +typedef struct h5_glb_elem { + h5_glb_idx_t idx; + h5_glb_idx_t parent_idx; + h5_glb_idx_t child_idx; + h5_lvl_idx_t level_idx; + h5_lvl_idx_t refinement; + h5_uint32_t flags; + h5_glb_idx_t indices[1]; +} h5_glb_elem_t; +typedef h5_glb_elem_t* h5_glb_elem_p; + + +typedef struct h5_glb_tri { + h5_glb_idx_t idx; + h5_glb_idx_t parent_idx; + h5_glb_idx_t child_idx; + h5_lvl_idx_t level_idx; + h5_lvl_idx_t refinement; + h5_uint32_t flags; + h5_glb_idx_t vertex_indices[3]; + h5_glb_idx_t neighbor_indices[3]; +} h5_glb_tri_t; + +typedef h5_glb_tri_t h5_glb_triangle_t; + +typedef struct h5_glb_tet { + h5_glb_idx_t idx; + h5_glb_idx_t parent_idx; + h5_glb_idx_t child_idx; + h5_lvl_idx_t level_idx; + h5_lvl_idx_t refinement; + h5_uint32_t flags; + h5_glb_idx_t vertex_indices[4]; + h5_glb_idx_t neighbor_indices[4]; +} h5_glb_tet_t; +typedef h5_glb_tet_t h5_glb_tetrahedron_t; + + +typedef struct h5_loc_tri { + h5_glb_idx_t glb_idx; // global index of element + h5_loc_idx_t parent_idx; // index of parent element + h5_loc_idx_t child_idx; // index of (first) children + h5_lvl_idx_t level_idx; // leaf level on which this element has been created + h5_lvl_idx_t refinement; // number of refinements of father in macro-grid + h5_uint32_t flags; + h5_int32_t my_proc; + h5_int32_t neighbor_proc; + h5_loc_idx_t vertex_indices[3]; + h5_loc_idx_t neighbor_indices[3]; +} h5_loc_tri_t; + +typedef struct h5_loc_tet { + h5_glb_idx_t glb_idx; + h5_loc_idx_t parent_idx; + h5_loc_idx_t child_idx; + h5_lvl_idx_t level_idx; + h5_lvl_idx_t refinement; + h5_uint32_t flags; + h5_int32_t my_proc; + h5_int32_t neighbor_proc; + h5_loc_idx_t vertex_indices[4]; + h5_loc_idx_t neighbor_indices[4]; +} h5_loc_tet_t; + + +// generic data type for local elements +typedef struct h5_loc_elem { + h5_glb_idx_t glb_idx; + h5_loc_idx_t parent_idx; + h5_loc_idx_t child_idx; + h5_lvl_idx_t level_idx; + h5_lvl_idx_t refinement; + h5_uint32_t flags; + h5_int32_t my_proc; + h5_int32_t neighbor_proc; + h5_loc_idx_t indices[1]; +} h5_loc_elem_t; + +/*** type ids' for compound types ***/ +typedef struct h5_dta_types { + hid_t h5_glb_idx_t; /* ID's */ + hid_t h5_int64_t; /* 64 bit signed integer */ + hid_t h5_float64_t; /* 64 bit floating point */ + hid_t h5_coord3d_t; /* 3-tuple of 64-bit float */ + hid_t h5_coord6d_t; /* 6-tuple of 64-bit float */ + hid_t h5_3glb_idx_t; /* 3-tuple of indices */ + hid_t h5_4glb_idx_t; /* 4-tuple of indices */ + hid_t h5_4chk_idx_t; + hid_t h5_vertex_t; /* vertex structure */ + hid_t h5_triangle_t; /* triangle structure */ + hid_t h5_tet_t; /* tetrahedron structure */ + hid_t h5_chunk_t; // chunk structure + hid_t h5_octree_t; // octree structure + hid_t h5_userdata_t; // userdata structure + hid_t h5t_glb_tag_idx_t; + hid_t h5_int32_t; + MPI_Datatype mpi_glb_triangle; + MPI_Datatype mpi_glb_tet; + MPI_Datatype mpi_glb_vtx; + MPI_Datatype mpi_chunk; + MPI_Datatype mpi_edge_list_elem; +} h5_dta_types_t; + +typedef struct h5t_adjacencies { + struct { + // h5_size_t size; + h5_loc_idlist_t** v; + } tv; + h5_hashtable_t te_hash; + h5_hashtable_t td_hash; +} h5t_adjacencies_t; + +#define OCT_USERDATA_SIZE 4 + +typedef struct h5t_oct_userdata { + h5_chk_idx_t idx[OCT_USERDATA_SIZE]; +} h5t_oct_userdata_t; + +typedef struct h5t_chunk { + h5_chk_idx_t idx; + h5_oct_idx_t oct_idx; + h5_glb_idx_t elem; + h5_chk_weight_t weight; + h5_chk_size_t num_elems; +// h5_glb_idx_t vtx; +// h5_glb_idx_t num_vtx; +// h5_chk_size_t* elems_subchk; +} h5t_chunk_t; + +typedef struct h5t_chunks { + h5_chk_idx_t curr_idx; + h5_chk_idx_t num_alloc; + h5_chk_size_t num_levels; + h5_chk_idx_t* num_chunks_p_level; + h5t_chunk_t* chunks; +} h5t_chunks_t; + +typedef struct h5t_edge_list_elem { + h5_glb_idx_t vtx1; + h5_glb_idx_t vtx2; + h5_glb_idx_t new_vtx; + h5_int32_t proc; +} h5t_edge_list_elem_t; + +typedef struct h5t_edge_list_t { + h5_int32_t num_items; + h5t_edge_list_elem_t* items; + h5_int32_t num_alloc; +} h5_edge_list_t; + +typedef struct h5t_vtx_chk_list { + h5_loc_idx_t vtx; + h5_chk_idx_t chk; +} h5t_vtx_chk_list_t; + +#define NUM_TIMING 27 + +typedef struct h5t_timing { + int num_timing; + int next_time; + h5_time_t measure[NUM_TIMING]; + char* f; +// h5_time_t t1; // after init mesh +// h5_time_t t2; // after reading octree +// h5_time_t t3; // after reading chunks +// h5_time_t t4; // after reading weights +// h5_time_t t5; // after distributing chunks +// h5_time_t t6; // after reading elems +// h5_time_t t7; // after reading vertices +// h5_time_t t8; // after internal updates +// h5_time_t t9; // begin end refinement +// h5_time_t t10; // after pre ref +// h5_time_t t11; // after refine +// h5_time_t t12; // after boundary edges exchange +// h5_time_t t13; // after weights exchange +// h5_time_t t14; // after init glb elems struct +// h5_time_t t15; // after init glb vertices struct +// h5_time_t t16; // after exchange glb_struct +// h5_time_t t17; // after store glb elems struct +// h5_time_t t18; // after post_refine +// h5_time_t t19; // before close +// h5_time_t t20; // after write weights +// h5_time_t t21; // after write chunks +// h5_time_t t22; // after write octree +// h5_time_t t23; // after calc vtx map +// h5_time_t t24; // after vtx hyperslap select +// h5_time_t t25; // after write vertices +// h5_time_t t26; // after write elems + +} h5t_timing_t; + +typedef struct h5t_oct_count { + h5_oct_idx_t oct; + h5_int32_t count; +} h5t_oct_count_t; + +typedef struct h5t_oct_count_list { + h5_int32_t num_items; + h5_int32_t size; + h5t_oct_count_t* items; +} h5t_oct_count_list_t; + +struct h5t_read_methods; +struct h5t_store_methods; +struct h5t_retrieve_methods; +struct h5t_access_methods; +struct h5t_adjacency_methods; +struct h5t_core_methods; + +typedef struct h5t_methods { + struct h5t_read_methods* read; + struct h5t_store_methods* store; + struct h5t_retrieve_methods* retrieve; + struct h5t_access_methods* access; + struct h5t_adjacency_methods* adjacency; + struct h5t_core_methods* core; +} h5t_methods_t; + + +struct h5t_mesh { + /*** book-keeping ***/ + char mesh_name[256]; + const h5t_ref_elem_t* ref_elem; + h5_id_t mesh_changed; /* true if new or has been changed */ + h5_lvl_idx_t leaf_level; /* idx of current level */ + h5_lvl_idx_t num_leaf_levels; /* number of levels */ + h5_lvl_idx_t num_loaded_levels; + + /*** chunking ***/ + h5_lvl_idx_t is_chunked; /* == 1 if mesh is chunked */ + h5t_octree_t* octree; + h5t_chunks_t* chunks; + h5_dsinfo_t dsinfo_chunks; + h5_dsinfo_t dsinfo_octree; + h5_dsinfo_t dsinfo_userdata; + h5t_timing_t timing; + + h5_strlist_t* mtagsets; + + /*** HDF5 IDs ***/ + hid_t mesh_gid; + + /*** functions to handle differnt mesh types ***/ + h5t_methods_t* methods; + + /*** vertices ***/ + h5_loc_vertex_t* vertices; + h5_glb_idx_t* num_glb_vertices; + h5_loc_idx_t* num_loc_vertices; + h5_idxmap_t map_vertex_g2l; /* map global to local idx */ + h5_loc_idx_t last_stored_vid; + h5_loc_idx_t last_stored_vid_before_ref; // needed for parallel refinement + h5_glb_idx_t* num_b_vtx; // stores the number of boundary vertices per level + h5_glb_idx_t* first_b_vtx; // stores the first boundary vertex per level + h5_dsinfo_t dsinfo_vertices; + + /*** Elements ***/ + h5_loc_elem_t* loc_elems; + + // number of global elements in mesh including refined for all levels + h5_glb_idx_t* num_glb_elems; + + // number of global leaf elements in mesh for all levels + h5_glb_idx_t* num_glb_leaf_elems; + + // number of interior (local) elements including refined for all loaded levels + h5_loc_idx_t* num_interior_elems; + + // number of interior (local) leaf elements for all loaded levels + h5_loc_idx_t* num_interior_leaf_elems; + + // number of ghost elements including refined for all loaded levels + h5_loc_idx_t* num_ghost_elems; + + h5_idxmap_t map_elem_g2l; /* map global id to local index */ + + h5_loc_idx_t last_stored_eid; + h5_loc_idx_t last_stored_eid_before_ref; + h5_dsinfo_t dsinfo_elems; + + h5_loc_idlist_t* marked_entities; + + /*** Weights ***/ + + h5_weight_t num_weights; + h5_weight_t* weights; + h5_dsinfo_t dsinfo_weights; + + /*** Adjacencies ***/ + h5t_adjacencies_t adjacencies; + + /*** IndexSets ***/ + h5_loc_idlist_t* index_sets[3]; + + /*** File ***/ + h5_file_p f; +}; + +#endif diff --git a/src/h5core/h5u_errorhandling_private.h b/src/h5core/h5u_errorhandling_private.h new file mode 100644 index 0000000..c51e63a --- /dev/null +++ b/src/h5core/h5u_errorhandling_private.h @@ -0,0 +1,17 @@ +#ifndef __H5U_ERRORHANDLING_PRIVATE_H +#define __H5U_ERRORHANDLING_PRIVATE_H + +#define HANDLE_H5_SET_VIEW_ERR( f, rc, start, end ) \ + h5_error( \ + f, \ + rc, \ + "Cannot set view to (%lld, %lld).", \ + (long long)start, (long long)end ); + +#define HANDLE_H5_GET_NUM_PARTICLES_ERR( f, rc ) \ + h5_error( \ + f, \ + rc, \ + "Cannot get number of particles." ); + +#endif diff --git a/src/h5core/h5u_model.c b/src/h5core/h5u_model.c new file mode 100644 index 0000000..f18ca84 --- /dev/null +++ b/src/h5core/h5u_model.c @@ -0,0 +1,630 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5core/h5.h" +#include "h5_private.h" +#include "h5_hdf5_private.h" + +#include "h5_model_private.h" +#include "h5_mpi_private.h" +#include "h5_readwrite_private.h" +#include "h5u_types_private.h" +#include "h5core/h5u_model.h" + +h5_ssize_t +h5u_get_num_particles ( + const h5_file_t fh /*!< [in] Handle to open file */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_ssize_t, "f=%p", f); + h5_ssize_t nparticles; + + if (h5u_has_view ((h5_file_t)f)) { + /* if a view exists, use its size as the number of particles */ + TRY (nparticles = h5u_get_num_particles_in_view (fh)); + } else { + /* otherwise, report all particles on disk in the first dataset + for this timestep */ + TRY (nparticles = h5u_get_totalnum_particles_by_idx (fh, 0)); + } + + H5_CORE_API_RETURN (nparticles); +} + +h5_ssize_t +h5u_get_num_particles_in_view ( + const h5_file_t fh /*!< [in] Handle to open file */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_ssize_t, "f=%p", f); + h5_ssize_t nparticles; + + if (!h5u_has_view (fh)) { + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_H5PART, + "No view has been set.")); + } + TRY (nparticles = hdf5_get_selected_npoints_of_dataspace(f->u->diskshape)); + h5_debug ("Found %lld particles in view.", (long long)nparticles ); + H5_CORE_API_RETURN (nparticles); +} + +h5_ssize_t +h5u_get_totalnum_particles_by_name ( + const h5_file_t fh, ///< [in] Handle to open file + const char* const name ///< [in] Index of dataset to query + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_ssize_t, "f=%p, name=%s", f, name); + h5_ssize_t nparticles; + + TRY (nparticles = hdf5_get_npoints_of_dataset_by_name (f->step_gid, name)); + h5_debug ("Found %lld particles in dataset %s.", (long long)nparticles, name); + H5_CORE_API_RETURN (nparticles); +} + +h5_ssize_t +h5u_get_totalnum_particles_by_idx ( + const h5_file_t fh, ///< [in] Handle to open file + h5_id_t idx ///< [in] Index of dataset to query + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_ssize_t, "f=%p, idx=%lld", f, (long long)idx); + char dataset_name[H5_DATANAME_LEN]; + dataset_name[0] = '\0'; + TRY (hdf5_get_name_of_dataset_by_idx ( + f->step_gid, + idx, + dataset_name, + H5_DATANAME_LEN)); + H5_CORE_API_RETURN (h5u_get_totalnum_particles_by_name (fh, dataset_name)); +} + +h5_err_t +h5u_set_num_particles ( + const h5_file_t fh, /*!< [in] Handle to open file */ + const h5_size_t nparticles, /*!< [in] Number of particles */ + const h5_size_t stride /*!< [in] Stride of particles in memory */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_ssize_t, + "f=%p, nparticles=%llu, stride=%llu", + f, (long long unsigned)nparticles, + (long long unsigned)stride); + struct h5u_fdata *u = f->u; + hsize_t start; + hsize_t dmax = H5S_UNLIMITED; + + if (nparticles < 0) + H5_CORE_API_LEAVE ( + h5_error( + H5_ERR_INVAL, + "Invalid number particles: %lld!\n", + (long long)nparticles)); + + hsize_t hstride = (hsize_t)stride; + if (hstride > 1) + h5_debug ("Striding by %lld elements.", (long long)hstride); + +#ifndef PARALLEL_IO + /* + if we are not using parallel-IO, there is enough information + to know that we can short circuit this routine. However, + for parallel IO, this is going to cause problems because + we don't know if things have changed globally + */ + if ( u->nparticles == nparticles && stride == 1 ) { + H5_CORE_API_LEAVE (H5_SUCCESS); + } +#endif + + TRY (h5u_reset_view(fh)); + + TRY (hdf5_close_dataspace (u->shape)); + u->shape = H5S_ALL; + + u->nparticles = (hsize_t)nparticles; + + /* declare local memory datasize with striding */ + hsize_t count = u->nparticles * stride; + TRY (u->memshape = hdf5_create_dataspace (1, &count, &dmax)); + + /* we need a hyperslab selection if there is striding + * (otherwise, the default H5S_ALL selection is ok) + */ + if (hstride > 1) { + start = 0; + count = u->nparticles; + TRY (hdf5_select_hyperslab_of_dataspace ( + u->memshape, + H5S_SELECT_SET, + &start, &hstride, &count, + NULL)); + } + +#ifndef PARALLEL_IO + count = u->nparticles; + TRY( u->shape = hdf5_create_dataspace (1, &count, NULL)); + u->viewstart = 0; + u->viewend = nparticles - 1; // view range is *inclusive* +#else /* PARALLEL_IO */ + /* + The Gameplan here is to declare the overall size of the on-disk + data structure the same way we do for the serial case. But + then we must have additional "DataSpace" structures to define + our in-memory layout of our domain-decomposed portion of the particle + list as well as a "selection" of a subset of the on-disk + data layout that will be written in parallel to mutually exclusive + regions by all of the processors during a parallel I/O operation. + These are f->shape, f->memshape and f->diskshape respectively. + */ + + /* + acquire the number of particles to be written from each MPI process + */ + hsize_t total; + TRY( h5priv_mpi_sum( + &(u->nparticles), &total, 1, MPI_LONG_LONG, f->props->comm ) ); + TRY( h5priv_mpi_prefix_sum( + &(u->nparticles), &start, 1, MPI_LONG_LONG, f->props->comm ) ); + start -= u->nparticles; + + h5_debug("Total particles across all processors: %lld.", (long long)total); + + u->viewstart = start; + u->viewend = start + u->nparticles - 1; // view range is *inclusive* + + /* declare overall datasize */ + count = total; + TRY( u->shape = hdf5_create_dataspace(1, &count, NULL) ); + + /* declare overall data size but then will select a subset */ + TRY( u->diskshape = hdf5_create_dataspace(1, &count, NULL) ); + + count = nparticles; + hstride = 1; + if (count > 0) { + TRY( hdf5_select_hyperslab_of_dataspace( + u->diskshape, + H5S_SELECT_SET, + &start, &hstride, &count, + NULL) ); + } else { + TRY (hdf5_select_none (u->diskshape)); + } +#endif + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5u_has_view ( + const const h5_file_t fh + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_ssize_t, "f=%p", f); + H5_CORE_API_RETURN (f->u->viewindexed || f->u->viewstart >= 0); +} + +h5_err_t +h5u_reset_view ( + const h5_file_t fh + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_ssize_t, "f=%p", f); + struct h5u_fdata *u = f->u; + + u->viewstart = -1; + u->viewend = -1; + u->viewindexed = 0; + TRY (hdf5_close_dataspace (u->diskshape)); + u->diskshape = H5S_ALL; + TRY (hdf5_close_dataspace (u->memshape)); + u->memshape = H5S_ALL; + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5u_set_view ( + const h5_file_t fh, ///!< [in] Handle to open file + h5_int64_t start, ///!< [in] Start particle + h5_int64_t end ///!< [in] End particle + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, start=%lld, end=%lld", + f, (long long)start, (long long)end); + hsize_t total = 0; + hsize_t stride = 1; + hsize_t dmax = H5S_UNLIMITED; + struct h5u_fdata *u = f->u; + + TRY (h5u_reset_view (fh)); + + if (start == -1 && end == -1) + H5_CORE_API_LEAVE (H5_SUCCESS); + + if (f->u->shape > 0) { + TRY (total = hdf5_get_npoints_of_dataspace (f->u->shape) ); + h5_debug( + "Found %lld particles from previous H5PartSetNumParticles call.", + (long long)total); + } else { + TRY (total = (hsize_t)h5u_get_totalnum_particles_by_idx (fh,0)); + } + if (total == 0) { + /* No datasets have been created yet and no views are set. + * We have to leave the view empty because we don't know how + * many particles there should be! */ + H5_CORE_API_LEAVE (H5_SUCCESS); + } + + if (start == -1) start = 0; + if (end == -1) end = total - 1; // select to end + + if (end < start) + H5_CORE_API_LEAVE ( + h5_error( + H5_ERR_INVAL, + "Invalid selection for last particle: start=%lld, end=%lld!\n", + (long long)start, (long long)end)); + + /* setting up the new view */ + u->viewstart = start; + u->viewend = end; + u->nparticles = end - start + 1; + + h5_debug ( + "This view selected %lld particles.", + (long long)u->nparticles ); + + /* declare overall data size but then will select a subset */ + TRY (u->diskshape = hdf5_create_dataspace ( 1, &total, NULL )); + + total = (hsize_t)u->nparticles; + hsize_t hstart = (hsize_t)start; + + TRY (hdf5_select_hyperslab_of_dataspace ( + u->diskshape, + H5S_SELECT_SET, + &hstart, &stride, &total, + NULL)); + + /* declare local memory datasize */ + TRY (u->memshape = hdf5_create_dataspace (1, &total, &dmax)); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5u_set_view_start_length ( + const h5_file_t fh, ///!< [in] Handle to open file + h5_int64_t start, ///!< [in] Start particle + h5_int64_t length ///!< [in] number of particle in view + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, start=%lld, length=%lld", + f, (long long)start, (long long)length); + hsize_t total = 0; + hsize_t stride = 1; + hsize_t dmax = H5S_UNLIMITED; + struct h5u_fdata *u = f->u; + + TRY (h5u_reset_view (fh)); + + if (start == -1 && length == -1) + H5_CORE_API_LEAVE (H5_SUCCESS); + + if (u->shape > 0) { + TRY (total = hdf5_get_npoints_of_dataspace (u->shape) ); + h5_debug( + "Found %lld particles from previous H5PartSetNumParticles call.", + (long long)total); + } else { + TRY (total = (hsize_t)h5u_get_totalnum_particles_by_idx (fh,0)); + } + if (total == 0) { + /* No datasets have been created yet and no views are set. + * We have to leave the view empty because we don't know how + * many particles there should be! */ + H5_CORE_API_LEAVE (H5_SUCCESS); + } + + if (start < 0 || length < 0 || start+length > total) + H5_CORE_API_LEAVE ( + h5_error( + H5_ERR_INVAL, + "Invalid view: start=%lld, length=%lld, total=%lld", + (long long)start, (long long)length, (long long)total)); + + /* setting up the new view */ + u->viewstart = start; + u->viewend = start + length - 1; + u->nparticles = length; + + h5_debug ( + "This view selected %lld particles.", + (long long)u->nparticles ); + + /* declare overall data size but then will select a subset */ + TRY (u->diskshape = hdf5_create_dataspace ( 1, &total, NULL )); + + total = (hsize_t)u->nparticles; + hsize_t hstart = (hsize_t)start; + + TRY (hdf5_select_hyperslab_of_dataspace ( + u->diskshape, + H5S_SELECT_SET, + &hstart, &stride, &total, + NULL)); + + /* declare local memory datasize */ + TRY (u->memshape = hdf5_create_dataspace (1, &total, &dmax)); + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5u_set_view_indices ( + const h5_file_t fh, /*!< [in] Handle to open file */ + const h5_size_t *const indices, /*!< [in] List of indices */ + h5_size_t nelems /*!< [in] Size of list */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, indices=%p, nelems=%llu", + f, indices, (long long unsigned)nelems); + CHECK_FILEHANDLE (f); + if (f->step_gid < 0) { + TRY (h5_set_step (fh, 0)); + } + + hsize_t total = 0; + hsize_t dmax = H5S_UNLIMITED; + struct h5u_fdata *u = f->u; + + TRY (h5u_reset_view (fh)); + + if ( indices == NULL ) { + h5_warn ("View indices array is null: reseting view."); + H5_CORE_API_LEAVE (H5_SUCCESS); + } + if (f->u->shape > 0) { + TRY (total = hdf5_get_npoints_of_dataspace (f->u->shape) ); + h5_debug( + "Found %lld particles from previous H5PartSetNumParticles call.", + (long long)total); + } else { + TRY (total = h5u_get_totalnum_particles_by_idx (fh,0)); + } + if (total == 0) { + /* No datasets have been created yet and no views are set. + * We have to leave the view empty because we don't know how + * many particles there should be! */ + H5_CORE_API_LEAVE (H5_SUCCESS); + } + + u->nparticles = nelems; + + /* declare overall data size but then we select a subset */ + TRY (u->diskshape = hdf5_create_dataspace (1, &total, NULL)); + + /* declare local memory datasize */ + total = u->nparticles; + TRY (u->memshape = hdf5_create_dataspace (1, &total, &dmax)); + if (nelems > 0) { + TRY (hdf5_select_elements_of_dataspace ( + u->diskshape, + H5S_SELECT_SET, + (hsize_t)nelems, (hsize_t*)indices ) ); + } else { + TRY (hdf5_select_none (u->diskshape)); + } + u->viewindexed = 1; + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_int64_t +h5u_get_view ( + const h5_file_t fh, + h5_int64_t *start, + h5_int64_t *end + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, start=%p, end=%p", + f, start, end); + struct h5u_fdata *u = f->u; + + if ( u->viewindexed ) { + H5_CORE_API_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "The current view has an index selection, but " + "this function only works for ranged views." )); + } + + h5_int64_t viewstart = 0; + h5_int64_t viewend = 0; + + if ( u->viewstart >= 0 ) + viewstart = u->viewstart; + + if ( u->viewend >= 0 ) { + viewend = u->viewend; + } + else { + TRY (viewend = h5u_get_num_particles (fh)); + } + + if ( start ) *start = viewstart; + if ( end ) *end = viewend; + + H5_CORE_API_RETURN (viewend - viewstart + 1); // view range is *inclusive* +} + +h5_int64_t +h5u_set_canonical_view ( + const h5_file_t fh + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_int64_t, "f=%p", f); + h5u_fdata_t* u = f->u; + TRY( h5u_reset_view (fh) ); + + h5_int64_t start = 0; + h5_int64_t total = 0; + + TRY (total = h5u_get_num_particles (fh)); + +#ifdef PARALLEL_IO + h5_int64_t remainder = 0; + + u->nparticles = total / f->nprocs; + remainder = total % f->nprocs; + start = f->myproc * u->nparticles; + + /* distribute the remainder */ + if ( f->myproc < remainder ) u->nparticles++; + + /* adjust the offset */ + if ( f->myproc < remainder ) start += f->myproc; + else start += remainder; + + h5_int64_t length = u->nparticles; +#else + u->nparticles = total; + h5_int64_t length = total - 1; +#endif // PARALLEL_IO + H5_CORE_API_RETURN (h5u_set_view_start_length (fh, start, length)); +} + +h5_ssize_t +h5u_get_num_datasets ( + const h5_file_t fh /*!< [in] Handle to open file */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_int64_t, "f=%p", f); + H5_CORE_API_RETURN (hdf5_get_num_datasets (f->step_gid)); +} + +/*! + Get information about dataset in current index given by its index + */ +h5_err_t +h5u_get_dataset_info ( + const h5_file_t fh, /*!< [in] Handle to open file */ + const h5_id_t idx, /*!< [in] Index of the dataset */ + char *dataset_name, /*!< [out] Name of dataset */ + const h5_size_t len_dataset_name, + /*!< [in] Size of buffer \c dataset_name */ + h5_int64_t *type, /*!< [out] Type of data in dataset */ + h5_size_t *nelem /*!< [out] Number of elements. */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, + "f=%p, " + "idx=%lld, " + "dataset_name='%s', len_dataset_name=%llu, " + "type=%p, nelem=%p", + f, + (long long)idx, + dataset_name, + (long long unsigned)len_dataset_name, + type, nelem); + TRY (hdf5_get_name_of_dataset_by_idx ( + f->step_gid, + idx, + dataset_name, len_dataset_name) ); + + H5_CORE_API_RETURN ( + h5u_get_dataset_info_by_name(f, dataset_name, type, nelem)); +} + +/*! + Get information about dataset in current index given by its index + */ +h5_err_t +h5u_get_dataset_info_by_name ( + const h5_file_p f, /*!< [in] Handle to open file */ + const char* const dataset_name, /*!< [in] Name of dataset */ + h5_int64_t* const type, /*!< [out] Type of data in dataset */ + h5_size_t* const nelem /*!< [out] Number of elements. */ + ) { + H5_CORE_API_ENTER (h5_err_t, + "f=%p, " + "dataset_name='%s', " + "type=%p, nelem=%p", + f, + dataset_name, + type, nelem); + + if (nelem) { + h5_ssize_t nelem_; + TRY (nelem_ = hdf5_get_npoints_of_dataset_by_name ( + f->step_gid, + dataset_name) ); + if ( nelem_ < 0 ) H5_CORE_API_LEAVE (nelem_); + *nelem = nelem_; + } + + if (type) { + *type = h5priv_get_dataset_type (f->step_gid, dataset_name); + if (*type < 0) H5_CORE_API_LEAVE (*type); + } + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5u_set_chunk ( + const h5_file_t fh, + const h5_size_t size + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_int64_t, "f=%p, size=%llu", f, (long long unsigned)size); + if ( size == 0 ) + { + h5_info ("Disabling chunking" ); + TRY (hdf5_set_layout_property ( + f->u->dcreate_prop, H5D_CONTIGUOUS)); + } else + { + h5_info ("Setting chunk size to %lld particles", (long long)size); + TRY (hdf5_set_chunk_property( + f->u->dcreate_prop, 1, (hsize_t*)&size)); + } + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5u_get_chunk ( + const h5_file_t fh, /*!< IN: File handle */ + const char *name, /*!< IN: name of dataset */ + h5_size_t *size /*!< OUT: chunk size in particles */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_int64_t, "f=%p, name='%s', size=%p", f,name,size); + hid_t dataset_id; + hid_t plist_id; + hsize_t hsize; + + TRY (dataset_id = hdf5_open_dataset (f->step_gid, name) ); + TRY (plist_id = hdf5_get_dataset_create_plist (dataset_id) ); + TRY (hdf5_get_chunk_property (plist_id, 1, &hsize) ); + TRY (hdf5_close_property ( plist_id) ); + TRY (hdf5_close_dataset (dataset_id) ); + + *size = (h5_size_t)hsize; + + h5_info ("Found chunk size of %lld particles", (long long)*size); + H5_CORE_API_RETURN (H5_SUCCESS); +} + diff --git a/src/h5core/h5u_readwrite.c b/src/h5core/h5u_readwrite.c new file mode 100644 index 0000000..2328129 --- /dev/null +++ b/src/h5core/h5u_readwrite.c @@ -0,0 +1,243 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#include "h5_types_private.h" +#include "h5_hdf5_private.h" +#include "h5_model_private.h" +#include "h5_readwrite_private.h" +#include "h5u_types_private.h" + +#include "h5core/h5.h" +#include "h5core/h5_model.h" +#include "h5core/h5_syscall.h" + +/*! + \ingroup h5_private + + \internal + + Initialize unstructured data internal data structure. + + TODO: Move to file "h5u_openclose.c" + + \return H5_SUCCESS or error code +*/ +h5_err_t +h5upriv_open_file ( + const h5_file_p f /*!< IN: file handle */ + ) { + H5_PRIV_API_ENTER (h5_err_t, "f=%p", f); + TRY (f->u = (h5u_fdata_t*)h5_calloc (1, sizeof (*f->u))); + h5u_fdata_t *u = f->u; + + u->shape = -1; + u->diskshape = H5S_ALL; + u->memshape = H5S_ALL; + u->viewstart = -1; + u->viewend = -1; + u->viewindexed = 0; + + TRY (u->dcreate_prop = hdf5_create_property (H5P_DATASET_CREATE)); + + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +/*! + \ingroup h5_private + + \internal + + De-initialize H5Block internal structure. Open HDF5 objects are + closed and allocated memory freed. + + \return H5_SUCCESS or error code +*/ +h5_err_t +h5upriv_close_file ( + const h5_file_p f /*!< file handle */ + ) { + H5_PRIV_API_ENTER (h5_err_t, "f=%p", f); + struct h5u_fdata* u = f->u; + + h5_errno = H5_SUCCESS; + TRY (hdf5_close_dataspace (u->shape)); + TRY (hdf5_close_dataspace (u->diskshape)); + TRY (hdf5_close_dataspace (u->memshape)); + TRY (hdf5_close_property (u->dcreate_prop)); + TRY (h5_free (f->u)); + f->u = NULL; + + H5_PRIV_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5u_read_data ( + const h5_file_t fh, /*!< [in] Handle to open file */ + const char* name, /*!< [in] Name to associate dataset with */ + void* data, /*!< [out] Array of data */ + const hid_t type + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, "f=%p, name='%s', data=%p, type=%d", + f, name, data, type); + CHECK_TIMEGROUP (f); + + struct h5u_fdata *u = f->u; + hid_t dataset_id; + hid_t space_id; + hid_t memspace_id; + hsize_t ndisk, nread, nmem; + + if ( f->step_gid < 0 ) { + TRY (h5_set_step ((h5_file_t)f, f->step_idx)); + } + + char name2[H5_DATANAME_LEN]; + TRY (h5priv_normalize_dataset_name (name, name2)); + + TRY (dataset_id = hdf5_open_dataset (f->step_gid, name2)); + + /* default spaces, if not using a view selection */ + memspace_id = H5S_ALL; + TRY (space_id = hdf5_get_dataset_space (dataset_id)); + + /* get the number of elements on disk for the datset */ + TRY (ndisk = hdf5_get_npoints_of_dataspace (space_id)); + + if (u->diskshape != H5S_ALL) { + TRY (nread = hdf5_get_selected_npoints_of_dataspace (u->diskshape)); + + /* make sure the disk space selected by the view doesn't + * exceed the size of the dataset */ + if (nread <= ndisk) { + /* we no longer need the dataset space... */ + TRY (hdf5_close_dataspace(space_id)); + /* ...because it's safe to use the view selection */ + space_id = f->u->diskshape; + } else { + /* the view selection is too big? + * fall back to using the dataset space */ + h5_warn ( + "Ignoring view: dataset[%s] has fewer " + "elements on disk (%lld) than are selected " + "(%lld).", + name2, (long long)ndisk, (long long)nread ); + nread = ndisk; + } + } else { + /* since the view selection is H5S_ALL, we will + * read all available elements in the dataset space */ + nread = ndisk; + } + + if (u->memshape != H5S_ALL) { + TRY (nmem = hdf5_get_npoints_of_dataspace (u->memshape)); + + /* make sure the memory space selected by the view has + * enough capacity for the read */ + if (nmem >= nread) { + memspace_id = f->u->memshape; + } else { + /* the view selection is too small? + * fall back to using H5S_ALL */ + h5_warn ( + "Ignoring view: dataset[%s] has more " + "elements selected (%lld) than are available " + "in memory (%lld).", + name2, (long long)nread, (long long)nmem ); + memspace_id = H5S_ALL; + } + } +#ifdef PARALLEL_IO + TRY (h5priv_start_throttle (f)); +#endif + TRY (hdf5_read_dataset ( + dataset_id, + type, + memspace_id, + space_id, + f->props->xfer_prop, + data )); +#ifdef PARALLEL_IO + TRY (h5priv_end_throttle (f)); +#endif + if (space_id != f->u->diskshape) { + TRY (hdf5_close_dataspace (space_id)); + } + + TRY (hdf5_close_dataset (dataset_id)); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + +h5_err_t +h5u_write_data ( + const h5_file_t fh, /*!< IN: Handle to open file */ + const char *name, /*!< IN: Name to associate array with */ + const void *data, /*!< IN: Array to commit to disk */ + const hid_t type /*!< IN: Type of data */ + ) { + h5_file_p f = (h5_file_p)fh; + H5_CORE_API_ENTER (h5_err_t, "f=%p, name='%s', data=%p, type=%d", + f, name, data, type); + CHECK_TIMEGROUP( f ); + CHECK_WRITABLE_MODE( f ); + + struct h5u_fdata *u = f->u; + hid_t dset_id; + + char name2[H5_DATANAME_LEN]; + TRY (h5priv_normalize_dataset_name (name, name2)); + + if ( u->shape == H5S_ALL ) + h5_warn("The view is unset or invalid."); + + /* test for existing dataset */ + H5E_BEGIN_TRY + dset_id = H5Dopen(f->step_gid, name2, H5P_DEFAULT); + H5E_END_TRY + + if (dset_id > 0) { + h5_warn("Dataset %s/%s already exists", + hdf5_get_objname(f->step_gid), name2); + } else { + TRY (dset_id = hdf5_create_dataset ( + f->step_gid, + name2, + type, + u->shape, + H5P_DEFAULT)); + } + +#ifdef PARALLEL_IO + TRY (h5priv_start_throttle (f)); +#endif + h5_info ("Writing dataset %s/%s.", + hdf5_get_objname(f->step_gid), name2); + TRY (hdf5_write_dataset ( + dset_id, + type, + u->memshape, + u->diskshape, + f->props->xfer_prop, + data)); +#ifdef PARALLEL_IO + TRY (h5priv_end_throttle (f)); +#endif + if (f->props->mode & H5_FLUSH_STEP) + TRY (hdf5_flush (f->step_gid, H5F_SCOPE_LOCAL)); + + TRY (hdf5_close_dataset (dset_id)); + + f->empty = 0; + TRY (hdf5_flush (f->step_gid, H5F_SCOPE_LOCAL)); + + H5_CORE_API_RETURN (H5_SUCCESS); +} + diff --git a/src/h5core/h5u_readwrite_private.h b/src/h5core/h5u_readwrite_private.h new file mode 100644 index 0000000..34d0d1a --- /dev/null +++ b/src/h5core/h5u_readwrite_private.h @@ -0,0 +1,24 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5U_READWRITE_PRIVATE_H +#define __H5U_READWRITE_PRIVATE_H + +#include "h5core/h5_types.h" + +h5_err_t +h5upriv_open_file ( + const h5_file_p f + ); + +h5_err_t +h5upriv_close_file ( + const h5_file_p f + ); +#endif diff --git a/src/h5core/h5u_types_private.h b/src/h5core/h5u_types_private.h new file mode 100644 index 0000000..b507198 --- /dev/null +++ b/src/h5core/h5u_types_private.h @@ -0,0 +1,29 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5U_TYPES_PRIVATE_H +#define __H5U_TYPES_PRIVATE_H + +#include "h5core/h5_types.h" + +struct h5u_fdata { + hsize_t nparticles; /* -> u.nparticles */ + + h5_int64_t viewstart; /* -1 if no view is available: A "view" looks */ + h5_int64_t viewend; /* at a subset of the data. */ + char viewindexed; /* flag whether this view is a list of indices */ + + hid_t shape; + hid_t diskshape; + hid_t memshape; + + hid_t dcreate_prop; +}; +typedef struct h5u_fdata h5u_fdata_t; +#endif diff --git a/src/include/H5.h b/src/include/H5.h new file mode 100644 index 0000000..a5f68c9 --- /dev/null +++ b/src/include/H5.h @@ -0,0 +1,366 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_H +#define __H5_H + +#include + +#include "H5_model.h" +#include "H5_attribs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +static inline h5_prop_t +H5CreateFileProp ( + void + ) { + H5_API_ENTER (h5_prop_t, "%s", ""); + H5_API_RETURN (h5_create_prop (H5_PROP_FILE)); +} + +static inline h5_err_t +H5SetPropFileMPIO ( + h5_prop_t prop, + MPI_Comm* comm + ) { + H5_API_ENTER (h5_err_t, "prop=%p, comm=%p", (void*)prop, comm); + H5_API_RETURN (h5_set_prop_file_mpio (prop, comm)); +} + +static inline h5_err_t +H5SetPropFileAlign ( + h5_prop_t prop, + h5_int64_t align + ) { + H5_API_ENTER (h5_err_t, "prop=%p, align=%lld", (void*)prop, align); + H5_API_RETURN (h5_set_prop_file_align (prop, align)); +} + +static inline h5_err_t +H5SetPropFileThrottle ( + h5_prop_t prop, + h5_int64_t throttle + ) { + H5_API_ENTER (h5_err_t, "prop=%p, throttle=%lld", (void*)prop, throttle); + H5_API_RETURN (h5_set_prop_file_throttle (prop, throttle)); +} + +static inline h5_err_t +H5CloseProp ( + h5_prop_t prop + ) { + H5_API_ENTER (h5_err_t, "prop=%p", (void*)prop); + H5_API_RETURN (h5_close_prop (prop)); +} + +/*! + \ingroup h5hut_file + + + Open file with name \c filename. This function is available in the parallel + and serial version. In the serial case \c comm may have any value. + + + File mode flags are: + - \c H5_O_RDONLY: only reading allowed + - \c H5_O_WRONLY: create new file, dataset must not exist + - \c H5_O_APPEND: allows to append a new datasets to an existing file + - \c H5_O_RDWR: dataset may exist + - \c H5_FS_LUSTRE - enable optimizations for the Lustre file system + - \c H5_VFD_MPIPOSIX - use the HDF5 MPI-POSIX virtual file driver + - \c H5_VFD_MPIIO_IND - use MPI-IO in indepedent mode + + The typical file extension is \c .h5. + + \c h5_file_p should be treated as an essentially opaque + datastructure. It acts as the file handle, but internally + it maintains several key state variables associated with + the file. + + \return File handle or \c (void*)H5_FAILURE +*/ +static inline h5_file_t +H5OpenFile ( + const char* filename, ///< [in] file name. + h5_int32_t flags, ///< [in] file access mode flags. + MPI_Comm comm ///< [in] MPI communicator. + ) { + H5_API_ENTER (h5_file_t, + "filename='%s', flags=%d, ...", + filename, flags); + H5_API_RETURN (h5_open_file (filename, flags, comm, 0)); +} + +static inline h5_file_t +H5OpenFile2 ( + const char* filename, + h5_int64_t mode, + h5_prop_t props + ) { + H5_API_ENTER (h5_file_t, + "filename='%s', mode=%lld, props=%p", + filename, mode, (void*)props); + H5_API_RETURN (h5_open_file2 (filename, mode, props)); +} + +/*! + \ingroup h5hut_file + + + Opens file with specified filename, and also specifices an alignment + value used for HDF5 tuning parameters. In the serial case \c comm may have + any value. + + File modes and flags are bit values that can be combined with the bit operator \c | + and include: + + - \c H5_O_RDONLY: only reading allowed + - \c H5_O_WRONLY: create new file, dataset must not exist + - \c H5_O_APPEND: allows to append a new datasets to an existing file + - \c H5_O_RDWR: dataset may exist + - \c H5_FS_LUSTRE - enable optimizations for the Lustre file system + - \c H5_VFD_MPIPOSIX - use the HDF5 MPI-POSIX virtual file driver + - \c H5_VFD_MPIIO_IND - use MPI-IO in indepedent mode + + The typical file extension is \c .h5. + + \c h5_file_p should be treated as an essentially opaque + datastructure. It acts as the file handle, but internally + it maintains several key state variables associated with + the file. + + \return File handle or \c (void*)H5_FAILURE + */ +static inline h5_file_t +H5OpenFileAlign ( + const char* filename, ///< [in] name of the data file to open. + const h5_int32_t flags, ///< [in] file access mode flags. + MPI_Comm comm, ///< [in] MPI communicator. + const h5_size_t align ///< [in] alignment size in bytes. + ) { + H5_API_ENTER (h5_file_t, + "filename='%s', flags=%d, ...", + filename, flags); + H5_API_RETURN (h5_open_file (filename, flags, comm, align)); +} + +/*! + \ingroup h5hut_file + + Close file and free all memory associated with the file handle. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5CloseFile ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_err_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5_close_file (f)); +} + +/*! + \ingroup h5hut_file + + Verify that the file handle points to a valid H5hut file structure. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5CheckFile ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_err_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5_check_filehandle (f)); +} + +/*! + \ingroup h5hut_file + + Set the `throttle` factor, which causes HDF5 write and read + calls to be issued in that number of batches. + + This can prevent large concurrency parallel applications that + use independent writes from overwhelming the underlying + parallel file system. + + Throttling only works with the H5_VFD_MPIPOSIX or + H5_VFD_MPIIO_IND drivers and is only available in + the parallel library. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +#ifdef PARALLEL_IO +h5_err_t +static inline H5SetThrottle ( + const h5_file_t f, ///< [in] file handle. + int factor ///< [in] throttle factor + ) { + H5_API_ENTER (h5_err_t, + "f=%p, factor=%d", + (h5_file_p)f, factor); + H5_API_RETURN (h5_set_throttle(f, factor)); +} +#endif // PARALLEL_IO +#ifdef __cplusplus +} +#endif + + +/*! + \ingroup h5hut_file + + Flush step data to disk. + + \return \c H5_SUCCESS or \c H5_FAILURE + */ +static inline h5_err_t +H5FlushStep ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_err_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5_flush_step (f)); +} + +/*! + \ingroup h5hut_file + + Flush file data to disk. + + \return \c H5_SUCCESS or \c H5_FAILURE + */ +static inline h5_err_t +H5FlushFile ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_err_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5_flush_file (f)); +} + +/*! + \ingroup h5hut_file + + Close H5hut library. This function should be called before program exit. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Finalize ( + void + ) { + H5_API_ENTER (h5_err_t, "%s", ""); + H5_API_RETURN (h5_close_hdf5 ()); +} + +/*! + \ingroup h5hut_error + + Set verbosity level to \c level. + + \return \c H5_SUCCESS +*/ +static inline h5_err_t +H5SetVerbosityLevel ( + const h5_id_t level ///< [in] verbosity/debug level. + ) { + return h5_set_debuglevel (level); +} + +/*! + \ingroup h5hut_error + + Set error handler to \c handler. + + \return \c H5_SUCCESS +*/ +static inline h5_err_t +H5SetErrorHandler ( + h5_errorhandler_t handler ///< [in] error handler to set. + ) { + H5_API_ENTER (h5_err_t, "handler=%p", handler); + H5_API_RETURN (h5_set_errorhandler (handler)); +} + +/*! + \ingroup h5hut_error + + Get current error handler. + + \return Pointer to error handler. +*/ +static inline h5_errorhandler_t +H5GetErrorHandler ( + void + ) { + H5_API_ENTER (h5_errorhandler_t, "%s", "void"); + H5_API_RETURN (h5_get_errorhandler()); +} + + +/*! + \ingroup h5hut_error + + The report error handler writes a message to stderr, sets the error number + and returns. + + \return \c H5_FAILURE + */ +static inline h5_err_t +H5ReportErrorhandler ( + const char* fmt, ///< [in] format string of error message. + va_list ap ///< [in] arguments to format string. + ) { + return h5_report_errorhandler (fmt, ap); +} + +/*! + \ingroup h5hut_error + + The abort error handler writes a message to stderr and exits the programm. + + \return does not return. + */ +static inline h5_err_t +H5AbortErrorhandler ( + const char* fmt, ///< [in] format string of error message. + va_list ap ///< [in] arguments to format string. + ) { + return h5_abort_errorhandler (fmt, ap); +} + +/*! + \ingroup h5hut_error + + Get last error code. + + \return error code +*/ +static inline h5_err_t +H5GetErrno ( + void + ) { + return h5_get_errno (); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/H5Block.h b/src/include/H5Block.h new file mode 100644 index 0000000..745a290 --- /dev/null +++ b/src/include/H5Block.h @@ -0,0 +1,41 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5BLOCK_H +#define __H5BLOCK_H + +/*! + \ingroup h5block_model + + \note + Different field sizes are allowed in the same time-step. + + \note + The same layout can be used, if the size of the field matches the + size of the layout. If the size of the layout doesn't match the + size of the field, an error will be indicated. + + \note + In write mode partitions are shrinked to make them non-overlaping. This + process may shrink the partitions more than required. + + \note + In read-mode partitions may not cross boundaries. This means, if the grid + size is (X, Y, Z), all partitions must fit into this grid. + + \todo + check whether layout is reasonable +*/ + +#include "H5Block_attribs.h" +#include "H5Block_model.h" +#include "H5Block_io.h" + +#endif + diff --git a/src/include/H5Block_attribs.h b/src/include/H5Block_attribs.h new file mode 100644 index 0000000..7581798 --- /dev/null +++ b/src/include/H5Block_attribs.h @@ -0,0 +1,733 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5BLOCK_ATTRIB +#define __H5BLOCK_ATTRIB + +#include + +#include "h5core/h5_types.h" +#include "h5core/h5.h" +#include "h5core/h5_debug.h" +#include "h5core/h5b_attribs.h" +#ifdef __cplusplus +extern "C" { +#endif + +/*! + \ingroup h5block_attrib + \anchor H5BlockGetNumFieldAttribs + + Query the number of attributes of field \c field_name. + + \return number of attributes + \return H5_FAILURE on error +*/ +static inline h5_ssize_t +H5BlockGetNumFieldAttribs ( + const h5_file_t f, ///< [in] file handle. + const char* field_name ///< [in] field name. + ) { + H5_API_ENTER (h5_ssize_t, + "f=%p, field_name='%s'", + (h5_file_p)f, field_name); + H5_API_RETURN (h5b_get_num_field_attribs (f, field_name)); +} + +/*! + \ingroup h5block_attrib + \anchor H5BlockGetFieldAttribInfo + + Gets the name, type and number of elements of the field attribute + specified by its index. + + This function can be used to retrieve all attributes bound to the + specified field by looping from \c 0 to the number of attribute + minus one. The number of attributes bound to the + field can be queried by calling \ref H5BlockGetNumFieldAttribs. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5BlockGetFieldAttribInfo ( + const h5_file_t f, ///< [in] file handle. + const char* field_name, ///< [in] field name. + const h5_size_t attrib_idx, ///< [in] index of attribute to query + char* attrib_name, ///< [out] name of attribute. + const h5_size_t len_attrib_name,///< [in] length of buffer \c name. + h5_int64_t* attrib_type, ///< [out] type of value. + h5_size_t* attrib_nelem ///< [out] number of elements. + ) { + H5_API_ENTER (h5_err_t, + "f=%p field_name='%s', " + "attrib_idx=%llu, " + "attrib_name=%p, len_attrib_name=%llu, " + "attrib_type=%p, " + "attrib_nelem=%p", + (h5_file_p)f, + field_name, + (long long unsigned)attrib_idx, + attrib_name, (long long unsigned)len_attrib_name, + attrib_type, + attrib_nelem); + H5_API_RETURN ( + h5b_get_field_attrib_info ( + f, + field_name, + attrib_idx, + attrib_name, + len_attrib_name, + attrib_type, + attrib_nelem)); +} + +/********************** reading and writing attribute ************************/ + +/*! + \ingroup h5block_attrib + \anchor H5BlockWriteFieldAttribString + + Write the string in \c buffer as attribute \c attrib_name of field + \c field_name. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5BlockWriteFieldAttribString ( + const h5_file_t f, ///< [in] file handle. + const char* field_name, ///< [in] field name. + const char* attrib_name, ///< [in] attribute name. + const char* buffer ///< [in] attribute value. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, " + "field_name='%s', " + "attrib_name='%s', " + "buffer='%s'", + (h5_file_p)f, + field_name, + attrib_name, + buffer); + H5_API_RETURN ( + h5b_write_field_attrib ( + f, + field_name, + attrib_name, + H5T_NATIVE_CHAR, + buffer, + strlen(buffer) + 1)); +} + +/*! + \ingroup h5block_attrib + \anchor H5BlockReadFieldAttribString ( + + Read the string value from attribute \c attrib_name of field + \c field_name into \c buffer. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5BlockReadFieldAttribString ( + const h5_file_t f, ///< [in] file handle. + const char* field_name, ///< [in] field name. + const char* attrib_name, ///< [in] attribute name. + char* buffer ///< [out] attribute value. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, " + "field_name='%s', " + "attrib_name='%s', " + "buffer=%p", + (h5_file_p)f, + field_name, + attrib_name, + buffer); + H5_API_RETURN ( + h5b_read_field_attrib ( + f, + field_name, + attrib_name, + H5_STRING_T, + (void*)buffer)); +} + + +/*! + \ingroup h5block_attrib + \anchor H5BlockWriteFieldAttribFloat64 + + Write float64 \c values as attribute \c attrib_name of field + \c field_name. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5BlockWriteFieldAttribFloat64 ( + const h5_file_t f, ///< [in] file handle. + const char* field_name, ///< [in] field name. + const char* attrib_name, ///< [in] attribute name. + const h5_float64_t* buffer, ///< [in] attribute values. + const h5_size_t nelems ///< [in] number of elements. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', attrib_name='%s', " + "buffer=%p, nelems=%lld", + (h5_file_p)f, field_name, attrib_name, buffer, (long long)nelems); + H5_API_RETURN (h5b_write_field_attrib ( + f, + field_name, + attrib_name, + H5T_NATIVE_DOUBLE, + buffer, + nelems )); +} + +/*! + \ingroup h5block_attrib + \anchor H5BlockReadFieldAttribFloat64 + + Read float64 values from attribute \c attrib_name of field + \c field_name into a \c buffer. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5BlockReadFieldAttribFloat64 ( + const h5_file_t f, ///< [in] file handle. + const char* field_name, ///< [in] field name. + const char* attrib_name, ///< [in] attribute name. + h5_float64_t* buffer ///< [out] attribute values. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', attrib_name='%s', buffer=%p", + (h5_file_p)f, field_name, attrib_name, buffer); + H5_API_RETURN (h5b_read_field_attrib ( + f, + field_name, + attrib_name, + H5T_NATIVE_DOUBLE, + (void*)buffer )); +} + + +/*! + \ingroup h5block_attrib + \anchor H5BlockWriteFieldAttribFloat32 + + Write float32 \c values as attribute \c attrib_name of field + \c field_name. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5BlockWriteFieldAttribFloat32 ( + const h5_file_t f, ///< [in] file handle. + const char* field_name, ///< [in] field name. + const char* attrib_name, ///< [in] attribute name. + const h5_float32_t* buffer, ///< [in] attribute values. + const h5_size_t nelems ///< [in] number of elements. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', attrib_name='%s', " + "buffer=%p, nelems=%lld", + (h5_file_p)f, field_name, attrib_name, buffer, (long long)nelems); + H5_API_RETURN (h5b_write_field_attrib ( + f, + field_name, + attrib_name, + H5T_NATIVE_FLOAT, + buffer, + nelems )); +} + +/*! + \ingroup h5block_attrib + \anchor H5BlockReadFieldAttribFloat32 + + Read float32 values from attribute \c attrib_name of field + \c field_name into a \c buffer. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5BlockReadFieldAttribFloat32 ( + const h5_file_t f, ///< [in] file handle. + const char* field_name, ///< [in] field name. + const char* attrib_name, ///< [in] attribute name. + h5_float32_t* const buffer ///< [out] attribute values. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', attrib_name='%s', buffer=%p", + (h5_file_p)f, field_name, attrib_name, buffer); + H5_API_RETURN (h5b_read_field_attrib ( + f, + field_name, + attrib_name, + H5T_NATIVE_FLOAT, + buffer )); +} + +/*! + \ingroup h5block_attrib + \anchor H5BlockWriteFieldAttribInt64 + + Write int64 \c values as attribute \c attrib_name of field + \c field_name. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5BlockWriteFieldAttribInt64 ( + const h5_file_t f, ///< [in] file handle. + const char* field_name, ///< [in] field name. + const char* attrib_name, ///< [in] attribute name. + const h5_int64_t* buffer, ///< [in] attribute values. + const h5_size_t nelems ///< [in] number of elements. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', attrib_name='%s', buffer=%p, nelems=%lld", + (h5_file_p)f, field_name, attrib_name, buffer, (long long)nelems); + H5_API_RETURN (h5b_write_field_attrib ( + f, + field_name, + attrib_name, + H5T_NATIVE_INT64, + buffer, + nelems )); +} + +/*! + \ingroup h5block_attrib + \anchor H5BlockReadFieldAttribInt64 + + Read int64 values from attribute \c attrib_name of field + \c field_name into a \c buffer. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5BlockReadFieldAttribInt64 ( + const h5_file_t f, ///< [in] file handle. + const char* field_name, ///< [in] field name. + const char* attrib_name, ///< [in] attribute name. + h5_int64_t* const buffer ///< [out] attribute values. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', attrib_name='%s', buffer=%p", + (h5_file_p)f, field_name, attrib_name, buffer); + H5_API_RETURN (h5b_read_field_attrib ( + f, + field_name, + attrib_name, + H5T_NATIVE_INT64, + buffer )); +} + + +/*! + \ingroup h5block_attrib + \anchor H5BlockWriteFieldAttribInt32 + + Write int32 \c values as attribute \c attrib_name of field + \c field_name. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5BlockWriteFieldAttribInt32 ( + const h5_file_t f, ///< [in] file handle. + const char* field_name, ///< [in] field name. + const char* attrib_name, ///< [in] attribute name. + const h5_int32_t* buffer, ///< [in] attribute values. + const h5_size_t nelems ///< [in] number of elements. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', attrib_name='%s', " + "buffer=%p, nelems=%lld", + (h5_file_p)f, field_name, attrib_name, buffer, (long long)nelems); + H5_API_RETURN (h5b_write_field_attrib ( + f, + field_name, + attrib_name, + H5T_NATIVE_INT32, + buffer, + nelems )); +} + +/*! + \ingroup h5block_attrib + \anchor H5BlockReadFieldAttribInt32 + + Read int32 values from attribute \c attrib_name of field + \c field_name into a \c buffer. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5BlockReadFieldAttribInt32 ( + const h5_file_t f, ///< [in] file handle. + const char* field_name, ///< [in] field name. + const char* attrib_name, ///< [in] attribute name. + h5_int32_t* buffer ///< [out] attribute values. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', attrib_name='%s', buffer=%p", + (h5_file_p)f, field_name, attrib_name, buffer); + H5_API_RETURN (h5b_read_field_attrib ( + f, + field_name, + attrib_name, + H5T_NATIVE_INT32, + (void*)buffer )); +} + +/* + :TODO: move macros to private include file +*/ +#define H5BLOCK_FIELD_ORIGIN_NAME "__Origin__" +#define H5BLOCK_FIELD_SPACING_NAME "__Spacing__" +#define H5BLOCK_FIELD_XCOORD_NAME "__X_Coordinates__" +#define H5BLOCK_FIELD_YCOORD_NAME "__Y_Coordinates__" +#define H5BLOCK_FIELD_ZCOORD_NAME "__Z_Coordinates__" + + +/*! + \ingroup h5block_attrib + \anchor H5Block3dGetFieldOrigin + + Get field origin. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dGetFieldOrigin ( + const h5_file_t f, ///< [in] file handle. + const char* field_name, ///< [in] field name. + h5_float64_t* x_origin, ///< [out] X origin. + h5_float64_t* y_origin, ///< [out] Y origin. + h5_float64_t* z_origin ///< [out] Z origin. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', x_origin=%p, y_origin=%p, z_origin=%p", + (h5_file_p)f, field_name, x_origin, y_origin, z_origin); + h5_float64_t origin[3]; + + TRY (h5b_read_field_attrib ( + f, + field_name, + H5BLOCK_FIELD_ORIGIN_NAME, + H5_FLOAT64_T, + origin)); + + *x_origin = origin[0]; + *y_origin = origin[1]; + *z_origin = origin[2]; + + H5_API_RETURN (H5_SUCCESS); +} + +/*! + \ingroup h5block_attrib + \anchor H5Block3dSetFieldOrigin + + Set field origin. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dSetFieldOrigin ( + const h5_file_t f, ///< [in] file handle. + const char* field_name, ///< [in] field name. + const h5_float64_t x_origin, ///< [in] X origin. + const h5_float64_t y_origin, ///< [in] Y origin. + const h5_float64_t z_origin ///< [in] Z origin. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', x_origin=%g, y_origin=%g, z_origin=%g", + (h5_file_p)f, field_name, x_origin, y_origin, z_origin); + h5_float64_t origin[3] = { x_origin, y_origin, z_origin }; + H5_API_RETURN (h5b_write_field_attrib ( + f, + field_name, + H5BLOCK_FIELD_ORIGIN_NAME, + (hid_t)H5_FLOAT64_T, + origin, + 3)); +} + +/*! + \ingroup h5block_attrib + \anchor H5Block3dGetFieldSpacing + + Get field spacing for field \c field_name in the current time step. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dGetFieldSpacing ( + const h5_file_t f, ///< [in] file handle. + const char* field_name, ///< [in] field name. + h5_float64_t* x_spacing, ///< [out] X spacing. + h5_float64_t* y_spacing, ///< [out] Y spacing. + h5_float64_t* z_spacing ///< [out] Z spacing. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', " + "x_spacing=%p, y_spacing=%p, z_spacing=%p", + (h5_file_p)f, field_name, x_spacing, y_spacing, z_spacing); + h5_float64_t spacing[3]; + TRY (h5b_read_field_attrib ( + f, + field_name, + H5BLOCK_FIELD_SPACING_NAME, + H5_FLOAT64_T, + spacing)); + *x_spacing = spacing[0]; + *y_spacing = spacing[1]; + *z_spacing = spacing[2]; + H5_API_RETURN (H5_SUCCESS); +} + +/*! + \ingroup h5block_attrib + \anchor H5Block3dSetFieldSpacing + + Set field spacing for field \c field_name in the current time step. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dSetFieldSpacing ( + const h5_file_t f, ///< [in] file handle. + const char* field_name, ///< [in] field name. + const h5_float64_t x_spacing, ///< [in] X spacing. + const h5_float64_t y_spacing, ///< [in] Y spacing. + const h5_float64_t z_spacing ///< [in] Z spacing. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, field_name='%s', x_spacing=%g, y_spacing=%g, z_spacing=%g", + (h5_file_p)f, field_name, x_spacing, y_spacing, z_spacing); + h5_float64_t spacing[3] = { x_spacing, y_spacing, z_spacing }; + H5_API_RETURN (h5b_write_field_attrib ( + f, + field_name, + H5BLOCK_FIELD_SPACING_NAME, + (hid_t)H5_FLOAT64_T, + spacing, + 3)); +} + +/*! + \ingroup h5block_attrib + \anchor H5Block3dSetFieldXCoords + + Set an explicit list of X coordinates for field \c field_name in the current + time step. The coordinates are a 1D array of floating point values with + dimension \c n_coords. + + By convention, the \c coords array should have the same length as the X + dimension of the field, and a warning will be printed if not. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dSetFieldXCoords ( + const h5_file_t f, ///< [in] file handle + const char* field_name, ///< [in] field name + const h5_float64_t* const coords,///< [in] X coordinates + const h5_int64_t n_coords ///< [in] number of coordinates + ) { + H5_API_ENTER (h5_err_t, + "f=%p, " + "field_name='%s', " + "coords=%p, n_coords=%llu", + (h5_file_p)f, + field_name, + coords, (long long unsigned)n_coords); + H5_API_RETURN (h5b_set_3d_field_coords ( + f, 0, field_name, H5BLOCK_FIELD_XCOORD_NAME, + coords, n_coords)); +} + + +/*! + \ingroup h5block_attrib + \anchor H5Block3dGetFieldXCoords + + Get the explicit list of X coordinates for field \c field_name in the current + time step. The coordinates are read into the 1D array \c coords which has + length \c n_coords. + + By convention, the \c coords array should have the same length as the X + dimension of the field, and a warning will be printed if they differ. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dGetFieldXCoords ( + const h5_file_t f, ///< [in] file handle + const char* field_name, ///< [in] field name + h5_float64_t* const coords, ///< [in] X coordinates + const h5_int64_t n_coords ///< [in] number of coordinates + ) { + H5_API_ENTER (h5_err_t, + "f=%p, " + "field_name='%s', " + "coords=%p, n_coords=%llu", + (h5_file_p)f, + field_name, + coords, (long long unsigned)n_coords); + H5_API_RETURN (h5b_get_3d_field_coords ( + f, 0, field_name, H5BLOCK_FIELD_XCOORD_NAME, + coords, n_coords)); +} + +/*! + \ingroup h5block_attrib + \anchor H5Block3dSetFieldYCoords + + Set an explicit list of Y coordinates for field \c field_name in the current + time step. The coordinates are a 1D array of floating point values with + dimension \c n_coords. + + By convention, the \c coords array should have the same length as the Y + dimension of the field, and a warning will be printed if not. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dSetFieldYCoords ( + const h5_file_t f, ///< [in] file handle + const char* field_name, ///< [in] field name + const h5_float64_t* const coords,///< [in] X coordinates + const h5_int64_t n_coords ///< [in] number of coordinates + ) { + H5_API_ENTER (h5_err_t, + "f=%p, " + "field_name='%s', " + "coords=%p, n_coords=%llu", + (h5_file_p)f, + field_name, + coords, (long long unsigned)n_coords); + H5_API_RETURN (h5b_set_3d_field_coords ( + f, 1, field_name, H5BLOCK_FIELD_YCOORD_NAME, + coords, n_coords)); +} + + +/*! + \ingroup h5block_attrib + \anchor H5Block3dGetFieldYCoords + + Get the explicit list of Y coordinates for field \c field_name in the current + time step. The coordinates are read into the 1D array \c coords which has + length \c n_coords. + + By convention, the \c coords array should have the same length as the Y + dimension of the field, and a warning will be printed if they differ. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dGetFieldYCoords ( + const h5_file_t f, ///< [in] file handle + const char* field_name, ///< [in] field name + h5_float64_t* const coords, ///< [in] Y coordinates + const h5_int64_t n_coords ///< [in] number of coordinates + ) { + H5_API_ENTER (h5_err_t, + "f=%p, " + "field_name='%s', " + "coords=%p, n_coords=%llu", + (h5_file_p)f, + field_name, + coords, (long long unsigned)n_coords); + H5_API_RETURN (h5b_get_3d_field_coords ( + f, 1, field_name, H5BLOCK_FIELD_YCOORD_NAME, + coords, n_coords)); +} + +/*! + \ingroup h5block_attrib + \anchor H5Block3dSetFieldZCoords + + Set an explicit list of Z coordinates for field \c field_name in the current + time step. The coordinates are a 1D array of floating point values with + dimension \c n_coords. + + By convention, the \c coords array should have the same length as the Z + dimension of the field, and a warning will be printed if not. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dSetFieldZCoords ( + const h5_file_t f, ///< [in] file handle + const char* field_name, ///< [in] field name + const h5_float64_t* const coords,///< [in] Z coordinates + const h5_int64_t n_coords ///< [in] number of coordinates + ) { + H5_API_ENTER (h5_err_t, + "f=%p, " + "field_name='%s', " + "coords=%p, n_coords=%llu", + (h5_file_p)f, + field_name, + coords, (long long unsigned)n_coords); + H5_API_RETURN (h5b_set_3d_field_coords ( + f, 2, field_name, H5BLOCK_FIELD_ZCOORD_NAME, + coords, n_coords)); +} + + +/*! + \ingroup h5block_attrib + \anchor H5Block3dGetFieldZCoords + + Get the explicit list of Z coordinates for field \c field_name in the current + time step. The coordinates are read into the 1D array \c coords which has + length \c n_coords. + + By convention, the \c coords array should have the same length as the Z + dimension of the field, and a warning will be printed if they differ. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dGetFieldZCoords ( + const h5_file_t f, ///< [in] file handle + const char* field_name, ///< [in] field name + h5_float64_t* const coords, ///< [in] Z coordinates + const h5_int64_t n_coords ///< [in] number of coordinates + ) { + H5_API_ENTER (h5_err_t, + "f=%p, " + "field_name='%s', " + "coords=%p, n_coords=%llu", + (h5_file_p)f, + field_name, + coords, (long long unsigned)n_coords); + H5_API_RETURN (h5b_get_3d_field_coords ( + f, 2, field_name, H5BLOCK_FIELD_ZCOORD_NAME, + coords, n_coords)); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/H5Block_io.h b/src/include/H5Block_io.h new file mode 100644 index 0000000..ff5018e --- /dev/null +++ b/src/include/H5Block_io.h @@ -0,0 +1,464 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5BLOCK_IO_H +#define __H5BLOCK_IO_H + +#include "h5core/h5_types.h" +#include "h5core/h5.h" +#include "h5core/h5_debug.h" +#include "h5core/h5b_io.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + \ingroup h5block_io + \anchor H5Block3dWriteScalarFieldFloat64 + + Write a 3-dimensional field \c name from the buffer starting at \c data + to the current time-step using the defined field layout. Values are + floating points (64-bit). + + You must use the Fortran indexing scheme to access items in \c data. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dWriteScalarFieldFloat64 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name of dataset to write. + const h5_float64_t* buffer ///< [in] pointer to write buffer. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5b_write_scalar_data(f, name, (void*)buffer, H5T_NATIVE_DOUBLE )); +} + +/*! + \ingroup h5block_io + \anchor H5Block3dReadScalarFieldFloat64 + + Read a 3-dimensional field \c name into the buffer starting at \c data from + the current time-step using the defined field layout. Values are + floating points (64-bit). + + You must use the Fortran indexing scheme to access items in \c data. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dReadScalarFieldFloat64 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name of dataset to read. + h5_float64_t* buffer ///< [out] pointer to read buffer. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5b_read_scalar_data(f, name, (void*)buffer, H5T_NATIVE_DOUBLE)); +} + +/*! + \ingroup h5block_io + \anchor H5Block3dWriteVector3dFieldFloat64 + + Write a 3-dimensional field \c name with 3-dimensional vectors as values + from the buffers starting at \c x_buf, \c y_buf and \c z_buf to the + current time-step using the defined field layout. Values are 3-dimensional + vectors with floating points (64-bit) values. + + You must use the Fortran indexing scheme to access items in \c x_buf. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dWriteVector3dFieldFloat64 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name of dataset to write. + const h5_float64_t* x_buf, ///< [in] pointer to X axis buffer. + const h5_float64_t* y_buf, ///< [in] pointer to Y axis buffer. + const h5_float64_t* z_buf ///< [in] pointer to Z axis buffer. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p", + (h5_file_p)f, name, x_buf, y_buf, z_buf); + H5_API_RETURN(h5b_write_vector3d_data(f, name, + (void*)x_buf, (void*)y_buf, (void*)z_buf, H5T_NATIVE_DOUBLE)); +} + +/*! + \ingroup h5block_io + \anchor H5Block3dReadVector3dFieldFloat64 + + Read a 3-dimensional field \c name with 3-dimensional vectors as values + from the buffers starting at \c x_buf, \c y_buf and \c z_buf to the + current time-step using the defined field layout. Values are 3-dimensional + vectors with floating points (64-bit) values. + + You must use the Fortran indexing scheme to access items in \c data. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dReadVector3dFieldFloat64 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name of dataset to write. + h5_float64_t* const x_buf, ///< [out] pointer to X axis buffer. + h5_float64_t* const y_buf, ///< [out] pointer to Y axis buffer. + h5_float64_t* const z_buf ///< [out] pointer to Z axis buffer. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p", + (h5_file_p)f, name, x_buf, y_buf, z_buf); + H5_API_RETURN(h5b_read_vector3d_data(f, name, + x_buf, y_buf, z_buf, H5T_NATIVE_DOUBLE)); +} + + +/*! + \ingroup h5block_io + \anchor H5Block3dWriteScalarFieldFloat32 + + Write a 3-dimensional field \c name from the buffer starting at \c data + to the current time-step using the defined field layout. Values are + floating points (32-bit). + + You must use the Fortran indexing scheme to access items in \c data. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dWriteScalarFieldFloat32 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name of dataset to write. + const h5_float32_t* buffer ///< [in] pointer to write buffer. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5b_write_scalar_data(f, name, buffer, H5T_NATIVE_FLOAT )); +} + +/*! + \ingroup h5block_io + \anchor H5Block3dReadScalarFieldFloat32 + + Read a 3-dimensional field \c name into the buffer starting at \c data from + the current time-step using the defined field layout. Values are + floating points (32-bit). + + You must use the Fortran indexing scheme to access items in \c data. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dReadScalarFieldFloat32 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name of dataset to read. + h5_float32_t* const buffer ///< [out] pointer to read buffer. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5b_read_scalar_data(f, name, buffer, H5T_NATIVE_FLOAT)); +} + +/*! + \ingroup h5block_io + \anchor H5Block3dWriteVector3dFieldFloat32 + + Write a 3-dimensional field \c name with 3-dimensional vectors as values + from the buffers starting at \c x_buf, \c y_buf and \c z_buf to the + current time-step using the defined field layout. Values are 3-dimensional + vectors with floating points (32-bit) values. + + You must use the Fortran indexing scheme to access items in \c x_buf. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dWriteVector3dFieldFloat32 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name of dataset to write. + const h5_float32_t* x_buf, ///< [in] pointer to X axis buffer. + const h5_float32_t* y_buf, ///< [in] pointer to Y axis buffer. + const h5_float32_t* z_buf ///< [in] pointer to Z axis buffer. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p", + (h5_file_p)f, name, x_buf, y_buf, z_buf); + H5_API_RETURN(h5b_write_vector3d_data(f, name, + x_buf, y_buf, z_buf, H5T_NATIVE_FLOAT)); +} + +/*! + \ingroup h5block_io + \anchor H5Block3dReadVector3dFieldFloat32 + + Read a 3-dimensional field \c name with 3-dimensional vectors as values + from the buffers starting at \c x_buf, \c y_buf and \c z_buf to the + current time-step using the defined field layout. Values are 3-dimensional + vectors with floating points (32-bit) values. + + You must use the Fortran indexing scheme to access items in \c data. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dReadVector3dFieldFloat32 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name of dataset to write. + h5_float32_t* const x_buf, ///< [out] pointer to X axis buffer. + h5_float32_t* const y_buf, ///< [out] pointer to Y axis buffer. + h5_float32_t* const z_buf ///< [out] pointer to Z axis buffer. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p", + (h5_file_p)f, name, x_buf, y_buf, z_buf); + H5_API_RETURN(h5b_read_vector3d_data(f, name, + x_buf, y_buf, z_buf, H5T_NATIVE_FLOAT)); +} + + +/*! + \ingroup h5block_io + \anchor H5Block3dWriteScalarFieldInt64 + + Write a 3-dimensional field \c name from the buffer starting at \c data + to the current time-step using the defined field layout. Values are + integers (64-bit). + + You must use the Fortran indexing scheme to access items in \c data. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dWriteScalarFieldInt64 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name of dataset to write. + const h5_int64_t* buffer ///< [in] pointer to write buffer. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5b_write_scalar_data(f, name, buffer, H5T_NATIVE_INT64 )); +} + +/*! + \ingroup h5block_io + \anchor H5Block3dReadScalarFieldInt64 + + Read a 3-dimensional field \c name into the buffer starting at \c data from + the current time-step using the defined field layout. Values are + integers (64-bit). + + You must use the Fortran indexing scheme to access items in \c data. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dReadScalarFieldInt64 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name of dataset to read. + h5_int64_t* const buffer ///< [out] pointer to read buffer. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5b_read_scalar_data(f, name, buffer, H5T_NATIVE_INT64)); +} + + +/*! + \ingroup h5block_io + \anchor H5Block3dWriteVector3dFieldInt64 + + Write a 3-dimensional field \c name with 3-dimensional vectors as values + from the buffers starting at \c x_buf, \c y_buf and \c z_buf to the + current time-step using the defined field layout. Values are 3-dimensional + vectors with integers (64-bit) values. + + You must use the Fortran indexing scheme to access items in \c x_buf. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dWriteVector3dFieldInt64 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name of dataset to write. + const h5_int64_t* x_buf, ///< [in] pointer to X axis buffer. + const h5_int64_t* y_buf, ///< [in] pointer to Y axis buffer. + const h5_int64_t* z_buf ///< [in] pointer to Z axis buffer. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p", + (h5_file_p)f, name, x_buf, y_buf, z_buf); + H5_API_RETURN (h5b_write_vector3d_data(f, name, + x_buf, y_buf, z_buf, H5T_NATIVE_INT64)); +} + +/*! + \ingroup h5block_io + \anchor H5Block3dReadVector3dFieldInt64 + + Read a 3-dimensional field \c name with 3-dimensional vectors as values + from the buffers starting at \c x_buf, \c y_buf and \c z_buf to the + current time-step using the defined field layout. Values are 3-dimensional + vectors with integers (64-bit) values. + + You must use the Fortran indexing scheme to access items in \c data. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dReadVector3dFieldInt64 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name of dataset to write. + h5_int64_t* const x_buf, ///< [out] pointer to X axis buffer. + h5_int64_t* const y_buf, ///< [out] pointer to Y axis buffer. + h5_int64_t* const z_buf ///< [out] pointer to Z axis buffer. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p", + (h5_file_p)f, name, x_buf, y_buf, z_buf); + H5_API_RETURN (h5b_read_vector3d_data(f, name, + x_buf, y_buf, z_buf, H5T_NATIVE_INT64)); +} + + +/*! + \ingroup h5block_io + \anchor H5Block3dWriteScalarFieldInt32 + + Write a 3-dimensional field \c name from the buffer starting at \c data + to the current time-step using the defined field layout. Values are + integers (32-bit). + + You must use the Fortran indexing scheme to access items in \c data. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dWriteScalarFieldInt32 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name of dataset to write. + const h5_int32_t* buffer ///< [in] pointer to write buffer. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5b_write_scalar_data(f, name, buffer, H5T_NATIVE_INT32 )); +} + +/*! + \ingroup h5block_io + \anchor H5Block3dReadScalarFieldInt32 + + Read a 3-dimensional field \c name into the buffer starting at \c data from + the current time-step using the defined field layout. Values are + integers (32-bit). + + You must use the Fortran indexing scheme to access items in \c data. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dReadScalarFieldInt32 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name of dataset to read. + h5_int32_t* const buffer ///< [out] pointer to read buffer. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5b_read_scalar_data(f, name, buffer, H5T_NATIVE_INT32)); +} + + +/*! + \ingroup h5block_io + \anchor H5Block3dWriteVector3dFieldInt32 + + Write a 3-dimensional field \c name with 3-dimensional vectors as values + from the buffers starting at \c x_buf, \c y_buf and \c z_buf to the + current time-step using the defined field layout. Values are 3-dimensional + vectors with integers (32-bit) values. + + You must use the Fortran indexing scheme to access items in \c x_buf. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dWriteVector3dFieldInt32 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name of dataset to write. + const h5_int32_t* x_buf, ///< [in] pointer to X axis buffer. + const h5_int32_t* y_buf, ///< [in] pointer to Y axis buffer. + const h5_int32_t* z_buf ///< [in] pointer to Z axis buffer. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p", + (h5_file_p)f, name, x_buf, y_buf, z_buf); + H5_API_RETURN(h5b_write_vector3d_data(f, name, + x_buf, y_buf, z_buf, H5T_NATIVE_INT32)); +} + +/*! + \ingroup h5block_io + \anchor H5Block3dReadVector3dFieldInt32 + + Read a 3-dimensional field \c name with 3-dimensional vectors as values + from the buffers starting at \c x_buf, \c y_buf and \c z_buf to the + current time-step using the defined field layout. Values are 3-dimensional + vectors with integers (32-bit) values. + + You must use the Fortran indexing scheme to access items in \c data. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dReadVector3dFieldInt32 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name of dataset to write. + h5_int32_t* const x_buf, ///< [out] pointer to X axis buffer. + h5_int32_t* const y_buf, ///< [out] pointer to Y axis buffer. + h5_int32_t* const z_buf ///< [out] pointer to Z axis buffer. + ) { + + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', x_buf=%p, y_buf=%p, z_buf=%p", + (h5_file_p)f, name, x_buf, y_buf, z_buf); + H5_API_RETURN(h5b_read_vector3d_data(f, name, + x_buf, y_buf, z_buf, H5T_NATIVE_INT32)); +} + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/H5Block_model.h b/src/include/H5Block_model.h new file mode 100644 index 0000000..5d1aeba --- /dev/null +++ b/src/include/H5Block_model.h @@ -0,0 +1,425 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5BLOCK_MODEL +#define __H5BLOCK_MODEL + +#include "h5core/h5_types.h" +#include "h5core/h5.h" +#include "h5core/h5_debug.h" +#include "h5core/h5b_model.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/********************** defining the layout **********************************/ + +/*! + \ingroup h5block_model + \anchor H5BlockHasFieldData + + Checks whether the current time-step has field data or not. + + \return \c H5_SUCCESS if field data is available otherwise \c + H5_NOK. +*/ +static inline h5_err_t +H5BlockHasFieldData ( + const h5_file_t f ///< [in] file handle + ) { + H5_API_ENTER (h5_err_t, + "f=%p, ", + (h5_file_p)f); + H5_API_RETURN (h5b_has_field_data (f)); +} + +/*! + \ingroup h5block_model + \anchor H5Block3dHasView + + Tests whether a view has been set, either directly with + \ref H5Block3dSetView or indirectly with \ref H5Block3dSetGrid. + + \return \c 1 on true. + \return \c 0 on false. +*/ +static inline h5_int64_t +H5Block3dHasView ( + const h5_file_t f ///< [in] File handle */ + ) { + H5_API_ENTER (h5_int64_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5b_3d_has_view (f)); +} + +/*! + \ingroup h5block_model + \anchor H5Block3dSetView + + Defines the partition of the field that this processor owns, using + Fortran ordering: the fastest moving index is \c i. + + This routine uses an MPI_Allgather, so at large concurrency it should + be called as infrequently as possible. For instance, if several timesteps + use the same field dimensions, set the layout only once before the + first timestep. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dSetView ( + const h5_file_t f, ///< [in] File handle. + const h5_int64_t i_start, ///< [in] start index of \c i + const h5_int64_t i_end, ///< [in] end index of \c i + const h5_int64_t j_start, ///< [in] start index of \c j + const h5_int64_t j_end, ///< [in] end index of \c j + const h5_int64_t k_start, ///< [in] start index of \c k + const h5_int64_t k_end ///< [in] end index of \c k + ) { + H5_API_ENTER (h5_err_t, + "f=%p, " + "i_start=%lld, i_end=%lld, " + "j_start=%lld, j_end=%lld, " + "k_start=%lld, k_end=%lld", + (h5_file_p)f, + (long long)i_start, (long long)i_end, + (long long)j_start, (long long)j_end, + (long long)k_start, (long long)k_end); + H5_API_RETURN (h5b_3d_set_view (f, + i_start, i_end, + j_start, j_end, + k_start, k_end)); +} + +/*! + \ingroup h5block_model + \anchor H5Block3dGetView + Return the view of this processor. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dGetView ( + const h5_file_t f, ///< [in] File handle. + h5_size_t* i_start, ///< [out] start index of \c i + h5_size_t* i_end, ///< [out] end index of \c i + h5_size_t* j_start, ///< [out] start index of \c j + h5_size_t* j_end, ///< [out] end index of \c j + h5_size_t* k_start, ///< [out] start index of \c k + h5_size_t* k_end ///< [out] end index of \c k + ) { + H5_API_ENTER (h5_err_t, + "f=%p, " + "i_start=%p, i_end=%p, " + "j_start=%p, j_end=%p, " + "k_start=%p, k_end=%p", + (h5_file_p)f, + i_start, i_end, + j_start, j_end, + k_start, k_end); + H5_API_RETURN (h5b_3d_get_view (f, i_start, i_end, j_start, j_end, k_start, k_end)); +} + +/*! + \ingroup h5block_model + \anchor H5Block3dGetReducedView + + Return the reduced (ghost-zone free) view of this processor. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dGetReducedView ( + const h5_file_t f, ///< [in] file handle. + h5_size_t* const i_start, ///< [out] start index of \c i + h5_size_t* const i_end, ///< [out] end index of \c i + h5_size_t* const j_start, ///< [out] start index of \c j + h5_size_t* const j_end, ///< [out] end index of \c j + h5_size_t* const k_start, ///< [out] start index of \c j + h5_size_t* const k_end ///< [out] end index of \c j + ) { + H5_API_ENTER (h5_err_t, + "f=%p, " + "i_start=%p, i_end=%p, " + "j_start=%p, j_end=%p, " + "k_start=%p, k_end=%p", + (h5_file_p)f, + i_start, i_end, + j_start, j_end, + k_start, k_end); + H5_API_RETURN (h5b_3d_get_reduced_view(f, i_start, i_end, j_start, j_end, k_start, k_end)); +} + +/*! + \ingroup h5block_model + \anchor H5Block3dSetChunkSize + + Define the chunk dimensions and enable chunking in the underlying + HDF5 dataset. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dSetChunkSize ( + const h5_file_t f, ///< [in] file handle. + const h5_size_t i, ///< [in] size of \c i + const h5_size_t j, ///< [in] size of \c j + const h5_size_t k ///< [in] size of \c k + ) { + H5_API_ENTER (h5_err_t, + "f=%p, i=%llu, j=%llu, k=%llu", + (h5_file_p)f, + (long long unsigned)i, + (long long unsigned)j, + (long long unsigned)k); + H5_API_RETURN (h5b_3d_set_chunk(f, i, j, k)); +} + +/*! + \ingroup h5block_model + \anchor H5Block3dGetChunkSize + + Lookup the chunk dimensions of the underlying HDF5 dataset. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dGetChunkSize ( + const h5_file_t f, ///< [in] file handle. + const char* field_name, ///< [in] name of dataset + h5_size_t* const i, ///< [out] size of \c i + h5_size_t* const j, ///< [out] size of \c j + h5_size_t* const k ///< [out] size of \c k + ) { + H5_API_ENTER (h5_err_t, + "f=%p, i=%p, j=%p, k=%p", + (h5_file_p)f, i, j, k); + H5_API_RETURN (h5b_3d_get_chunk(f, field_name, i, j, k)); +} + +#ifdef PARALLEL_IO +/*! + \ingroup h5block_model + \anchor H5Block3dSetGrid + + Define an underlying 3D Cartesian grid on the processors with dimensions + (\c i,\c j,\c k). You can look up a processor's index into the grid + using \ref H5Block3dGetGridCoords. + + This function can be used in conjunction with \ref H5Block3dSetDims + to setup the view for a regular grid. + + The product of the dimensions must equal the size of the MPI communicator. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dSetGrid ( + const h5_file_t f, ///< [in] file handle. + const h5_size_t i, ///< [in] dimension in \c i + const h5_size_t j, ///< [in] dimension in \c j + const h5_size_t k ///< [in] dimension in \c k + ) { + H5_API_ENTER (h5_err_t, + "f=%p, i=%llu, j=%llu, k=%llu", + (h5_file_p)f, + (long long unsigned)i, + (long long unsigned)j, + (long long unsigned)k); + H5_API_RETURN (h5b_3d_set_grid(f, i, j, k)); +} + +/*! + \ingroup h5block_model + \anchor H5Block3dGetGridCoords + + Look up the index (\c i, \c j, \c k) in the grid belonging to MPI processor + \c proc. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dGetGridCoords ( + const h5_file_t f, ///< [in] file handle. + const int proc, ///< [in] MPI processor + h5_int64_t* i, ///< [out] index in \c i + h5_int64_t* j, ///< [out] index in \c j + h5_int64_t* k ///< [out] index in \c k + ) { + H5_API_ENTER (h5_err_t, + "f=%p, proc=%d, i=%p, j=%p, k=%p", + (h5_file_p)f, proc, i, j, k); + H5_API_RETURN (h5b_3d_get_grid_coords(f, proc, i, j, k)); +} + +/*! + \ingroup h5block_model + \anchor H5Block3dSetDims + + Set the dimensions of each processor's block when the field is a regular + grid. + + A grid must be already set with \ref H5Block3dSetGrid, and all processors + must specify the same dimensions. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dSetDims ( + const h5_file_t f, ///< [in] file handle. + const h5_size_t i, ///< [in] dimension in \c i + const h5_size_t j, ///< [in] dimension in \c j + const h5_size_t k ///< [in] dimension in \c k + ) { + H5_API_ENTER (h5_err_t, + "f=%p, i=%llu, j=%llu, k=%llu", + (h5_file_p)f, + (long long unsigned)i, + (long long unsigned)j, + (long long unsigned)k); + H5_API_RETURN (h5b_3d_set_dims(f, i, j, k)); +} +#endif + +/*! + \ingroup h5block_model + \anchor H5Block3dSetHalo + + Sets the additional cells (\c i, \c j, \c k) in each direction to use as + the `halo` region (or `ghost zone`) that overlaps between neighboring + processors on the grid. + + A grid with dimensions must already be set with \ref H5Block3dSetGrid and + \ref H5Block3dSetDims, and all processors must specify the same halo radii. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5Block3dSetHalo ( + const h5_file_t f, ///< [in] file handle. + const h5_size_t i, ///< [in] radius in \c i + const h5_size_t j, ///< [in] radius in \c j + const h5_size_t k ///< [in] radius in \c k + ) { + H5_API_ENTER (h5_err_t, + "f=%p, i=%llu, j=%llu, k=%llu", + (h5_file_p)f, + (long long unsigned)i, + (long long unsigned)j, + (long long unsigned)k); + H5_API_RETURN (h5b_3d_set_halo(f, i, j, k)); +} + +/*! + \ingroup h5block_model + \anchor H5BlockGetNumFields + + Query number of fields in current time step. + + \return \c number of fields + \return H5_FAILURE on error +*/ +static inline h5_ssize_t +H5BlockGetNumFields ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_ssize_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5b_get_num_fields(f)); +} + + +/*! + \ingroup h5block_model + \anchor H5BlockGetFieldInfo + + Get the name, rank and dimensions of the field specified by the + index \c idx. + + \c elem_rank reports the rank of the elements in the field + (e.g. scalar or vector). + + This function can be used to retrieve all fields bound to the + current time-step by looping from \c 0 to the number of fields + minus one. The number of fields bound to the current time-step + can be queried by calling the function \ref H5BlockGetNumFields. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5BlockGetFieldInfo ( + const h5_file_t f, ///< [in] file handle. + const h5_size_t idx, ///< [in] index of field. + char* name, ///< [out] field name. + const h5_size_t len_name, ///< [in] buffer size. + h5_size_t* field_rank, ///< [out] field rank. + h5_size_t* field_dims, ///< [out] field dimensions. + h5_size_t* elem_rank, ///< [out] element rank. + h5_int64_t* type ///< [out] datatype. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, idx=%llu, " + "name=%p, len_name=%llu, " + "field_rank=%p, field_dims=%p, elem_rank=%p, type=%p", + (h5_file_p)f, (long long unsigned)idx, + name, (long long unsigned)len_name, + field_rank, field_dims, elem_rank, + type); + H5_API_RETURN ( + h5b_get_field_info ( + f, + idx, + name, + len_name, + field_rank, + field_dims, + elem_rank, + type)); +} + +/*! + \ingroup h5block_model + \anchor H5BlockGetFieldInfoByName + + Get the rank and dimensions of the field specified by its name. + See \ref H5BlockGetFieldInfo. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5BlockGetFieldInfoByName ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] field name. + h5_size_t* field_rank, ///< [out] field rank. + h5_size_t* field_dims, ///< [out] field dimensions. + h5_size_t* elem_rank, ///< [out] element rank. + h5_int64_t* type ///< [out] datatype. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', " + "field_rank=%p, field_dims=%p, elem_rank=%p, type=%p", + (h5_file_p)f, name, field_rank, field_dims, elem_rank, type); + H5_API_RETURN ( + h5b_get_field_info_by_name ( + f, + name, + field_rank, + field_dims, + elem_rank, + type)); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/H5Fed.h b/src/include/H5Fed.h new file mode 100644 index 0000000..90ac1b7 --- /dev/null +++ b/src/include/H5Fed.h @@ -0,0 +1,137 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5FED_H +#define __H5FED_H + +#include "H5Fed_adjacency.h" +#include "H5Fed_model.h" +#include "H5Fed_retrieve.h" +#include "H5Fed_store.h" +#include "H5Fed_tags.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/****** General routines *****************************************************/ + +static inline h5_err_t +H5FedOpenTetrahedralMesh ( + const h5_file_t f, + const char* name, + h5t_mesh_t** mesh + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name=%s, mesh=%p", + (h5_file_p)f, name, mesh); + H5_API_RETURN (h5t_open_tetrahedral_mesh (f, name, mesh)); +} + +static inline h5_err_t +H5FedOpenTetrahedralMeshByIndex ( + const h5_file_t f, + const h5_id_t idx, + h5t_mesh_t** mesh + ) { + H5_API_ENTER (h5_err_t, + "f=%p, idx=%lld, mesh=%p", + (h5_file_p)f, (long long)idx, mesh); + H5_API_RETURN (h5t_open_tetrahedral_mesh_by_idx (f, idx, mesh)); +} + +static inline h5_err_t +H5FedOpenTriangleMesh ( + const h5_file_t f, + const char* name, + h5t_mesh_t** mesh + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name=%s, mesh=%p", + (h5_file_p)f, name, mesh); + H5_API_RETURN (h5t_open_triangle_mesh (f, name, mesh)); +} + +static inline h5_err_t +H5FedOpenTriangleMeshPart ( + const h5_file_t f, + const char* name, + h5t_mesh_t** mesh, + h5_glb_idx_t* const elem_indices, + const h5_glb_idx_t num_elems + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name=%s, mesh=%p", + (h5_file_p)f, name, mesh); + H5_API_RETURN (h5t_open_triangle_mesh_part (f, name, mesh, elem_indices, num_elems)); +} + +static inline h5_err_t +H5FedOpenTriangleMeshByIndex ( + const h5_file_t f, + const h5_id_t idx, + h5t_mesh_t** mesh + ) { + H5_API_ENTER (h5_err_t, + "f=%p, idx=%lld, mesh=%p", + (h5_file_p)f, (long long)idx, mesh); + H5_API_RETURN (h5t_open_triangle_mesh_by_idx (f, idx, mesh)); +} + +static inline h5_err_t +H5FedCloseMesh ( + h5t_mesh_t* const m + ) { + H5_API_ENTER (h5_err_t, "m=%p", m); + H5_API_RETURN (h5t_close_mesh (m)); +} + +static inline h5_err_t +H5FedSetLevel ( + h5t_mesh_t* const m, + const h5_lvl_idx_t level_id + ) { + H5_API_ENTER (h5_err_t, "m=%p, level_id=%d", m, level_id); + H5_API_RETURN (h5t_set_level (m, level_id)); +} + +static inline h5_err_t +H5FedSetMeshChanged ( + h5t_mesh_t* const m + ) { + H5_API_ENTER (h5_err_t, "m=%p", m); + H5_API_RETURN (h5t_set_mesh_changed (m)); +} + +static inline h5_err_t +H5FedLinkMeshToStep ( + h5_file_t* const m, + const h5_id_t mesh_id + ) { + H5_API_ENTER (h5_err_t, "m=%p, mesh_id=%lld", m, (long long)mesh_id); + H5_API_RETURN (h5_error_not_implemented ()); +} + +#ifdef __cplusplus +} +#endif + +#endif + + + + + + + + + + + + diff --git a/src/include/H5Fed_adjacency.h b/src/include/H5Fed_adjacency.h new file mode 100644 index 0000000..7378b48 --- /dev/null +++ b/src/include/H5Fed_adjacency.h @@ -0,0 +1,48 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5FED_ADJACENCY_H +#define __H5FED_ADJACENCY_H + +#include "h5core/h5_types.h" +#include "h5core/h5.h" +#include "h5core/h5_debug.h" +#include "h5core/h5t_adjacencies.h" + +#ifdef __cplusplus +extern "C" { +#endif + +static inline h5_err_t +H5FedGetAdjacencies ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + const h5_int32_t dim, + h5_loc_idlist_t** list + ) { + H5_API_ENTER (h5_err_t, + "m=%p, entity_id=%lld, dim=%d, list=%p", + m, (long long)entity_id, dim, list); + H5_API_RETURN (h5t_get_adjacencies (m, entity_id, dim, list)); +} + +static inline h5_err_t +H5FedReleaseListOfAdjacencies ( + h5t_mesh_t* const m, + h5_loc_idlist_t** list + ) { + H5_API_ENTER (h5_err_t, "f=%p, list=%p", m, list); + H5_API_RETURN (h5t_release_list_of_adjacencies (m, list)); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/H5Fed_model.h b/src/include/H5Fed_model.h new file mode 100644 index 0000000..0917c90 --- /dev/null +++ b/src/include/H5Fed_model.h @@ -0,0 +1,184 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5FED_MODEL_H +#define __H5FED_MODEL_H + +#include "h5core/h5_types.h" +#include "h5core/h5.h" +#include "h5core/h5_debug.h" +#include "h5core/h5t_model.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + Get number of meshes of given type. + + \param[in] f File handle + \param[in] type_id Type of mesh we want the number of. + + \return Number of meshes of type \c type_id or error code. + */ +static inline h5_ssize_t +H5FedGetNumTetrahedralMeshes ( + const h5_file_t f + ) { + H5_API_ENTER (h5_err_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5t_get_num_tetmeshes (f)); +} + +static inline h5_ssize_t +H5FedGetNumTriangleMeshes ( + const h5_file_t f + ) { + H5_API_ENTER (h5_err_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5t_get_num_trimeshes (f)); +} + +/*! + Get the number of hierarchical mesh levels. + + \param[in] f File handle + + \return Number of hierarchical mesh levels or error code. + */ +static inline h5_ssize_t +H5FedGetNumLevels ( + h5t_mesh_t* const m + ) { + H5_API_ENTER (h5_ssize_t, "m=%p", m); + H5_API_RETURN (h5t_get_num_leaf_levels (m)); +} + +/*! + Get current mesh levels. + + \param[in] f File handle + + \return ID of current mesh levels or error code. + */ +static inline h5_lvl_idx_t +H5FedGetLevel ( + h5t_mesh_t* const m + ) { + H5_API_ENTER (h5_lvl_idx_t, "m=%p", m); + H5_API_RETURN (h5t_get_level (m)); +} + +/*! + Returns the number of vertices used for defining the (sub-)mesh + at current level on this compute node. + + \param[in] f file handle + + \return Number of vertices or error code. +*/ +static inline h5_ssize_t +H5FedGetNumVertices ( + h5t_mesh_t* const m /*!< file handle */ + ) { + H5_API_ENTER (h5_ssize_t, "m=%p", m); + H5_API_RETURN (h5t_get_num_vertices (m, -1)); +} + +/*! + Returns the number of vertices used for defining the (sub-)mesh + at current level on compute node \c cnode. + + \param[in] f file handle + \param[in] cnode compute node + + \return Number of vertices or error code. +*/ +static inline h5_ssize_t +H5FedGetNumVerticesCnode ( + h5t_mesh_t* const m, + const int cnode + ) { + H5_API_ENTER (h5_ssize_t, "m=%p, cnode=%d", m, cnode); + H5_API_RETURN (h5t_get_num_vertices (m, cnode)); +} + +/*! + Returns the number of vertices used for defining the (sub-)mesh + at current level overl all compute nodes. + + \param[in] f file handle + + \return Total number of vertices or error code. +*/ +static inline h5_ssize_t +H5FedGetNumVerticesTotal ( + h5t_mesh_t* const m + ) { + H5_API_ENTER (h5_ssize_t, "m=%p", m); + H5_API_RETURN (h5t_get_num_vertices (m, -1)); +} + +/*! + Returns the number of elements present in the (sub-)mesh + at current level on this compute node. + + \param[in] f file handle + + \return Number of elements or error code. +*/ +static inline h5_ssize_t +H5FedGetNumElements ( + h5t_mesh_t* const m + ) { + H5_API_ENTER (h5_ssize_t, "m=%p", m); + H5_API_RETURN (h5t_get_num_leaf_elems (m, -1)); +} + +/*! + Returns the number of elements present in the (sub-)mesh + at current level on compute node \c cnode. + + \param[in] f file handle + \param[in] cnode Compute node + + \return Number of elements or error code. +*/ +static inline h5_ssize_t +H5FedGetNumElementsCnode ( + h5t_mesh_t* const m, + const int cnode + ) { + H5_API_ENTER (h5_ssize_t, "m=%p, cnode=%d", m, cnode); + H5_API_RETURN (h5t_get_num_leaf_elems (m, cnode)); +} + +/*! + Returns the number of elements present in the mesh + at current level over all compute nodes. + + \param[in] f File handle. + + \return Number of elements or error code. +*/ +static inline h5_ssize_t +H5FedGetNumElementsTotal ( + h5t_mesh_t* const m + ) { + H5_API_ENTER (h5_ssize_t, "m=%p", m); + H5_API_RETURN (h5t_get_num_leaf_elems (m, -1)); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/H5Fed_retrieve.h b/src/include/H5Fed_retrieve.h new file mode 100644 index 0000000..cf1c623 --- /dev/null +++ b/src/include/H5Fed_retrieve.h @@ -0,0 +1,218 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5FED_RETRIEVE_H +#define __H5FED_RETRIEVE_H + +#include "h5core/h5_types.h" +#include "h5core/h5.h" +#include "h5core/h5_debug.h" +#include "h5core/h5_syscall.h" +#include "h5core/h5t_map.h" +#include "h5core/h5t_retrieve.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/*! + Begin traverse over all entities on this compute node. + Initialize internal data structures. + + \remark + Entities might be on processor boundaries! Therefore the same entity might be + processed on several compute nodes. + + \param[in] f file handle + \param[in] codim co-dimension of entity to traverse + + \return H5_SUCCESS or error code + */ + +static inline h5t_iterator_p +H5FedBeginTraverseEntities ( + h5t_mesh_t* const m, + const int codim + ) { + H5_API_ENTER (h5t_iterator_p, "m=%p, codim=%d", m, codim); + h5t_iterator_p iter; + TRY (iter = (h5t_iterator_p)h5_calloc (1, sizeof (*iter))); + TRY (h5t_init_leaf_iterator (iter, m, codim)); + H5_API_RETURN (iter); +} + +static inline h5t_iterator_p +H5FedBeginTraverseBoundaryFaces ( + h5t_mesh_t* const m, + const int codim + ) { + H5_API_ENTER (h5t_iterator_p, "m=%p, codim=%d", m, codim); + h5t_iterator_p iter; + TRY (iter = (h5t_iterator_p)h5_calloc (1, sizeof (*iter))); + TRY (h5t_init_boundary_face_iterator (iter, m, codim)); + H5_API_RETURN (iter); +} + +/*! + Get next local entity ID. + + \param[in/out] iter iterator + + \return Local entity ID + \return -1, if done + \return error code on error + */ +static inline h5_loc_id_t +H5FedTraverseEntities ( + h5t_iterator_t* iter + ) { + H5_API_ENTER (h5_loc_id_t, "iter=%p", iter); + H5_API_RETURN (h5t_iterate_entities (iter)); +} + +/*! + End of traversing. Release internal data structures. + + \param[in/out] iter iterator + + \return H5_SUCCESS or error code + + */ +static inline h5_err_t +H5FedEndTraverseEntities ( + h5t_iterator_t* iter + ) { + H5_API_ENTER (h5_err_t, "iter=%p", iter); + H5_API_RETURN (h5t_release_entity_iterator (iter)); +} + + +/*! + Get coordinates of vertex given by local index + + \param[in] f file handle + \param[in] vertex_idx local index of vertex + \param[out] P 3-dimensional coordinates + + \return H5_SUCCESS or error code + */ +static inline h5_err_t +H5FedGetVertexCoordsByIndex ( + h5t_mesh_t* const m, + h5_loc_idx_t vertex_index, + h5_float64_t P[3] + ) { + H5_API_ENTER (h5_err_t, + "m=%p, vertex_index=%lld, P=%p", + m, (long long)vertex_index, P); + H5_API_RETURN (h5t_get_vertex_coords_by_index (m, vertex_index, P)); +} + +static inline h5_err_t +H5FedGetVertexCoordsByID ( + h5t_mesh_t* const m, + h5_loc_id_t vertex_id, + h5_float64_t P[3] + ) { + H5_API_ENTER (h5_err_t, + "m=%p, vertex_id=%lld, P=%p", + m, (long long)vertex_id, P); + H5_API_RETURN (h5t_get_vertex_coords_by_id (m, vertex_id, P)); +} + +static inline h5_err_t +H5FedGetVertexIndicesOfEdge ( + h5t_mesh_t* const m, + h5_loc_id_t entity_id, + h5_loc_idx_t* vertex_indices + ) { + H5_API_ENTER (h5_err_t, + "m=%p, entity_id=%lld, vertex_indices=%p", + m, (long long)entity_id, vertex_indices); + H5_API_RETURN (h5t_get_loc_vertex_indices_of_edge (m, entity_id, vertex_indices)); +} + +static inline h5_err_t +H5FedGetVertexIndicesOfTriangle ( + h5t_mesh_t* const m, + h5_loc_id_t entity_id, + h5_loc_idx_t* vertex_indices + ) { + H5_API_ENTER (h5_err_t, + "m=%p, entity_id=%lld, vertex_indices=%p", + m, (long long)entity_id, vertex_indices); + H5_API_RETURN (h5t_get_loc_vertex_indices_of_triangle (m, entity_id, vertex_indices)); +} + +static inline h5_err_t +H5FedGetVertexIndicesOfTet ( + h5t_mesh_t* const m, + h5_loc_id_t entity_id, + h5_loc_idx_t* vertex_indices + ) { + H5_API_ENTER (h5_err_t, + "m=%p, entity_id=%lld, vertex_indices=%p", + m, (long long)entity_id, vertex_indices); + H5_API_RETURN (h5t_get_loc_vertex_indices_of_tet (m, entity_id, vertex_indices)); +} + +static inline h5_err_t +H5FedGetVertexIndicesOfEntity ( + h5t_mesh_t* const m, + h5_loc_id_t entity_id, + h5_loc_idx_t* indices + ) { + H5_API_ENTER (h5_err_t, + "m=%p, entity_id=%lld, indices=%p", + m, (long long)entity_id, indices); + H5_API_RETURN (h5t_get_loc_vertex_indices_of_entity (m, entity_id, indices)); +} + +static inline h5_err_t +H5FedGetGlobalVertexIndicesOfEntity ( + h5t_mesh_t* const m, + h5_loc_id_t entity_id, + h5_glb_idx_t* indices + ) { + H5_API_ENTER (h5_err_t, + "m=%p, entity_id=%lld, indices=%p", + m, (long long)entity_id, indices); + H5_API_RETURN (h5t_get_glb_vertex_indices_of_entity (m, entity_id, indices)); +} + +static inline h5_err_t +H5FedGetVertexByID ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_glb_idx_t* glb_idx, + h5_float64_t* P[] + ) { + H5_API_ENTER (h5_err_t, + "m=%p, entity_id=%lld, glb_idx=%p, P[]=%p", + m, (long long)entity_id, glb_idx, P); + H5_API_RETURN (h5t_get_vertex_by_id (m, entity_id, glb_idx, P)); +} + +static inline h5_err_t +H5FedGetNeighborIndicesOfElement ( + h5t_mesh_t* const m, + h5_loc_id_t entity_id, + h5_loc_idx_t* neighbor_indices + ) { + H5_API_ENTER (h5_err_t, + "m=%p, entity_id=%lld, neighbor_indices=%p", + m, (long long)entity_id, neighbor_indices); + H5_API_RETURN (h5t_get_neighbor_indices (m, entity_id, neighbor_indices)); +} +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/H5Fed_store.h b/src/include/H5Fed_store.h new file mode 100644 index 0000000..534161e --- /dev/null +++ b/src/include/H5Fed_store.h @@ -0,0 +1,218 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5FED_STORE_H +#define __H5FED_STORE_H + +#include "h5core/h5_types.h" +#include "h5core/h5.h" +#include "h5core/h5_debug.h" +#include "h5core/h5t_store.h" + +#ifdef __cplusplus +extern "C" { +#endif + +static inline h5_err_t +H5FedAddTetrahedralMesh ( + const h5_file_t f, + const char* name, + h5t_mesh_t** mesh + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name=%s, mesh=%p", + (h5_file_p)f, name, mesh); + H5_API_RETURN (h5t_add_tetrahedral_mesh (f, name, mesh)); +} + +static inline h5_err_t +H5FedAddChunkedTetrahedralMesh ( + const h5_file_t f, + const char* name, + h5t_mesh_t** mesh + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name=%s, mesh=%p", + (h5_file_p)f, name, mesh); + H5_API_RETURN (h5t_add_chunked_tetrahedral_mesh (f, name, mesh)); +} + + +static inline h5_err_t +H5FedAddTriangleMesh ( + const h5_file_t f, + const char* name, + h5t_mesh_t** mesh + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name=%s, mesh=%p", + (h5_file_p)f, name, mesh); + H5_API_RETURN (h5t_add_triangle_mesh (f, name, mesh)); +} + +static inline h5_err_t +H5FedAddChunkedTriangleMesh ( + const h5_file_t f, + const char* name, + h5t_mesh_t** mesh + ) { + H5_API_ENTER(h5_err_t, + "f=%p, name=%s, mesh=%p", + (h5_file_p)f, name, mesh); + H5_API_RETURN (h5t_add_chunked_triangle_mesh (f, name, mesh)); +} +/*! + \ingroup h5fed_c_api + + Add a new level with \c num_elems elements. The number of elements must be the + real number of elements to add the level. If you want to refine \c n tetrahedra + \c n*8 elements must be added. + + \param[in] f File handle. + \param[in] num_elems_to_refine Number of elements which will be refined. + + \return ID of new level. + + \note + values for f->t.num_levels: + \c -1 unknown: after opening the file. This is equivalent to + "topological data has not been initialized". + \c 0 no levels: HDF5 group for meshes may already exist but must not! + \c > 0 number of mesh levels + + */ +static inline h5_err_t +H5FedBeginStoreVertices ( + h5t_mesh_t* const m, + const h5_size_t num + ) { + H5_API_ENTER (h5_err_t, + "m=%p, num=%llu", + m, (long long unsigned)num); + H5_API_RETURN (h5t_begin_store_vertices (m, num)); +} + +/*! + \ingroup h5fed_c_api + + Stores the the coordinates of a specific vertex at level \c level + with id \c vertex_id of the tetrahedral mesh. + + \return local vertex id on success + \return errno on error + */ +static inline h5_loc_idx_t +H5FedStoreVertex ( + h5t_mesh_t* const m, /*!< file handle */ + const h5_glb_id_t vertex_id, /*!< id from mesher or -1 */ + const h5_float64_t P[3] /*!< coordinates */ + ) { + H5_API_ENTER (h5_loc_idx_t, + "m=%p, vertex_id=%lld, P=%p", + m, (long long)vertex_id, P); + if (h5t_get_level (m) != 0) { + H5_API_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "Vertices can be added to level 0 only!")); + } + H5_API_RETURN (h5t_store_vertex (m, vertex_id, P)); +} + +static inline h5_err_t +H5FedEndStoreVertices ( + h5t_mesh_t* const m + ) { + H5_API_ENTER (h5_err_t, "m=%p", m); + H5_API_RETURN (h5t_end_store_vertices (m)); +} + +static inline h5_err_t +H5FedBeginStoreElements ( + h5t_mesh_t* const m, + const h5_size_t num, + const h5_weight_t num_weights + ) { + H5_API_ENTER (h5_err_t, + "m=%p, num=%llu, num_weights=%d", + m, (long long unsigned)num, num_weights); + H5_API_RETURN (h5t_begin_store_elems (m, num, num_weights)); +} + +/*! + \ingroup h5fed_c_api + + Stores the 4-tuple, that contains the specific indices describing + a tetrahedron with id \c tet_id at level \c level of the tetrahedral + mesh. + + Errors: + * current level not yet defined + * to many tets stored on level + + \return local tetrahedron id + \return \c errno on error + */ +static inline h5_loc_idx_t +H5FedStoreElement ( + h5t_mesh_t* const m, /*!< file handle */ + const h5_loc_idx_t local_vids[], /*!< tuple with vertex id's */ + const h5_weight_t weights[] // tuple with weights + ) { + H5_API_ENTER (h5_loc_idx_t, "m=%p, local_vids=%p", m, local_vids); + if (h5t_get_level (m) != 0) { + H5_API_LEAVE ( + h5_error ( + H5_ERR_INVAL, + "Elements can be added to level 0 only!")); + } + H5_API_RETURN (h5t_store_elem2 (m, -1, local_vids, weights)); +} + +static inline h5_err_t +H5FedEndStoreElements ( + h5t_mesh_t* const m + ) { + H5_API_ENTER (h5_err_t, "m=%p", m); + + H5_API_RETURN ((h5t_is_chunked(m)) ? h5t_end_store_ckd_elems (m) : h5t_end_store_elems (m)); +} + +static inline h5_err_t +H5FedBeginRefineElements ( + h5t_mesh_t* const m + ) { + H5_API_ENTER (h5_err_t, "m=%p", m); + H5_API_RETURN (h5t_begin_refine_elems (m)); +} + +static inline h5_loc_idx_t +H5FedRefineElement ( + h5t_mesh_t* const m, /*!< file handle */ + const h5_loc_id_t local_eid /*!< local element id */ + ) { + H5_API_ENTER (h5_loc_idx_t, + "m=%p, local_eid=%lld", + m, (long long)local_eid); + H5_API_RETURN (h5t_mark_entity (m, local_eid)); +} + +static inline h5_err_t +H5FedEndRefineElements ( + h5t_mesh_t* const m + ) { + H5_API_ENTER (h5_err_t, "m=%p", m); + H5_API_RETURN (h5t_end_refine_elems (m)); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/H5Fed_tags.h b/src/include/H5Fed_tags.h new file mode 100644 index 0000000..711c1b3 --- /dev/null +++ b/src/include/H5Fed_tags.h @@ -0,0 +1,221 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5FED_TAGS_H +#define __H5FED_TAGS_H + +#include "h5core/h5_types.h" +#include "h5core/h5.h" +#include "h5core/h5_debug.h" +#include "h5core/h5t_tags.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + Get number of tagsets assocciated with the mesh. + + \param[in] m mesh + */ +static inline h5_ssize_t +H5FedGetNumMTagsets ( + h5t_mesh_t* const m + ) { + H5_API_ENTER (h5_ssize_t, "m=%p", m); + H5_API_RETURN (h5t_get_num_mtagsets(m)); +} + +/*! + Get some information about the tagset \c name. + + \param[in] m mesh + \param[in] idx index of tagset to query + \param[out] name name of tagset + \param[in] len_name len of buffer \c name + \param[out] type type of tagset + */ +static inline h5_err_t +H5FedGetMTagsetInfo ( + h5t_mesh_t* const m, + const h5_size_t idx, + char name[], + const h5_size_t len_name, + h5_int64_t* const type + ) { + H5_API_ENTER (h5_err_t, + "m=%p, idx=%llu, name=%p, len_name=%llu, type=%p", + m, (long long unsigned)idx, name, + (long long unsigned)len_name, type); + H5_API_RETURN (h5t_get_mtagset_info (m, idx, name, len_name, type)); +} + +/*! + Test whether tagset \c name exists. + + \param[in] m mesh + \param[out] name name of tagset to test existance + */ +static inline h5_err_t +H5FedMTagsetExists ( + h5t_mesh_t* const m, + const char name[] + ) { + H5_API_ENTER (h5_err_t, "m=%p, name=%s", m, name); + H5_API_RETURN (h5t_mtagset_exists (m, name)); +} + +/*! + Add a tagset to the current mesh. + + \param[in] m mesh to add a tagset to + \param[in] name name of tagset + \param[in] type data type of tagset + \param[out] tagset new tagset + + \return H5_SUCCESS or error code + */ +static inline h5_err_t +H5FedAddMTagset ( + h5t_mesh_t* const m, + const char name[], + const h5_id_t type, + h5t_tagset_t** tagset + ) { + H5_API_ENTER (h5_err_t, + "m=%p, name='%s', type=%lld tagset=%p", + m, name, (long long)type, tagset); + H5_API_RETURN (h5t_create_mtagset (m, name, type, tagset)); +} + +/*! + Open tagset \c name. + + \param[in] m mesh + \param[in] name name of tagset to open + \param[out] tagset open tagset + + \return H5_SUCCESS or error code + */ +static inline h5_err_t +H5FedOpenMTagset ( + h5t_mesh_t* const m, + const char name[], + h5t_tagset_t** tagset + ) { + H5_API_ENTER (h5_err_t, + "m=%p, name='%s', tagset=%p", + m, name, tagset); + H5_API_RETURN (h5t_open_mtagset (m, name, tagset)); +} + +/*! + Close tagset. + + \param[in] tagset open tagset + + \return H5_SUCCESS or error code + */ +static inline h5_err_t +H5FedCloseMTagset ( + h5t_tagset_t* tagset + ) { + H5_API_ENTER (h5_err_t, "tagset=%p", tagset); + H5_API_RETURN (h5t_close_mtagset(tagset)); +} + +/*! + Remove tagset from mesh + + \param[in] tagset tagset + \param[in] name name of tagset to remove + + \return H5_SUCCESS or error code + */ +static inline h5_err_t +H5FedRemoveMTagset ( + h5t_mesh_t* m, + const char name[] + ) { + H5_API_ENTER (h5_err_t, "m=%p, name='%s'", m, name); + H5_API_RETURN (h5t_remove_mtagset (m, name)); +} + +/*! + Set tag for entity in current mesh. + + \param[in] tagset ptr tagset + \param[in] entity_id id of entity + \param[in] size size of value + \param[in] val tag value + + \return H5_SUCCESS or error code + */ +static inline h5_err_t +H5FedSetTag ( + h5t_tagset_t* const tagset, + h5_loc_id_t entity_id, + const h5_size_t size, + void* val + ) { + H5_API_ENTER (h5_err_t, + "tagset=%p, entity_id=%lld, size=%lld, val=%p", + tagset, (long long)entity_id, (long long)size, val); + H5_API_RETURN (h5t_set_tag (tagset, entity_id, size, val)); +} + +/*! + Get tag for entity in current mesh. If entity is not tagged, return tag of + the next coarser tagged entity. The corresponding entity ID is returned. + + \param[in] tagset ptr to tagset + \param[in] entity_id id of entity to tag + \param[out] size size of value + \param[out] val tag value + + \return entity id + \return H5_ERR on error + */ +static inline h5_loc_id_t +H5FedGetTag ( + h5t_tagset_t* const tagset, + const h5_loc_id_t entity_id, + h5_size_t* size, + void* val + ) { + H5_API_ENTER (h5_err_t, + "tagset=%p, entity_id=%lld, size=%p, val=%p", + tagset, (long long)entity_id, size, val); + H5_API_RETURN (h5t_get_tag (tagset, entity_id, size, val)); +} + +/*! + Remove tag for entity in current mesh. + + \param[in] tagset ptr to tagset tagset + \param[in] entity_id id of entity from which the tag must be removed. + + \return H5_SUCCESS or error code + */ +static inline h5_err_t +H5FedRemoveMTag ( + h5t_tagset_t* const tagset, + const h5_loc_id_t entity_id + ) { + H5_API_ENTER (h5_err_t, + "tagset=%p, entity_id=%lld", + tagset, (long long)entity_id); + H5_API_RETURN (h5t_remove_tag (tagset, entity_id)); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/H5Part.h b/src/include/H5Part.h new file mode 100644 index 0000000..3e44806 --- /dev/null +++ b/src/include/H5Part.h @@ -0,0 +1,16 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5PART_H +#define __H5PART_H + +#include "H5Part_io.h" +#include "H5Part_model.h" + +#endif diff --git a/src/include/H5Part_io.h b/src/include/H5Part_io.h new file mode 100644 index 0000000..cd0fe0d --- /dev/null +++ b/src/include/H5Part_io.h @@ -0,0 +1,274 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef H5PART_IO +#define H5PART_IO + +#include "h5core/h5_types.h" +#include "h5core/h5.h" +#include "h5core/h5_debug.h" +#include "h5core/h5u_io.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + \ingroup h5part_data + + Write array of 64 bit floating point data to file. + + After setting the number of particles with \c H5PartSetNumParticles() and + the current timestep using \c H5SetStep(), you can start writing datasets + into the file. Each dataset has a name associated with it (chosen by the + user) in order to facilitate later retrieval. The name of the dataset is + specified in the parameter \c name, which must be a null-terminated string. + + There are no restrictions on naming of datasets, but it is useful to arrive + at some common naming convention when sharing data with other groups. + + The writing routines also implicitly store the datatype of the array so that + the array can be reconstructed properly on other systems with incompatible + type representations. + + All data that is written after setting the timestep is associated with that + timestep. While the number of particles can change for each timestep, you + cannot change the number of particles in the middle of a given timestep. + + The data is committed to disk before the routine returns. + + \return \c H5_SUCCESS or \c H5_FAILURE. + */ +static inline h5_err_t +H5PartWriteDataFloat64 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name to associate array with. + const h5_float64_t* data ///< [in] array to commit to disk. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', date=%p", + (h5_file_p)f, name, data); + H5_API_RETURN (h5u_write_data (f, name, (void*)data, H5T_NATIVE_DOUBLE)); +} + +/*! + \ingroup h5part_data + + Write array of 32 bit floating point data to file. + + After setting the number of particles with \c H5PartSetNumParticles() and + the current timestep using \c H5SetStep(), you can start writing datasets + into the file. Each dataset has a name associated with it (chosen by the + user) in order to facilitate later retrieval. The name of the dataset is + specified in the parameter \c name, which must be a null-terminated string. + + There are no restrictions on naming of datasets, but it is useful to arrive + at some common naming convention when sharing data with other groups. + + The writing routines also implicitly store the datatype of the array so that + the array can be reconstructed properly on other systems with incompatible + type representations. + + All data that is written after setting the timestep is associated with that + timestep. While the number of particles can change for each timestep, you + cannot change the number of particles in the middle of a given timestep. + + The data is committed to disk before the routine returns. + + \return \c H5_SUCCESS or \c H5_FAILURE. + */ +static inline h5_err_t +H5PartWriteDataFloat32 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name to associate array with. + const h5_float32_t* data ///< [in] array to commit to disk. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', date=%p", + (h5_file_p)f, name, data); + H5_API_RETURN (h5u_write_data(f, name, (void*)data, H5T_NATIVE_FLOAT)); +} + +/*! + \ingroup h5part_data + + Write array of 64 bit integer data to file. + + After setting the number of particles with \c H5PartSetNumParticles() and + the current timestep using \c H5SetStep(), you can start writing datasets + into the file. Each dataset has a name associated with it (chosen by the + user) in order to facilitate later retrieval. The name of the dataset is + specified in the parameter \c name, which must be a null-terminated string. + + There are no restrictions on naming of datasets, but it is useful to arrive + at some common naming convention when sharing data with other groups. + + The writing routines also implicitly store the datatype of the array so that + the array can be reconstructed properly on other systems with incompatible + type representations. + + All data that is written after setting the timestep is associated with that + timestep. While the number of particles can change for each timestep, you + cannot change the number of particles in the middle of a given timestep. + + The data is committed to disk before the routine returns. + + \return \c H5_SUCCESS or \c H5_FAILURE. + */ +static inline h5_err_t +H5PartWriteDataInt64 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name to associate array with. + const h5_int64_t* data ///< [in] array to commit to disk. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', date=%p", + (h5_file_p)f, name, data); + H5_API_RETURN (h5u_write_data (f, name, (void*)data, H5T_NATIVE_INT64)); +} + +/*! + \ingroup h5part_data + + Write array of 32 bit integer data to file. + + After setting the number of particles with \c H5PartSetNumParticles() and + the current timestep using \c H5SetStep(), you can start writing datasets + into the file. Each dataset has a name associated with it (chosen by the + user) in order to facilitate later retrieval. The name of the dataset is + specified in the parameter \c name, which must be a null-terminated string. + + There are no restrictions on naming of datasets, but it is useful to arrive + at some common naming convention when sharing data with other groups. + + The writing routines also implicitly store the datatype of the array so that + the array can be reconstructed properly on other systems with incompatible + type representations. + + All data that is written after setting the timestep is associated with that + timestep. While the number of particles can change for each timestep, you + cannot change the number of particles in the middle of a given timestep. + + The data is committed to disk before the routine returns. + + \return \c H5_SUCCESS or \c H5_FAILURE. + */ +static inline h5_err_t +H5PartWriteDataInt32 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name to associate array with. + const h5_int32_t* data ///< [in] array to commit to disk. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', date=%p", + (h5_file_p)f, name, data); + H5_API_RETURN (h5u_write_data (f, name, (void*)data, H5T_NATIVE_INT32)); +} + +/*! + \ingroup h5part_data + + Read array of 64 bit floating point data from file. + + When retrieving datasets from disk, you ask for them + by name. There are no restrictions on naming of arrays, + but it is useful to arrive at some common naming + convention when sharing data with other groups. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5PartReadDataFloat64 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name to associate dataset with. + h5_float64_t* data ///< [out] array of data. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', date=%p", + (h5_file_p)f, name, data); + H5_API_RETURN (h5u_read_data (f, name, data, H5T_NATIVE_DOUBLE)); +} + +/*! + \ingroup h5part_data + + Read array of 32 bit floating point data from file. + + When retrieving datasets from disk, you ask for them + by name. There are no restrictions on naming of arrays, + but it is useful to arrive at some common naming + convention when sharing data with other groups. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5PartReadDataFloat32 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name to associate dataset with. + h5_float32_t* data ///< [out] array of data. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', date=%p", + (h5_file_p)f, name, data); + H5_API_RETURN (h5u_read_data (f, name, data, H5T_NATIVE_FLOAT)); +} + +/*! + \ingroup h5part_data + + Read array of 64 bit integer data from file. + + When retrieving datasets from disk, you ask for them + by name. There are no restrictions on naming of arrays, + but it is useful to arrive at some common naming + convention when sharing data with other groups. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5PartReadDataInt64 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name to associate dataset with. + h5_int64_t* data ///< [out] array of data. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', date=%p", + (h5_file_p)f, name, data); + H5_API_RETURN (h5u_read_data (f, name, data, H5T_NATIVE_INT64)); +} + +/*! + \ingroup h5part_data + + Read array of 32 bit integer data from file. + + When retrieving datasets from disk, you ask for them + by name. There are no restrictions on naming of arrays, + but it is useful to arrive at some common naming + convention when sharing data with other groups. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5PartReadDataInt32 ( + const h5_file_t f, ///< [in] file handle. + const char* name, ///< [in] name to associate dataset with. + h5_int32_t* data ///< [out] Array of data. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', date=%p", + (h5_file_p)f, name, data); + H5_API_RETURN (h5u_read_data (f, name, data, H5T_NATIVE_INT32)); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/H5Part_model.h b/src/include/H5Part_model.h new file mode 100644 index 0000000..e749248 --- /dev/null +++ b/src/include/H5Part_model.h @@ -0,0 +1,395 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef H5PART_MODEL +#define H5PART_MODEL + +#include "h5core/h5_types.h" +#include "h5core/h5.h" +#include "h5core/h5_debug.h" +#include "h5core/h5u_model.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + \ingroup h5part_model + + Set the number of particles for the current time-step. + After you call this subroutine, all subsequent + operations will assume this number of particles will be written. + + For the parallel library, the \c nparticles value is the number of + particles that the \e individual task will write. You can use + a different value on different tasks. + This function uses an \c MPI_Allgather + call to aggregate each tasks number of particles and determine + the appropiate offsets. Because of the use of this MPI collective, + it is advisable to call this function as + few times as possible when running at large concurrency. + + This function assumes that your particles' data fields are in stored in + contiguous 1D arrays. + For instance, the fields \e x and \e y for your particles are stored + in separate arrays \c x[] and \c y[]. + + If instead you store your particles as tuples, so that the values + are arranged \f$ x_1,y_1,x_2,y_2\f$... than you need to setup striding + (in this case with value 2) using \ref H5PartSetNumParticlesStrided. + + \return \c H5_SUCCESS or \c H5_FAILURE. + */ +static inline h5_err_t +H5PartSetNumParticles ( + const h5_file_t f, ///< [in] file handle. + h5_size_t nparticles ///< [in] Number of particles. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, nparticles=%llu", + (h5_file_p)f, (long long unsigned)nparticles); + h5_size_t stride = 1; + H5_API_RETURN (h5u_set_num_particles (f, nparticles, stride)); +} + +/*! + \ingroup h5part_model + + Set the number of particles for the current time-step. + After you call this subroutine, all subsequent + operations will assume this number of particles will be written. + + For the parallel library, the \c nparticles value is the number of + particles that the \e individual task will write. You can use + a different value on different tasks. + This function uses an \c MPI_Allgather + call to aggregate each tasks number of particles and determine + the appropiate offsets. Because of the use of this MPI collective, + it is advisable to call this function as + few times as possible when running at large concurrency. + + This function assumes that your particles' data fields are + stored tuples. For instance, the fields \e x and \e y of your + particles are arranged \f$x_1,y_1,x_2,y_2\f$... in a single data + array. In this example, the stride value would be 2. + + If you instead have a separate array for each fields, + such as \c x[] and \c y[], + use \ref H5PartSetNumParticles. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5PartSetNumParticlesStrided ( + const h5_file_t f, ///< [in] file handle. + h5_size_t nparticles, ///< [in] number of particles. + h5_size_t stride ///< [in] stride value (e.g. number + ///< of fields in the particle array). + ) { + H5_API_ENTER (h5_err_t, + "f=%p, nparticles=%llu, stride=%llu", + (h5_file_p)f, (long long unsigned)nparticles, + (long long unsigned)stride); + H5_API_RETURN (h5u_set_num_particles (f, nparticles, stride)); +} + +/*! + \ingroup h5part_model + + Define the chunk \c size and enables chunking in the underlying + HDF5 layer. + + Note that this policy wastes some disk space, but can improve read and write + performance depending on the access pattern. + + On parallel filesystems that are sensitive to write alignment (e.g. lustre) + it is recommended to set a reasonable chunk size when using the MPI-POSIX + or MPI-IO independent VFDs (see \ref H5OpenFile). + + For more details about chunking, please read the HDF5 documentation. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5PartSetChunkSize ( + const h5_file_t f, ///< [in] file handle. + h5_size_t size ///< [in] chunk size. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, size=%llu", + (h5_file_p)f, (long long unsigned)size); + H5_API_RETURN (h5u_set_chunk (f, size)); +} + +/*! + \ingroup h5part_model + + Get the number of datasets that are stored at the current time-step. + + \return number of datasets in current timestep or \c H5_FAILURE. +*/ +static inline h5_ssize_t +H5PartGetNumDatasets ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_err_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5u_get_num_datasets(f)); +} + +/*! + \ingroup h5part_model + + This reads the name of a dataset specified by it's index in the current + time-step. + + If the number of datasets is \c n, the range of \c _index is \c 0 to \c n-1. + + \result \c H5_SUCCESS +*/ +static inline h5_err_t +H5PartGetDatasetName ( + const h5_file_t f, ///< [in] file handle. + const h5_id_t idx, ///< [in] index of the dataset. + char* name, ///< [out] name of dataset. + const h5_size_t len ///< [in] size of buffer \c name. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, " + "idx=%lld, " + "name='%p', len=%llu, ", + (h5_file_p)f, + (long long)idx, + name, (unsigned long long)len); + H5_API_RETURN (h5u_get_dataset_info(f, idx, name, len, NULL, NULL)); +} + +/*! + \ingroup h5part_model + + Gets the name, type and number of elements of a dataset based on its + index in the current timestep. + + Type is one of the following values: + + - \c H5_FLOAT64_T (for \c h5_float64_t) + - \c H5_FLOAT32_T (for \c h5_float32_t) + - \c H5_INT64_T (for \c h5_int64_t) + - \c H5_INT32_T (for \c h5_int32_t) + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5PartGetDatasetInfo ( + const h5_file_t f, ///< [in] file handle. + const h5_id_t idx, ///< [in] index of the dataset. + char* name, ///< [out] name of dataset. + const h5_size_t len_name, ///< [in] size of buffer \c name. + h5_int64_t* type, ///< [out] type of data in dataset. + h5_size_t* nelems ///< [out] number of elements. + ) { + H5_API_ENTER (h5_int64_t, + "f=%p, " + "idx=%lld, " + "name='%p', len_name=%llu, " + "type=%p, nelems=%p", + (h5_file_p)f, + (long long)idx, + name, (long long unsigned)len_name, + type, nelems); + H5_API_RETURN (h5u_get_dataset_info ( + f, idx, name, len_name, type, nelems)); +} + +/*! + \ingroup h5part_model + + This function returns the number of particles in this processor's view, + if a view has been set. + + If not, it returns the total number of particles across all processors + from the last \ref H5PartSetNumParticles call. + + If you have neither set the number of particles + nor set a view, then this returns the total number of + particles in the first data set of the current time step. + Note that H5Part assumes that all data sets within a given time step + have the same number of particles (although the number particles can + vary across time steps). + + If none of these conditions are met, an error is thrown. + + \return number of particles in current step. + \return \c H5_FAILURE on error. + */ +static inline h5_ssize_t +H5PartGetNumParticles ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_ssize_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5u_get_num_particles (f)); +} + +/*! + \ingroup h5part_model + + Reset the view. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5PartResetView ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_ssize_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5u_reset_view (f)); +} + +/*! + \ingroup h5part_model + + Check whether a view has been set, either automatically with + \ref H5PartSetNumParticles or manually with \ref H5PartSetView + or \ref H5PartSetViewIndices. + + \return \c 1 if view has been set. + \return \c 0 otherwise. + \return \c H5_FAILURE on error. +*/ +static inline h5_err_t +H5PartHasView ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_err_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5u_has_view (f)); +} + +/*! + \ingroup h5part_model + + For parallel I/O or for subsetting operations on the datafile, + this function allows you to define a subset of the total + particle dataset to operate on. + The concept of "view" works for both serial + and for parallel I/O. The "view" will remain in effect until a new view + is set, or the number of particles in a dataset changes, or the view is + "unset" by calling \c H5PartSetView(file,-1,-1); + + Before you set a view, \ref H5PartGetNumParticles will return the + total number of particles in the current time-step (even for the parallel + reads). However, after you set a view, it will return the number of + particles contained in the view. + + The range is \e inclusive: the end value is the last index of the + data. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5PartSetView ( + const h5_file_t f, ///< [in] file handle. + h5_int64_t start, ///< [in] start particle. + h5_int64_t end ///< [in] end particle. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, start=%lld, end=%lld", + (h5_file_p)f, (long long)start, (long long)end); + H5_API_RETURN (h5u_set_view (f, start, end)); +} + +/*! + \ingroup h5part_model + + For parallel I/O or for subsetting operations on the datafile, + this function allows you to define a subset of the total + dataset to operate on by specifying a list of indices. + The concept of "view" works for both serial + and for parallel I/O. The "view" will remain in effect until a new view + is set, or the number of particles in a dataset changes, or the view is + "unset" by calling \c H5PartSetViewIndices(NULL,0); + + When you perform a read or write on a view consisting of indices, it + is assumed that your buffer is \b unpacked, meaning that there is room + for all the intermediate values (which will not be touched by the read + or write). + + Before you set a view, the \c H5PartGetNumParticles() will return the + total number of particles in the current time-step (even for the parallel + reads). However, after you set a view, it will return the number of + particles contained in the view. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5PartSetViewIndices ( + const h5_file_t f, ///< [in] file handle. + const h5_size_t* indices, ///< [in] list of indices. + h5_size_t nelems ///< [in] size of list. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, indices=%p, nelems=%llu", + (h5_file_p)f, indices, (long long unsigned)nelems); + H5_API_RETURN (h5u_set_view_indices (f, indices, nelems)); +} + +/*! + \ingroup h5part_model + + Allows you to query the current view. Start and End + will be \c -1 if there is no current view established. + Use \c H5PartHasView() to see if the view is smaller than the + total dataset. + + \return number of elements in the view + \return \c H5_FAILURE on error +*/ +static inline h5_int64_t +H5PartGetView ( + const h5_file_t f, ///< [in] file handle. + h5_int64_t* start, ///< [out] start particle. + h5_int64_t* end ///< [out] end particle. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, start=%p, end=%p", + (h5_file_p)f, start, end); + H5_API_RETURN (h5u_get_view (f, start, end)); +} + +/*! + \ingroup h5part_model + + If it is too tedious to manually set the start and end coordinates + for a view, the \c H5SetCanonicalView() will automatically select an + appropriate domain decomposition of the data arrays for the degree + of parallelism and set the "view" accordingly. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_int64_t +H5PartSetCanonicalView ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_err_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5u_set_canonical_view (f)); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/H5_attribs.h b/src/include/H5_attribs.h new file mode 100644 index 0000000..8e76b58 --- /dev/null +++ b/src/include/H5_attribs.h @@ -0,0 +1,650 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_ATTRIBS_H +#define __H5_ATTRIBS_H + +#include + +#include "h5core/h5_types.h" +#include "h5core/h5.h" +#include "h5core/h5_debug.h" +#include "h5core/h5_attribs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*** WRITE ***/ + +/*! + \ingroup h5hut_attrib + + Write an attribute \c name with the string \c value to + the file root ("/"). + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5WriteFileAttribString ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + const char *value ///< [in] value of attribute. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', value='%s'", + (h5_file_p)f, name, value); + H5_API_RETURN (h5_write_file_attrib ( + f, + name, + H5T_NATIVE_CHAR, + value, + strlen(value) + 1 )); +} + +/*! + \ingroup h5hut_attrib + + Write an attribute \c name with the string \c value to + the current timestep. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5WriteStepAttribString ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + const char *value ///< [in] value of attribute. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', value='%s'", + (h5_file_p)f, name, value); + H5_API_RETURN (h5_write_step_attrib ( + f, + name, + H5T_NATIVE_CHAR, + value, + strlen(value) + 1 )); +} + +/*! + \ingroup h5hut_attrib + + Write an attribute \c name with float32 \c values to + the file root ("/"). + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5WriteFileAttribFloat32 ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + const h5_float32_t *values, ///< [in] values of attribute. + const h5_size_t nelems ///< [in] number of values. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', values=%p, nelems=%llu", + (h5_file_p)f, name, values, (long long unsigned)nelems); + H5_API_RETURN (h5_write_file_attrib ( + f, + name, + H5T_NATIVE_FLOAT, + values, + nelems )); +} + +/*! + \ingroup h5hut_attrib + + Write an attribute \c name with float32 \c values to + the current time step. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5WriteStepAttribFloat32 ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + const h5_float32_t *values, ///< [in] values of attribute. + const h5_size_t nelems ///< [in] number of values. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', values=%p, nelems=%llu", + (h5_file_p)f, name, values, (long long unsigned)nelems); + H5_API_RETURN (h5_write_step_attrib ( + f, + name, + H5T_NATIVE_FLOAT, + values, + nelems )); +} + +/*! + \ingroup h5hut_attrib + + Write an attribute \c name with float64 \c values to + the file root ("/"). + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5WriteFileAttribFloat64 ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + const h5_float64_t *values, ///< [in] values of attribute. + const h5_size_t nelems ///< [in] number of values. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', values=%p, nelems=%llu", + (h5_file_p)f, name, values, (long long unsigned)nelems); + H5_API_RETURN (h5_write_file_attrib ( + f, + name, + H5T_NATIVE_DOUBLE, + values, + nelems)); +} + +/*! + \ingroup h5hut_attrib + + Write an attribute \c name with float64 \c values to + the current time step. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5WriteStepAttribFloat64 ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + const h5_float64_t *values, ///< [in] values of attribute. + const h5_size_t nelems ///< [in] number of values. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', values=%p, nelems=%llu", + (h5_file_p)f, name, values, (long long unsigned)nelems); + H5_API_RETURN (h5_write_step_attrib ( + f, + name, + H5T_NATIVE_DOUBLE, + values, + nelems)); +} + +/*! + \ingroup h5hut_attrib + + Write an attribute \c name with int32 \c values to + the file root ("/"). + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5WriteFileAttribInt32 ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + const h5_int32_t *values, ///< [in] values of attribute. + const h5_size_t nelems ///< [in] number of values. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', values=%p, nelems=%llu", + (h5_file_p)f, name, values, (long long unsigned)nelems); + H5_API_RETURN (h5_write_file_attrib ( + f, + name, + H5T_NATIVE_INT32, + values, + nelems)); +} + +/*! + \ingroup h5hut_attrib + + Write an attribute \c name with int32 \c values to + the current time step. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5WriteStepAttribInt32 ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + const h5_int32_t *values, ///< [in] values of attribute. + const h5_size_t nelems ///< [in] number of values. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', values=%p, nelems=%llu", + (h5_file_p)f, name, values, (long long unsigned)nelems); + H5_API_RETURN (h5_write_step_attrib ( + f, + name, + H5T_NATIVE_INT32, + values, + nelems)); +} + +/*! + \ingroup h5hut_attrib + + Write an attribute \c name with int64 \c values to + the file root ("/"). + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5WriteFileAttribInt64 ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + const h5_int64_t *values, ///< [in] values of attribute. + const h5_size_t nelems ///< [in] number of values. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', values=%p, nelems=%llu", + (h5_file_p)f, name, values, (long long unsigned)nelems); + H5_API_RETURN (h5_write_file_attrib ( + f, + name, + H5T_NATIVE_INT64, + values, + nelems)); +} + +/*! + \ingroup h5hut_attrib + + Write an attribute \c name with int64 \c values to + the current time step. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5WriteStepAttribInt64 ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + const h5_int64_t *values, ///< [in] values of attribute. + const h5_size_t nelems ///< [in] number of values. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', values=%p, nelems=%llu", + (h5_file_p)f, name, values, (long long unsigned)nelems); + H5_API_RETURN (h5_write_step_attrib ( + f, + name, + H5T_NATIVE_INT64, + values, + nelems)); +} + +/*** READ ***/ + +/*! + \ingroup h5hut_attrib + + Read a string into a \c buffer from an attribute \c name + in the file root ("/"). + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5ReadFileAttribString ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + char *buffer ///< [out] value of attribute. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', value='%s'", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5_read_file_attrib ( + f, + name, + H5_STRING_T, + (void*)buffer)); +} + +/*! + \ingroup h5hut_attrib + + Read a string into a \c buffer from an attribute \c name + in the current timestep. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5ReadStepAttribString ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + char *buffer ///< [out] value of attribute. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', value='%s'", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5_read_step_attrib ( + f, + name, + H5_STRING_T, + (void*)buffer)); +} + +/*! + \ingroup h5hut_attrib + + Read int32 values into a \c buffer from an attribute \c name + in the file root ("/"). + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5ReadFileAttribInt32 ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + h5_int32_t *buffer ///< [out] values of attribute. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5_read_file_attrib ( + f, + name, + H5_INT32_T, + (void*)buffer)); +} + +/*! + \ingroup h5hut_attrib + + Read int32 values into a \c buffer from an attribute \c name + in the current time step. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5ReadStepAttribInt32 ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + h5_int32_t *buffer ///< [out] values of attribute. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5_read_step_attrib ( + f, + name, + H5_INT32_T, + (void*)buffer)); +} + +/*! + \ingroup h5hut_attrib + + Read int64 values into a \c buffer from an attribute \c name + in the file root ("/"). + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5ReadFileAttribInt64 ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + h5_int64_t *buffer ///< [out] values of attribute. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5_read_file_attrib ( + f, + name, + H5_INT64_T, + (void*)buffer)); +} + +/*! + \ingroup h5hut_attrib + + Read int64 values into a \c buffer from an attribute \c name + in the current time step. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5ReadStepAttribInt64 ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + h5_int64_t *buffer ///< [out] values of attribute. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p", + (h5_file_p)f, name, buffer); + h5_err_t h5err = h5_read_step_attrib ( + f, + name, + H5_INT64_T, + (void*)buffer); + H5_API_RETURN (h5err); +} + +/*! + \ingroup h5hut_attrib + + Read float32 values into a \c buffer from an attribute \c name + in the file root ("/"). + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5ReadFileAttribFloat32 ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + h5_float32_t *buffer ///< [out] values of attribute. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5_read_file_attrib ( + f, + name, + H5_FLOAT32_T, + (void*)buffer)); +} + +/*! + \ingroup h5hut_attrib + + Read float32 values into a \c buffer from an attribute \c name + in the current time step. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5ReadStepAttribFloat32 ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + h5_float32_t *buffer ///< [out] values of attribute. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5_read_step_attrib ( + f, + name, + H5_FLOAT32_T, + (void*)buffer)); +} + +/*! + \ingroup h5hut_attrib + + Read float64 values into a \c buffer from an attribute \c name + in the file root ("/"). + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5ReadFileAttribFloat64 ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + h5_float64_t *buffer ///< [out] values of attribute. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5_read_file_attrib ( + f, + name, + H5_FLOAT64_T, + (void*)buffer)); +} + +/*! + \ingroup h5hut_attrib + + Read float64 values into a \c buffer from an attribute \c name + in the current time step. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5ReadStepAttribFloat64 ( + const h5_file_t f, ///< [in] file handle. + const char *name, ///< [in] name of attribute to create. + h5_float64_t *buffer ///< [out] values of attribute. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', buffer=%p", + (h5_file_p)f, name, buffer); + H5_API_RETURN (h5_read_step_attrib ( + f, + name, + H5_FLOAT64_T, + (void*)buffer)); +} + +/*** QUERY ***/ + +/*! + \ingroup h5hut_attrib + + Gets the number of attributes in the file's root ("/"). + + \return Number of attributes or \c H5_FAILURE.. +*/ +static inline h5_int64_t +H5GetNumFileAttribs ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_int64_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5_get_num_file_attribs (f)); +} + +/*! + \ingroup h5hut_attrib + + Gets the number of attributes bound to the current step. + + \return Number of attributes or \c H5_FAILURE.. +*/ +static inline h5_int64_t +H5GetNumStepAttribs ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_int64_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5_get_num_step_attribs (f)); +} + + +/*! + \ingroup h5hut_attrib + + Gets the name, type and number of elements of the file attribute + specified by its index. + + This function can be used to retrieve all attributes bound to the + file \c f by looping from \c 0 to the number of attribute minus + one. The number of attributes bound to file \c f can be queried + by calling \ref H5GetNumFileAttribs. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ + +static inline h5_err_t +H5GetFileAttribInfo ( + const h5_file_t f, ///< [in] file handle. + const h5_size_t idx, ///< [in] index of attribute to query + char* name, ///< [out] name of attribute. + const h5_size_t len_name, ///< [in] length of buffer \c name. + h5_int64_t* type, ///< [out] type of value.. + h5_size_t* nelems ///< [out] number of elements. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, " + "idx=%llu, name=%p, len_name=%llu, " + "type=%p, nelems=%p", + (h5_file_p)f, + (long long unsigned)idx, + name, + (long long unsigned)len_name, + type, + nelems); + H5_API_RETURN (h5_get_file_attrib_info ( + f, + idx, + name, len_name, + type, + nelems)); +} + +/*! + \ingroup h5hut_attrib + + Gets the name, type and number of elements of the step attribute + specified by its index. + + This function can be used to retrieve all attributes bound to the + current time-step by looping from \c 0 to the number of attribute + minus one. The number of attributes bound to the current + time-step can be queried by calling \ref H5GetNumStepAttribs. + + \return \c H5_SUCCESS or \c H5_FAILURE. +*/ +static inline h5_err_t +H5GetStepAttribInfo ( + const h5_file_t f, ///< [in] file handle. + const h5_size_t idx, ///< [in] index of attribute to query + char* name, ///< [out] name of attribute. + const h5_size_t len_name, ///< [in] length of buffer \c name. + h5_int64_t* type, ///< [out] type of value.. + h5_size_t* nelems ///< [out] number of elements. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, " + "idx=%llu, name=%p, len_name=%llu, " + "type=%p, nelems=%p", + (h5_file_p)f, + (long long unsigned)idx, + name, + (long long unsigned)len_name, + type, + nelems); + H5_API_RETURN (h5_get_step_attrib_info ( + f, + idx, + name, + len_name, + type, + nelems)); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/H5_model.h b/src/include/H5_model.h new file mode 100644 index 0000000..8018d3a --- /dev/null +++ b/src/include/H5_model.h @@ -0,0 +1,314 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5_MODEL_H +#define __H5_MODEL_H + +#include "h5core/h5_types.h" +#include "h5core/h5.h" +#include "h5core/h5_debug.h" +#include "h5core/h5_model.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + \ingroup h5hut_model + + Define format of the step names. + + Example: ==H5SetStepNameFormat( f, "Step", 6 )== defines step names + like ==Step#000042==. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5SetStepNameFormat ( + const h5_file_t f, ///< [in] file handle + const char* name, ///< [in] prefix, defaults to \c Step + const h5_int64_t width ///< [in] width of step number + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name='%s', width=%lld", + (h5_file_p)f, name, (long long) width); + H5_API_RETURN (h5_set_stepname_fmt (f, name, width)); +} + +/*! + \ingroup h5hut_model + + Get format of the step names. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5GetStepNameFormat ( + const h5_file_t f, ///< [in] file handle + char* name, ///< [out] prefix + const h5_size_t l_name, ///< [in] length of buffer name + int* width ///< [out] width of step number + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name=%p, l_name=%llu, width=%p", + (h5_file_p)f, name, (unsigned long long)l_name, width); + H5_API_RETURN (h5_get_stepname_fmt (f, name, l_name, width)); +} + +/*! + \ingroup h5hut_model + + Set the current step. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5SetStep ( + const h5_file_t f, ///< [in] file handle. + const h5_id_t step ///< [in] step to set. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, step=%lld", + (h5_file_p)f, (long long)step); + H5_API_RETURN (h5_set_step (f, step)); +} + +/*! + \ingroup h5hut_model + + Get current step. + + \return Step index + \return H5_FAILURE on error +*/ +static inline h5_id_t +H5GetStep ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_err_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5_get_step (f)); +} + +/*! + \ingroup h5hut_model + + Get the number of processors. + + \return Number of processors. + \return \c H5_FAILURE on error. + */ +static inline int +H5GetNumProcs ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_err_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5_get_num_procs(f)); +} + +/*! + \ingroup h5hut_model + + Get the number of time-steps that are currently stored in the file + \c f. + + It works for both reading and writing of files, but is probably + only typically used when you are reading. + + \return Number of time-steps + \return \c H5_FAILURE on error. +*/ +static inline h5_ssize_t +H5GetNumSteps ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_err_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5_get_num_steps(f)); +} + +/*! + \ingroup h5hut_model + + Query whether a particular step already exists in the file. + + \return \c 1 if step exists + \return \c 0 if step does not exist + \return \c H5_FAILURE on error +*/ +static inline h5_err_t +H5HasStep ( + const h5_file_t f, ///< [in] file handle. + h5_id_t stepno ///< [in] step number to query for existence. + ) { + H5_API_ENTER (h5_err_t, + "f=%p, stepno=%lld", + (h5_file_p)f, (long long)stepno); + H5_API_RETURN (h5_has_step (f, stepno)); +} + +/*! + \ingroup h5hut_model + + Start traversing steps. + + \note This function is not yet implemented! + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5StartTraverseSteps ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_err_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5_start_traverse_steps (f)); +} + +/*! + \ingroup h5hut_model + + Go to next step. + + \note This function is not yet implemented! + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5TraverseSteps ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_err_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5_traverse_steps (f)); +} + +/*! + \ingroup h5hut_model + + Return number of attached files. + + \return number of attachments. + \return \c H5_FAILURE on error. +*/ +static inline h5_ssize_t +H5GetNumAttachments ( + const h5_file_t f ///< [in] file handle. + ) { + H5_API_ENTER (h5_ssize_t, + "f=%p", + (h5_file_p)f); + H5_API_RETURN (h5_get_num_attachments (f)); +} + +/*! + \ingroup h5hut_model + + Get name and size of attachment given by index \c idx. Return the file name + in \c fname and the original size in \c fsize. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5GetAttachmentInfoByIdx ( + const h5_file_t f, ///< [in] file handle. + const h5_size_t idx, ///< [in] index of attachment to be queried. + char* const fname, ///< [out] original file name. + h5_size_t len_fname, ///< [in] max length of file name. + h5_size_t* const fsize ///< [out] size of original file. + ) { + H5_API_ENTER (h5_err_t, + "idx=%llu, fname=%p, len_fname=%llu, fsize=%p", + (long long unsigned)idx, + fname, (long long unsigned)len_fname, + fsize); + H5_API_RETURN (h5_get_attachment_info_by_idx ( + f, idx, fname, len_fname, fsize)); +} + +/*! + \ingroup h5hut_model + + Get size of attached file with name \c fname. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5GetAttachmentInfoByName ( + const h5_file_t f, ///< [in] file handle. + char* const fname, ///< [in] original file name. + h5_size_t* const fsize ///< [out] size of original file. + ) { + H5_API_ENTER (h5_err_t, "fname='%s', fsize=%p", fname, fsize); + H5_API_RETURN (h5_get_attachment_info_by_name ( + f, fname, fsize)); +} + +/*! + \ingroup h5hut_model + + Attach file \c fname. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5AddAttachment ( + const h5_file_t f, ///< [in] file handle. + const char* fname ///< [in] name of file to attach. + ) { + H5_API_ENTER (h5_err_t, "fname='%s'", fname); + H5_API_RETURN (h5_add_attachment (f, fname)); +} + +/*! + \ingroup h5hut_model + + Get attachment \c fname from H5hut file and write it to disk in + the current working directory. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5GetAttachment ( + const h5_file_t f, ///< [in] file handle. + const char* fname ///< [in] name of attachment. + ) { + H5_API_ENTER (h5_err_t, "fname='%s'", fname); + H5_API_RETURN (h5_get_attachment (f, fname)); +} + +/*! + \ingroup h5hut_model + + Delete attachment \c fname. + + \return \c H5_SUCCESS or \c H5_FAILURE +*/ +static inline h5_err_t +H5DeleteAttachment ( + const h5_file_t f, ///< [in] file handle. + const char* const fname ///< [in] name of attachment. + ) { + H5_API_ENTER (h5_err_t, "fname='%s'", fname); + H5_API_RETURN (h5_delete_attachment (f, fname)); +} + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/src/include/H5hut.h b/src/include/H5hut.h new file mode 100644 index 0000000..cc46e53 --- /dev/null +++ b/src/include/H5hut.h @@ -0,0 +1,18 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5HUT_H +#define __H5HUT_H + +#include "H5.h" +#include "H5Part.h" +#include "H5Block.h" +#include "H5Fed.h" + +#endif diff --git a/src/include/Makefile.am b/src/include/Makefile.am new file mode 100644 index 0000000..bbeca23 --- /dev/null +++ b/src/include/Makefile.am @@ -0,0 +1,29 @@ +# src/C level Makefile.am + +# Header files that I wish to install in $(prefix)/include +include_HEADERS = \ + ../include/h5core/h5.h \ + ../include/h5core/h5_attribs.h \ + ../include/h5core/h5_debug.h \ + ../include/h5core/h5_errorhandling.h \ + ../include/h5core/h5_model.h \ + ../include/h5core/h5_syscall.h \ + ../include/h5core/h5_types.h \ + ../include/h5core/h5b_attribs.h \ + ../include/h5core/h5b_model.h \ + ../include/h5core/h5b_io.h \ + ../include/h5core/h5t_adjacencies.h \ + ../include/h5core/h5t_map.h \ + ../include/h5core/h5t_model.h \ + ../include/h5core/h5t_retrieve.h \ + ../include/h5core/h5t_store.h \ + ../include/h5core/h5t_tags.h \ + ../include/h5core/h5u_model.h \ + ../include/h5core/h5u_io.h + +# Listing of all possible headers that I may include +EXTRA_HEADERS = + +clean-local: + $(RM) *~ + $(RM) h5core/*~ diff --git a/src/include/h5core/h5.h b/src/include/h5core/h5.h new file mode 100644 index 0000000..27f7fff --- /dev/null +++ b/src/include/h5core/h5.h @@ -0,0 +1,123 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5_H +#define __H5CORE_H5_H + +#include "h5core/h5_types.h" +#include + +#define UNUSED_ARGUMENT(x) (void)x + + +#ifdef __cplusplus +extern "C" { +#endif + +extern int h5_initialized; + +h5_err_t +h5_initialize (void); + +hid_t +h5_get_hdf5_file( + const h5_file_t); + +h5_prop_t +h5_create_prop ( + const h5_int64_t); + +h5_err_t +h5_set_prop_file_throttle ( + h5_prop_t, const h5_int64_t); + +h5_err_t +h5_set_prop_file_align ( + h5_prop_t, const h5_int64_t); + +h5_err_t +h5_set_prop_file_mpio ( + h5_prop_t, MPI_Comm* const); + +h5_err_t +h5_close_prop ( + h5_prop_t); + +h5_file_t +h5_open_file ( + const char*, const h5_int32_t, MPI_Comm, const h5_size_t); + +h5_file_t +h5_open_file2 ( + const char*, const h5_int32_t, h5_prop_t prop); + +h5_err_t +h5_check_filehandle ( + const h5_file_t); + +h5_err_t +h5_close_file ( + const h5_file_t); + +h5_err_t +h5_close_hdf5 ( + void); + + +h5_err_t +h5_flush_step ( + const h5_file_t); + +h5_err_t +h5_flush_file ( + const h5_file_t); + +h5_err_t +h5_set_stepname_fmt ( + const h5_file_t, const char*, const int); + +h5_err_t +h5_get_stepname_fmt ( + const h5_file_t, char* const, const int, int* const); + +int +h5_get_num_procs ( + const h5_file_t); + +h5_ssize_t +h5_get_num_steps ( + const h5_file_t); + +h5_int64_t +h5_has_step ( + const h5_file_t, const h5_int64_t); + +h5_int64_t +h5_get_step ( + const h5_file_t); + +h5_err_t +h5_start_traverse_steps ( + const h5_file_t); + +h5_err_t +h5_traverse_steps ( + const h5_file_t); + +h5_err_t +h5_set_throttle ( + h5_file_t f, + int factor + ); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/h5core/h5_attribs.h b/src/include/h5core/h5_attribs.h new file mode 100644 index 0000000..8fd752c --- /dev/null +++ b/src/include/h5core/h5_attribs.h @@ -0,0 +1,57 @@ +/* + Copyright (c) 2006-2012, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5_ATTRIBS_H +#define __H5CORE_H5_ATTRIBS_H + +#include "h5core/h5_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +h5_err_t +h5_read_file_attrib ( + const h5_file_t, const char*, const hid_t, void*); + +h5_err_t +h5_read_step_attrib ( + const h5_file_t, const char*, const hid_t, void*); + +h5_err_t +h5_write_file_attrib ( + const h5_file_t, const char*, const hid_t, const void*, const hsize_t); + +h5_err_t +h5_write_step_attrib ( + const h5_file_t, const char*, const hid_t, const void*, const hsize_t); + +h5_err_t +h5_get_file_attrib_info ( + const h5_file_t, const h5_size_t, char*, const h5_size_t, h5_int64_t* const, + h5_size_t*); + +h5_err_t +h5_get_step_attrib_info ( + const h5_file_t, const h5_size_t, char*, const h5_size_t, h5_int64_t*, + h5_size_t*); + +h5_ssize_t +h5_get_num_file_attribs ( + const h5_file_t); + +h5_ssize_t +h5_get_num_step_attribs ( + const h5_file_t); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/h5core/h5_debug.h b/src/include/h5core/h5_debug.h new file mode 100644 index 0000000..f4cf82a --- /dev/null +++ b/src/include/h5core/h5_debug.h @@ -0,0 +1,142 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5_DEBUG_H +#define __H5CORE_H5_DEBUG_H + +#include "h5core/h5_types.h" +#include "h5core/h5_errorhandling.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define H5_DEBUG_USER (1<<2) +#define H5_DEBUG_API (1<<3) +#define H5_DEBUG_CORE_API (1<<4) +#define H5_DEBUG_PRIV_API (1<<5) +#define H5_DEBUG_PRIV_FUNC (1<<6) +#define H5_DEBUG_HDF5 (1<<7) +#define H5_DEBUG_MPI (1<<8) +#define H5_DEBUG_MALLOC (1<<9) +#define H5_DEBUG_CLIB (1<<10) + +#define H5_DEBUG_ALL (-1) + +extern char* h5_rfmts[]; + +////////////////////////////////////////////////////////////////////////////// +// function enter macro +#if defined(NDEBUG) + +#define __API_ENTER(type, mask, fmt, ...) \ + h5_call_stack_init (__func__,e_##type); \ + type ret_value = (type)H5_ERR; + +#define __FUNC_ENTER(type, mask, fmt, ...) \ + type ret_value = (type)H5_ERR; + +#else // NDEBUG not defined + +#define __API_ENTER(type, mask, fmt, ...) \ + h5_call_stack_push (__func__,e_##type); \ + type ret_value = (type)H5_ERR; \ + if (h5_debug_level & mask ) { \ + h5_debug ("(" fmt ")", __VA_ARGS__); \ + } + +#define __FUNC_ENTER(type, mask, fmt, ...) \ + type ret_value = (type)H5_ERR; \ + if (h5_debug_level & mask ) { \ + h5_call_stack_push (__func__,e_##type); \ + h5_debug ("(" fmt ")", __VA_ARGS__); \ + } \ + +#endif +// +////////////////////////////////////////////////////////////////////////////// + +#define __API_LEAVE(expr) { \ + ret_value = expr; \ + goto done; \ + } + +#define __FUNC_LEAVE(expr) { \ + ret_value = expr; \ + goto done; \ +} + +////////////////////////////////////////////////////////////////////////////// +// function return macro +#if defined(NDEBUG) + +#define __API_RETURN(expr, mask) \ + ret_value = expr; \ + goto done; \ +done: \ + h5_call_stack_reset (); \ + return ret_value; + +#define __FUNC_RETURN(expr, mask) \ + ret_value = expr; \ + goto done; \ +done: \ + return ret_value; + +#else // NDEBUG not defined + +#define __API_RETURN(expr, mask) \ + ret_value = expr; \ + goto done; \ +done: \ + if (h5_debug_level & mask ) { \ + char fmt[256]; \ + snprintf (fmt, sizeof(fmt), "return: %s", \ + h5_rfmts[h5_call_stack_get_type()]); \ + h5_debug (fmt, ret_value); \ + } \ + h5_call_stack_reset (); \ + return ret_value; + +#define __FUNC_RETURN(expr, mask) \ + ret_value = expr; \ + goto done; \ +done: \ + if (h5_debug_level & mask ) { \ + char fmt[256]; \ + snprintf (fmt, sizeof(fmt), "return: %s", \ + h5_rfmts[h5_call_stack_get_type()]); \ + h5_debug (fmt, ret_value); \ + h5_call_stack_pop(); \ + } \ + return ret_value; + +#endif +// +////////////////////////////////////////////////////////////////////////////// + +#define H5_API_ENTER(type, fmt, ...) \ + if (!h5_initialized) { \ + h5_initialize(); \ + } \ + __API_ENTER(type, H5_DEBUG_API, fmt, __VA_ARGS__) +#define H5_API_LEAVE(expr) __API_LEAVE(expr) +#define H5_API_RETURN(expr) __API_RETURN(expr, H5_DEBUG_API); + + +#define TRY( func ) \ + if ((int64_t)(ptrdiff_t)(func) <= (int64_t)H5_ERR) { \ + goto done; \ + } + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/h5core/h5_errorhandling.h b/src/include/h5core/h5_errorhandling.h new file mode 100644 index 0000000..9e3881b --- /dev/null +++ b/src/include/h5core/h5_errorhandling.h @@ -0,0 +1,321 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5_ERRORHANDLING_H +#define __H5CORE_H5_ERRORHANDLING_H + +#include +#include +#include "h5core/h5_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + \addtogroup h5hut_error + @{ +*/ + +#define H5_SUCCESS 0 ///< Function performs successfully +#define H5_OK H5_SUCCESS ///< Alias for \c H5_SUCCESS +#define H5_NOK -1 ///< +#define H5_FAILURE -2 ///< Function runs into an error +#define H5_ERR H5_FAILURE ///< Alias for H5_FAILURE + +#define H5_ERR_BADF -9 ///< Something is wrong with the file handle. +#define H5_ERR_NOMEM -12 ///< Out of memory. +#define H5_ERR_INVAL -22 ///< Invalid argument. + +#define H5_ERR_VIEW -100 ///< Something is wrong with the view. +#define H5_ERR_NOENTRY -101 ///< A lookup failed. + +#define H5_ERR_MPI -201 ///< A MPI error occured. +#define H5_ERR_HDF5 -202 ///< A HDF5 error occured. +#define H5_ERR_H5 -203 ///< Unspecified error in H5 module. +#define H5_ERR_H5PART -204 ///< Unspecified error in H5Part module. +#define H5_ERR_H5BLOCK -205 ///< Unspecified error in H5Block module. +#define H5_ERR_H5FED -206 ///< Unspecified error in H5Fed module. + +#define H5_ERR_INTERNAL -253 ///< Internal error. +#define H5_ERR_NOT_IMPLEMENTED -254 ///< Function not yet implemented. + +/** @}*/ + +enum h5_rtypes { + e_int = 0, + e_ssize_t, + e_char_p, + e_void_p, + e_h5_err_t, + e_h5_int64_t, + e_h5_id_t, + e_h5_ssize_t, + e_h5_errorhandler_t, + e_h5_file_p, + e_h5_file_t, + e_h5_lvl_idx_t, + e_h5t_iterator_p, + e_h5_loc_id_t, + e_h5_loc_idx_t, + e_hid_t, + e_H5O_type_t, + e_h5_glb_elem_p, + e_h5_prop_p, + e_h5_prop_t, + e_h5_prop_file_p, + e_h5_prop_file_t, + e_herr_t +}; + +struct call_stack_entry { + char* name; + enum h5_rtypes type; +}; + +struct call_stack { + int level; + struct call_stack_entry entry[1024]; +}; + +extern h5_int32_t h5_debug_level; +extern struct call_stack h5_call_stack; +extern h5_err_t h5_errno; + +#define h5_error_not_implemented() \ + h5_error( \ + H5_ERR_NOT_IMPLEMENTED, \ + "%s: Function '%s', line %d not yet implemented!", \ + __FILE__, __func__, __LINE__); + +#define h5_error_internal() \ + h5_error( \ + H5_ERR_INTERNAL, \ + "%s: Internal error: %s line %d!", \ + __FILE__, __func__, __LINE__) + + +h5_err_t +h5_set_debuglevel ( + const h5_id_t); + +h5_err_t +h5_get_debuglevel ( + void); + +h5_err_t +h5_set_errorhandler ( + const h5_errorhandler_t); + +h5_errorhandler_t +h5_get_errorhandler ( + void); + +h5_err_t +h5_get_errno ( + void); + +void +h5_set_errno ( + const h5_err_t); + +static inline void +h5_call_stack_init ( + const char* fname, + enum h5_rtypes type + ) { + h5_call_stack.level = 0; + h5_call_stack.entry[0].name = (char *)fname; + h5_call_stack.entry[0].type = type; +} + +static inline void +h5_call_stack_push ( + const char* fname, + enum h5_rtypes type + ) { + h5_call_stack.entry[h5_call_stack.level].name = (char *)fname; + h5_call_stack.entry[h5_call_stack.level].type = type; + h5_call_stack.level++; +} + +static inline const char* +h5_call_stack_pop ( + void + ) { + return h5_call_stack.entry[--h5_call_stack.level].name; +} + +static inline const char* +h5_call_stack_get_name ( + void + ) { + return h5_call_stack.entry[h5_call_stack.level-1].name; +} + +static inline const char* +h5_get_funcname ( + void + ) { + return h5_call_stack.entry[0].name; +} + +static inline enum h5_rtypes +h5_call_stack_get_type ( + void + ) { + return h5_call_stack.entry[h5_call_stack.level-1].type; +} + +static inline int +h5_call_stack_get_level ( + void + ) { + return h5_call_stack.level; +} + +static inline const char* +h5_call_stack_reset ( + void + ) { + h5_call_stack.level = 0; + return h5_call_stack.entry[0].name; +} + +h5_err_t +h5_report_errorhandler ( + const char *fmt, + va_list ap + ); + +h5_err_t +h5_abort_errorhandler ( + const char *fmt, + va_list ap + ); + +void +h5priv_vprintf ( + FILE* f, + const char* prefix, + const char* __funcname, + const char* fmt, + va_list ap + ); + +h5_err_t +h5_error ( + const h5_err_t error_no, + const char *fmt, + ... + ) +#ifdef __GNUC__ +__attribute__ ((format (printf, 2, 3))) +#endif +; + +void +h5_verror ( + const char* fmt, + va_list ap + ); + +/*! + \ingroup h5_core_errorhandling + + Print a warning message to \c stderr. + */ + +static inline h5_err_t +h5_warn ( + const char *fmt, + ... + ) +#ifdef __GNUC__ +__attribute__ ((format (printf, 1, 2))) +#endif +; +static inline h5_err_t +h5_warn ( + const char* fmt, + ... + ) { + if (h5_debug_level >= 2) { + va_list ap; + va_start (ap, fmt); + h5priv_vprintf (stderr, "W", h5_get_funcname(), fmt, ap); + va_end (ap); + } + return H5_NOK; +} + +/*! + \ingroup h5_core_errorhandling + + Print an informational message to \c stdout. + */ +static inline void +h5_info ( + const char *fmt, + ... + ) +#ifdef __GNUC__ +__attribute__ ((format (printf, 1, 2))) +#endif +; +static inline void +h5_info ( + const char* fmt, + ... + ) { + if (h5_debug_level >= 3) { + va_list ap; + va_start (ap, fmt); + h5priv_vprintf (stdout, "I", h5_get_funcname(), fmt, ap); + va_end (ap); + } +} + +/*! + \ingroup h5_core_errorhandling + + Print a debug message to \c stdout. + */ +static inline void +h5_debug ( + const char *fmt, + ... + ) +#ifdef __GNUC__ +__attribute__ ((format (printf, 1, 2))) +#endif +; + +static inline void +h5_debug ( + const char *fmt, + ... + ) { + if (h5_debug_level >= 4) { + char prefix[1024]; + snprintf (prefix, sizeof(prefix), "%*s %s", + h5_call_stack_get_level(), "", + h5_call_stack_get_name()); + va_list ap; + va_start (ap, fmt); + h5priv_vprintf (stdout, "D", prefix, fmt, ap); + va_end (ap); + } +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/h5core/h5_model.h b/src/include/h5core/h5_model.h new file mode 100644 index 0000000..9683680 --- /dev/null +++ b/src/include/h5core/h5_model.h @@ -0,0 +1,55 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5_MODEL +#define __H5CORE_H5_MODEL + +#include "h5core/h5_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +h5_int64_t +h5_set_step ( + const h5_file_t, const h5_int64_t); + +h5_err_t +h5_add_attachment ( + const h5_file_t, const char* const); + +h5_ssize_t +h5_get_num_attachments ( + const h5_file_t); + +h5_err_t +h5_get_attachment_info_by_idx ( + const h5_file_t, const h5_size_t, char* const, h5_size_t, h5_size_t* const); + +h5_err_t +h5_get_attachment_info_by_name ( + const h5_file_t, const char* const, h5_size_t* const); + +h5_err_t +h5_get_attachment ( + const h5_file_t, const char* const); + +h5_err_t +h5_delete_attachment ( + const h5_file_t, const char* const); + + +#ifdef __cplusplus +} +#endif +extern int dont_use_parmetis; // Warning bad style! used for switching without makro and recompiling... +extern int max_num_elems_p_chunk; // used for switching chunksize without recompiling +extern int preferred_direction; // DITO used for choosing direction without recompiling + +#endif diff --git a/src/include/h5core/h5_syscall.h b/src/include/h5core/h5_syscall.h new file mode 100644 index 0000000..b76eab3 --- /dev/null +++ b/src/include/h5core/h5_syscall.h @@ -0,0 +1,97 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5_SYSCALL_H +#define __H5CORE_H5_SYSCALL_H + +#include +#include + +#include "h5core/h5_types.h" +#include "h5core/h5_debug.h" +#include "h5core/h5_errorhandling.h" + +#define MALLOC_WRAPPER_ENTER(type, fmt, ...) \ + __FUNC_ENTER(type, H5_DEBUG_MALLOC, fmt, __VA_ARGS__) +#define MALLOC_WRAPPER_LEAVE(value) __FUNC_LEAVE(value) +#define MALLOC_WRAPPER_RETURN(value) __FUNC_RETURN(value, H5_DEBUG_MALLOC) + +#ifdef __cplusplus +extern "C" { +#endif + + +static inline h5_err_t +h5_free ( + void* ptr + ) { + MALLOC_WRAPPER_ENTER (h5_err_t, "ptr=%p", ptr); + if (ptr) { + free (ptr); + } + MALLOC_WRAPPER_RETURN (H5_SUCCESS); +} + + +static inline void_p +h5_alloc ( + void* ptr, + const size_t size + ) { + MALLOC_WRAPPER_ENTER (void_p, "ptr=%p, size=%lu", ptr, size); + if (size < 1) { + ret_value = (void_p) h5_free (ptr); + MALLOC_WRAPPER_LEAVE (NULL); + } + ptr = realloc (ptr, size); + if (ptr == NULL) { + MALLOC_WRAPPER_LEAVE ( + (void_p)h5_error (H5_ERR_NOMEM, "Out of memory. Tried to alloc %lld", (long long int)size)); + } + MALLOC_WRAPPER_RETURN (ptr); +} + +static inline void_p +h5_calloc ( + const size_t count, + const size_t size + ) { + MALLOC_WRAPPER_ENTER (void_p, "count=%zu , size=%zu", count, size); + void* ptr = NULL; + if (count * size < 1) { + MALLOC_WRAPPER_LEAVE (ptr); + } + ptr = calloc (count, size); + if (ptr == NULL) { + MALLOC_WRAPPER_LEAVE ( + (void_p)h5_error (H5_ERR_NOMEM, "Out of memory. Tried to alloc %lld", (long long int)count* size)); + } + MALLOC_WRAPPER_RETURN (ptr); +} + + +static inline char_p +h5_strdup ( + const char* s1 + ) { + MALLOC_WRAPPER_ENTER (char_p, "s='%s'", s1); + + char_p s2 = (char_p)h5_calloc (1, strlen (s1)+1 ); + if (s2 == NULL) { + MALLOC_WRAPPER_LEAVE ( + (char_p)h5_error (H5_ERR_NOMEM, "Out of memory.")); + } + MALLOC_WRAPPER_RETURN (strcpy (s2, s1)); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/h5core/h5_types.h b/src/include/h5core/h5_types.h new file mode 100644 index 0000000..4afc977 --- /dev/null +++ b/src/include/h5core/h5_types.h @@ -0,0 +1,162 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5_TYPES_H +#define __H5CORE_H5_TYPES_H + +//#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + file modes: + H5_O_RDONLY: only reading allowed + H5_O_WRONLY: create new file, dataset must not exist + H5_O_APPEND: allows to append a new datasets to an existing file + H5_O_RDWR: dataset may exist + */ + +#define H5_O_RDWR 0x001 +#define H5_O_RDONLY 0x002 +#define H5_O_WRONLY 0x004 +#define H5_O_APPEND 0x008 + +#define H5_VFD_MPIPOSIX 0x00000010 +#define H5_VFD_MPIIO_IND 0x00000020 +#define H5_VFD_CORE 0x00000040 + +#define H5_FLUSH_FILE 0x040 +#define H5_FLUSH_STEP 0x080 +#define H5_FLUSH_DATASET 0x100 + +#define H5_FS_LUSTRE 0x200 + +#define H5_ID_T H5T_NATIVE_INT64 +#define H5_FLOAT64_T H5T_NATIVE_DOUBLE +#define H5_FLOAT32_T H5T_NATIVE_FLOAT +#define H5_INT64_T H5T_NATIVE_INT64 +#define H5_INT32_T H5T_NATIVE_INT32 +#define H5_INT16_T H5T_NATIVE_INT16 +#define H5_UINT16_T H5T_NATIVE_UINT16 +#define H5_STRING_T H5T_NATIVE_CHAR +#define H5_COMPOUND_T H5T_COMPOUND + +#define H5_VER_STRING "2.0.0" + +extern const char * const H5_O_MODES[]; + +#ifdef WIN32 +typedef __int64 int64_t; +#endif /* WIN32 */ + +typedef int64_t h5_int64_t; +typedef int32_t h5_int32_t; +typedef uint64_t h5_uint64_t; +typedef uint32_t h5_uint32_t; +typedef int64_t h5_id_t; +typedef int16_t h5_lvl_idx_t; +typedef int64_t h5_glb_idx_t; // type for a global index +typedef int64_t h5_glb_id_t; // type for a global ID + +#if defined(USE_LARGE_INDICES) +typedef int64_t h5_loc_idx_t; // type for a local index +typedef int64_t h5_loc_id_t; // type for a local ID +#else +typedef int32_t h5_loc_idx_t; // type for a local index +typedef int32_t h5_loc_id_t; // type for a local ID +#endif + +typedef int32_t h5_chk_idx_t; // type for a chunk index + +typedef uint64_t h5_size_t; // size in number of elements +typedef int64_t h5_ssize_t; // size in number of elements */ +typedef int64_t h5_err_t; +typedef int64_t h5_chk_weight_t;// type for a chunk weight +typedef uint16_t h5_chk_size_t; // type for number of elements in chunk +typedef int32_t h5_weight_t; // type for weights +typedef double h5_time_t; // type for storing a time + +typedef char* char_p; +typedef void* void_p; +typedef double h5_float64_t; +typedef float h5_float32_t; + +typedef struct h5_complex { + h5_float64_t r,i; +} h5_complex_t; + +typedef h5_float64_t h5_coord3d_t[3]; + +struct h5_prop; +typedef struct h5_prop* h5_prop_p; +typedef uintptr_t h5_prop_t; + +struct h5_prop_file; +typedef struct h5_prop_file* h5_prop_file_p; + +struct h5_file; +typedef struct h5_file* h5_file_p; +typedef uintptr_t h5_file_t; + +struct h5t_mesh; +typedef struct h5t_mesh h5t_mesh_t; +typedef h5t_mesh_t* h5t_mesh_p; + +typedef h5_err_t (*h5_errorhandler_t)( + const char*, + va_list ap ); + +#ifndef PARALLEL_IO +typedef int MPI_Comm; +typedef int MPI_Datatype; +#endif + +typedef struct h5_loc_idlist { + int32_t size; /* allocated space in number of items */ + int32_t num_items; /* stored items */ + int32_t flags; + h5_loc_id_t items[1]; +} h5_loc_idlist_t; + +typedef struct h5_glb_idlist { + int32_t size; /* allocated space in number of items */ + int32_t num_items; /* stored items */ + h5_glb_id_t items[1]; +} h5_glb_idlist_t; + +typedef struct h5_loc_idxlist { + int32_t size; /* allocated space in number of items */ + int32_t num_items; /* stored items */ + h5_loc_idx_t items[1]; +} h5_loc_idxlist_t; + +typedef struct h5_glb_idxlist { + int32_t size; /* allocated space in number of items */ + int32_t num_items; /* stored items */ + h5_glb_idx_t items[1]; +} h5_glb_idxlist_t; + +struct h5_idxmap; +typedef struct h5_idxmap h5_idxmap_t; + +#define H5_TRIANGLE_MESH (H5_OID_TRIANGLE) +#define H5_TETRAHEDRAL_MESH (H5_OID_TETRAHEDRON) + +#define H5_PROP_DEFAULT (0) +#define H5_PROP_FILE (1) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/h5core/h5b_attribs.h b/src/include/h5core/h5b_attribs.h new file mode 100644 index 0000000..d9dc6e3 --- /dev/null +++ b/src/include/h5core/h5b_attribs.h @@ -0,0 +1,55 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5B_ATTRIBS_H +#define __H5CORE_H5B_ATTRIBS_H + +#include "h5core/h5_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +h5_err_t +h5b_write_field_attrib ( + const h5_file_t, + const char*, const char*, const hid_t, const void*, const h5_int64_t); + +h5_err_t +h5b_read_field_attrib ( + const h5_file_t, + const char*, const char*, const h5_int64_t, void* const); + +h5_ssize_t +h5b_get_num_field_attribs ( + const h5_file_t, + const char*); + +h5_err_t +h5b_get_field_attrib_info ( + const h5_file_t, + const char*, const h5_size_t, char* const, const h5_size_t, + h5_int64_t* const, h5_size_t*); + +h5_err_t +h5b_set_3d_field_coords ( + const h5_file_t, + const int, const char* const, const char* const, + const h5_float64_t* const, const h5_int64_t n_coords); + +h5_err_t +h5b_get_3d_field_coords ( + const h5_file_t, + const int rank, const char* const, const char* const, + h5_float64_t* const, const h5_int64_t); +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/h5core/h5b_io.h b/src/include/h5core/h5b_io.h new file mode 100644 index 0000000..8e5fcd2 --- /dev/null +++ b/src/include/h5core/h5b_io.h @@ -0,0 +1,43 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5B_IO_H +#define __H5CORE_H5B_IO_H + +#include "h5core/h5_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +h5_err_t +h5b_write_scalar_data ( + const h5_file_t, + const char*, const void*, const hid_t); + +h5_err_t +h5b_write_vector3d_data ( + const h5_file_t, + const char*, const void*, const void*, const void*, const hid_t); + +h5_err_t +h5b_read_scalar_data ( + const h5_file_t, + const char*, void*, const hid_t); + +h5_err_t +h5b_read_vector3d_data ( + const h5_file_t, + const char*, void*, void*, void*, const hid_t); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/h5core/h5b_model.h b/src/include/h5core/h5b_model.h new file mode 100644 index 0000000..81b840c --- /dev/null +++ b/src/include/h5core/h5b_model.h @@ -0,0 +1,102 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5B_MODEL_H +#define __H5CORE_H5B_MODEL_H + +#include "h5core/h5_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +h5_err_t +h5b_has_field_data ( + const h5_file_t); + +h5_int64_t +h5b_3d_has_view ( + const h5_file_t f); + +h5_err_t +h5b_3d_set_view ( + const h5_file_t, + const h5_size_t, const h5_size_t, + const h5_size_t, const h5_size_t, + const h5_size_t, const h5_size_t); + +h5_err_t +h5b_3d_get_view ( + const h5_file_t, + h5_size_t* const, h5_size_t* const, + h5_size_t* const, h5_size_t* const, + h5_size_t* const, h5_size_t* const); + +h5_err_t +h5b_3d_get_reduced_view ( + const h5_file_t, + h5_size_t* const, h5_size_t* const, + h5_size_t* const, h5_size_t* const, + h5_size_t* const, h5_size_t* const); + +h5_err_t +h5b_3d_set_chunk ( + const h5_file_t, + const h5_size_t, const h5_size_t, const h5_size_t k); + +h5_err_t +h5b_3d_get_chunk ( + const h5_file_t, + const char*, + h5_size_t* const, h5_size_t* const, h5_size_t* const); + +#if defined(PARALLEL_IO) +h5_err_t +h5b_3d_set_grid ( + const h5_file_t, + const h5_size_t, const h5_size_t, const h5_size_t); + +h5_err_t +h5b_3d_get_grid_coords ( + const h5_file_t, + const int, + h5_int64_t* const, h5_int64_t* const, h5_int64_t* const); + +h5_err_t +h5b_3d_set_dims ( + const h5_file_t, + const h5_size_t, const h5_size_t, const h5_size_t); +#endif + +h5_err_t +h5b_3d_set_halo ( + const h5_file_t, const h5_size_t, const h5_size_t, const h5_size_t); + +h5_ssize_t +h5b_get_num_fields ( + const h5_file_t); + +h5_err_t +h5b_get_field_info_by_name ( + const h5_file_t, + const char* name, + h5_size_t* const, h5_size_t* const, h5_size_t* const, h5_int64_t* const); + +h5_err_t +h5b_get_field_info ( + const h5_file_t, + const h5_size_t, + char* const, const h5_size_t, + h5_size_t* const, h5_size_t* const, h5_size_t* const, h5_int64_t* const); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/h5core/h5t_adjacencies.h b/src/include/h5core/h5t_adjacencies.h new file mode 100644 index 0000000..e5038d9 --- /dev/null +++ b/src/include/h5core/h5t_adjacencies.h @@ -0,0 +1,45 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5T_ADJACENCIES_H +#define __H5CORE_H5T_ADJACENCIES_H + +#include "h5core/h5_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +h5_err_t +h5t_get_adjacencies ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + const h5_int32_t dim, + h5_loc_idlist_t **list + ); + +h5_err_t +h5t_release_list_of_adjacencies ( + h5t_mesh_t* const m, + h5_loc_idlist_t **list + ); + +h5_err_t +h5t_find_te2 ( + h5t_mesh_t* const m, + h5_loc_idx_t face_idx, + h5_loc_idx_t elem_idx, + h5_loc_idlist_t** retval + ); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/h5core/h5t_map.h b/src/include/h5core/h5t_map.h new file mode 100644 index 0000000..ddb3e8d --- /dev/null +++ b/src/include/h5core/h5t_map.h @@ -0,0 +1,117 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5T_MAP_H +#define __H5T_MAP_H + +#include "h5core/h5_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +h5_loc_idx_t +h5t_map_global_vertex_idx2local ( + h5t_mesh_t* const m, + h5_glb_idx_t glb_idx + ); + +h5_err_t +h5t_map_global_vertex_indices2local ( + h5t_mesh_t* f, + const h5_glb_id_t* const glb_indices, + const h5_size_t size, + h5_loc_idx_t* const loc_indices + ); + +h5_loc_idx_t +h5t_map_glb_elem_idx2loc ( + h5t_mesh_t* const m, + const h5_glb_idx_t glb_idx + ); + +h5_err_t +h5t_map_glb_elem_indices2loc ( + h5t_mesh_t* const m, + const h5_glb_idx_t* glb_indices, + const h5_size_t size, + h5_loc_idx_t* loc_indices + ); + +h5_err_t +h5t_get_loc_vertex_index_of_vertex ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idx_t* vertex_index + ); + +h5_err_t +h5t_get_loc_vertex_index_of_vertex2 ( + h5t_mesh_t* const m, + const h5_loc_idx_t face_idx, + const h5_loc_idx_t elem_idx, + h5_loc_idx_t* vertex_indices + ); + +h5_err_t +h5t_get_loc_vertex_indices_of_edge ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idx_t *vertex_indices + ); + +h5_err_t +h5t_get_loc_vertex_indices_of_edge2 ( + h5t_mesh_t* const m, + const h5_loc_idx_t face_idx, + const h5_loc_idx_t elem_id, + h5_loc_idx_t* vertex_indices + ); + +h5_err_t +h5t_get_loc_vertex_indices_of_triangle ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idx_t* vertex_indices + ); + +h5_err_t +h5t_get_loc_vertex_indices_of_triangle2 ( + h5t_mesh_t* const m, + const h5_loc_idx_t face_idx, + const h5_loc_idx_t elem_idx, + h5_loc_idx_t* vertex_indices + ); + +h5_err_t +h5t_get_loc_vertex_indices_of_tet ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idx_t *vertex_indices + ); + +h5_err_t +h5t_get_loc_vertex_indices_of_entity ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_loc_idx_t *vertex_indices + ); + +h5_err_t +h5t_get_glb_vertex_indices_of_entity ( + h5t_mesh_t* const m, + const h5_loc_id_t entity_id, + h5_glb_idx_t *vertex_indices + ); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/h5core/h5t_model.h b/src/include/h5core/h5t_model.h new file mode 100644 index 0000000..9ba4a44 --- /dev/null +++ b/src/include/h5core/h5t_model.h @@ -0,0 +1,92 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5T_MODEL_H +#define __H5CORE_H5T_MODEL_H + +#include "h5core/h5_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define H5_GEOBORDER_ENTITY 1 +#define H5_INTERIOR_ENTITY 2 +#define H5_BORDER_ENTITY 4 +#define H5_OVERLAP_ENTITY 8 +#define H5_FRONT_ENTITY 16 +#define H5_GHOST_ENTITY 32 +#define H5_LEAF_ENTITY 64 + +h5_err_t h5t_open_tetrahedral_mesh (const h5_file_t, const char*, h5t_mesh_t**); +h5_err_t h5t_open_tetrahedral_mesh_by_idx (const h5_file_t, const h5_id_t, h5t_mesh_t**); +h5_err_t h5t_open_tetrahedral_mesh_part (const h5_file_p, const char*, h5t_mesh_t** mesh, + h5_glb_idx_t*, h5_glb_idx_t); +h5_ssize_t h5t_get_num_tetmeshes (const h5_file_t f); + + +// TODO just removed svn comment, need to check if ok +h5_err_t +h5t_open_triangle_mesh ( + const h5_file_t, const char*, h5t_mesh_t**); + +h5_err_t +h5t_open_triangle_mesh_by_idx ( + const h5_file_t, const h5_id_t, h5t_mesh_t**); + +h5_err_t +h5t_open_triangle_mesh_part ( + const h5_file_t, const char*, h5t_mesh_t** mesh, + h5_glb_idx_t*, h5_glb_idx_t); + +h5_lvl_idx_t h5t_is_chunked (h5t_mesh_t* const); + +h5_ssize_t h5t_get_num_trimeshes (const h5_file_t f); + +h5_ssize_t h5t_get_num_leaf_levels (h5t_mesh_t* const); + +h5_ssize_t h5t_get_num_vertices (h5t_mesh_t* const, const h5_id_t); + +h5_ssize_t h5t_get_num_leaf_elems (h5t_mesh_t* const, const h5_id_t); + +h5_id_t h5t_add_chunked_tetrahedral_mesh (const h5_file_t, const char* name, h5t_mesh_t**); + +h5_id_t h5t_add_triangle_mesh (const h5_file_t, const char*, h5t_mesh_t**); + +h5_id_t h5t_add_chunked_triangle_mesh (const h5_file_t, const char*, h5t_mesh_t**); + +h5_lvl_idx_t h5t_get_level (h5t_mesh_t* const); + +h5_err_t h5t_open_tetrahedral_mesh (const h5_file_t , + const char*, h5t_mesh_t**); +h5_err_t h5t_open_tetrahedral_mesh_by_idx (const h5_file_t , + const h5_id_t, h5t_mesh_t**); + +h5_err_t h5t_open_triangle_mesh (const h5_file_t, + const char*, h5t_mesh_t**); +h5_err_t h5t_open_triangle_mesh_by_idx (const h5_file_t, + const h5_id_t, h5t_mesh_t**); +h5_id_t h5t_add_tetrahedral_mesh (const h5_file_t, + const char* name, h5t_mesh_t**); +h5_id_t h5t_add_triangle_mesh (const h5_file_t, + const char*, h5t_mesh_t**); + +h5_err_t h5t_set_level (h5t_mesh_t* const, const h5_lvl_idx_t); + +h5_err_t h5t_set_mesh_changed (h5t_mesh_t* const m); + +h5_err_t h5t_close_mesh (h5t_mesh_t* const); + + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/h5core/h5t_octree.h b/src/include/h5core/h5t_octree.h new file mode 100644 index 0000000..d15688e --- /dev/null +++ b/src/include/h5core/h5t_octree.h @@ -0,0 +1,58 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5T_OCTREE_H +#define __H5T_OCTREE_H + +#include "h5core/h5_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// it is very unlikely that there are more than 2^32 octants needed. since there is no id +// we dont need that... +//#if defined(USE_LARGE_INDICES) +//typedef int64_t h5_oct_idx_t; // type for a octant +//typedef h5_uint64_t h5_oct_userlev_t; // type for user defined levels +//#define OCT_USERLEV_LENGTH 64 +//#else +typedef h5_int32_t h5_oct_idx_t; // type for a octant +typedef h5_uint32_t h5_oct_userlev_t; // type for user defined levels +#define OCT_USERLEV_LENGTH 32 +//#endif + +typedef h5_int32_t h5_oct_level_t; +typedef int16_t h5_oct_orient_t; // orientation of an octant +typedef int16_t h5_oct_dir_t; // direction to look for neighboring octants + + +#define OCT_CHG_INTERNAL 11 +#define OCT_CHG_USERDATA 12 +#define OCT_X 13 +#define OCT_Y 14 +#define OCT_Z 15 + +struct h5_oct_point; +typedef struct h5_oct_point h5_oct_point_t; + +struct h5_octant; +typedef struct h5_octant h5t_octant_t; + +struct h5_octree; +typedef struct h5_octree h5t_octree_t; + +struct h5t_oct_iterator; +typedef struct h5t_oct_iterator h5t_oct_iterator_t; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/h5core/h5t_retrieve.h b/src/include/h5core/h5t_retrieve.h new file mode 100644 index 0000000..57fb65f --- /dev/null +++ b/src/include/h5core/h5t_retrieve.h @@ -0,0 +1,96 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5T_RETRIEVE_H +#define __H5CORE_H5T_RETRIEVE_H + +#include "h5core/h5_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct h5t_ref_elem; +struct h5t_tagset; +struct h5t_iterator; + +typedef struct { + h5t_mesh_t* mesh; + h5_loc_id_t (*iter)(struct h5t_iterator*); + h5_lvl_idx_t leaf_level; + const struct h5t_ref_elem* ref_elem; + h5_loc_idx_t elem_idx; + h5_loc_idx_t face_idx; // face according reference element + int codim; // dimension of entities to traverse + h5_err_t (*find)(h5t_mesh_t *const, h5_loc_id_t, h5_loc_id_t, h5_loc_idlist_t**); +} h5t_leaf_iterator_t; + +typedef struct { + h5t_mesh_t* mesh; + h5_loc_id_t (*iter)(struct h5t_iterator* iter); + h5_lvl_idx_t refinement_level; + const struct h5t_ref_elem* ref_elem; + h5_loc_idx_t elem_idx; + h5_loc_idx_t face_idx; // face according reference element + int codim; // dimension of entities to traverse + h5_err_t (*find)(h5t_mesh_t *const f, h5_loc_id_t face_idx, + h5_loc_id_t elem_idx, h5_loc_idlist_t **retval); +} h5t_level_iterator_t; + +typedef struct { + h5t_mesh_t* mesh; + h5_loc_id_t (*iter)(struct h5t_iterator* iter); + h5_lvl_idx_t level_idx; + struct h5t_tagset* tagset; + h5_loc_idx_t elem_idx; + int subentity_idx; +} h5t_tag_iterator_t; + +typedef struct h5t_iterator { + h5t_mesh_t* mesh; + h5_loc_id_t (*iter)(struct h5t_iterator* iter); +} h5t_iterator_t; + + +typedef h5t_iterator_t* h5t_iterator_p; + +h5_err_t +h5t_init_leaf_iterator (h5t_iterator_t*, h5t_mesh_t*, const int); + +h5_err_t +h5t_init_boundary_face_iterator (h5t_iterator_t*, h5t_mesh_t*, const int); + +h5_err_t +h5t_init_mtag_iterator (h5t_iterator_t*, h5t_mesh_t*, const char*); + +h5_err_t +h5t_release_entity_iterator (h5t_iterator_t*); + +h5_loc_id_t +h5t_iterate_entities (h5t_iterator_t*); + +h5_err_t +h5t_end_iterate_entities (h5t_iterator_t*); + +h5_err_t +h5t_get_vertex_coords_by_index (h5t_mesh_t* const, h5_loc_idx_t, h5_float64_t[3]); + +h5_err_t +h5t_get_vertex_coords_by_id (h5t_mesh_t* const, h5_loc_id_t, h5_float64_t[3]); + +h5_err_t +h5t_get_vertex_by_id (h5t_mesh_t* const, const h5_loc_id_t, h5_glb_idx_t*, h5_float64_t*[]); + +h5_err_t +h5t_get_neighbor_indices (h5t_mesh_t* const, h5_loc_id_t, h5_loc_idx_t*); +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/h5core/h5t_store.h b/src/include/h5core/h5t_store.h new file mode 100644 index 0000000..e3c09da --- /dev/null +++ b/src/include/h5core/h5t_store.h @@ -0,0 +1,83 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5T_STORE_H +#define __H5CORE_H5T_STORE_H + +#include "h5core/h5_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +h5_err_t +h5t_begin_store_vertices ( + h5t_mesh_t* const, const h5_size_t); + +h5_loc_id_t +h5t_store_vertex ( + h5t_mesh_t* const, const h5_glb_id_t, const h5_float64_t[3]); + +h5_err_t +h5t_end_store_vertices ( + h5t_mesh_t* const); + +h5_err_t +h5t_begin_store_elems ( + h5t_mesh_t* const, const h5_size_t, const h5_weight_t); + +h5_loc_idx_t +h5t_store_elem ( + h5t_mesh_t* const, const h5_loc_idx_t, const h5_loc_idx_t*, const h5_weight_t*); + +h5_loc_idx_t +h5t_store_elem2 ( + h5t_mesh_t* const, const h5_loc_idx_t, const h5_loc_idx_t*, const h5_weight_t*); + +h5_err_t +h5t_end_store_elems ( + h5t_mesh_t* const); + +h5_err_t +h5t_end_store_ckd_elems ( + h5t_mesh_t* const m); + +h5_err_t +h5t_begin_refine_elems ( + h5t_mesh_t* const); + +h5_err_t +h5t_refine_marked_elems ( + h5t_mesh_t* const); + +h5_err_t +h5t_end_refine_elems ( + h5t_mesh_t* const); + +h5_err_t +h5t_mark_entity ( + h5t_mesh_t* const, const h5_loc_id_t); + +h5_err_t +h5t_pre_refine ( + h5t_mesh_t* const); + +h5_err_t +h5t_refine ( + h5t_mesh_t* const); + +h5_err_t +h5t_post_refine ( + h5t_mesh_t* const); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/h5core/h5t_tags.h b/src/include/h5core/h5t_tags.h new file mode 100644 index 0000000..f0f878b --- /dev/null +++ b/src/include/h5core/h5t_tags.h @@ -0,0 +1,57 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5T_TAGS_H +#define __H5CORE_H5T_TAGS_H + +#include "h5core/h5_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct h5t_tagset h5t_tagset_t; +typedef struct h5t_tagcontainer h5t_tagcontainer_t; + +h5_ssize_t +h5t_get_num_mtagsets (h5t_mesh_t* const); + +h5_err_t +h5t_get_mtagset_info (h5t_mesh_t* const, const h5_size_t, char[], + const h5_size_t, h5_int64_t* const); + +h5_err_t +h5t_mtagset_exists (h5t_mesh_t* const, const char* const); + +h5_err_t +h5t_create_mtagset (h5t_mesh_t* const, const char[], const h5_id_t, h5t_tagset_t**); + +h5_err_t +h5t_open_mtagset (h5t_mesh_t* const, const char* const, h5t_tagset_t**); + +h5_err_t +h5t_close_mtagset (h5t_tagset_t*); + +h5_err_t +h5t_remove_mtagset (h5t_mesh_t* const, const char[]); + +h5_err_t +h5t_set_tag (h5t_tagset_t* const, const h5_loc_id_t, const h5_size_t, void*); + +h5_loc_id_t +h5t_get_tag (const h5t_tagset_t*, const h5_loc_id_t, h5_size_t* const, void* const); + +h5_err_t +h5t_remove_tag (h5t_tagset_t*, const h5_loc_id_t); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/include/h5core/h5u_io.h b/src/include/h5core/h5u_io.h new file mode 100644 index 0000000..a0fcece --- /dev/null +++ b/src/include/h5core/h5u_io.h @@ -0,0 +1,34 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5U_IO_H +#define __H5CORE_H5U_IO_H + +#include "h5core/h5_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +h5_int64_t +h5u_read_data ( + const h5_file_t, + const char* const, void* const, const hid_t); + +h5_int64_t +h5u_write_data ( + const h5_file_t, + const char* const, const void* const, const hid_t); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/src/include/h5core/h5u_model.h b/src/include/h5core/h5u_model.h new file mode 100644 index 0000000..64719ac --- /dev/null +++ b/src/include/h5core/h5u_model.h @@ -0,0 +1,101 @@ +/* + Copyright (c) 2006-2013, The Regents of the University of California, + through Lawrence Berkeley National Laboratory (subject to receipt of any + required approvals from the U.S. Dept. of Energy) and the Paul Scherrer + Institut (Switzerland). All rights reserved. + + License: see file COPYING in top level of source distribution. +*/ + +#ifndef __H5CORE_H5U_MODEL_H +#define __H5CORE_H5U_MODEL_H + +#include "h5core/h5_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +h5_ssize_t +h5u_get_num_particles ( + const h5_file_t); + +h5_ssize_t +h5u_get_num_particles_in_view ( + const h5_file_t); + +h5_ssize_t +h5u_get_totalnum_particles_by_name ( + const h5_file_t, + const char* const); + +h5_ssize_t +h5u_get_totalnum_particles_by_idx ( + const h5_file_t, + h5_id_t); + +h5_err_t +h5u_set_num_particles ( + const h5_file_t, + const h5_size_t, const h5_size_t); + +h5_err_t +h5u_has_view ( + const const h5_file_t); + +h5_err_t +h5u_reset_view ( + const h5_file_t); + +h5_err_t +h5u_set_view ( + const h5_file_t, const h5_int64_t, const h5_int64_t); + +h5_err_t +h5u_set_view_indices ( + const h5_file_t, + const h5_size_t* const, const h5_size_t); + +h5_err_t +h5u_get_view ( + const h5_file_t, + h5_int64_t* const, h5_int64_t* const); + +h5_err_t +h5u_set_canonical_view ( + const h5_file_t); + +h5_ssize_t +h5u_get_num_datasets ( + const h5_file_t); + +h5_err_t +h5u_get_dataset_info ( + const h5_file_t, + const h5_id_t, char* const, const h5_size_t, h5_int64_t* const, + h5_size_t* const); + +h5_err_t +h5u_get_dataset_info_by_name ( + const h5_file_p f, + const char* const dataset_name, + h5_int64_t* const type, + h5_size_t* const nelem + ); + +h5_err_t +h5u_set_chunk ( + const h5_file_t, + const h5_size_t); + +h5_err_t +h5u_get_chunk ( + const h5_file_t, + const char*, h5_size_t*); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/test/Makefile.am b/test/Makefile.am new file mode 100644 index 0000000..a74461d --- /dev/null +++ b/test/Makefile.am @@ -0,0 +1,38 @@ +# test level Makefile.am + +OBJEXT=o + +AM_CPPFLAGS = -I../src/include @AM_CPPFLAGS@ + +LDADD = \ + ../src/lib/libH5hut.a + +noinst_PROGRAMS = @BUILD_TESTS@ + +TESTS_ENVIRONMENT = env LD_LIBRARY_PATH=@HDF5_PREFIX@/lib:$(LD_LIBRARY_PATH) +TESTS = @BUILD_TESTS@ + +EXTRA_PROGRAMS = h5u_test h5b_test h5_attach_test + +h5u_test_SOURCES = \ + h5u_test.c \ + h5u_write.c \ + h5u_read.c \ + testframe.c \ + testframe.h \ + params.h + +h5b_test_SOURCES = \ + h5b_test.c \ + h5b_write.c \ + h5b_read.c \ + testframe.c \ + testframe.h \ + params.h + +h5_attach_test_SOURCES = \ + h5_attach_test.c + +clean-local: + ${RM} -f *.h5 + diff --git a/test/h5_attach_test.c b/test/h5_attach_test.c new file mode 100644 index 0000000..f12900c --- /dev/null +++ b/test/h5_attach_test.c @@ -0,0 +1,34 @@ +#include +#include +#include +#include + +#define FNAME "h5_attach.h5" +#define ATTACHMENT "h5_attach_test" + + +int +main ( + int argc, + char* argv[] + ) { + H5SetErrorHandler (H5AbortErrorhandler); + H5SetVerbosityLevel (255); + h5_file_t f = H5OpenFile (FNAME, H5_O_WRONLY, 0); + H5AddAttachment (f, ATTACHMENT); + H5CloseFile (f); + f = H5OpenFile (FNAME, H5_O_RDONLY, 0); + h5_ssize_t num_attachments = H5GetNumAttachments (f); + printf ("Number of attachments: %lld\n", num_attachments); + int i; + char fname[FILENAME_MAX]; + h5_size_t fsize; + for (i=0; i < num_attachments; i++) { + H5GetAttachmentInfoByIdx (f, i, fname, sizeof(fname), &fsize); + printf ("Attachment %d: Name: %s, Size: %llu\n", i, fname, fsize); + H5GetAttachment (f, fname); + H5DeleteAttachment (f, fname); + } + H5CloseFile (f); + return 0; +} diff --git a/test/h5b_read.c b/test/h5b_read.c new file mode 100644 index 0000000..9d7aba7 --- /dev/null +++ b/test/h5b_read.c @@ -0,0 +1,283 @@ +#include +#include +#include "testframe.h" +#include "params.h" + +static void +test_read_field_attribs( + h5_file_t file, + const char *field_name, + int position) +{ + h5_err_t status; + char name[ATTR_NAME_SIZE]; + char str[ATTR_NAME_SIZE]; + h5_int32_t i32; + h5_int64_t i64; + h5_float32_t f32; + h5_float64_t f64; + + TEST("Reading field attributes"); + + i64 = H5BlockGetNumFieldAttribs(file, field_name); + VALUE(i64 % 5, 0, "file attribute count"); + + get_attr_name(name, "str", position); + status = H5BlockReadFieldAttribString( + file, field_name, name, str); + RETURN(status, H5_SUCCESS, "H5BlockReadFieldAttribString"); + SVALUE(str, ATTR_STR_VAL, "string attribute"); + + get_attr_name(name, "i32", position); + status = H5BlockReadFieldAttribInt32( + file, field_name, name, &i32); + RETURN(status, H5_SUCCESS, "H5BlockReadFieldAttribInt32"); + IVALUE(i32, ATTR_INT32_VAL, "int32 attribute"); + + get_attr_name(name, "i64", position); + status = H5BlockReadFieldAttribInt64( + file, field_name, name, &i64); + RETURN(status, H5_SUCCESS, "H5BlockReadFieldAttribInt64"); + IVALUE(i64, ATTR_INT64_VAL, "int64 attribute"); + + get_attr_name(name, "f32", position); + status = H5BlockReadFieldAttribFloat32( + file, field_name, name, &f32); + RETURN(status, H5_SUCCESS, "H5BlockReadFieldAttribFloat32"); + FVALUE(f32, ATTR_FLOAT_VAL, "float32 attribute"); + + get_attr_name(name, "f64", position); + status = H5BlockReadFieldAttribFloat64( + file, field_name, name, &f64); + RETURN(status, H5_SUCCESS, "H5BlockReadFieldAttribFloat64"); + FVALUE(f64, ATTR_FLOAT_VAL, "float64 attribute"); +} + +static void +test_read_data64(h5_file_t file, int step) +{ + extern h5_size_t grid[3]; + extern h5_size_t layout[6]; + + int i,t; + int rank, nprocs; + h5_err_t status; + h5_int64_t val, type[2]; + char name[4]; + h5_size_t field_rank[2], field_dims[6], elem_rank[2]; + + double *e; + double *ex,*ey,*ez; + h5_int64_t *id; + + const size_t nelems = + (layout[1] - layout[0] + 1) * + (layout[3] - layout[2] + 1) * + (layout[5] - layout[4] + 1); + + e=(double*)malloc(nelems*sizeof(double)); + ex=(double*)malloc(nelems*sizeof(double)); + ey=(double*)malloc(nelems*sizeof(double)); + ez=(double*)malloc(nelems*sizeof(double)); + id=(h5_int64_t*)malloc(nelems*sizeof(h5_int64_t)); + + TEST("Verifying dataset info"); + +#if defined(PARALLEL_IO) + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + MPI_Comm_size(MPI_COMM_WORLD, &nprocs); +#else + nprocs = 1; + rank = 2; +#endif + + status = H5SetStep(file, step); + RETURN(status, H5_SUCCESS, "H5SetStep"); + + val = H5BlockGetNumFields(file); + IVALUE(val, 3, "field count"); + + for (i=0; i<3; i++) { + status = H5BlockGetFieldInfo( + file, i, name, 4, + field_rank, field_dims, elem_rank, type); + RETURN(status, H5_SUCCESS, "H5BlockGetFieldInfo"); + + status = H5BlockGetFieldInfoByName( + file, name, + field_rank+1, field_dims+3, elem_rank+1, type+1); + RETURN(status, H5_SUCCESS, "H5BlockGetFieldInfoByName"); + IVALUE(field_rank[0], field_rank[1], "field rank"); + IVALUE(field_dims[0], field_dims[3], "field dims x"); + IVALUE(field_dims[1], field_dims[4], "field dims y"); + IVALUE(field_dims[2], field_dims[5], "field dims z"); + IVALUE(elem_rank[0], elem_rank[1], "elem rank"); + IVALUE(type[0], type[1], "field type"); + + IVALUE(field_rank[0], 3, "field rank"); + IVALUE(field_dims[0], grid[0]*NBLOCKX, "field dims x"); + IVALUE(field_dims[1], grid[1]*NBLOCKY, "field dims y"); + IVALUE(field_dims[2], grid[2]*NBLOCKZ, "field dims z"); + if (i==1) { + CVALUE(name[0], 'e', "field name"); + IVALUE(elem_rank[0], 1, "elem rank"); + IVALUE(type[0], H5_FLOAT64_T, "field type"); + } else if (i==0) { + CVALUE(name[0], 'E', "field name"); + IVALUE(elem_rank[0], 3, "elem rank"); + IVALUE(type[1], H5_FLOAT64_T, "field type"); + } else if (i==2) { + CVALUE(name[0], 'i', "field name"); + IVALUE(elem_rank[0], 1, "elem rank"); + IVALUE(type[1], H5_INT64_T, "field type"); + } + } + +#if defined(PARALLEL_IO) + TEST("Setting throttle"); + status = H5SetThrottle(file, 3); + RETURN(status, H5_SUCCESS, "H5SetThrottle"); +#endif + + TEST("Reading 64-bit data"); + + for (t=step; t +#include +#include + +#include "testframe.h" +#include "params.h" + +/* global */ +h5_size_t grid[3]; +h5_size_t layout[6]; +h5_size_t fields_dims[3]; + +/* from write.c */ +void h5b_test_write1(void); +void h5b_test_write2(void); + +/* from read.c */ +void h5b_test_read1(void); +void h5b_test_read2(void); + +static int +_nth_root_int_divisor (const int m, const int n) +{ + int i, root; + double p; + + p = 1.0 / (double)n; + root = (int) ceil ( pow ( (double)m, p ) ); + for (i=root; i<=m; i++) + { + if (m % i == 0) return i; + } + + return i; +} + +int main(int argc, char **argv) +{ + extern h5_size_t layout[6]; +#ifdef PARALLEL_IO + MPI_Init(&argc, &argv); + + int procs, rank; + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + MPI_Comm_size(MPI_COMM_WORLD, &procs); + + if (procs > MAX_MPI_TASKS) { + fprintf(stderr, + "ERROR: please use <= %d MPI tasks for the test.\n", + MAX_MPI_TASKS); + exit(EXIT_FAILURE); + } + + /* make up a 3D layout */ + grid[0] = _nth_root_int_divisor (procs, 3); + grid[1] = _nth_root_int_divisor (procs / grid[0], 2); + grid[2] = procs / grid[0] / grid[1]; + + h5_size_t i,j,k; + k = rank % grid[2]; + j = (rank / grid[2]) % grid[1]; + i = rank / (grid[2] * grid[1]); + + layout[0] = i*NBLOCKX; + layout[1] = (i+1)*NBLOCKX - 1; + layout[2] = j*NBLOCKY; + layout[3] = (j+1)*NBLOCKY - 1; + layout[4] = k*NBLOCKZ; + layout[5] = (k+1)*NBLOCKZ - 1; +#else // PARALLEL_IO + grid[0] = 1; + grid[1] = 1; + grid[2] = 1; + + layout[0] = 0; + layout[1] = NBLOCKX - 1; + layout[2] = 0; + layout[3] = NBLOCKY - 1; + layout[4] = 0; + layout[5] = NBLOCKZ - 1; +#endif + + /* Initialize testing framework */ + TestInit(argv[0], NULL, NULL); + + /* Tests are generally arranged from least to most complexity... */ + AddTest("write1", h5b_test_write1, NULL, "Write 64-bit data", NULL); + AddTest("read1", h5b_test_read1, NULL, "Read 64-bit data", NULL); + AddTest("write2", h5b_test_write2, NULL, "Write 32-bit data", NULL); + AddTest("read2", h5b_test_read2, NULL, "Read 32-bit data", NULL); + + /* Display testing information */ + TestInfo(argv[0]); + + /* Parse command line arguments */ + TestParseCmdLine(argc, argv); + + H5SetVerbosityLevel(GetTestVerbosity()); + + /* Perform requested testing */ + PerformTests(); + + /* Display test summary, if requested */ + if (GetTestSummary()) + TestSummary(); + + /* Clean up test files, if allowed */ + //if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP")) + // TestCleanup(); + +#ifdef PARALLEL_IO + TestPrintf ("reached end\n"); + fflush(stdout); + MPI_Finalize(); +#endif + return GetTestNumErrs(); +} + diff --git a/test/h5b_write.c b/test/h5b_write.c new file mode 100644 index 0000000..fe78263 --- /dev/null +++ b/test/h5b_write.c @@ -0,0 +1,225 @@ +#include +#include "testframe.h" +#include "params.h" + +static void +test_write_field_attribs( + h5_file_t file, + const char *field_name, + int position) +{ + h5_err_t status; + char name[ATTR_NAME_SIZE]; + + TEST("Writing field attributes"); + + get_attr_name(name, "str", position); + status = H5BlockWriteFieldAttribString( + file, field_name, name, ATTR_STR_VAL); + RETURN(status, H5_SUCCESS, "H5BlockWriteFieldAttribString"); + + get_attr_name(name, "i32", position); + h5_int32_t i32 = ATTR_INT32_VAL; + status = H5BlockWriteFieldAttribInt32( + file, field_name, name, &i32, 1); + RETURN(status, H5_SUCCESS, "H5BlockWriteFieldAttribInt32"); + + get_attr_name(name, "i64", position); + h5_int64_t i64 = ATTR_INT64_VAL; + status = H5BlockWriteFieldAttribInt64( + file, field_name, name, &i64, 1); + RETURN(status, H5_SUCCESS, "H5BlockWriteFieldAttribInt64"); + + get_attr_name(name, "f32", position); + h5_float32_t f32 = ATTR_FLOAT_VAL; + status = H5BlockWriteFieldAttribFloat32( + file, field_name, name, &f32, 1); + RETURN(status, H5_SUCCESS, "H5BlockWriteFieldAttribFloat32"); + + get_attr_name(name, "f64", position); + h5_float64_t f64 = ATTR_FLOAT_VAL; + status = H5BlockWriteFieldAttribFloat64( + file, field_name, name, &f64, 1); + RETURN(status, H5_SUCCESS, "H5BlockWriteFieldAttribFloat64"); +} + +static void +test_write_data64(h5_file_t file, int step) +{ + extern h5_size_t layout[6]; + + int i,t; + h5_int64_t status, val; + + double *e; + double *ex,*ey,*ez; + h5_int64_t *id; + + const size_t nelems = + (layout[1] - layout[0] + 1) * + (layout[3] - layout[2] + 1) * + (layout[5] - layout[4] + 1); + + e=(double*)malloc(nelems*sizeof(double)); + ex=(double*)malloc(nelems*sizeof(double)); + ey=(double*)malloc(nelems*sizeof(double)); + ez=(double*)malloc(nelems*sizeof(double)); + id=(h5_int64_t*)malloc(nelems*sizeof(h5_int64_t)); + +#if defined(PARALLEL_IO) + TEST("Setting throttle"); + status = H5SetThrottle(file, 2); + RETURN(status, H5_SUCCESS, "H5SetThrottle"); +#endif + + TEST("Writing 64-bit data"); + + for (t=step; t +#include +#include "testframe.h" +#include "params.h" + +static void +test_read_file_attribs(h5_file_t file, int position) +{ + h5_err_t status; + char name[ATTR_NAME_SIZE]; + char str[ATTR_NAME_SIZE]; + h5_int32_t i32; + h5_int64_t i64; + h5_float32_t f32; + h5_float64_t f64; + + TEST("Reading file attributes"); + + i64 = H5GetNumFileAttribs(file); + VALUE(i64 % 5, 0, "file attribute count"); + + get_attr_name(name, "str", position); + status = H5ReadFileAttribString(file, name, str); + RETURN(status, H5_SUCCESS, "H5ReadFileAttribString"); + SVALUE(str, ATTR_STR_VAL, "string attribute"); + + get_attr_name(name, "i32", position); + status = H5ReadFileAttribInt32(file, name, &i32); + RETURN(status, H5_SUCCESS, "H5ReadFileAttribInt32"); + IVALUE(i32, ATTR_INT32_VAL, "int32 attribute"); + + get_attr_name(name, "i64", position); + status = H5ReadFileAttribInt64(file, name, &i64); + RETURN(status, H5_SUCCESS, "H5ReadFileAttribInt64"); + IVALUE(i64, ATTR_INT64_VAL, "int64 attribute"); + + get_attr_name(name, "f32", position); + status = H5ReadFileAttribFloat32(file, name, &f32); + RETURN(status, H5_SUCCESS, "H5ReadFileAttribFloat32"); + FVALUE(f32, ATTR_FLOAT_VAL, "float32 attribute"); + + get_attr_name(name, "f64", position); + status = H5ReadFileAttribFloat64(file, name, &f64); + RETURN(status, H5_SUCCESS, "H5ReadFileAttribFloat64"); + FVALUE(f64, ATTR_FLOAT_VAL, "float64 attribute"); +} + +static void +test_read_step_attribs(h5_file_t file, int position) +{ + h5_err_t status; + char name[ATTR_NAME_SIZE]; + char str[ATTR_NAME_SIZE]; + h5_int32_t i32; + h5_int64_t i64; + h5_float32_t f32; + h5_float64_t f64; + + TEST("Reading file attributes"); + + i64 = H5GetNumStepAttribs(file); + VALUE(i64 % 5, 0, "step attribute count"); + + get_attr_name(name, "str", position); + status = H5ReadStepAttribString(file, name, str); + RETURN(status, H5_SUCCESS, "H5ReadStepAttribString"); + SVALUE(str, ATTR_STR_VAL, "string attribute"); + + get_attr_name(name, "i32", position); + status = H5ReadStepAttribInt32(file, name, &i32); + RETURN(status, H5_SUCCESS, "H5ReadStepAttribInt32"); + IVALUE(i32, ATTR_INT32_VAL, "int32 attribute"); + + get_attr_name(name, "i64", position); + status = H5ReadStepAttribInt64(file, name, &i64); + RETURN(status, H5_SUCCESS, "H5ReadStepAttribInt64"); + IVALUE(i64, ATTR_INT64_VAL, "int64 attribute"); + + get_attr_name(name, "f32", position); + status = H5ReadStepAttribFloat32(file, name, &f32); + RETURN(status, H5_SUCCESS, "H5ReadStepAttribFloat32"); + FVALUE(f32, ATTR_FLOAT_VAL, "float32 attribute"); + + get_attr_name(name, "f64", position); + status = H5ReadStepAttribFloat64(file, name, &f64); + RETURN(status, H5_SUCCESS, "H5ReadStepAttribFloat64"); + FVALUE(f64, ATTR_FLOAT_VAL, "float64 attribute"); +} + +static void +test_read_data64(h5_file_t file, int nparticles, int step) +{ + int i,t; + int rank, nprocs; + h5_err_t status; + h5_int64_t val, start, end, type; + char name1[4]; + char name2[8]; + h5_size_t indices[8]; + h5_size_t size; + + double *x,*y,*z; + double *px,*py,*pz; + h5_int64_t *id; + + x=(double*)malloc(nparticles*sizeof(double)); + y=(double*)malloc(nparticles*sizeof(double)); + z=(double*)malloc(nparticles*sizeof(double)); + px=(double*)malloc(nparticles*sizeof(double)); + py=(double*)malloc(nparticles*sizeof(double)); + pz=(double*)malloc(nparticles*sizeof(double)); + id=(h5_int64_t*)malloc(nparticles*sizeof(h5_int64_t)); + + TEST("Verifying dataset info"); + +#if defined(PARALLEL_IO) + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + MPI_Comm_size(MPI_COMM_WORLD, &nprocs); +#else + nprocs = 1; + rank = 2; +#endif + + val = H5PartGetNumParticles(file); + IVALUE(val, nprocs*nparticles, "particle count"); + + val = H5PartGetNumDatasets(file); + IVALUE(val, 7, "dataset count"); + + for (i=0; i<7; i++) { + status = H5PartGetDatasetName(file, i, name1, 2); + RETURN(status, H5_SUCCESS, "H5PartGetDatasetName"); + + status = H5PartGetDatasetInfo( + file, i, name2, 4, &type, &size); + RETURN(status, H5_SUCCESS, "H5PartGetDatasetInfo"); + CVALUE(name1[0], name2[0], "dataset name"); + + status = H5PartGetDatasetName(file, i, name1, 4); + RETURN(status, H5_SUCCESS, "H5PartGetDatasetName"); + CVALUE(name1[1], name2[1], "dataset name"); + + IVALUE(size, nprocs*nparticles, "dataset size"); + if (name1[0] == 'i') IVALUE(type, H5_INT64_T, "dataset type"); + else IVALUE(type, H5_FLOAT64_T, "dataset type"); + } + +#if defined(PARALLEL_IO) + TEST("Setting throttle"); + status = H5SetThrottle(file, 3); + RETURN(status, H5_SUCCESS, "H5SetThrottle"); +#endif + + TEST("Reading 64-bit data"); + + for (t=step; t +#include + +#include "testframe.h" +#include "params.h" + +/* from write.c */ +void h5u_test_write1(void); +void h5u_test_write2(void); +void h5u_test_write3(void); +void h5u_test_write4(void); + +/* from read.c */ +void h5u_test_read1(void); +void h5u_test_read2(void); +void h5u_test_read3(void); +void h5u_test_read4(void); + +int main(int argc, char **argv) +{ +#ifdef PARALLEL_IO + MPI_Init(&argc, &argv); + int procs; + MPI_Comm_size(MPI_COMM_WORLD, &procs); + if (procs > MAX_MPI_TASKS) { + fprintf(stderr, + "ERROR: please use <= %d MPI tasks for the test.\n", + MAX_MPI_TASKS); + exit(EXIT_FAILURE); + } +#endif + + /* Initialize testing framework */ + TestInit(argv[0], NULL, NULL); + + /* Tests are generally arranged from least to most complexity... */ + AddTest("write1", h5u_test_write1, NULL, "Write 32-bit data", NULL); + AddTest("read1", h5u_test_read1, NULL, "Read 32-bit data", NULL); + AddTest("write2", h5u_test_write2, NULL, "Write 32-bit strided data", NULL); + AddTest("read2", h5u_test_read2, NULL, "Read 32-bit strided data", NULL); + AddTest("write3", h5u_test_write3, NULL, "Write 64-bit strided data", NULL); + AddTest("read3", h5u_test_read3, NULL, "Read 64-bit strided data", NULL); + AddTest("write4", h5u_test_write4, NULL, "Write 64-bit data", NULL); + AddTest("read4", h5u_test_read4, NULL, "Read 64-bit data", NULL); + + /* Display testing information */ + TestInfo(argv[0]); + + /* Parse command line arguments */ + TestParseCmdLine(argc, argv); + + //H5SetVerbosityLevel(GetTestVerbosity()); + H5SetVerbosityLevel(1); + + /* Perform requested testing */ + PerformTests(); + + /* Display test summary, if requested */ + if (GetTestSummary()) + TestSummary(); + + /* Clean up test files, if allowed */ + //if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP")) + // TestCleanup(); + +#ifdef PARALLEL_IO + TestPrintf ("reached end\n"); + fflush(stdout); + MPI_Finalize(); +#endif + return GetTestNumErrs(); +} + diff --git a/test/h5u_write.c b/test/h5u_write.c new file mode 100644 index 0000000..54b56c0 --- /dev/null +++ b/test/h5u_write.c @@ -0,0 +1,466 @@ +#include +#include "testframe.h" +#include "params.h" + +static void +test_write_file_attribs(h5_file_t file, int position) +{ + h5_err_t status; + char name[ATTR_NAME_SIZE]; + + TEST("Writing file attributes"); + + get_attr_name(name, "str", position); + status = H5WriteFileAttribString(file, name, ATTR_STR_VAL); + RETURN(status, H5_SUCCESS, "H5WriteFileAttribString"); + + get_attr_name(name, "i32", position); + h5_int32_t i32 = ATTR_INT32_VAL; + status = H5WriteFileAttribInt32(file, name, &i32, 1); + RETURN(status, H5_SUCCESS, "H5WriteFileAttribInt32"); + + get_attr_name(name, "i64", position); + h5_int64_t i64 = ATTR_INT64_VAL; + status = H5WriteFileAttribInt64(file, name, &i64, 1); + RETURN(status, H5_SUCCESS, "H5WriteFileAttribInt64"); + + get_attr_name(name, "f32", position); + h5_float32_t f32 = ATTR_FLOAT_VAL; + status = H5WriteFileAttribFloat32(file, name, &f32, 1); + RETURN(status, H5_SUCCESS, "H5WriteFileAttribFloat32"); + + get_attr_name(name, "f64", position); + h5_float64_t f64 = ATTR_FLOAT_VAL; + status = H5WriteFileAttribFloat64(file, name, &f64, 1); + RETURN(status, H5_SUCCESS, "H5WriteFileAttribFloat64"); +} + +static void +test_write_step_attribs(h5_file_t file, int position) +{ + h5_err_t status; + char name[ATTR_NAME_SIZE]; + + TEST("Writing file attributes"); + + get_attr_name(name, "str", position); + status = H5WriteStepAttribString(file, name, ATTR_STR_VAL); + RETURN(status, H5_SUCCESS, "H5WriteStepAttribString"); + + get_attr_name(name, "i32", position); + h5_int32_t i32 = ATTR_INT32_VAL; + status = H5WriteStepAttribInt32(file, name, &i32, 1); + RETURN(status, H5_SUCCESS, "H5WriteStepAttribInt32"); + + get_attr_name(name, "i64", position); + h5_int64_t i64 = ATTR_INT64_VAL; + status = H5WriteStepAttribInt64(file, name, &i64, 1); + RETURN(status, H5_SUCCESS, "H5WriteStepAttribInt64"); + + get_attr_name(name, "f32", position); + h5_float32_t f32 = ATTR_FLOAT_VAL; + status = H5WriteStepAttribFloat32(file, name, &f32, 1); + RETURN(status, H5_SUCCESS, "H5WriteStepAttribFloat32"); + + get_attr_name(name, "f64", position); + h5_float64_t f64 = ATTR_FLOAT_VAL; + status = H5WriteStepAttribFloat64(file, name, &f64, 1); + RETURN(status, H5_SUCCESS, "H5WriteStepAttribFloat64"); +} + +static void +test_write_data64(h5_file_t file, int nparticles, int step) +{ + int i,t; + h5_int64_t status, val; + + double *x,*y,*z; + double *px,*py,*pz; + h5_int64_t *id; + + x=(double*)malloc(nparticles*sizeof(double)); + y=(double*)malloc(nparticles*sizeof(double)); + z=(double*)malloc(nparticles*sizeof(double)); + px=(double*)malloc(nparticles*sizeof(double)); + py=(double*)malloc(nparticles*sizeof(double)); + pz=(double*)malloc(nparticles*sizeof(double)); + id=(h5_int64_t*)malloc(nparticles*sizeof(h5_int64_t)); + +#if PARALLEL_IO + TEST("Setting throttle"); + status = H5SetThrottle(file, 2); + RETURN(status, H5_SUCCESS, "H5SetThrottle"); +#endif + + TEST("Writing 64-bit data"); + + for (t=step; t + * Tuesday, January 6, 2004 + * + * Purpose: Provides support functions for the testing framework. + * + */ + +#include +#include +#include +#include +#include "testframe.h" + +/* + * Definitions for the testing structure. + */ +#define MAXNUMOFTESTS 64 +#define MAXTESTNAME 16 +#define MAXTESTDESC 64 + +typedef struct TestStruct { + int NumErrors; + char Description[MAXTESTDESC]; + int SkipFlag; + char Name[MAXTESTNAME]; + void (*Call)(void); + void (*Cleanup)(void); + const void *Parameters; +} TestStruct; + + +/* + * Variables used by testing framework. + */ +static int num_errs = 0; /* Total number of errors during testing */ +static int Verbosity = VERBO_DEF; /* Default Verbosity is Low */ +static int Summary = 0; /* Show test summary. Default is no. */ +static int CleanUp = 1; /* Do cleanup or not. Default is yes. */ +static int TestExpress = -1; /* Do TestExpress or not. -1 means not set yet. */ +static TestStruct Test[MAXNUMOFTESTS]; +static int Index = 0; +static const void *Test_parameters = NULL; +static const char *TestProgName = NULL; +static void (*TestPrivateUsage)(void) = NULL; +static int (*TestPrivateParser)(int ac, char *av[]) = NULL; + + +/* + * Setup a test function and add it to the list of tests. + * It must have no parameters and returns void. + * TheName--short test name. + * If the name starts with '-', do not run it by default. + * TheCall--the test routine. + * Cleanup--the cleanup routine for the test. + * TheDescr--Long description of the test. + * Parameters--pointer to extra parameters. Use NULL if none used. + * Since only the pointer is copied, the contents should not change. + */ +void +AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const char *TheDescr, const void *Parameters) +{ + /* Sanity checking */ + if (Index >= MAXNUMOFTESTS) { + printf("Too many tests added, increase MAXNUMOFTEST(%d).\n", + MAXNUMOFTESTS); + exit(-1); + } /* end if */ + if (strlen(TheDescr) >= MAXTESTDESC) { + printf("Test description too long, increase MAXTESTDESC(%d).\n", + MAXTESTDESC); + exit(-1); + } /* end if */ + if (strlen(TheName) >= MAXTESTNAME) { + printf("Test name too long, increase MAXTESTNAME(%d).\n", + MAXTESTNAME); + exit(-1); + } /* end if */ + + /* Set up test function */ + strcpy(Test[Index].Description, TheDescr); + if (*TheName != '-') { + strcpy(Test[Index].Name, TheName); + Test[Index].SkipFlag = 0; + } + else { /* skip test by default */ + strcpy(Test[Index].Name, TheName+1); + Test[Index].SkipFlag = 1; + } + Test[Index].Call = TheCall; + Test[Index].Cleanup = Cleanup; + Test[Index].NumErrors = -1; + Test[Index].Parameters = Parameters; + + /* Increment test count */ + Index++; +} + + +/* + * Initialize testing framework + * + * ProgName: Name of test program. + * private_usage: Optional routine provided by test program to print the + * private portion of usage page. Default to NULL which means none is + * provided. + * private_parser: Optional routine provided by test program to parse the + * private options. Default to NULL which means none is provided. + * + * Modifications: + * Albert Cheng 2004/08/17 + * Added the ProgName, private_usage and private_parser arguments. + */ +void TestInit(const char *ProgName, void (*private_usage)(void), int (*private_parser)(int ac, char *av[])) +{ +#if !(defined MAC || defined SYMANTEC_C) + /* Un-buffer the stdout and stderr */ + setbuf(stderr, NULL); + setbuf(stdout, NULL); +#endif + + /* + * Turn off automatic error reporting since we do it ourselves. Besides, + * half the functions this test calls are private, so automatic error + * reporting wouldn't do much good since it's triggered at the API layer. + */ + //H5Eset_auto2(H5E_DEFAULT, NULL, NULL); + + /* + * Record the program name and private routines if provided. + */ + TestProgName = ProgName; + if (NULL != private_usage) + TestPrivateUsage = private_usage; + if (NULL != private_parser) + TestPrivateParser = private_parser; +} + + +/* + * Print test usage. + * First print the common test options, then the extra options if provided. + * + * Modification: + * 2004/08/18 Albert Cheng. Add TestPrivateUsage feature. + */ +void TestUsage(void) +{ + int i; + + printf("Usage: %s [-v[erbose] (l[ow]|m[edium]|h[igh]|0-9)] %s\n", + TestProgName, (TestPrivateUsage ? "" : "")); + printf(" [-[e]x[clude] name+] \n"); + printf(" [-o[nly] name+] \n"); + printf(" [-b[egin] name] \n"); + printf(" [-s[ummary]] \n"); + printf(" [-c[leanoff]] \n"); + printf(" [-h[elp]] \n"); + printf("\n\n"); + printf("verbose controls the amount of information displayed\n"); + printf("exclude to exclude tests by name\n"); + printf("only to name tests which should be run\n"); + printf("begin start at the name of the test givin\n"); + printf("summary prints a summary of test results at the end\n"); + printf("cleanoff does not delete *.hdf files after execution of tests\n"); + printf("help print out this information\n"); + if (TestPrivateUsage) { + printf("\nExtra options\n"); + TestPrivateUsage(); + } + printf("\n\n"); + printf("This program currently tests the following: \n\n"); + printf("%16s %s\n", "Name", "Description"); + printf("%16s %s\n", "----", "-----------"); + + for (i = 0; i < Index; i++) + printf("%16s %s\n", Test[i].Name, Test[i].Description); + + printf("\n\n"); +} + + +/* + * Print test info. + */ +void TestInfo(const char *ProgName) +{ + unsigned major, minor, release; + + H5get_libversion(&major, &minor, &release); + + printf("\nFor help use: %s -help\n",ProgName); + printf("Linked with HDF5 version %u.%u release %u\n", major, minor, release); + printf("Linked with H5hut version %s\n", H5_VER_STRING); +} + + +/* + * Parse command line information. + * argc, argv: the usual command line argument count and strings + * + * Modification: + * 2004/08/18 Albert Cheng. Add extra_parse feature. + */ +void TestParseCmdLine(int argc, char *argv[]) +{ + int ret_code; + + while (argv++, --argc > 0) { + if ((strcmp(*argv, "-verbose") == 0) || + (strcmp(*argv, "-v") == 0)) { + if (argc > 0) { + --argc; ++argv; + ParseTestVerbosity(*argv); + }else{ + TestUsage(); + exit(1); + } + } + else if (((strcmp(*argv, "-exclude") == 0) || + (strcmp(*argv, "-x") == 0))) { + if (argc > 0) { + --argc; ++argv; + SetTest(*argv, SKIPTEST); + }else{ + TestUsage(); + exit(1); + } + } + else if (((strcmp(*argv, "-begin") == 0) || + (strcmp(*argv, "-b") == 0))) { + if (argc > 0) { + --argc; ++argv; + SetTest(*argv, BEGINTEST); + }else{ + TestUsage(); + exit(1); + } + } + else if (((strcmp(*argv, "-only") == 0) || + (strcmp(*argv, "-o") == 0))) { + if (argc > 0) { + int Loop; + --argc; ++argv; + /* Skip all tests, then activate only one. */ + for (Loop = 0; Loop < Index; Loop++) + Test[Loop].SkipFlag = 1; + SetTest(*argv, ONLYTEST); + }else{ + TestUsage(); + exit(1); + } + } + else if ((strcmp(*argv, "-summary") == 0) || (strcmp(*argv, "-s") == 0)) + Summary = 1; + else if ((strcmp(*argv, "-help") == 0) || (strcmp(*argv, "-h") == 0)) { + TestUsage(); + exit(0); + } + else if ((strcmp(*argv, "-cleanoff") == 0) || (strcmp(*argv, "-c") == 0)) + SetTestNoCleanup(); + else { + /* non-standard option. Break out. */ + break; + } + + } + + /* Call extra parsing function if provided. */ + if (NULL != TestPrivateParser) { + ret_code=TestPrivateParser(argc+1, argv-1); + if (ret_code != 0) + exit(-1); + } +} + + +/* + * Perform Tests. + */ +void PerformTests(void) +{ + int Loop; + + for (Loop = 0; Loop < Index; Loop++) + if (Test[Loop].SkipFlag) { + MESSAGE(2, ("Skipping -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name)); + } else { + MESSAGE(2, ("Testing -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name)); + MESSAGE(5, ("===============================================\n")); + Test[Loop].NumErrors = num_errs; + Test_parameters = Test[Loop].Parameters; + //ALARM_ON; + Test[Loop].Call(); + //ALARM_OFF; + Test[Loop].NumErrors = num_errs - Test[Loop].NumErrors; + MESSAGE(5, ("===============================================\n")); + MESSAGE(5, ("There were %d errors detected.\n\n", (int)Test[Loop].NumErrors)); + } + + Test_parameters = NULL; /* clear it. */ + MESSAGE(2, ("\n\n")); + + if (num_errs) + printf("!!! %d Error(s) were detected !!!\n\n", (int) num_errs); + else + printf("All tests were successful. \n\n"); +} + + +/* + * Display test summary. + */ +void TestSummary(void) +{ + int Loop; + + printf("Summary of Test Results:\n"); + printf("Name of Test Errors Description of Test\n"); + printf("---------------- ------ --------------------------------------\n"); + + for (Loop = 0; Loop < Index; Loop++) { + if (Test[Loop].NumErrors == -1) + printf("%16s %6s %s\n", Test[Loop].Name, "N/A", Test[Loop].Description); + else + printf("%16s %6d %s\n", Test[Loop].Name, (int)Test[Loop].NumErrors, Test[Loop].Description); + } + + printf("\n\n"); +} + + +/* + * Cleanup files from testing + */ +void TestCleanup(void) +{ + int Loop; + + MESSAGE(2, ("\nCleaning Up temp files...\n\n")); + + /* call individual cleanup routines in each source module */ + for (Loop = 0; Loop < Index; Loop++) + if (!Test[Loop].SkipFlag && Test[Loop].Cleanup!=NULL) + Test[Loop].Cleanup(); +} + + +/* + * Retrieve the verbosity level for the testing framework + */ +int GetTestVerbosity(void) +{ + return(Verbosity); +} + +/* + * Set the verbosity level for the testing framework. + * Return previous verbosity level. + */ +int SetTestVerbosity(int newval) +{ + int oldval; + + oldval = Verbosity; + Verbosity = newval; + return(oldval); +} + +/* + * Retrieve the TestExpress mode for the testing framework + Values: + 0: Exhaustive run + Tests should take as long as necessary + 1: Full run. Default if HDF5TestExpress is not defined + Tests should take no more than 30 minutes + 2: Quick run + Tests should take no more than 10 minutes + 3: Smoke test. Default if HDF5TestExpress is set to a value other than 0-3 + Tests should take less than 1 minute + + Design: + If the environment variable $HDF5TestExpress is defined, + then test programs should skip some tests so that they + complete sooner. + + Terms: + A "test" is a single executable, even if it contains multiple + sub-tests. + The standard system for test times is a Linux machine running in + NFS space (to catch tests that involve a great deal of disk I/O). + + Implementation: + I think this can be easily implemented in the test library (libh5test.a) + so that all tests can just call it to check the status of $HDF5TestExpress. + */ +int GetTestExpress(void) +{ + char * env_val; + + /* set it here for now. Should be done in something like h5test_init(). */ + if(TestExpress==-1) + { + env_val = getenv("HDF5TestExpress"); + + if(env_val == NULL) + SetTestExpress(1); + else if(strcmp(env_val, "0") == 0) + SetTestExpress(0); + else if(strcmp(env_val, "1") == 0) + SetTestExpress(1); + else if(strcmp(env_val, "2") == 0) + SetTestExpress(2); + else + SetTestExpress(3); + } + + return(TestExpress); +} + +/* + * Set the TestExpress mode for the testing framework. + * Return previous TestExpress mode. + * Values: non-zero means TestExpress mode is on, 0 means off. + */ +int SetTestExpress(int newval) +{ + int oldval; + + oldval = TestExpress; + TestExpress = newval; + return(oldval); +} + +/* + * Retrieve Summary request value. + * 0 means no summary, 1 means yes. + */ +int GetTestSummary(void) +{ + return(Summary); +} + +/* + * Retrieve Cleanup request value. + * 0 means no Cleanup, 1 means yes. + */ +int GetTestCleanup(void) +{ + return(CleanUp); +} + +/* + * Set cleanup to no. + * Return previous cleanup value. + */ +int SetTestNoCleanup(void) +{ + int oldval; + + oldval = CleanUp; + CleanUp = 0; + return(oldval); +} + +/* + * Parse an argument string for verbosity level and set it. + */ +void ParseTestVerbosity(char *argv) +{ + if (*argv == 'l') + SetTestVerbosity(VERBO_LO); + else if (*argv == 'm') + SetTestVerbosity(VERBO_MED); + else if (*argv == 'h') + SetTestVerbosity(VERBO_HI); + else + SetTestVerbosity(atoi(argv)); +} + + +/* + * Retrieve the number of testing errors for the testing framework + */ +int GetTestNumErrs(void) +{ + return(num_errs); +} + + +/* + * Increment the number of testing errors + */ +void IncTestNumErrs(void) +{ + num_errs++; +} + + +/* + * Retrieve the current Test Parameters pointer. + */ +const void *GetTestParameters(void) +{ + return(Test_parameters); +} + +int +TestPrintf(const char *format, ...) +{ + va_list arglist; + int ret_value; + +#if defined(PARALLEL_IO) + int nproc; + MPI_Comm_rank(MPI_COMM_WORLD, &nproc); + if ( nproc == 0 || VERBOSE_HI ) { + char *format2 = malloc(strlen(format)+8); + sprintf(format2, "[%d] %s", nproc, format); + va_start(arglist, format); + ret_value = vprintf(format2, arglist); + va_end(arglist); + } +#else + va_start(arglist, format); + ret_value = vprintf(format, arglist); + va_end(arglist); +#endif + + /* Return the length of the string produced (like printf() does) */ + return ret_value; +} + + +/* + * This routine is designed to provide equivalent functionality to 'printf' + * and also increment the error count for the testing framework. + */ +int +TestErrPrintf(const char *format, ...) +{ + va_list arglist; + int ret_value; + + /* Increment the error count */ + num_errs++; + +#if PARALLEL_IO + int nproc; + MPI_Comm_rank(MPI_COMM_WORLD, &nproc); + if ( nproc == 0 || VERBOSE_HI ) { + char *format2 = malloc(strlen(format)+8); + sprintf(format2, "[%d] %s", nproc, format); + va_start(arglist, format); + ret_value = vfprintf(stderr, format2, arglist); + va_end(arglist); + } +#else + va_start(arglist, format); + ret_value = vfprintf(stderr, format, arglist); + va_end(arglist); +#endif + + /* Return the length of the string produced (like printf() does) */ + return ret_value; +} + + +/* + * Set (control) which test will be tested. + * SKIPTEST: skip this test + * ONLYTEST: do only this test + * BEGINETEST: skip all tests before this test + * + */ +void SetTest(const char *testname, int action) +{ + int Loop; + switch (action) { + case SKIPTEST: + for (Loop = 0; Loop < Index; Loop++) + if (strcmp(testname, Test[Loop].Name) == 0) { + Test[Loop].SkipFlag = 1; + break; + } + break; + case BEGINTEST: + for (Loop = 0; Loop < Index; Loop++) { + if (strcmp(testname, Test[Loop].Name) != 0) + Test[Loop].SkipFlag = 1; + else{ + /* Found it. Set it to run. Done. */ + Test[Loop].SkipFlag = 0; + break; + } + } + break; + case ONLYTEST: + for (Loop = 0; Loop < Index; Loop++) { + if (strcmp(testname, Test[Loop].Name) != 0) + Test[Loop].SkipFlag = 1; + else { + /* Found it. Set it to run. Break to skip the rest. */ + Test[Loop].SkipFlag = 0; + break; + } + } + /* skip the rest */ + while (++Loop < Index) + Test[Loop].SkipFlag = 1; + break; + default: + /* error */ + printf("*** ERROR: Unknown action (%d) for SetTest\n", action); + break; + } +} + +void +get_attr_name(char *name, char *tag, int id) +{ + sprintf(name, "Attr%d%s", id, tag); +} + +void +test_open_objects(h5_file_t file, int max_objects) +{ + hid_t hfile = h5_get_hdf5_file(file); + ssize_t nopen = H5Fget_obj_count(hfile, H5F_OBJ_ALL); + if (nopen > max_objects) + { + TestErrPrintf( "*** TOO MANY OBJECTS OPEN: %d > %d " + "at line %4d in %s\n", nopen, max_objects, + (int)__LINE__, __FILE__ ); + + hid_t *list = malloc(sizeof(hid_t)*nopen); + H5Fget_obj_ids(hfile, H5F_OBJ_ALL, nopen, list); + + H5O_info_t info; + int i; + for (i=0; i + +#ifndef PARALLEL_IO +#define MPI_COMM_WORLD 0 +#endif + +/* + * Predefined test verbosity levels. + * + * Convention: + * + * The higher the verbosity value, the more information printed. + * So, output for higher verbosity also include output of all lower + * verbosity. + * + * Value Description + * 0 None: No informational message. + * 1 "All tests passed" + * 2 Header of overall test + * 3 Default: header and results of individual test + * 4 + * 5 Low: Major category of tests. + * 6 + * 7 Medium: Minor category of tests such as functions called. + * 8 + * 9 High: Highest level. All information. + */ +#define VERBO_DEF 0 /* Default */ +#define VERBO_LO 2 /* Low */ +#define VERBO_MED 3 /* Medium */ +#define VERBO_HI 4 /* High */ + +/* + * Verbose queries + * Only None needs an exact match. The rest are at least as much. + */ +#define VERBOSE_DEF (GetTestVerbosity()>=VERBO_DEF) +#define VERBOSE_LO (GetTestVerbosity()>=VERBO_LO) +#define VERBOSE_MED (GetTestVerbosity()>=VERBO_MED) +#define VERBOSE_HI (GetTestVerbosity()>=VERBO_HI) + +#define SKIPTEST 1 +#define ONLYTEST 2 +#define BEGINTEST 3 + +/* + * Print the current location on the standard output stream. + */ +#define AT() TestPrintf (" at %s:%d in %s()...\n", \ + __FILE__, __LINE__, __FUNCTION__); + +/* + * The name of the test is printed by saying TESTING("something") which will + * result in the string `Testing something' being flushed to standard output. + * If a test passes, fails, or is skipped then the PASSED(), H5_FAILED(), or + * SKIPPED() macro should be called. After H5_FAILED() or SKIPPED() the caller + * should print additional information to stdout indented by at least four + * spaces. If the h5_errors() is used for automatic error handling then + * the H5_FAILED() macro is invoked automatically when an API function fails. + */ +#define TESTING(WHAT) {TestPrintf("Testing %-62s",WHAT); fflush(stdout); } +#define TESTING_2(WHAT) {TestPrintf(" Testing %-62s",WHAT); fflush(stdout); } +#define PASSED() {TestPrintf(" PASSED"); fflush(stdout); } +#define H5_FAILED() {TestPrintf("*FAILED*"); fflush(stdout); } +#define H5_WARNING() {TestPrintf("*WARNING*"); fflush(stdout); } +#define SKIPPED() {TestPrintf(" -SKIP-"); fflush(stdout); } +#define TEST_ERROR {H5_FAILED(); AT(); goto error; } +#define FAIL_PUTS_ERROR(s) {H5_FAILED(); AT(); TestPrintf(s); goto error; } + +/* Use %ld to print the value because long should cover most cases. */ +/* Used to make certain a return value _is_not_ a value */ +#define RETURN(ret, val, where) do { \ + if (VERBOSE_HI) TestPrintf( " Call to routine %15s at line %4d " \ + "in %s returned %ld \n", \ + where, (int)__LINE__, __FILE__, \ + (long)(ret)); \ + if ((ret) != (val)) { \ + TestErrPrintf("*** UNEXPECTED RETURN from %s is %ld at line %4d " \ + "in %s\n", where, (long)(ret), (int)__LINE__, __FILE__); \ + } \ +} while(0) + +#define VALUE(val, expected, what) do { \ + if ((val) != (expected)) { \ + TestErrPrintf( "*** INCORRECT VALUE of %s at line " \ + "%d in %s\n", what, (int)__LINE__, \ + __FILE__); \ + } \ +} while(0) + +#define IVALUE(val, expected, what) do { \ + if (VERBOSE_HI) TestPrintf( " Value of int %15s at line %4d " \ + "in %s is %ld =? %ld\n", what, \ + (int)__LINE__, __FILE__, \ + (long)(val), (long)(expected)); \ + VALUE(val, expected, what); \ +} while(0) + +#define FVALUE(val, expected, what) do { \ + if (VERBOSE_HI) TestPrintf( " Value of float %15s at line %4d " \ + "in %s is %g =? %g\n", what, \ + (int)__LINE__, __FILE__, \ + (val), (expected)); \ + VALUE(val, expected, what); \ +} while(0) + +#define CVALUE(val, expected, what) do { \ + if (VERBOSE_HI) TestPrintf( " Value of char %15s at line %4d " \ + "in %s is %c =? %c\n", what, \ + (int)__LINE__, __FILE__, \ + (val), (expected)); \ + VALUE(val, expected, what); \ +} while(0) + + +#define SVALUE(val, expected, what) do { \ + if (VERBOSE_HI) TestPrintf( " Value of string %15s at line %4d " \ + "in %s is %s =? %s\n", what, \ + (int)__LINE__, __FILE__, \ + (val), (expected)); \ + if (strcmp(val,expected) != 0) { \ + TestErrPrintf( "*** INCORRECT VALUE of %d at line " \ + "%4d in %s\n", what, (int)__LINE__, \ + __FILE__); \ + } \ +} while(0) + +/* Used to document process through a test */ +#define MESSAGE(V,A) do { \ + if (V) TestPrintf A; \ +} while(0) + +#define TEST(WHAT) MESSAGE(VERBOSE_DEF,(WHAT "\n")) + +/* definitions for command strings */ +#define VERBOSITY_STR "Verbosity" +#define SKIP_STR "Skip" +#define TEST_STR "Test" +#define CLEAN_STR "Cleanup" + +void TestUsage(void); +void AddTest(const char *TheName, void (*TheCall)(void), + void (*Cleanup)(void), const char *TheDescr, + const void *Parameters); +void TestInfo(const char *ProgName); +void TestParseCmdLine(int argc, char *argv[]); +void PerformTests(void); +void TestSummary(void); +void TestCleanup(void); +void TestInit(const char *ProgName, void (*private_usage)(void), int (*private_parser)(int ac, char *av[])); +int GetTestVerbosity(void); +int SetTestVerbosity(int newval); +int GetTestSummary(void); +int GetTestCleanup(void); +int SetTestNoCleanup(void); +int GetTestExpress(void); +int SetTestExpress(int newval); +void ParseTestVerbosity(char *argv); +int GetTestNumErrs(void); +void IncTestNumErrs(void); +const void *GetTestParameters(void); +int TestPrintf(const char *format, ...); +int TestErrPrintf(const char *format, ...); +void SetTest(const char *testname, int action); + +void +get_attr_name(char *name, char *tag, int id); + +void +test_open_objects(h5_file_t file, int max_objects); + +#endif + diff --git a/tools/H5PartMerge/AUTHORS b/tools/H5PartMerge/AUTHORS new file mode 100644 index 0000000..3bd39e1 --- /dev/null +++ b/tools/H5PartMerge/AUTHORS @@ -0,0 +1 @@ +christof.kraus@psi.ch (PSI, Switzerland) diff --git a/tools/H5PartMerge/COPYING b/tools/H5PartMerge/COPYING new file mode 100644 index 0000000..e69de29 diff --git a/tools/H5PartMerge/ChangeLog b/tools/H5PartMerge/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/tools/H5PartMerge/INSTALL b/tools/H5PartMerge/INSTALL new file mode 100644 index 0000000..07ca44a --- /dev/null +++ b/tools/H5PartMerge/INSTALL @@ -0,0 +1,17 @@ + +Installing H5PartMerge version 0.1 - January 8, 2008 + +On Unix/Linux and similar systems, you can simply type + + ./configure [--prefix=/path] [other options] + make check + make install + +and ignore the rest of this document. + +If configure does not work on your system and you have a reasonably +up-to-date set of tools, running ./autogen.sh before running ./configure +may fix the problem. You can also run the individual commands in +autogen.sh with the --force option, if supported by your version of +the tools. + diff --git a/tools/H5PartMerge/NEWS b/tools/H5PartMerge/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/tools/H5PartMerge/README b/tools/H5PartMerge/README new file mode 100644 index 0000000..e69de29 diff --git a/tools/H5PartMerge/autogen.sh b/tools/H5PartMerge/autogen.sh new file mode 100755 index 0000000..aacf815 --- /dev/null +++ b/tools/H5PartMerge/autogen.sh @@ -0,0 +1,7 @@ +#! /bin/sh + +aclocal +autoconf +automake -a -c + + diff --git a/tools/H5PartMerge/configure.ac b/tools/H5PartMerge/configure.ac new file mode 100644 index 0000000..fdb9d78 --- /dev/null +++ b/tools/H5PartMerge/configure.ac @@ -0,0 +1,160 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +#m4_pattern_allow([AM_CPPFLAGS]) +#m4_pattern_allow([AM_LDFLAGS]) +#m4_pattern_allow([AM_INIT_AUTOMAKE]) +AC_PREREQ(2.59) +AC_INIT([H5PartMerge],[0.1],[christof.kraus@psi.ch]) +AM_INIT_AUTOMAKE + +AC_CONFIG_SRCDIR([./src/H5merge.cpp]) + +# Checks for programs. +AC_PROG_CC +AC_PROG_CPP +AC_PROG_CXX +AC_PROG_INSTALL + +# Checks for libraries. + Z_PREFIX="" + Z_INCL_PATH="" + Z_LIB_PATH="" + AC_ARG_WITH( + [zlib], + AC_HELP_STRING( + [--with-zlib=PREFIX], + [prefix, parent directory, where the z library and header files can be found] + ), + [Z_PREFIX=$withval + Z_INCL_PATH=${Z_PREFIX}/include + Z_LIB_PATH=${Z_PREFIX}/lib] + ) + if test "${Z_PREFIX}" != "" ; then + CPPFLAGS=${CPPFLAGS}" -I"${Z_INCL_PATH} + LDFLAGS=${LDFLAGS}" -L"${Z_LIB_PATH} + fi + AC_CHECK_LIB( + [z], + [main], + [], + [AC_MSG_ERROR(z library not found !)] + ) + +AC_LANG_PUSH(C) + HDF5_PREFIX="" + HDF5_INCL_PATH="" + HDF5_LIB_PATH="" + AC_ARG_WITH( + [hdf5], + AC_HELP_STRING([--with-hdf5=PREFIX], + [prefix, parent directory, where the serial(!) hdf5 library and header files can be found]), + [HDF5_PREFIX=$withval + HDF5_INCL_PATH=${HDF5_PREFIX}"/include " + HDF5_LIB_PATH=${HDF5_PREFIX}"/lib "] + ) + if test "${HDF5_PREFIX}" != "" ; then + CPPFLAGS=${CPPFLAGS}" -I"${HDF5_INCL_PATH}; + LDFLAGS=${LDFLAGS}" -L"${HDF5_LIB_PATH}; + fi + AC_CHECK_HEADERS( + [hdf5.h], + [], + [AC_MSG_ERROR(hdf5.h header file not found!)] + ) + AC_CHECK_LIB( + [hdf5], + [main], + [], + [AC_MSG_ERROR(hdf5 library not found!)] + ) + + H5HUT_PREFIX="" + H5HUT_INCL_PATH="" + H5HUT_LIB_PATH="" + AC_ARG_WITH( + [h5hut], + AC_HELP_STRING([--with-h5hut=PREFIX], + [prefix, parent directory, where the serial(!) h5hut library and header files can be found]), + [H5HUT_PREFIX=$withval + H5HUT_INCL_PATH=${H5HUT_PREFIX}"/include " + H5HUT_LIB_PATH=${H5HUT_PREFIX}"/lib "] + ) + if test "${H5HUT_PREFIX}" != ""; then + CPPFLAGS=${CPPFLAGS}" -I"${H5HUT_INCL_PATH}; + LDFLAGS=${LDFLAGS}" -L"${H5HUT_LIB_PATH}; + fi + AC_CHECK_HEADERS( + [H5hut.h], + [], + [AC_MSG_ERROR(H5hut.h not found!)] + ) + AC_CHECK_LIB( + [H5hut], + [main], + [], + [AC_MSG_ERROR(H5hut library not found!)] + ) + AC_CHECK_LIB( + [H5hutC], + [main], + [], + [AC_MSG_ERROR(H5hut library not found!)] + ) + + +AC_LANG_POP +AC_LANG(C++) + + USE_BOOST_=false + BOOST_INCL_PATH="" + AC_ARG_ENABLE( + [boost], + AC_HELP_STRING([--enable-boost], + [[enable usage of boost::any]]), + [USE_BOOST_=true] ) + + if test "x${USE_BOOST_}" = xtrue; then + AC_ARG_WITH( + [boost], + AC_HELP_STRING([--with-boost-include=DIR], + [include path for the boost library]), + [BOOST_INCL_PATH=$withval] + ) + + if test "${BOOST_INCL_PATH}" != ""; then + TEMP_CPPFLAGS=${CPPFLAGS} + CPPFLAGS=${CPPFLAGS}" -I"${BOOST_INCL_PATH} + fi + + AC_CHECK_HEADERS( + [boost/any.hpp], + [AC_DEFINE_UNQUOTED(USE_BOOST)], + [USE_BOOST_=false + AC_MSG_ERROR(any.hpp not found!)] + ) + fi + + if test "x${USE_BOOST_}" != xtrue ; then + if test "${BOOST_INCL_PATH}" != "" ; then + CPPFLAGS=${TEMP_CPPFLAGS} + fi + fi + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_CONST +AC_TYPE_SIZE_T + +# Checks for library functions. +#AC_FUNC_MALLOC + +CPPFLAGS=$CPPFLAGS" -m64 -mtune=k8" +LDFLAGS=$LDFLAGS" -lm" + +AC_SUBST([AM_CPPFLAGS], $CPPFLAGS) +AC_SUBST([AM_LDFLAGS], $LDFLAGS) + + +AC_CONFIG_FILES([makefile]) +AC_OUTPUT diff --git a/tools/H5PartMerge/makefile.am b/tools/H5PartMerge/makefile.am new file mode 100644 index 0000000..76313df --- /dev/null +++ b/tools/H5PartMerge/makefile.am @@ -0,0 +1,13 @@ +## Makefile.am -- process this file with automake to produce Makefile.in +## authors - christof kraus +## modified - 2008 jan 07, creation, christof kraus +## objective - automake file for H5PartMerge + +#SUBDIRS = src examples + +#SUBDIRS = src examples test doc +CLEANFILES=*~ +bin_PROGRAMS = H5merge +H5merge_SOURCES = ./src/H5merge.cpp ./src/optparse.cpp + +AM_CPPFLAGS = @AM_CPPFLAGS@ diff --git a/tools/H5PartMerge/src/H5merge.cpp b/tools/H5PartMerge/src/H5merge.cpp new file mode 100644 index 0000000..f8a25d8 --- /dev/null +++ b/tools/H5PartMerge/src/H5merge.cpp @@ -0,0 +1,897 @@ +/* Description + * + * This application merges and slices one, two or more H5hut files + * into a single one. The range of each file which should be merged/ + * sliced can be specified on the command line where each input file + * is handled similar to a python array. Negative indices are counted + * from the end of the file i.e. -1 signifies the last step. + * + * Copyright by Christof Kraus, 2007-2008, all rights reserved. + * + * \author Christof Kraus + * + * \date 2007 dec 27 + * + * \warning none + * + * \attention none required + * + * \bug this code is now ported to H5hut August 2011 Andreas Adelmann + * + * \todo + */ + +#include +#include "H5hut.h" + +#include +#include +#include +#include +#include +#include + +#include "optparse.hh" + +#ifdef USE_BOOST +#include +#endif + +#define MAX_LEN 128 + +using namespace std; + +struct StringCmp { + bool operator()(const string s1, const string s2) const { + return s1 < s2; + } +}; + +#ifdef USE_BOOST +using boost::any_cast; +typedef map StringAnyValueMap; +#endif + +typedef map StringIntMap; +typedef map StringInt64Map; + +h5_int64_t copyFileAttribute(h5_file_t *In, h5_file_t *Out, string AttrName, h5_int64_t Type, h5_size_t Num); +h5_int64_t copyFileToStepAttribute(h5_file_t *In, h5_file_t *Out, string AttrName, h5_int64_t Type, h5_size_t Num); + +#ifdef USE_BOOST +h5_int64_t copyFileAttribute(h5_file_t *In, h5_file_t *Out, StringAnyValueMap &FileAttributes, string AttrName, + h5_int64_t Type, h5_size_t Num); +h5_int64_t copyFileToStepAttribute(h5_file_t *In, h5_file_t *Out, StringAnyValueMap &FileAttributes, string AttrName, + h5_int64_t Type, h5_size_t Num); +#endif + +h5_int64_t copyStepAttribute(h5_file_t *In, h5_file_t *Out, string AttrName, h5_int64_t Type, h5_size_t Num); +h5_int64_t copyDataset(h5_file_t *In, h5_file_t *Out, string SetName, + h5_int64_t Type, h5_float64_t *FloatArray, h5_int64_t *IntArray); + +int main(int argc, char **argv) { + + using optparse::STORE; + using optparse::STORE_TRUE; + using optparse::STORE_FALSE; + using optparse::STRING; + using optparse::BOOL; + using optparse::INT; + using optparse::DOUBLE; + + h5_file_t *H5OutFile, *H5InFile; + ifstream testopen; + + int NumInput = 0; + int effNumInput = 0; + string *InputFilenames = NULL; + string Input; + string Range; + string from_str; + int *from = NULL; + string to_str; + int *to = NULL; + + + string OutputFilename; + bool isOutputInput = false; + int OutputIsInput = 0; + + char AttrName[MAX_LEN]; + int NumFileAttr; + StringIntMap FileAttribName; + StringInt64Map FileAttribType; + StringInt64Map FileAttribNumType; + +#ifdef USE_BOOST + StringAnyValueMap FileAttributes; +#endif + + char SetName[MAX_LEN]; + int NumDataSets; + StringIntMap DataSetName; + StringInt64Map DataSetType; + + char StepAttrName[MAX_LEN]; + int NumStepAttr; + StringIntMap StepAttribName; + StringInt64Map StepAttribType; + StringInt64Map StepAttribNumType; + + StringIntMap::iterator itName; + StringInt64Map::iterator itType; + StringInt64Map::iterator itNumType; + + + h5_int64_t NumParticles = 0; + h5_int64_t maxNumParticles = 0; + + h5_int64_t NumSteps; + h5_int64_t effStep = 0; + bool firstStepInput = true; + + h5_float64_t *FloatValues = NULL; + h5_int64_t *IntegerValues = NULL; + + h5_int64_t Type; + h5_int64_t SetType; + h5_size_t NumType; + + h5_size_t SetNum; + + int verbosity = 0; + h5_int64_t rc; + + string usage("H5merge\n\nmerges two or more H5hut files, but can also be used to slice a H5hut file\n\nUsage: H5merge [[options]] input1.h5[from1:to1] [input2.h5[from2:to2] ... inputN.h5[fromN:toN]] output.h5,\n where fromX and toX are the step numbers which determine the range to be merged.\n Negative values are counted from the end of the file\n\noptions:"); + optparse::OptionParser parser(usage); + + parser.add_option("-h", "--help", "help", "Show this message", STORE_TRUE, BOOL, "0"); + parser.add_option("-v", "--verbose", "verbosity", "increase verbosity", STORE, INT, "0"); + parser.add_option("-r", "--replace", "replace", "If output file name is the same as input file replace the input file at the end", STORE_TRUE, BOOL, "0"); + parser.add_option("-f", "--intersect-file-attributes", "intersect-file-attributes", "merge only the intersection of file attributes from all input files", STORE_TRUE, BOOL, "0"); + parser.add_option("-s", "--intersect-step-attributes", "intersect-step-attributes", "merge only the intersection of step attributes from all steps in all input files", STORE_TRUE, BOOL, "0"); + parser.add_option("-d", "--intersect-datasets", "intersect-datasets", "merge only the intersection of datasets of all input files", STORE_TRUE, BOOL, "0"); + try { + parser.parse_args(argc, argv); + if(parser.get("help")) { + parser.help(cerr); + exit(0); + } + } catch(optparse::OptionError e) { + cerr << e.what() << endl << endl; + parser.help(cerr); + exit(1); + } + + if(parser.arguments.size() < 2) { + cerr << "No output file found." << endl << endl; + parser.help(cerr); + exit(1); + } + + NumInput = parser.arguments.size(); //argc - 2; + InputFilenames = new string[NumInput]; + from = new int[NumInput]; + to = new int[NumInput]; + + verbosity = parser.get("verbosity"); + H5SetVerbosityLevel(verbosity); + + /**************************************************************\ + * Parse input file names and ranges to be merged + \**************************************************************/ + + for(int i = 0; i < NumInput - 1; ++i) { + Input = string(parser.arguments[i]); + + if(Input.find("[") != string::npos && Input.find("]") != string::npos) { + Range = Input; + Range.erase(0, Range.find_first_of("[") + 1); + Range.erase(Range.find_first_of("]")); + if(Range.find(":") != string::npos) { + from_str = Range; + from_str.erase(from_str.find_first_of(":")); + if(from_str.length() == 0) + from[effNumInput] = 0; + else + from[effNumInput] = atoi(from_str.c_str()); + + to_str = Range; + to_str.erase(0, to_str.find_first_of(":") + 1); + if(to_str.length() == 0) + to[effNumInput] = -1; + else + to[effNumInput] = atoi(to_str.c_str()); + } else { + if(Range.length() > 0) { + from[effNumInput] = atoi(Range.c_str()); + to[effNumInput] = from[effNumInput]; + } else { + from[effNumInput] = -1; + to[effNumInput] = 0; + } + } + Input.erase(Input.find_first_of("[")); + + } else { + if(Input.find("[") != string::npos) { + Input.erase(Input.find_first_of("[")); + cerr << "error when assigning a range for file " << Input << endl; + exit(1); + } + if(Input.find("]") != string::npos) { + Input.erase(Input.find_first_of("]")); + cerr << "error when assigning a range for file " << Input << endl; + exit(1); + } + from[effNumInput] = 0; + to[effNumInput] = -1; + } + testopen.open(Input.c_str(), ios::in); + if(testopen.good()) { + InputFilenames[effNumInput] = Input; + effNumInput++; + } else { + cerr << "Can't open " << Input << endl; + exit(1); + } + testopen.close(); + } + + OutputFilename = string(parser.arguments[NumInput - 1]); + + /**************************************************************\ + * check whether output file name is also an input filename; + * if true then append '_tmp' to the base name; + * rename it in the end + \**************************************************************/ + for(int i = 0; i < effNumInput; ++i) { + if(InputFilenames[i] == OutputFilename) { + if(!parser.get("replace")) { + cout << "Do you really want to overwrite the input file " << InputFilenames[i] << "? [y/N] "; + char answer = '0'; + cin.get(answer); + + if(answer != 'y' && answer != 'Y') { + cout << "Aborting..." << endl; + exit(1); + } + } + ostringstream tmp; + isOutputInput = true; + OutputIsInput = i; + OutputFilename.erase(OutputFilename.find_last_of(".")); + tmp << OutputFilename << "_tmp.h5"; + OutputFilename = tmp.str(); + break; + } + } + + /**************************************************************\ + * check whether output file allready exists + \**************************************************************/ + if(!isOutputInput) { + testopen.open(OutputFilename.c_str(), ios::in); + if(testopen.good()) { + testopen.close(); + if(!parser.get("replace")) { + cout << "Do you really want to overwrite the file " << OutputFilename << "? [y/N] "; + char answer = '0'; + cin.get(answer); + + if(answer != 'y' && answer != 'Y') { + cout << "Aborting..." << endl; + exit(1); + } + } + } else if(parser.get("replace")) { + cerr << "WARNING: option 'replace' chosen but output filename is not the same" << endl + << " as any of the input filenames" << endl; + } + } + + for(int i = 0; i < effNumInput; ++i) { + H5InFile = H5OpenFile(InputFilenames[i].c_str(), H5_O_RDONLY, 0); + + /**************************************************************\ + * fix range if values are negative + \**************************************************************/ + int n_steps = H5GetNumSteps(H5InFile); + + if(from[i] >= n_steps) + from[i] = n_steps - 1; + else + while(from[i] < 0) + from[i] += n_steps; + + if(to[i] >= n_steps) + to[i] = n_steps - 1; + else + while(to[i] < 0) + to[i] += n_steps; + if(to[i] < from[i]) { + int tmp; + tmp = to[i]; + to[i] = from[i]; + from[i] = tmp; + } + + NumSteps = to[i] - from[i] + 1; + + for(int k = from[i]; k <= to[i]; ++k) { + H5SetStep(H5InFile, k); + + /**************************************************************\ + * determine maximum number of particles in all input files + * and all steps + \**************************************************************/ + h5_int64_t localNumParticles = H5PartGetNumParticles(H5InFile); + if(localNumParticles > maxNumParticles) + maxNumParticles = localNumParticles; + } + + + /**************************************************************\ + * get the *intersection* of names of all file attributes + * --------------- " ------------------- step attributes + * --------------- " ------------------- datasets + * from all files which are to be merged + \**************************************************************/ + if(parser.get("intersect-file-attributes") || + parser.get("intersect-datasets") || + parser.get("intersect-step-attributes")) { + StringIntMap localStepAttribName; + StringInt64Map localStepAttribType; + StringInt64Map localStepAttribNumType; + StringIntMap localDataSetName; + StringInt64Map localDataSetType; + StringIntMap::iterator itlocalName; + StringInt64Map::iterator itlocalType; + StringInt64Map::iterator itlocalNumType; + + + if(parser.get("intersect-file-attributes")) { + NumFileAttr = H5GetNumFileAttribs(H5InFile); + for(int l = 0; l < NumFileAttr; ++l) { + + H5GetFileAttribInfo(H5InFile, l, AttrName, MAX_LEN, &Type, &NumType); + itName = FileAttribName.find(string(AttrName)); + if(itName == FileAttribName.end()) { + FileAttribName.insert(make_pair(string(AttrName), 1)); + FileAttribType.insert(make_pair(string(AttrName), Type)); + FileAttribNumType.insert(make_pair(string(AttrName), NumType)); + } else { + if(FileAttribType[string(AttrName)] == Type) { + if(FileAttribNumType[string(AttrName)] == NumType) { + FileAttribName[string(AttrName)] += 1; + } else { + cerr << "WARNING: found same file attribute (" << AttrName << ") " << endl; + cerr << " with same type but different length! Will be skipped!" << endl; + } + } else { + cerr << "WARNING: found same file attribute (" << AttrName << ") " << endl; + cerr << " with different type! Will be skipped!" << endl; + } + } + } + } + + for(int k = from[i]; k <= to[i]; ++k) { + H5SetStep(H5InFile, k); + + if(parser.get("intersect-datasets")) { + NumDataSets = H5PartGetNumDatasets(H5InFile); + for(h5_int64_t m = 0; m < NumDataSets; ++m) { + H5PartGetDatasetInfo(H5InFile, m, SetName, MAX_LEN, &SetType, &SetNum); + itName = localDataSetName.find(string(SetName)); + if(itName == localDataSetName.end()) { + localDataSetName.insert(make_pair(string(SetName), 1)); + localDataSetType.insert(make_pair(string(SetName), SetType)); + } else { + if(localDataSetType[string(SetName)] == SetType) { + localDataSetName[string(SetName)] += 1; + } else { + cerr << "WARNING: found same dataset (" << SetName << ")" << endl; + cerr << " with different type! Will be skipped!" << endl; + } + } + } + } + + if(parser.get("intersect-step-attributes")) { + NumStepAttr = H5GetNumStepAttribs(H5InFile); + for(int m = 0; m < NumStepAttr; ++m) { + H5GetStepAttribInfo(H5InFile, m, StepAttrName, MAX_LEN, &Type, &NumType); + itlocalName = localStepAttribName.find(string(StepAttrName)); + if(itlocalName == localStepAttribName.end()) { + localStepAttribName.insert(make_pair(string(StepAttrName), 1)); + localStepAttribType.insert(make_pair(string(StepAttrName), Type)); + localStepAttribNumType.insert(make_pair(string(StepAttrName), NumType)); + } else { + if(localStepAttribType[string(StepAttrName)] == Type) { + if(localStepAttribNumType[string(StepAttrName)] == NumType) { + localStepAttribName[string(StepAttrName)] += 1; + } else { + cerr << "WARNING: found same step attribute (" << StepAttrName << ") " << endl; + cerr << " with same type but different length! Will be skipped!" << endl; + } + } else { + cerr << "WARNING: found same step attribute (" << StepAttrName << ")" << endl; + cerr << " with different type! Will be skipped!" << endl; + } + } + } + } + } + + if(parser.get("intersect-datasets")) { + // exclude those datasets which do not occur in all steps in file i + for(itlocalName = localDataSetName.begin(), itlocalType = localDataSetType.begin(); + itlocalName != localDataSetName.end(); itlocalName++, itlocalType++) { + if(itlocalName->second != NumSteps) { + cerr << "WARNING: dataset '" << itlocalName->first << "' in file " + << InputFilenames[i] << " only found in " << itlocalName->second + << " of " << NumSteps << " steps;" << endl; + cerr << " Skipping this dataset;" << endl; + localDataSetName.erase(itlocalName); + } else { + itName = DataSetName.find(itlocalName->first); + if(itName == DataSetName.end()) { + DataSetName.insert(make_pair(itlocalName->first, 1)); + DataSetType.insert(make_pair(itlocalName->first, itlocalType->second)); + } else { + if(DataSetType[itlocalName->first] == itlocalType->second) { + DataSetName[itlocalName->first] += 1; + } else { + cerr << "WARNING: found same dataset (" << itlocalName->first << ")" << endl; + cerr << " with different type! Will be skipped!" << endl; + } + } + } + } + } + + if(parser.get("intersect-step-attributes")) { + // exclude those step attributes which do not occur in all steps in file i + itlocalType = localStepAttribType.begin(); + itlocalNumType = localStepAttribNumType.begin(); + for(itlocalName = localStepAttribName.begin(); itlocalName != localStepAttribName.end(); + itlocalName++, itlocalType++, itlocalNumType++) { + if(itlocalName->second != NumSteps) { + cerr << "WARNING: step attribute '" << itlocalName->first << "' in file " << InputFilenames[i] + << " only found in " << itlocalName->second << " of " << NumSteps << " steps;" << endl; + cerr << " Skipping this step attribute;" << endl; + } else { + itName = StepAttribName.find(itlocalName->first); + if(itName == StepAttribName.end()) { + StepAttribName.insert(make_pair(itlocalName->first, 1)); + StepAttribType.insert(make_pair(itlocalName->first, itlocalType->second)); + StepAttribNumType.insert(make_pair(itlocalName->first, itlocalNumType->second)); + } else { + if(StepAttribType[itlocalName->first] == itlocalType->second) { + if(StepAttribNumType[itlocalName->first] == itlocalNumType->second) { + StepAttribName[itlocalName->first] += 1; + } else { + cerr << "WARNING: found same step attribute (" << itlocalName->first << ") " << endl; + cerr << " with same type but different length! Will be skipped!" << endl; + } + } else { + cerr << "WARNING: found same step attribute (" << itlocalName->first << ")" << endl; + cerr << " with different type! Will be skipped!" << endl; + } + } + } + } + } + + H5CloseFile(H5InFile); + } + } + + + if(parser.get("intersect-file-attributes")) { + //erase all those file attributes which do not occur in all files + itType = FileAttribType.begin(); + itNumType = FileAttribNumType.begin(); + for(itName = FileAttribName.begin(); itName != FileAttribName.end(); itName++, itType++, itNumType++) { + if(itName->second != effNumInput) { + cerr << "WARNING: file attribute '" << itName->first << "' only found in " << itName->second << " of " + << effNumInput << " input files;" << endl; + cerr << " skipping this attribute!" << endl; + FileAttribName.erase(itName); + FileAttribType.erase(itType); + FileAttribNumType.erase(itNumType); + } + } + + if(verbosity > 0) { + cout << "found the following file attributes (intersection of all file attributes):" << endl; + for(itName = FileAttribName.begin(); itName != FileAttribName.end(); ++itName) { + cout << "file attribute '" << itName->first << "'" << endl; + } + cout << endl; + } + } + + if(parser.get("intersect-datasets")) { + //erase all those datasets which do not occur in all steps of all files + for(itName = DataSetName.begin(), itType = DataSetType.begin(); itName != DataSetName.end(); itName++, itType++) { + if(itName->second != effNumInput) { + cerr << "WARNING: dataset '" << itName->first << "' only found in " << itName->second + << " of " << effNumInput << " input files;" << endl; + cerr << " skipping this data set!" << endl; + DataSetName.erase(itName); + DataSetType.erase(itType); + } + } + + if(verbosity > 0) { + cout << "found the following data sets (intersection of all datasets):" << endl; + for(itName = DataSetName.begin(); itName != DataSetName.end(); itName++) + cout << "dataset '" << itName->first << "'" << endl; + cout << endl; + } + } + + if(parser.get("intersect-step-attributes")) { + //erase all those step attributes which do not occur in all steps of all fiels + itType = StepAttribType.begin(); + itNumType = StepAttribNumType.begin(); + for(itName = StepAttribName.begin(); itName != StepAttribName.end(); itName++, itType++, itNumType++) { + if(itName->second != effNumInput) { + cerr << "WARNING: step attribute '" << itName->first << "' only found in " << itName->second + << " of " << effNumInput << " input files;" << endl; + cerr << " skipping this attribute!" << endl; + StepAttribName.erase(itName); + StepAttribType.erase(itType); + StepAttribNumType.erase(itNumType); + } + } + + if(verbosity > 0) { + cout << "found the following step attributes (intersection of all step attributes):" << endl; + for(itName = StepAttribName.begin(); itName != StepAttribName.end(); ++itName) { + cout << "step attribute '" << itName->first << "'" << endl; + } + cout << endl; + } + } + + + H5OutFile = H5OpenFile(OutputFilename.c_str(), H5_O_WRONLY, 0); + if(H5OutFile == NULL) { + cerr << "ABORT: could not open '" << OutputFilename << "' for writing!" << endl; + exit(1); + } + + FloatValues = new h5_float64_t[maxNumParticles]; + IntegerValues = new h5_int64_t[maxNumParticles]; + + for(int i = 0; i < effNumInput; ++i) { + H5InFile = H5OpenFile(InputFilenames[i].c_str(), H5_O_RDONLY, 0); + + H5SetStep(H5InFile, from[i]); + H5SetStep(H5OutFile, effStep); + + if(parser.get("intersect-file-attributes")) { + itType = FileAttribType.begin(); + itNumType = FileAttribNumType.begin(); + for(itName = FileAttribName.begin(); itName != FileAttribName.end(); itName++, itType++, itNumType++) { + if(i == 0) { +#ifdef USE_BOOST + rc = copyFileAttribute(H5InFile, H5OutFile, FileAttributes, itName->first, itType->second, itNumType->second); +#else + rc = copyFileAttribute(H5InFile, H5OutFile, itName->first, itType->second, itNumType->second); +#endif + } else { +#ifdef USE_BOOST + rc = copyFileToStepAttribute(H5InFile, H5OutFile, FileAttributes, itName->first, itType->second, itNumType->second); +#else + rc = copyFileToStepAttribute(H5InFile, H5OutFile, itName->first, itType->second, itNumType->second); +#endif + } + if(rc != H5_SUCCESS) + cerr << "WARNING: could not write file attribute '" << AttrName << "'" << endl; + } + } else { + h5_int64_t NumFileAttr = H5GetNumFileAttribs(H5InFile); + for(h5_int64_t l = 0; l < NumFileAttr; ++l) { + H5GetFileAttribInfo(H5InFile, l, AttrName, MAX_LEN, &Type, &NumType); + if(i == 0) { +#ifdef USE_BOOST + rc = copyFileAttribute(H5InFile, H5OutFile, FileAttributes, string(AttrName), Type, NumType); +#else + rc = copyFileAttribute(H5InFile, H5OutFile, string(AttrName), Type, NumType); +#endif + } else { +#ifdef USE_BOOST + rc = copyFileToStepAttribute(H5InFile, H5OutFile, FileAttributes, string(AttrName), Type, NumType); +#else + rc = copyFileToStepAttribute(H5InFile, H5OutFile, string(AttrName), Type, NumType); +#endif + } + if(rc != H5_SUCCESS) + cerr << "WARNING: could not write file attribute '" << AttrName << "'" << endl; + } + } + + firstStepInput = true; + for(int l = from[i]; l <= to[i]; ++l, ++effStep) { + if(!firstStepInput) { + rc = H5SetStep(H5InFile, l); + if(rc != H5_SUCCESS) { + cerr << "ABORT: could not change to step #" << l << " in input file '" + << InputFilenames[i] << "'" << endl; + rc = H5CloseFile(H5InFile); + rc = H5CloseFile(H5OutFile); + exit(1); + } + rc = H5SetStep(H5OutFile, effStep); + if(rc != H5_SUCCESS) { + cerr << "ABORT: could not change to step #" << effStep << " in output file '" + << OutputFilename << "'" << endl; + rc = H5CloseFile(H5InFile); + rc = H5CloseFile(H5OutFile); + exit(1); + } + } else { + firstStepInput = false; + } + NumParticles = H5PartGetNumParticles(H5InFile); + rc = H5PartSetNumParticles(H5OutFile, NumParticles); + if(rc != H5_SUCCESS) { + cerr << "ABORT: could not set the number of particles in output file '" << OutputFilename << "'" << endl; + rc = H5CloseFile(H5InFile); + rc = H5CloseFile(H5OutFile); + exit(1); + } + if(parser.get("intersect-step-attributes")) { + itType = StepAttribType.begin(); + itNumType = StepAttribNumType.begin(); + for(itName = StepAttribName.begin(); itName != StepAttribName.end(); ++itName, ++itType, ++itNumType) { + rc = copyStepAttribute(H5InFile, H5OutFile, itName->first, itType->second, itNumType->second); + if(rc != H5_SUCCESS) + cerr << "WARNING: could not write step attribute '" << itName->first << "'" << endl; + } + } else { + h5_int64_t NumStepAttr = H5GetNumStepAttribs(H5InFile); + for(h5_int64_t m = 0; m < NumStepAttr; ++m) { + H5GetStepAttribInfo(H5InFile, m, StepAttrName, MAX_LEN, &Type, &NumType); + rc = copyStepAttribute(H5InFile, H5OutFile, string(StepAttrName), Type, NumType); + if(rc != H5_SUCCESS) + cerr << "WARNING: could not write step attribute '" << StepAttrName << "'" << endl; + } + } + + if(parser.get("intersect-datasets")) { + + for(itType = DataSetType.begin(); itType != DataSetType.end(); ++itType) { + rc = copyDataset(H5InFile, H5OutFile, itType->first, itType->second, FloatValues, IntegerValues); + if(rc != H5_SUCCESS) + cerr << "WARNING: could not write dataset '" << itType->first << "'" << endl; + } + } else { + h5_int64_t NumDataSets = H5PartGetNumDatasets(H5InFile); + for(h5_int64_t m = 0; m < NumDataSets; ++m) { + H5PartGetDatasetInfo(H5InFile, m, SetName, MAX_LEN, &SetType, &SetNum); + rc = copyDataset(H5InFile, H5OutFile, string(SetName), SetType, FloatValues, IntegerValues); + if(rc != H5_SUCCESS) + cerr << "WARNING: could not write dataset '" << SetName << "'" << endl; + } + } + + } + rc = H5CloseFile(H5InFile); + } + rc = H5CloseFile(H5OutFile); + + if(isOutputInput) { + rename(OutputFilename.c_str(), InputFilenames[OutputIsInput].c_str()); + } + + delete[] FloatValues; + delete[] IntegerValues; + delete[] InputFilenames; + delete[] from; + delete[] to; +} + +h5_int64_t copyFileAttribute(h5_file_t *In, h5_file_t *Out, string AttrName, h5_int64_t Type, h5_size_t Num) { + h5_int64_t rc; + if(Type == H5T_NATIVE_DOUBLE) { + void *Attrib = (double *)malloc(sizeof(double) * Num); + rc = H5ReadFileAttribFloat64(In, AttrName.c_str(), (double *)Attrib); + if(rc == H5_SUCCESS) + rc = H5WriteFileAttribFloat64(Out, AttrName.c_str(), (double *)Attrib, Num); + free(Attrib); + return rc; + } else if(Type == H5T_NATIVE_CHAR) { + void *Attrib = (char *)malloc(sizeof(char) * Num); + rc = H5ReadFileAttribString(In, AttrName.c_str(), (char *)Attrib); + if(rc == H5_SUCCESS) + rc = H5WriteFileAttribString(Out, AttrName.c_str(), (char *)Attrib); + free(Attrib); + return rc; + } else if(Type == H5T_NATIVE_INT64) { + void *Attrib = (h5_int64_t *)malloc(sizeof(h5_int64_t) * Num); + rc = H5ReadFileAttribInt64(In, AttrName.c_str(), (h5_int64_t *)Attrib); + if(rc == H5_SUCCESS) + rc = H5WriteFileAttribInt64(Out, AttrName.c_str(), (h5_int64_t *)Attrib, Num); + free(Attrib); + return rc; + } else { + cerr << "WARNING: unknown type for file attribue " << AttrName << "! Skipping it. " << endl; + return H5_ERR_INVAL; + } +} + + +h5_int64_t copyFileToStepAttribute(h5_file_t *In, h5_file_t *Out, string AttrName, h5_int64_t Type, h5_size_t Num) { + h5_int64_t rc; + if(Type == H5T_NATIVE_DOUBLE) { + void *Attrib = (double *)malloc(sizeof(double) * Num); + rc = H5ReadFileAttribFloat64(In, AttrName.c_str(), (double *)Attrib); + if(rc == H5_SUCCESS) + rc = H5WriteStepAttribFloat64(Out, AttrName.c_str(), (double *)Attrib, Num); + free(Attrib); + return rc; + } else if(Type == H5T_NATIVE_CHAR) { + void *Attrib = (char *)malloc(sizeof(char) * Num); + rc = H5ReadFileAttribString(In, AttrName.c_str(), (char *)Attrib); + if(rc == H5_SUCCESS) + rc = H5WriteStepAttribString(Out, AttrName.c_str(), (char *)Attrib); + free(Attrib); + return rc; + } else if(Type == H5T_NATIVE_INT64) { + void *Attrib = (h5_int64_t *)malloc(sizeof(h5_int64_t) * Num); + rc = H5ReadFileAttribInt64(In, AttrName.c_str(), (h5_int64_t *)Attrib); + if(rc == H5_SUCCESS) + rc = H5WriteStepAttribInt64(Out, AttrName.c_str(), (h5_int64_t *)Attrib, Num); + free(Attrib); + return rc; + } else { + cerr << "WARNING: unknown type for file attribue " << AttrName << "! Skipping it. " << endl; + return H5_ERR_INVAL; + } +} + +h5_int64_t copyStepAttribute(h5_file_t *In, h5_file_t *Out, string AttrName, h5_int64_t Type, h5_size_t Num) { + h5_int64_t rc; + if(Type == H5T_NATIVE_DOUBLE) { + void *Attrib = (double *)malloc(sizeof(double) * Num);; + rc = H5ReadStepAttribFloat64(In, AttrName.c_str(), (double *)Attrib); + if(rc == H5_SUCCESS) + rc = H5WriteStepAttribFloat64(Out, AttrName.c_str(), (double *)Attrib, Num); + free(Attrib); + return rc; + } else if(Type == H5T_NATIVE_CHAR) { + void *Attrib = (char *)malloc(sizeof(char) * Num);; + rc = H5ReadStepAttribString(In, AttrName.c_str(), (char *)Attrib); + if(rc == H5_SUCCESS) + rc = H5WriteStepAttribString(Out, AttrName.c_str(), (char *)Attrib); + free(Attrib); + return rc; + } else if(Type == H5T_NATIVE_INT64) { + void *Attrib = (h5_int64_t *)malloc(sizeof(h5_int64_t) * Num); + rc = H5ReadStepAttribInt64(In, AttrName.c_str(), (h5_int64_t *)Attrib); + if(rc == H5_SUCCESS) + rc = H5WriteStepAttribInt64(Out, AttrName.c_str(), (h5_int64_t *)Attrib, Num); + free(Attrib); + return rc; + } else { + cerr << "WARNING: unknown type for step attribute " << AttrName << "! Skipping it." << endl; + return H5_ERR_INVAL; + } +} + + +h5_int64_t copyDataset(h5_file_t *In, h5_file_t *Out, string SetName, h5_int64_t Type, h5_float64_t *FloatArray, h5_int64_t *IntegerArray) { + h5_int64_t rc; + if(Type == H5T_NATIVE_DOUBLE) { + rc = H5PartReadDataFloat64(In, SetName.c_str(), FloatArray); + if(rc == H5_SUCCESS) + rc = H5PartWriteDataFloat64(Out, SetName.c_str(), FloatArray); + return rc; + } else if(Type == H5T_NATIVE_INT64) { + rc = H5PartReadDataInt64(In, SetName.c_str(), IntegerArray); + if(rc == H5_SUCCESS) + rc = H5PartWriteDataInt64(Out, SetName.c_str(), IntegerArray); + return rc; + } else { + cerr << "WARNING: unknown type for dataset " << SetName << "! Skipping it." << endl; + return H5_ERR_INVAL; + } +} + +#ifdef USE_BOOST +h5_int64_t copyFileAttribute(h5_file_t *In, h5_file_t *Out, StringAnyValueMap &FileAttributes, string AttrName, h5_int64_t Type, h5_int64_t Num) { + h5_int64_t rc; + if(Type == H5T_NATIVE_DOUBLE) { + void *Attrib = (double *)malloc(sizeof(double) * Num); + rc = H5PartReadFileAttrib(In, AttrName.c_str(), (double *)Attrib); + if(rc == H5_SUCCESS) + rc = H5PartWriteFileAttrib(Out, AttrName.c_str(), Type, (double *)Attrib, Num); + if(rc == H5_SUCCESS) + FileAttributes.insert(make_pair(AttrName, boost::any(*(double *)Attrib))); + free(Attrib); + return rc; + } else if(Type == H5T_NATIVE_CHAR) { + void *Attrib = (char *)malloc(sizeof(char) * Num); + rc = H5PartReadFileAttrib(In, AttrName.c_str(), (char *)Attrib); + if(rc == H5_SUCCESS) + rc = H5PartWriteFileAttrib(Out, AttrName.c_str(), Type, (char *)Attrib, Num); + if(rc == H5_SUCCESS) + FileAttributes.insert(make_pair(AttrName, boost::any(string((char *)Attrib)))); + free(Attrib); + return rc; + } else if(Type == H5T_NATIVE_INT64) { + void *Attrib = (h5_int64_t *)malloc(sizeof(h5_int64_t) * Num); + rc = H5PartReadFileAttrib(In, AttrName.c_str(), (h5_int64_t *)Attrib); + if(rc == H5_SUCCESS) + rc = H5PartWriteFileAttrib(Out, AttrName.c_str(), Type, (h5_int64_t *)Attrib, Num); + if(rc == H5_SUCCESS) + FileAttributes.insert(make_pair(AttrName, boost::any(*(h5_int64_t *)Attrib))); + free(Attrib); + return rc; + } else { + cerr << "WARNING: unknown type for file attribue " << AttrName << "! Skipping it. " << endl; + return H5_ERR_INVAL; + } +} + + +h5_int64_t copyFileToStepAttribute(h5_file_t *In, h5_file_t *Out, StringAnyValueMap &FileAttributes, string AttrName, h5_int64_t Type, h5_int64_t Num) { + h5_int64_t rc; + if(Type == H5T_NATIVE_DOUBLE) { + void *Attrib = (double *)malloc(sizeof(double) * Num); + rc = H5PartReadFileAttrib(In, AttrName.c_str(), (double *)Attrib); + if(rc == H5_SUCCESS) { + if(FileAttributes.find(AttrName) == FileAttributes.end()) { + rc = H5PartWriteStepAttrib(Out, AttrName.c_str(), Type, (double *)Attrib, Num); + if(rc == H5_SUCCESS) + FileAttributes.insert(make_pair(AttrName, boost::any(*(double *)Attrib))); + } else if(any_cast(FileAttributes[AttrName]) != *(double *)Attrib) { + rc = H5PartWriteStepAttrib(Out, (AttrName + " changed to").c_str(), Type, (double *)Attrib, Num); + if(rc == H5_SUCCESS) + FileAttributes[AttrName] = boost::any(*(double *)Attrib); + } + } + free(Attrib); + return rc; + } else if(Type == H5T_NATIVE_CHAR) { + void *Attrib = (char *)malloc(sizeof(char) * Num); + rc = H5PartReadFileAttrib(In, AttrName.c_str(), (char *)Attrib); + if(rc == H5_SUCCESS) { + if(FileAttributes.find(AttrName) == FileAttributes.end()) { + rc = H5PartWriteStepAttrib(Out, AttrName.c_str(), Type, (char *)Attrib, Num); + if(rc == H5_SUCCESS) + FileAttributes.insert(make_pair(AttrName, boost::any(string((char *)Attrib)))); + } else if(strcmp((any_cast(FileAttributes[AttrName])).c_str(), (char *)Attrib) != 0) { + rc = H5PartWriteStepAttrib(Out, (AttrName + " changed to").c_str(), Type, (char *)Attrib, Num); + if(rc == H5_SUCCESS) + FileAttributes[AttrName] = boost::any(string((char *)Attrib)); + } + } + free(Attrib); + return rc; + } else if(Type == H5T_NATIVE_INT64) { + void *Attrib = (h5_int64_t *)malloc(sizeof(h5_int64_t) * Num); + rc = H5PartReadFileAttrib(In, AttrName.c_str(), (h5_int64_t *)Attrib); + if(rc == H5_SUCCESS) { + if(FileAttributes.find(AttrName) == FileAttributes.end()) { + rc = H5PartWriteStepAttrib(Out, AttrName.c_str(), Type, (h5_int64_t *)Attrib, Num); + FileAttributes.insert(make_pair(AttrName, boost::any((h5_int64_t *)Attrib))); + } else if(any_cast(FileAttributes[AttrName]) != *(h5_int64_t *)Attrib) { + rc = H5PartWriteStepAttrib(Out, (AttrName + " changed to").c_str(), Type, (h5_int64_t *)Attrib, Num); + if(rc == H5_SUCCESS) + FileAttributes[AttrName] = boost::any((h5_int64_t *)Attrib); + } + } + free(Attrib); + return rc; + } else { + cerr << "WARNING: unknown type for file attribue " << AttrName << "! Skipping it. " << endl; + return H5_ERR_INVAL; + } +} +#endif diff --git a/tools/H5PartMerge/src/optparse.cpp b/tools/H5PartMerge/src/optparse.cpp new file mode 100644 index 0000000..582f1b1 --- /dev/null +++ b/tools/H5PartMerge/src/optparse.cpp @@ -0,0 +1,309 @@ +/* + * Implementation of optparse.h + * + * Roman Geus, 2005 + * + */ + +#include +#include +#include "optparse.hh" + +using namespace std; + +namespace optparse { + +/********************** Option **********************/ + +Option::Option (string shrt, string lng, string dest, + string hlp, action_t act, string dfault, type_t type, string allowed_args) + : action (act), + shrt_flag (shrt), + lng_flag (lng), + help (hlp), + destination (dest), + dfault_(dfault), + type_(type), + allowed_args_(allowed_args) +{} + +Option::~Option () {} + +bool +Option::is_allowed(std::string argument) { + // Test type + // FIXME: implement that + + // Test allowed values + if (allowed_args_ == "") + return true; + + size_t pos_begin = 0; + do { + size_t pos_comma = allowed_args_.find(',', pos_begin); + if (pos_comma == string::npos) + pos_comma = allowed_args_.size(); + if (allowed_args_.substr(pos_begin, pos_comma-pos_begin) == argument) + return true; + pos_begin = pos_comma + 1; + } while(pos_begin < allowed_args_.size()); + return false; +} + +/******************** OptionParser *******************/ + +OptionParser::OptionParser (string usage) + : use_msg (usage) +{ } + +OptionParser::~OptionParser () {} + +void +OptionParser::add_option(string shrt_flag, string lng_flag, string destination, + string help, action_t act, type_t type, string dfault, + string allowed_values) +{ + Option option(shrt_flag, lng_flag, destination, help, act, dfault, type, allowed_values); + + /* Add the option to our list of options. */ + opts.push_back(option); + + /* Set the default value for this option, this not only allows you to + * set default values but insures that every option's destination will + * be in our dictionary, even if the value is only "". + */ + set_option(option, dfault); +} + +string OptionParser::get_option(std::string option_name) { + string arg(options[option_name]); + size_t colon_pos = arg.find(':'); + return arg.substr(0, colon_pos); +} + +void +OptionParser::parse_args (int argc, char **argv) { + /* Walk through the arguments and sort them into options + * or arguments. + */ + for (int i = 1; i < argc; i++) { + /* If we start with a '-' we're probably a pair + * so we need to figure out which option it is. find_opt() is + * where the real work is done. + */ + if (argv[i][0] == '-') + if (argv[i][1] == '-') + find_opt_long(argc, argv, i); + else + find_opt_short(argc, argv, i); + + /* If we're looking at an argument (i.e. a value with no flag who's + * meaning is determined by position) just append it into the + * arguments list. + */ + else + arguments.insert(arguments.end(), argv[i]); + } +} + +void +OptionParser::help (ostream& os) { + const size_t WORD_WRAP = 50; // max width of last column + + // Determine column width for short options + size_t shrt_flag_max_len = 0; + for (size_t i=0; i < opts.size(); ++ i) { + stringstream buf; + buf << opts[i].shrt_flag; + if (opts[i].shrt_flag != "" && opts[i].action == STORE) + buf << " " << type2string(opts[i].type_); + if (buf.str().size() > shrt_flag_max_len) + shrt_flag_max_len = buf.str().size(); + } + + // Determine column width for long options + size_t lng_flag_max_len = 0; + for (size_t i=0; i < opts.size(); ++ i) { + stringstream buf; + buf << opts[i].lng_flag; + if (opts[i].action == STORE) + buf << "=" << type2string(opts[i].type_); + if (buf.str().size() > lng_flag_max_len) + lng_flag_max_len = buf.str().size(); + } + + os << use_msg << endl; + for (size_t i=0; i < opts.size(); ++ i) { + stringstream line; + line << " "; + + // short option column + stringstream shrt_buf; + shrt_buf << opts[i].shrt_flag; + if (opts[i].shrt_flag != "" && opts[i].action == STORE) + shrt_buf << " " << type2string(opts[i].type_); + line << ' ' << shrt_buf.str(); + for (size_t k = 0; k < shrt_flag_max_len-shrt_buf.str().size()+2; ++ k) + line << ' '; + + // long option column + stringstream buf; + buf << opts[i].lng_flag; + if (opts[i].action == STORE) + buf << "=" << type2string(opts[i].type_); + line << buf.str(); + for (size_t k = 0; k < lng_flag_max_len-buf.str().size()+4; ++ k) + line << ' '; + + // help column + os << line.str(); + size_t help_col = line.str().size(); + line.str(""); + + line << opts[i].help; + bool is_allowed = opts[i].allowed_args_ != ""; + bool is_default = opts[i].action == STORE && opts[i].dfault_ != ""; + if (is_allowed || is_default) { + line << " ("; + if (is_allowed) { + line << "possible values="; + size_t pos_begin = 0; + size_t pos_comma = opts[i].allowed_args_.find(',', pos_begin); + while (pos_comma != string::npos) { + line << '\'' << opts[i].allowed_args_.substr(pos_begin, pos_comma-pos_begin) << "\',"; + pos_begin = pos_comma + 1; + pos_comma = opts[i].allowed_args_.find(',', pos_begin); + } + line << '\'' << opts[i].allowed_args_.substr(pos_begin) << '\''; + if (is_default) + line << ", "; + } + if (is_default) + line << "default=\'" << opts[i].dfault_ << "\'"; + line << ')'; + } + + // split over several lines + size_t begin_pos = 0; + size_t last_pos = 0; + size_t next_pos; + + do { + next_pos = line.str().find_first_of(" ,", last_pos+1); + if (next_pos == string::npos) + next_pos = line.str().size()-1; + if (last_pos == line.str().size()-1 || (next_pos+1 - begin_pos > WORD_WRAP && last_pos > begin_pos)) { + if (begin_pos != 0) + for (size_t k = 0; k < help_col+2; ++ k) + os << ' '; + os << line.str().substr(begin_pos, last_pos+1 - begin_pos) << endl; + begin_pos = last_pos+1; + last_pos = begin_pos; + } else + last_pos = next_pos; + } while (begin_pos != line.str().size()); + } + } + +void +OptionParser::find_opt_short(int argc, char **argv, int &index) { + /* Step through our list of known options. */ + for (size_t i = 0; i < opts.size(); i++) { + /* Uses the overridden == operator for the Options class + * to compare argv[index] to the flags of each Option. + */ + if (opts[i].shrt_flag == (string)argv[index]) { + switch (opts[i].action) { + case STORE_FALSE: + set_option(opts[i], "0"); + break; + case STORE_TRUE: + set_option(opts[i], "1"); + break; + case STORE: + /* Set the value and return if we've found a match. */ + if (index >= argc-1) + throw OptionError(argv[index], "Missing option argument"); + set_option(opts[i], argv[index+1]); + index++; + break; + default: + break; + }; + return; + } + } + + /* If we haven't found a match this is not a known argument. */ + throw OptionError(argv[index], "Unknown option"); +} + +void +OptionParser::find_opt_long(int argc, char **argv, int &index) { + // Split option and argument at "=" + string option; + string argument; + string arg_str(argv[index]); + size_t equal_pos = arg_str.find('='); + if (equal_pos != string::npos) { + option = arg_str.substr(0, equal_pos); + argument = arg_str.substr(equal_pos+1, string::npos); + } else + option = arg_str; + + /* Step through our list of known options. */ + for (size_t i = 0; i < opts.size(); i++) { + if (opts[i].lng_flag == option) { + switch (opts[i].action) { + case STORE_FALSE: + if (argument != "") + throw OptionError(option, "No argument expected for this option"); + set_option(opts[i], "0"); + break; + case STORE_TRUE: + if (argument != "") + throw OptionError(option, "No argument expected for this option"); + set_option(opts[i], "1"); + break; + case STORE: + if (argument == "") + throw OptionError(option, "Missing option argument"); + set_option(opts[i], argument); + break; + default: + break; + }; + return; + } + } + + /* If we haven't found a match this is not a known argument. */ + throw OptionError(option, "Unknown option"); +} + +void OptionParser::set_option(Option& option, std::string argument) { + if (option.is_allowed(argument)) + options[option.destination] = argument; + else + throw OptionError("", "Invalid argument for option"); +} + +string OptionParser::type2string(type_t type) { + if (type == STRING) + return string("STRING"); + else if (type == DOUBLE) + return string("DOUBLE"); + else if (type == INT) + return string("INT"); + else if (type == BOOL) + return string("BOOL"); + else + return ""; +} + +template<> bool OptionParser::get(std::string option_name) +{ + return get_option(option_name) == "1"; +} + +} // namespace optparse diff --git a/tools/H5PartMerge/src/optparse.hh b/tools/H5PartMerge/src/optparse.hh new file mode 100644 index 0000000..7183673 --- /dev/null +++ b/tools/H5PartMerge/src/optparse.hh @@ -0,0 +1,180 @@ +/* + * optparse.h + * + * An option parser for C++ modeled after the optparse Python + * module. Create an instance of OptionParser in your program + * and you can add options to it then call the method + * parse_args with argc and argv and it will parse them. The + * '-h' and '--help' options are built in, they print the + * usage message. + * + * W. Evan Sheehan + * + */ + +#ifndef OPTPARSE_H +#define OPTPARSE_H + +#include +#include +#include +#include +#include + +namespace optparse { + +/** + * Action type. + * Use this type to determine what we're storing, naming + * convention is the same as the optparse python module. + * Even with STORE_FALSE and STORE_TRUE the values are + * going to be stored as strings, false is "0" true is "1" + * so you can just atoi() the value and use that for tests. + */ +typedef enum {STORE_FALSE=0, STORE_TRUE, STORE} action_t; + +/** + * Option argument type. + * Defines expected option argument type. + */ +typedef enum {STRING=0, BOOL, INT, DOUBLE} type_t; + +/** Option for OptionParser */ +class Option { +public: + Option (std::string shrt, std::string lng, std::string dest, + std::string hlp, action_t act, std::string dfault, type_t type, + std::string allowed_args); + ~Option (); + + /** + * Validate option argument. + * Test if argument is valid for the option. The argument must be valid w.r.t. + * to type_ and allowed_values_. + * @param argument Argument to be tested. + * @return true if argument is valid. + */ + bool is_allowed(std::string argument); + + action_t action; // define what we store + std::string shrt_flag; // short flag, something like -o + std::string lng_flag; // long flag, something like --outfile + std::string help; // help message about the option + std::string destination; // the key used to store this option in the parser. + /** + * Default value. An empty string means no default value exist. + */ + std::string dfault_; + /** + * Expected type the argument of this option should have. + * Only relevant for STORE action. + * Used for generating the usage string. + */ + type_t type_; + std::string allowed_args_; //!< Comma-separated list of allowed option arguments. +}; + +class OptionError : public std::runtime_error { +public: + OptionError(std::string option, std::string error_msg) + : std::runtime_error("") { + std::ostringstream str; + str << "OptionParser error: option: " << option << ", cause: " << error_msg; + msg_ = str.str(); + } + virtual ~OptionError() throw() {} + /** + * Human-readable error message. + * @return Pointer to error message. + */ + virtual const char* what() const throw() { return msg_.c_str(); } +protected: + std::string msg_; +}; + +/** Option parser. */ +class OptionParser { +public: + OptionParser (std::string usage=""); + virtual ~OptionParser (); + + /** + * Add an option to the parser. + * @param shrt_flag Short option name, like e.g. "-q". + * @param lng_flag Long option name, like e.g. "--quiet" + * @param destination Key under which the option argument is stored in the dictionary. + * @param help Help string for generating the usage info. + * @param act Action, one of STORE, STORE_TRUE, STORE_FALSE. + * @param type Type info of the expected option argument. One of INT, DOUBLE, STRING, BOOL. + * @param dfault Default value. Value stored in the dictionary if the option is not given. + * @param allowed_values List of possible option values. + * A string of comma-separated allowed values. An empty string means + * that any value is allowed. + */ + void add_option (std::string shrt_flag, std::string lng_flag, + std::string destination, std::string help="", action_t act=STORE, + type_t type=STRING, std::string dfault="", + std::string allowed_values=""); + + /** + * Get option argument. + * @param option_name Name of option, as given in "destination" parameter of "add_option". + * @return Option argument with type appendix removed. + */ + std::string get_option(std::string option_name); + template T get(std::string option_name); + /* Parse the commandline args. */ + void parse_args (int argc, char **argv); + /** + * Write usage info to stream. + * The usage info includes a formatted list of all options the parser knows about, + * including the help string, expected argument type and default value. + * @param os Output stream the usage info is written to. + */ + void help (std::ostream& os); + /** + * Convert type_t type to human-readable string. + * This is used for generating the usage string and also in + * TypeOptionParser to encode the argument type in the options dictionary. + * @see help + * @param type Type. + * @return Converted string. + */ + std::string type2string(type_t type); + /** + * Type of "options" dictionary. + */ + typedef std::map options_type; + options_type options; //!< Dictionary of options. Use options[key] to access. + std::vector arguments; //!< List of positional arguments. +protected: + /** + * Set option in dictionary. + * Function the parser uses to store an option argument or a default value in + * options dictionary. Can be overridden in a subclass to store additional info. + * @param option Option object. + * @param argument Option argument to store. + */ + virtual void set_option(Option& option, std::string argument); + +private: + std::string use_msg; //!< Usage message. + std::vector