Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
WriteGmsh.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_GMSH_HPP
00017 #define WRITE_GMSH_HPP
00018 
00019 #include "moab/Forward.hpp"
00020 #include "moab/WriterIface.hpp"
00021 #include <cstdio>
00022 
00023 namespace moab
00024 {
00025 
00026 class WriteUtilIface;
00027 
00028 /**
00029  * \brief Export Gmsh files.
00030  * \author Jason Kraftcheck
00031  *
00032  * Known limitations:
00033  *  - Tag data and most sets cannot be saved.
00034  *  - For blocks, geometry sets, and parallel partitions, the
00035  *     sets are saved but the IDs may be lost.
00036  *  - File format does not support general polygons or polyhedra.
00037  *  - File format does not support higher-order volume elements
00038  *     other than TET10 and HEX27.
00039  */
00040 class WriteGmsh : public WriterIface
00041 {
00042 
00043   public:
00044     //! factory method
00045     static WriterIface* factory( Interface* );
00046 
00047     //! Constructor
00048     WriteGmsh( Interface* impl );
00049 
00050     //! Destructor
00051     virtual ~WriteGmsh();
00052 
00053     //! writes out a file
00054     ErrorCode write_file( const char* file_name,
00055                           const bool overwrite,
00056                           const FileOptions& opts,
00057                           const EntityHandle* output_list,
00058                           const int num_sets,
00059                           const std::vector< std::string >& qa_list,
00060                           const Tag* tag_list  = NULL,
00061                           int num_tags         = 0,
00062                           int export_dimension = 3 );
00063 
00064   private:
00065     //! interface instance
00066     Interface* mbImpl;
00067     WriteUtilIface* mWriteIface;
00068 };
00069 
00070 }  // namespace moab
00071 
00072 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines