GemaCoreLib
The GeMA Core library
gmMeditFileFormat.h
Go to the documentation of this file.
1 /************************************************************************
2 **
3 ** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4 ** All rights reserved.
5 **
6 ** This file is part of the "GeMA" software. It's use should respect
7 ** the terms in the license agreement that can be found together
8 ** with this source code.
9 ** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10 ** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11 ** A PARTICULAR PURPOSE.
12 **
13 ************************************************************************/
14 
24 #ifndef _GM_MEDIT_FILE_FORMAT_H_
25 #define _GM_MEDIT_FILE_FORMAT_H_
26 
27 #include "gmFileFormat.h"
28 
31 {
32 public:
33  // See comments on the base class
34  virtual const char* formatName() const { return "Medit"; }
35 
36  // See comments on the base class
37  virtual bool supportsMultipleIterations() const { return false; }
38 
39  // See comments on the base class
40  virtual bool supportsSplitVectors() const { return true; }
41 
42  // See comments on the base class
43  virtual bool acceptsNodeDimension(int ndim) const { return ndim == 2 || ndim == 3; }
44 
45  virtual bool acceptsDataType(const GmValueInfo* info, int nodeDim, int dimFilter = -1) const;
46 
47  // See comments on the base class
48  virtual bool acceptsMultipleGaussProfiles() const { return false; }
49 
50  // See comments on the base class
51  virtual bool acceptsGaussRuleForElement(GmCellType type, const GmIntegrationRule* ir) const { Q_UNUSED(type); Q_UNUSED(ir); return false; }
52 
53  // See comments on the base class
54  virtual bool acceptsDiscontinuitySet(GmDiscontinuitySet::DiscontinuityType type) const { Q_UNUSED(type); return false; }
55 
56  // TODO
57  virtual int acceptsCellType(GmCellType type) const { Q_UNUSED(type); return 0; }
58  virtual const QVector<int>& cellNumbering(GmCellType type) const { Q_UNUSED(type); static QVector<int> dummy; return dummy; }
59  virtual int fileCellType(GmCellType type) const { Q_UNUSED(type); return 0; }
60  virtual const char* fileCellTypeName(GmCellType type) const { Q_UNUSED(type); return NULL; }
61 
62  // See comments on the base class
63  virtual bool supportsMeshChanges() const { return false; }
64 
65 protected:
66  // Supported element types and file section names
68  {
69  GmCellType type;
70  const char* topoSection;
71  const char* dataSection;
72  };
73 
74  static const SupportedTypesT supportedTypes[];
75  static const int supportedTypesSize;
76 };
77 
78 
79 #endif // _GM_MEDIT_FILE_FORMAT_H_
virtual bool supportsSplitVectors() const
Returns true if this writer prefers to split vector values into scalar values by itself.
Definition: gmMeditFileFormat.h:40
Auxiliar class used to store the definition of a value. It can be used to store informations about st...
Definition: gmValueInfo.h:126
Definition: gmMeditFileFormat.h:67
virtual bool supportsMeshChanges() const
Returns true if this writer can cope with mesh changes during the simulation.
Definition: gmMeditFileFormat.h:63
virtual bool supportsMultipleIterations() const
Returns true if this file type supports multiple iterations (result sets)
Definition: gmMeditFileFormat.h:37
File format specifications for the "Medit" file format.
Definition: gmMeditFileFormat.h:30
virtual bool acceptsMultipleGaussProfiles() const
Does the file supports multiple Gauss points per element type?
Definition: gmMeditFileFormat.h:48
virtual const char * fileCellTypeName(GmCellType type) const
Returns the cell type name as seen by the exported file format.
Definition: gmMeditFileFormat.h:60
virtual bool acceptsNodeDimension(int ndim) const
Returns true if this file format accepts meshes with nodes of the given dimension.
Definition: gmMeditFileFormat.h:43
DiscontinuityType
Discontinuity type (defining how the disc. geometry is defined)
Definition: gmDiscontinuitySet.h:52
virtual int fileCellType(GmCellType type) const
Returns the cell type code as seen by the file format. Currently used only by HDF5 based formats.
Definition: gmMeditFileFormat.h:59
Integration rule base classe.
Definition: gmIntegrationRule.h:88
virtual const QVector< int > & cellNumbering(GmCellType type) const
Returns the node cell type numbering order in the file format view or an empty vector for unsupported...
Definition: gmMeditFileFormat.h:58
Declaration of the GmFileFormat class (old GmFileDataclass)
virtual int acceptsCellType(GmCellType type) const
Does the file format accepts this cell type? Returns 0 if the cell type is not accepted,...
Definition: gmMeditFileFormat.h:57
GmCellType
Mesh Cell types. Don't change type orders or add types without reading comments below.
Definition: gmCellType.h:30
Basic interface for describing high level file format capabilities.
Definition: gmFileFormat.h:34
virtual const char * formatName() const
Returns the file format name.
Definition: gmMeditFileFormat.h:34
virtual bool acceptsGaussRuleForElement(GmCellType type, const GmIntegrationRule *ir) const
Does the file support exporting data at Gauss points for an element of type type with the supplied in...
Definition: gmMeditFileFormat.h:51
virtual bool acceptsDataType(const GmValueInfo *info, int nodeDim, int dimFilter=-1) const
Returns true if this file format can save node/element data with the specified type (especially its d...
Definition: gmMeditFileFormat.cpp:41