Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
SphereDecomp.hpp
Go to the documentation of this file.
00001 #ifndef SPHERE_DECOMP_HPP
00002 #define SPHERE_DECOMP_HPP
00003 
00004 #include "moab/Interface.hpp"
00005 
00006 class SphereDecomp
00007 {
00008   public:
00009     SphereDecomp( moab::Interface* impl );
00010 
00011     moab::ErrorCode build_sphere_mesh( const char* sphere_radii_tag_name, moab::EntityHandle* hex_set = NULL );
00012 
00013   private:
00014     //! compute subdivision vertices on entities of specified dimension
00015     moab::ErrorCode compute_nodes( const int dim );
00016 
00017     //! subdivide tets based on subdiv vertices, returning in lists according
00018     //! to whether they're inside or outside spheres
00019     moab::ErrorCode build_hexes( std::vector< moab::EntityHandle >& sphere_hexes,
00020                                  std::vector< moab::EntityHandle >& interstic_hexes );
00021 
00022     //! subdivide an individual tet
00023     moab::ErrorCode subdivide_tet( moab::EntityHandle tet,
00024                                    std::vector< moab::EntityHandle >& sphere_hexes,
00025                                    std::vector< moab::EntityHandle >& interstic_hexes );
00026 
00027     //! retrieve the subdivision vertices for a given entity in a given tet,
00028     //! placing them in the array oriented wrt the tet
00029     moab::ErrorCode retrieve_subdiv_verts( moab::EntityHandle tet,
00030                                            moab::EntityHandle this_ent,
00031                                            const moab::EntityHandle* tet_conn,
00032                                            const int dim,
00033                                            moab::EntityHandle* subdiv_verts );
00034 
00035     //! tag used to hold sphere radii (assigned to vertices)
00036     moab::Tag sphereRadiiTag;
00037 
00038     //! used to store subdiv vertices for a given d>0 entity
00039     moab::Tag subdivVerticesTag;
00040 
00041     //! MOAB interface ptr
00042     moab::Interface* mbImpl;
00043 };
00044 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines