MOAB: Mesh Oriented datABase
(version 5.2.1)
|
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, const bool overwite, const FileOptions& opts, 00054 const EntityHandle* output_sets, const int num_output_sets, 00055 const std::vector< std::string >& qa_list, const Tag* tag_list = NULL, int num_tags = 0, 00056 int requested_dimension = 3 ); 00057 00058 //! writes out a mesh file 00059 ErrorCode write_file( const char* file_name, const EntityHandle output_set, const int user_dimension = 3, 00060 const bool mesh = true, const bool poly_mesh = true ); 00061 00062 protected: 00063 private: 00064 //! interface instance 00065 Interface* mbImpl; 00066 WriteUtilIface* mWriteIface; 00067 00068 //! Cached tags for reading. Note that all these tags are defined when the 00069 //! core is initialized. 00070 Tag mMaterialSetTag; 00071 Tag mDirichletSetTag; 00072 Tag mNeumannSetTag; 00073 Tag mHasMidNodesTag; 00074 Tag mGeomDimensionTag; 00075 Tag mGlobalIdTag; 00076 00077 static const char* gmvTypeNames[MBMAXTYPE]; 00078 00079 ErrorCode local_write_mesh( const char* file_name, const EntityHandle output_set, const int user_dimension, 00080 const bool mesh, const bool poly_mesh ); 00081 }; 00082 00083 } // namespace moab 00084 00085 #endif