moab
MeshTopoUtil.hpp
Go to the documentation of this file.
00001 
00017 #ifndef MOAB_MESH_TOPO_UTIL_HPP
00018 #define MOAB_MESH_TOPO_UTIL_HPP
00019 
00020 #include "moab/Forward.hpp"
00021 
00022 namespace moab {
00023 
00030 class MeshTopoUtil
00031 {
00032 public:
00033   MeshTopoUtil(Interface *impl) : mbImpl(impl) {}
00034   
00035   ~MeshTopoUtil() {}
00036 
00038   ErrorCode construct_aentities(const Range &vertices);
00039 
00041   ErrorCode get_average_position(Range &entities,
00042                                    double *avg_position);
00043 
00045   ErrorCode get_average_position(const EntityHandle entity,
00046                                    double *avg_position);
00047 
00049   ErrorCode get_average_position(const EntityHandle *entities,
00050                                    const int num_entities,
00051                                    double *avg_position);
00052 
00057   ErrorCode get_manifold(const EntityHandle star_entity,
00058                            const int target_dim,
00059                            Range &manifold);
00060   
00065   ErrorCode star_entities(const EntityHandle star_center,
00066                             std::vector<EntityHandle> &star_entities,
00067                             bool &bdy_entity,
00068                             const EntityHandle starting_star_entity = 0,
00069                             std::vector<EntityHandle> *star_entities_dp1 = NULL,
00070                             Range *star_entities_candidates_dp1 = NULL);
00071 
00076   ErrorCode star_entities_nonmanifold(const EntityHandle star_entity,
00077                                         std::vector<std::vector<EntityHandle> > &stars,
00078                                         std::vector<bool> *bdy_flags = NULL,
00079                                         std::vector<std::vector<EntityHandle> > *dp2_stars = NULL);
00080 
00085   ErrorCode star_next_entity(const EntityHandle star_center,
00086                                const EntityHandle last_entity,
00087                                const EntityHandle last_dp1,
00088                                Range *star_candidates_dp1,
00089                                EntityHandle &next_entity,
00090                                EntityHandle &next_dp1);
00091   
00093   ErrorCode get_bridge_adjacencies(Range &from_entities,
00094                                      int bridge_dim,
00095                                      int to_dim, 
00096                                      Range &to_ents,
00097                                      int num_layers = 1);
00098   
00100   ErrorCode get_bridge_adjacencies(const EntityHandle from_entity,
00101                                      const int bridge_dim,
00102                                      const int to_dim,
00103                                      Range &to_adjs);
00104 
00106   EntityHandle common_entity(const EntityHandle ent1,
00107                                const EntityHandle ent2,
00108                                const int dim);
00109   
00117   ErrorCode opposite_entity(const EntityHandle parent,
00118                               const EntityHandle child,
00119                               EntityHandle &opposite_element);
00120 
00125   ErrorCode split_entity_nonmanifold(EntityHandle split_ent,
00126                                        Range &old_adjs,
00127                                        Range &new_adjs,
00128                                        EntityHandle &new_entity);
00129   
00132 
00138   ErrorCode split_entities_manifold(Range &entities,
00139                                       Range &new_entities,
00140                                       Range *fill_entities);
00141   
00144 
00155   ErrorCode split_entities_manifold(EntityHandle *entities,
00156                                       const int num_entities,
00157                                       EntityHandle *new_entities,
00158                                       Range *fill_entities,
00159                                       EntityHandle *gowith_ents = NULL);
00160 
00164   bool equivalent_entities(const EntityHandle entity,
00165                            Range *equiv_ents = NULL);
00166   
00167                                   
00168 private:
00169   Interface *mbImpl;
00170   
00171 };
00172 
00173 } // namespace moab 
00174 
00175 #endif
00176 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines