Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
WriteGMV.hpp
Go to the documentation of this file.
1 /**
2  * MOAB, a Mesh-Oriented datABase, is a software component for creating,
3  * storing and accessing finite element mesh data.
4  *
5  * Copyright 2004 Sandia Corporation. Under the terms of Contract
6  * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
7  * retains certain rights in this software.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  */
15 
16 //-------------------------------------------------------------------------
17 // Filename : WriteGMV.hpp
18 //
19 // Purpose : Writer template
20 //
21 // Special Notes :
22 //
23 // Creator : Tim Tautges
24 //
25 // Date : 2/04
26 //
27 //-------------------------------------------------------------------------
28 
29 #ifndef WRITEGMV_HPP
30 #define WRITEGMV_HPP
31 
32 #include "moab/Forward.hpp"
33 #include "moab/WriterIface.hpp"
34 
35 namespace moab
36 {
37 
38 class WriteUtilIface;
39 
40 //! Output Exodus File for VERDE
41 class WriteGMV : public WriterIface
42 {
43 
44  public:
45  //! Constructor
46  WriteGMV( Interface* impl );
47 
48  //! Destructor
49  virtual ~WriteGMV();
50 
51  static WriterIface* factory( Interface* );
52 
53  ErrorCode write_file( const char* filename,
54  const bool overwite,
55  const FileOptions& opts,
56  const EntityHandle* output_sets,
57  const int num_output_sets,
58  const std::vector< std::string >& qa_list,
59  const Tag* tag_list = NULL,
60  int num_tags = 0,
61  int requested_dimension = 3 );
62 
63  //! writes out a mesh file
64  ErrorCode write_file( const char* file_name,
65  const EntityHandle output_set,
66  const int user_dimension = 3,
67  const bool mesh = true,
68  const bool poly_mesh = true );
69 
70  protected:
71  private:
72  //! interface instance
75 
76  //! Cached tags for reading. Note that all these tags are defined when the
77  //! core is initialized.
84 
85  static const char* gmvTypeNames[MBMAXTYPE];
86 
87  ErrorCode local_write_mesh( const char* file_name,
88  const EntityHandle output_set,
89  const int user_dimension,
90  const bool mesh,
91  const bool poly_mesh );
92 };
93 
94 } // namespace moab
95 
96 #endif