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
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
/**
 * MOAB, a Mesh-Oriented datABase, is a software component for creating,
 * storing and accessing finite element mesh data.
 *
 * Copyright 2004 Sandia Corporation.  Under the terms of Contract
 * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
 * retains certain rights in this software.
 *
 * This 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.
 *
 */

#ifndef MB_READ_UTIL_HPP
#define MB_READ_UTIL_HPP

#ifndef IS_BUILDING_MB
#error "ReadUtil.hpp isn't supposed to be included into an application"
#endif

#include "moab/ReadUtilIface.hpp"

namespace moab
{

class Core;
class Error;

class ReadUtil : public ReadUtilIface
{
  private:
    //! Pointer to the Core
    Core* mMB;

  public:
    //! Constructor takes Core pointer
    ReadUtil( Core* mdb, Error* error_handler );

    //! Destructor
    ~ReadUtil() {}

    //! Get arrays for coordinate data from the MB
    ErrorCode get_node_coords( const int num_arrays,<--- Function in derived class<--- Function in derived class
                               const int num_nodes,
                               const int preferred_start_id,
                               EntityHandle& actual_start_handle,
                               std::vector< double* >& arrays,
                               int sequence_size = -1 );

    //! Get array for connectivity data from the MB
    ErrorCode get_element_connect( const int num_elements,<--- Function in derived class<--- Function in derived class
                                   const int verts_per_element,
                                   const EntityType mdb_type,
                                   const int preferred_start_id,
                                   EntityHandle& actual_start_handle,
                                   EntityHandle*& array,
                                   int sequence_size = -1 );

    /**
     *\brief Gather entities related to those in the partition
     * Gather entities related to those in the input partition. Related
     * means down-adjacent to, contained in, etc.
     * \param partition Entities for which to gather related entities
     * \param related_ents Related entities
     * \param all_sets If non-NULL, all sets in mesh instance are returned
     * in the pointed-to range
     */
    ErrorCode gather_related_ents( Range& partition, Range& related_ents, EntityHandle* file_set = NULL );<--- Function in derived class<--- Function in derived class

    ErrorCode create_entity_sets( EntityID num_sets,<--- Function in derived class<--- Function in derived class
                                  const unsigned* set_flags,
                                  EntityID preffered_start_id,
                                  EntityHandle& actual_start_handle );

    //! Tell MB which elements have been added to the database
    ErrorCode update_adjacencies( const EntityHandle start_handle,<--- Function in derived class<--- Function in derived class
                                  const int number_elements,
                                  const int number_vertices_per_element,
                                  const EntityHandle* conn_array );

    //! Given an ordered list of bounding entities and the sense of
    //! those entities, return an ordered list of vertices
    ErrorCode get_ordered_vertices( EntityHandle* bound_ents,<--- Function in derived class<--- Function in derived class
                                    int* sense,
                                    int num_bound,
                                    int dim,
                                    EntityHandle* bound_verts,
                                    EntityType& etype );

    ErrorCode assign_ids( Tag id_tag, const Range& ents, int start = 0 );<--- Function in derived class<--- Function in derived class

    ErrorCode assign_ids( Tag id_tag, const EntityHandle* ents, size_t num_ents, int start = 0 );<--- Function in derived class<--- Function in derived class

    //! Create a new gather set with tag GATHER_SET
    ErrorCode create_gather_set( EntityHandle& gather_set );<--- Function in derived class<--- Function in derived class

    //! Get entity handle of an existing gather set
    ErrorCode get_gather_set( EntityHandle& gather_set );<--- Function in derived class<--- Function in derived class
};

}  // namespace moab

#endif