MOAB: Mesh Oriented datABase  (version 5.2.1)
WriteHDF5.hpp
Go to the documentation of this file.
00001 /**
00002  * MOAB, a Mesh-Oriented datABase, is a software component for creating,
00003  * storing and accessing finite element mesh data.
00004  *
00005  * Copyright 2004 Sandia Corporation.  Under the terms of Contract
00006  * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
00007  * retains certain rights in this software.
00008  *
00009  * This library is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU Lesser General Public
00011  * License as published by the Free Software Foundation; either
00012  * version 2.1 of the License, or (at your option) any later version.
00013  *
00014  */
00015 
00016 #ifndef WRITE_HDF5_HPP
00017 #define WRITE_HDF5_HPP
00018 
00019 #include <list>
00020 #include "moab/MOABConfig.h"
00021 #ifdef MOAB_HAVE_MPI  // include this before HDF5 headers to avoid conflicts
00022 #include "moab_mpi.h"
00023 #endif
00024 #include "moab_mpe.h"
00025 #include "mhdf.h"
00026 #include "moab/Forward.hpp"
00027 #include "moab/Range.hpp"
00028 #include "moab/WriterIface.hpp"
00029 #include "moab/RangeMap.hpp"
00030 #include "moab/WriteUtilIface.hpp"
00031 #include "DebugOutput.hpp"
00032 #include "HDF5Common.hpp"
00033 
00034 namespace moab
00035 {
00036 
00037 class IODebugTrack;
00038 
00039 /* If this define is not set, node->entity adjacencies will not be written */
00040 #undef MB_H5M_WRITE_NODE_ADJACENCIES
00041 
00042 /**
00043  * \brief  Write mesh database to MOAB's native HDF5-based file format.
00044  * \author Jason Kraftcheck
00045  * \date   01 April 2004
00046  */
00047 class WriteHDF5 : public WriterIface
00048 {
00049 
00050   public:
00051     static WriterIface* factory( Interface* );
00052 
00053     WriteHDF5( Interface* iface );
00054 
00055     virtual ~WriteHDF5();
00056 
00057     /** Export specified meshsets to file
00058      * \param filename     The filename to export.
00059      * \param export_sets  Array of handles to sets to export, or NULL to export all.
00060      * \param export_set_count Length of <code>export_sets</code> array.
00061      */
00062     ErrorCode write_file( const char* filename, const bool overwrite, const FileOptions& opts,
00063                           const EntityHandle* export_sets, const int export_set_count,
00064                           const std::vector< std::string >& qa_records, const Tag* tag_list = NULL, int num_tags = 0,
00065                           int user_dimension = 3 );
00066 
00067     /** The type to use for entity IDs w/in the file.
00068      *
00069      * NOTE:  If this is changed, the value of id_type
00070      *        MUST be changed accordingly.
00071      */
00072     typedef EntityHandle wid_t;  // change the name,
00073     //  to avoid conflicts to /usr/include/x86_64-linux-gnu/bits/types.h : id_t , which is unsigned
00074     //  int
00075 
00076     /** HDF5 type corresponding to type of wid_t */
00077     static const hid_t id_type;
00078 
00079     struct ExportType
00080     {
00081         //! The type of the entities in the range
00082         EntityType type;
00083         //! The number of nodes per entity - not used for nodes and sets
00084         int num_nodes;
00085 
00086         virtual ~ExportType() {}
00087 
00088         bool operator==( ExportType t ) const
00089         {
00090             return t.type == type && t.num_nodes == num_nodes;
00091         }
00092         bool operator!=( ExportType t ) const
00093         {
00094             return t.type != type || t.num_nodes != num_nodes;
00095         }
00096         bool operator<( ExportType t ) const
00097         {
00098             return type < t.type || ( type == t.type && num_nodes < t.num_nodes );
00099         }
00100     };
00101 
00102     //! Range of entities, grouped by type, to export
00103     struct ExportSet : public ExportType
00104     {
00105         //! The range of entities.
00106         Range range;
00107         //! The first Id allocated by the mhdf library.  Entities in range have sequential IDs.
00108         wid_t first_id;
00109         //! The offset at which to begin writing this processor's data.
00110         //! Always zero except for parallel IO.
00111         long offset;
00112         //! Offset for adjacency data.  Always zero except for parallel IO
00113         long adj_offset;
00114         //! If doing parallel IO, largest number of entities to write
00115         //! for any processor (needed to do collective IO).  Zero if unused.
00116         long max_num_ents, max_num_adjs;
00117         //! The total number of entities that will be written to the file
00118         //! for this group.  For serial IO, this should always be range.size().
00119         //! For parallel IO, it will be the sum of range size over all processors.
00120         //! For parallel IO, this value is undefined except for on the root
00121         //! processor.
00122         long total_num_ents;
00123 
00124         bool operator<( const ExportType& other ) const
00125         {
00126             return type < other.type || ( type == other.type && num_nodes < other.num_nodes );
00127         }
00128 
00129         bool operator<( std::pair< int, int > other ) const
00130         {
00131             return type < other.first || ( type == other.first && num_nodes < other.second );
00132         }
00133 
00134         bool operator==( const ExportType& other ) const
00135         {
00136             return ( type == other.type && num_nodes == other.num_nodes );
00137         }
00138 
00139         bool operator==( std::pair< int, int > other ) const
00140         {
00141             return ( type == other.first && num_nodes == other.second );
00142         }
00143 
00144         const char* name() const;
00145     };
00146 
00147     //! Tag to write to file.
00148     struct TagDesc
00149     {
00150         //! The tag handle
00151         Tag tag_id;
00152         //! The offset at which to begin writting this processor's data.
00153         //! Always zero except for parallel IO.
00154         wid_t sparse_offset;
00155         //! For variable-length tags, a second offset for the tag data table,
00156         //! separate from the offset used for the ID and Index tables.
00157         //! Always zero except for parallel IO.
00158         wid_t var_data_offset;
00159         //! Write sparse tag data (for serial, is always equal to !range.empty())
00160         bool write_sparse;
00161         //! If doing parallel IO, largest number, over all processes, of entities
00162         //! for which to write tag data.  Zero if unused.
00163         unsigned long max_num_ents;
00164         //! For variable-length tags during parallel IO: the largest number
00165         //! of tag values to be written on by any process, used to calculate
00166         //! the total number of collective writes that all processes must do.
00167         //! Zero for fixed-length tags or if not doing parallel IO.
00168         unsigned long max_num_vals;
00169 
00170         //! List of entity groups for which to write tag data in
00171         //! dense format
00172         std::vector< ExportType > dense_list;
00173 
00174         bool have_dense( const ExportType& type ) const
00175         {
00176             return std::find( dense_list.begin(), dense_list.end(), type ) != dense_list.end();
00177         }
00178 
00179         bool operator<( const TagDesc& ) const;
00180     };
00181 
00182     /** Create attributes holding the HDF5 type handle for the
00183      *  type of a bunch of the default tags.
00184      */
00185     // static ErrorCode register_known_tag_types( Interface* );
00186 
00187     //! Store old HDF5 error handling function
00188     struct HDF5ErrorHandler
00189     {
00190         HDF5_Error_Func_Type func;
00191         void* data;
00192     };
00193 
00194     mhdf_FileHandle file_ptr()
00195     {
00196         return filePtr;
00197     }
00198 
00199     WriteUtilIface* write_util()
00200     {
00201         return writeUtil;
00202     }
00203 
00204   protected:
00205     //! Store old HDF5 error handling function
00206     HDF5ErrorHandler errorHandler;
00207 
00208     /** Function to create the file.  Virtual to allow override
00209      *  for parallel version.
00210      */
00211     virtual ErrorCode parallel_create_file( const char* filename, bool overwrite,
00212                                             const std::vector< std::string >& qa_records, const FileOptions& opts,
00213                                             const Tag* tag_list, int num_tags, int dimension = 3, double* times = 0 );
00214     virtual ErrorCode write_finished();
00215     virtual void debug_barrier_line( int lineno );
00216 
00217     //! Gather tags
00218     ErrorCode gather_tags( const Tag* user_tag_list, int user_tag_list_length );
00219 
00220     /** Check if tag values for a given ExportSet should be written in dense format
00221      *
00222      *\param ents        ExportSet to consider
00223      *\param all_tagged  Range containing all the entities in ents.range for
00224      *                   which an explicit tag value is stored.  Range may
00225      *                   also contain entities not in ents.range, but may
00226      *                   not contain entities in ents.range for which no tag
00227      *                   value is stored.
00228      *\param prefer_dense If true, will return true if at least 2/3 of the
00229      *                   entities are tagged.  This should not be passed as
00230      *                   true if the tag does not have a default value, as
00231      *                   tag values must be stored for all entities in the
00232      *                   ExportSet for dense-formatted data.
00233      */
00234     bool check_dense_format_tag( const ExportSet& ents, const Range& all_tagged, bool prefer_dense );
00235 
00236     /** Helper function for create-file
00237      *
00238      * Calculate the sum of the number of non-set adjacencies
00239      * of all entities in the passed range.
00240      */
00241     ErrorCode count_adjacencies( const Range& elements, wid_t& result );
00242 
00243   public:  // make these public so helper classes in WriteHDF5Parallel can use them
00244     /** Helper function for create-file
00245      *
00246      * Create zero-ed tables where element connectivity and
00247      * adjacency data will be stored.
00248      */
00249     ErrorCode create_elem_table( const ExportSet& block, long num_ents, long& first_id_out );
00250 
00251     /** Helper function for create-file
00252      *
00253      * Create zero-ed table where set descriptions will be written
00254      */
00255     ErrorCode create_set_meta( long num_sets, long& first_id_out );
00256 
00257   protected:
00258     /** Helper function for create-file
00259      *
00260      * Calculate total length of set contents and child tables.
00261      */
00262     ErrorCode count_set_size( const Range& sets, long& contents_length_out, long& children_length_out,
00263                               long& parents_length_out );
00264 
00265     //! Get information about a meshset
00266     ErrorCode get_set_info( EntityHandle set, long& num_entities, long& num_children, long& num_parents,
00267                             unsigned long& flags );
00268 
00269     /** Helper function for create-file
00270      *
00271      * Create zero-ed tables where set data will be written.
00272      */
00273     ErrorCode create_set_tables( long contents_length, long children_length, long parents_length );
00274 
00275     //! Write exodus-type QA info
00276     ErrorCode write_qa( const std::vector< std::string >& list );
00277 
00278     //!\brief Get tagged entities for which to write tag values
00279     ErrorCode get_num_sparse_tagged_entities( const TagDesc& tag, size_t& count );
00280     //!\brief Get tagged entities for which to write tag values
00281     ErrorCode get_sparse_tagged_entities( const TagDesc& tag, Range& range );
00282     //!\brief Get entities that will be written to file
00283     void get_write_entities( Range& range );
00284 
00285     //! The size of the data buffer (<code>dataBuffer</code>).
00286     size_t bufferSize;
00287     //! A memory buffer to use for all I/O operations.
00288     char* dataBuffer;
00289 
00290     //! Interface pointer passed to constructor
00291     Interface* iFace;
00292     //! Cached pointer to writeUtil interface.
00293     WriteUtilIface* writeUtil;
00294 
00295     //! The file handle from the mhdf library
00296     mhdf_FileHandle filePtr;
00297 
00298     //! Map from entity handles to file IDs
00299     RangeMap< EntityHandle, wid_t > idMap;
00300 
00301     //! The list elements to export.
00302     std::list< ExportSet > exportList;
00303     //! The list of nodes to export
00304     ExportSet nodeSet;
00305     //! The list of sets to export
00306     ExportSet setSet;
00307 
00308     const ExportSet* find( ExportType type ) const
00309     {
00310         if( type.type == MBVERTEX )
00311             return &nodeSet;
00312         else if( type.type == MBENTITYSET )
00313             return &setSet;
00314         else
00315         {
00316             std::list< ExportSet >::const_iterator it;
00317             it = std::find( exportList.begin(), exportList.end(), type );
00318             return it == exportList.end() ? 0 : &*it;
00319         }
00320     }
00321 
00322     //! Offset into set contents table (zero except for parallel)
00323     unsigned long setContentsOffset;
00324     //! Offset into set children table (zero except for parallel)
00325     unsigned long setChildrenOffset, setParentsOffset;
00326     //! The largest number of values to write
00327     //! for any processor (needed to do collective IO).
00328     long maxNumSetContents, maxNumSetChildren, maxNumSetParents;
00329     //! Flags idicating if set data should be written.
00330     //! For the normal (non-parallel) case, these values
00331     //! will depend only on whether or not there is any
00332     //! data to be written.  For parallel-meshes, opening
00333     //! the data table is collective so the values must
00334     //! depend on whether or not any processor has meshsets
00335     //! to be written.
00336     bool writeSets, writeSetContents, writeSetChildren, writeSetParents;
00337 
00338     //! Struct describing a set for which the contained and linked entity
00339     //! lists are something other than the local values.  Used to store
00340     //! data for shared sets owned by this process when writing in parallel.
00341     struct SpecialSetData
00342     {
00343         EntityHandle setHandle;
00344         unsigned setFlags;
00345         std::vector< wid_t > contentIds;
00346         std::vector< wid_t > childIds;
00347         std::vector< wid_t > parentIds;
00348     };
00349     struct SpecSetLess
00350     {
00351         bool operator()( const SpecialSetData& a, SpecialSetData b ) const
00352         {
00353             return a.setHandle < b.setHandle;
00354         }
00355     };
00356 
00357     //! Array of special/shared sets, in order of handle value.
00358     std::vector< SpecialSetData > specialSets;
00359     const SpecialSetData* find_set_data( EntityHandle h ) const
00360     {
00361         return const_cast< WriteHDF5* >( this )->find_set_data( h );
00362     }
00363     SpecialSetData* find_set_data( EntityHandle h );
00364 
00365     //! The list of tags to export
00366     std::list< TagDesc > tagList;
00367 
00368     //! True if doing parallel write
00369     bool parallelWrite;
00370     //! True if using collective IO calls for parallel write
00371     bool collectiveIO;
00372     //! True if writing dense-formatted tag data
00373     bool writeTagDense;
00374 
00375     //! Property set to pass to H5Dwrite calls.
00376     //! For serial, should be H5P_DEFAULTS.
00377     //! For parallel, may request collective IO.
00378     hid_t writeProp;
00379 
00380     //! Utility to log debug output
00381     DebugOutput dbgOut;
00382 
00383     static MPEState topState;
00384     static MPEState subState;
00385 
00386     //! Look for overlapping and/or missing writes
00387     bool debugTrack;
00388 
00389     void print_id_map() const;
00390     void print_id_map( std::ostream& str, const char* prefix = "" ) const;
00391 
00392     /** Helper function for create-file
00393      *
00394      * Write tag meta-info and create zero-ed table where
00395      * tag values will be written.
00396      *\param num_entities  Number of entities for which to write tag data.
00397      *\param var_len_total For variable-length tags, the total number of values
00398      *                     in the data table.
00399      */
00400     ErrorCode create_tag( const TagDesc& tag_data, unsigned long num_entities, unsigned long var_len_total );
00401 
00402     /**\brief add entities to idMap */
00403     ErrorCode assign_ids( const Range& entities, wid_t first_id );
00404 
00405     /** Get possibly compacted list of IDs for passed entities
00406      *
00407      * For the passed range of entities, determine if IDs
00408      * can be compacted and write IDs to passed list.
00409      *
00410      * If the IDs are not compacted, the output list will contain
00411      * a simple ordered list of IDs.
00412      *
00413      * If IDs are compacted, the output list will contain
00414      * {start,count} pairs.
00415      *
00416      * If the ID list is compacted, ranged_list will be 'true'.
00417      * Otherwise it will be 'false'.
00418      */
00419     ErrorCode range_to_blocked_list( const Range& input_range, std::vector< wid_t >& output_id_list,
00420                                      bool& ranged_list );
00421 
00422     /** Get possibly compacted list of IDs for passed entities
00423      *
00424      * For the passed range of entities, determine if IDs
00425      * can be compacted and write IDs to passed list.
00426      *
00427      * If the IDs are not compacted, the output list will contain
00428      * a simple ordered list of IDs.
00429      *
00430      * If IDs are compacted, the output list will contain
00431      * {start,count} pairs.
00432      *
00433      * If the ID list is compacted, ranged_list will be 'true'.
00434      * Otherwise it will be 'false'.
00435      */
00436     ErrorCode range_to_blocked_list( const EntityHandle* input_ranges, size_t num_input_ranges,
00437                                      std::vector< wid_t >& output_id_list, bool& ranged_list );
00438 
00439     ErrorCode range_to_id_list( const Range& input_range, wid_t* array );
00440     //! Get IDs for entities
00441     ErrorCode vector_to_id_list( const std::vector< EntityHandle >& input, std::vector< wid_t >& output,
00442                                  bool remove_non_written = false );
00443     //! Get IDs for entities
00444     ErrorCode vector_to_id_list( const EntityHandle* input, wid_t* output, size_t num_entities );
00445     //! Get IDs for entities
00446     ErrorCode vector_to_id_list( const EntityHandle* input, size_t input_len, wid_t* output, size_t& output_len,
00447                                  bool remove_non_written );
00448 
00449     /** When writing tags containing EntityHandles to file, need to convert tag
00450      *  data from EntityHandles to file IDs.  This function does that.
00451      *
00452      * If the handle is not valid or does not correspond to an entity that will
00453      * be written to the file, the file ID is set to zero.
00454      *\param data  The data buffer.  As input, an array of EntityHandles.  As
00455      *             output an array of file IDS, where the size of each integral
00456      *             file ID is the same as the size of EntityHandle.
00457      *\param count The number of handles in the buffer.
00458      *\return true if at least one of the handles is valid and will be written to
00459      *             the file or at least one of the handles is NULL (zero). false
00460      *             otherwise
00461      */
00462     bool convert_handle_tag( EntityHandle* data, size_t count ) const;
00463     bool convert_handle_tag( const EntityHandle* source, EntityHandle* dest, size_t count ) const;
00464 
00465     /** Get IDs of adjacent entities.
00466      *
00467      * For all entities adjacent to the passed entity, if the
00468      * adjacent entity is to be exported (ID is not zero), append
00469      * the ID to the passed list.
00470      */
00471     ErrorCode get_adjacencies( EntityHandle entity, std::vector< wid_t >& adj );
00472 
00473     //! get sum of lengths of tag values (as number of type) for
00474     //! variable length tag data.
00475     ErrorCode get_tag_data_length( const TagDesc& tag_info, const Range& range, unsigned long& result );
00476 
00477   private:
00478     //! Do the actual work of write_file.  Separated from write_file
00479     //! for easier resource cleanup.
00480     ErrorCode write_file_impl( const char* filename, const bool overwrite, const FileOptions& opts,
00481                                const EntityHandle* export_sets, const int export_set_count,
00482                                const std::vector< std::string >& qa_records, const Tag* tag_list, int num_tags,
00483                                int user_dimension = 3 );
00484 
00485     ErrorCode init();
00486 
00487     ErrorCode serial_create_file( const char* filename, bool overwrite, const std::vector< std::string >& qa_records,
00488                                   const Tag* tag_list, int num_tags, int dimension = 3 );
00489 
00490     /** Get all mesh to export from given list of sets.
00491      *
00492      * Populate exportSets, nodeSet and setSet with lists of
00493      * entities to write.
00494      *
00495      * \param export_sets  The list of meshsets to export
00496      */
00497     ErrorCode gather_mesh_info( const std::vector< EntityHandle >& export_sets );
00498 
00499     //! Same as gather_mesh_info, except for entire mesh
00500     ErrorCode gather_all_mesh();
00501 
00502     //! Initialize internal data structures from gathered mesh
00503     ErrorCode initialize_mesh( const Range entities_by_dim[5] );
00504 
00505     /** Write out the nodes.
00506      *
00507      * Note: Assigns IDs to nodes.
00508      */
00509     ErrorCode write_nodes();
00510 
00511     /** Write out element connectivity.
00512      *
00513      * Write connectivity for passed set of elements.
00514      *
00515      * Note: Assigns element IDs.
00516      * Note: Must do write_nodes first so node IDs get assigned.
00517      */
00518     ErrorCode write_elems( ExportSet& elemset );
00519 
00520     /** Write out meshsets
00521      *
00522      * Write passed set of meshsets, including parent/child relations.
00523      *
00524      * Note: Must have written nodes and element connectivity
00525      *       so entities have assigned IDs.
00526      */
00527     ErrorCode write_sets( double* times );
00528 
00529     /** Write set contents/parents/children lists
00530      *
00531      *\param which_data Which set data to write (contents, parents, or children)
00532      *\param handle     HDF5 handle for data set in which to write data
00533      *\param track      Debugging tool
00534      *\param ranged     Will be populated with handles of sets for which
00535      *                  contents were written in a range-compacted format.
00536      *                  (mhdf_SET_RANGE_BIT).  Should be null for parents/children.
00537      *\param null_stripped Will be populated with handles of sets for which
00538      *                  invalid or null handles were stripped from the contents
00539      *                  list.  This is only done for unordered sets.  This argument
00540      *                  should be null if writing parents/children because those
00541      *                  lists are always ordered.
00542      *\param set_sizes  Will be populated with the length of the data written
00543      *                  for those sets for which the handles were added to
00544      *                  either \c ranged or \c null_stripped.  Values are
00545      *                  in handle order.
00546      */
00547     ErrorCode write_set_data( const WriteUtilIface::EntityListType which_data, const hid_t handle, IODebugTrack& track,
00548                               Range* ranged = 0, Range* null_stripped = 0, std::vector< long >* set_sizes = 0 );
00549 
00550     /** Write adjacency info for passed set of elements
00551      *
00552      * Note: Must have written element connectivity so elements
00553      *       have IDs assigned.
00554      */
00555     ErrorCode write_adjacencies( const ExportSet& export_set );
00556 
00557     /** Write tag information and data.
00558      *
00559      * Note: Must have already written nodes, elem connectivity and
00560      *       sets so that entities have IDs assigned.
00561      */
00562 
00563     //! Write tag for all entities.
00564     ErrorCode write_tag( const TagDesc& tag_data, double* times );
00565 
00566     //! Get element connectivity
00567     ErrorCode get_connectivity( Range::const_iterator begin, Range::const_iterator end, int nodes_per_element,
00568                                 wid_t* id_data_out );
00569 
00570     //! Get size data for tag
00571     //!\param tag       MOAB tag ID
00572     //!\param moab_type Output: DataType for tag
00573     //!\param num_bytes Output: MOAB tag size (bits for bit tags).
00574     //!                         MB_VARIABLE_LENGTH for variable-length tags.
00575     //!\param elem_size Output: Size of of the base data type of the
00576     //!                         tag data (e.g. sizeof(double) if
00577     //!                         moab_type == MB_TYPE_DOUBLE).
00578     //!                         One for bit and opaque tags.
00579     //!\param array_size Output: The number of valeus of size elem_size
00580     //!                          for each tag.  Always 1 for opaque data.
00581     //!                          Nubmer of bits for bit tags.
00582     //!\param file_type Output: mhdf type enumeration
00583     //!\param hdf_type  Output: Handle to HDF5 type object.  Caller is
00584     //!                         responsible for releasing this object
00585     //!                         (calling H5Tclose).
00586     ErrorCode get_tag_size( Tag tag, DataType& moab_type, int& num_bytes, int& elem_size, int& file_size,
00587                             mhdf_TagDataType& file_type, hid_t& hdf_type );
00588 
00589     //! Write ID table for sparse tag
00590     ErrorCode write_sparse_ids( const TagDesc& tag_data, const Range& range, hid_t table_handle, size_t table_size,
00591                                 const char* name = 0 );
00592 
00593     //! Write fixed-length tag data in sparse format
00594     ErrorCode write_sparse_tag( const TagDesc& tag_data, const std::string& tag_name, DataType tag_data_type,
00595                                 hid_t hdf5_data_type, int hdf5_type_size );
00596 
00597     //! Write end index data_set for a variable-length tag
00598     ErrorCode write_var_len_indices( const TagDesc& tag_data, const Range& range, hid_t idx_table, size_t table_size,
00599                                      int type_size, const char* name = 0 );
00600 
00601     //! Write tag value data_set for a variable-length tag
00602     ErrorCode write_var_len_data( const TagDesc& tag_data, const Range& range, hid_t table, size_t table_size,
00603                                   bool handle_tag, hid_t hdf_type, int type_size, const char* name = 0 );
00604 
00605     //! Write varialbe-length tag data
00606     ErrorCode write_var_len_tag( const TagDesc& tag_info, const std::string& tag_name, DataType tag_data_type,
00607                                  hid_t hdf5_type, int hdf5_type_size );
00608 
00609     //! Write dense-formatted tag data
00610     ErrorCode write_dense_tag( const TagDesc& tag_data, const ExportSet& elem_data, const std::string& tag_name,
00611                                DataType tag_data_type, hid_t hdf5_data_type, int hdf5_type_size );
00612 
00613     //! Write data for fixed-size tag
00614     ErrorCode write_tag_values( Tag tag_id, hid_t data_table, unsigned long data_offset, const Range& range,
00615                                 DataType tag_data_type, hid_t hdf5_data_type, int hdf5_type_size,
00616                                 unsigned long max_num_ents, IODebugTrack& debug_track );
00617 
00618   protected:
00619     enum TimingValues
00620     {
00621         TOTAL_TIME = 0,
00622         GATHER_TIME,
00623         CREATE_TIME,
00624         CREATE_NODE_TIME,
00625         NEGOTIATE_TYPES_TIME,
00626         CREATE_ELEM_TIME,
00627         FILEID_EXCHANGE_TIME,
00628         CREATE_ADJ_TIME,
00629         CREATE_SET_TIME,
00630         SHARED_SET_IDS,
00631         SHARED_SET_CONTENTS,
00632         SET_OFFSET_TIME,
00633         CREATE_TAG_TIME,
00634         COORD_TIME,
00635         CONN_TIME,
00636         SET_TIME,
00637         SET_META,
00638         SET_CONTENT,
00639         SET_PARENT,
00640         SET_CHILD,
00641         ADJ_TIME,
00642         TAG_TIME,
00643         DENSE_TAG_TIME,
00644         SPARSE_TAG_TIME,
00645         VARLEN_TAG_TIME,
00646         NUM_TIMES
00647     };
00648 
00649     virtual void print_times( const double times[NUM_TIMES] ) const;
00650 };
00651 
00652 }  // namespace moab
00653 
00654 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines