Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
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 //------------------------------------------------------------------------- 00017 // Filename : WriteGMV.hpp 00018 // 00019 // Purpose : Writer template 00020 // 00021 // Special Notes : 00022 // 00023 // Creator : Tim Tautges 00024 // 00025 // Date : 2/04 00026 // 00027 //------------------------------------------------------------------------- 00028 00029 #ifndef WRITEGMV_HPP 00030 #define WRITEGMV_HPP 00031 00032 #include "moab/Forward.hpp" 00033 #include "moab/WriterIface.hpp" 00034 00035 namespace moab 00036 { 00037 00038 class WriteUtilIface; 00039 00040 //! Output Exodus File for VERDE 00041 class WriteGMV : public WriterIface 00042 { 00043 00044 public: 00045 //! Constructor 00046 WriteGMV( Interface* impl ); 00047 00048 //! Destructor 00049 virtual ~WriteGMV(); 00050 00051 static WriterIface* factory( Interface* ); 00052 00053 ErrorCode write_file( const char* filename, 00054 const bool overwite, 00055 const FileOptions& opts, 00056 const EntityHandle* output_sets, 00057 const int num_output_sets, 00058 const std::vector< std::string >& qa_list, 00059 const Tag* tag_list = NULL, 00060 int num_tags = 0, 00061 int requested_dimension = 3 ); 00062 00063 //! writes out a mesh file 00064 ErrorCode write_file( const char* file_name, 00065 const EntityHandle output_set, 00066 const int user_dimension = 3, 00067 const bool mesh = true, 00068 const bool poly_mesh = true ); 00069 00070 protected: 00071 private: 00072 //! interface instance 00073 Interface* mbImpl; 00074 WriteUtilIface* mWriteIface; 00075 00076 //! Cached tags for reading. Note that all these tags are defined when the 00077 //! core is initialized. 00078 Tag mMaterialSetTag; 00079 Tag mDirichletSetTag; 00080 Tag mNeumannSetTag; 00081 Tag mHasMidNodesTag; 00082 Tag mGeomDimensionTag; 00083 Tag mGlobalIdTag; 00084 00085 static const char* gmvTypeNames[MBMAXTYPE]; 00086 00087 ErrorCode local_write_mesh( const char* file_name, 00088 const EntityHandle output_set, 00089 const int user_dimension, 00090 const bool mesh, 00091 const bool poly_mesh ); 00092 }; 00093 00094 } // namespace moab 00095 00096 #endif