GemaCoreLib
The GeMA Core library
Public Member Functions | Private Member Functions | Private Attributes | List of all members
GmNfFileReader Class Reference

A file deserializer for reading data in the "Neutral File" file format. More...

#include <gmNfFileReader.h>

Inheritance diagram for GmNfFileReader:
Inheritance graph
[legend]
Collaboration diagram for GmNfFileReader:
Collaboration graph
[legend]

Public Member Functions

 GmNfFileReader (const GmLogCategory &logger)
 Default constructor.
 
virtual ~GmNfFileReader ()
 Destructor.
 
virtual bool openFiles (QString fileName, int numNodeValues, int numElemValues)
 See comments on the base class.
 
virtual bool initializeMesh (GmMesh *mesh, const QStringList &nodeValues, const QList< Unit > &nodeUnits, const QStringList &elementValues, const QList< Unit > &elementUnits)
 See comments on the base class.
 
virtual bool readNodeCoordinates (GmMesh *mesh, Unit coordUnit)
 See comments on the base class.
 
virtual bool readCellGeometry (GmCellMesh *cellmesh)
 See comments on the base class.
 
virtual bool readNodeData (GmMesh *mesh, const QStringList &nodeValues, const QList< Unit > &nodeUnits)
 See comments on the base class.
 
virtual bool readCellData (GmCellMesh *cellmesh, const QStringList &elementValues, const QList< Unit > &elementUnits)
 See comments on the base class.
 
virtual bool closeFiles ()
 See comments on the base class.
 
virtual GmFileFormatfileFormat ()
 Returns the file format of the deserializer.
 
- Public Member Functions inherited from GmFileReader
 GmFileReader (const GmLogCategory &logger)
 Constructor. Receives as parameter the logger used to report errors.
 
virtual ~GmFileReader ()
 Destructor. Should call closeFiles() on derived classes.
 
- Public Member Functions inherited from GmNfFileFormat
virtual const char * formatName () const
 Returns the file format name.
 
virtual bool supportsMultipleIterations () const
 Returns true if this file type supports multiple iterations (result sets)
 
virtual bool supportsSplitVectors () const
 Returns true if this writer prefers to split vector values into scalar values by itself.
 
virtual bool acceptsNodeDimension (int ndim) const
 Returns true if this file format accepts meshes with nodes of the given dimension.
 
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 dimension and value set kind). The nodeDim parameter provides the mesh node dimension since some file formats only accept vectors and matrices with the same size as the mesh dimension. The dimFilter parameter specifies if a dimension filter will be applied to the data or not (dimFilter == -1)
 
virtual bool acceptsMultipleGaussProfiles () const
 Does the file supports multiple Gauss points per element type?
 
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 integration rule?
 
virtual bool acceptsDiscontinuitySet (GmDiscontinuitySet::DiscontinuityType type) const
 
virtual int acceptsCellType (GmCellType type) const
 Does the file format accepts this cell type? Returns 0 if the cell type is not accepted, 1 if it is natively accepted or 2 if it is accepted requiring standard Gema transformations for adjusting interface elements that need extra interpolated nodes to be exported.
 
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 types. More...
 
virtual int fileCellType (GmCellType type) const
 Returns the cell type code as seen by the file format. Currently used only by HDF5 based formats.
 
virtual const char * fileCellTypeName (GmCellType type) const
 Returns the cell type name as seen by the exported file format.
 
virtual bool supportsMeshChanges () const
 Returns true if this writer can cope with mesh changes during the simulation.
 

Private Member Functions

void updateNfStepIds ()
 Obtain step ids from NF file.
 
void updateNfValueIds ()
 Obtain value ids from NF file.
 
void updateNfElementIds (GmCellMesh *cellmesh)
 Fill correspondence table between nfr and gema element ids.
 
void buildGemaMatrix (double *val, GmVector &vec)
 Transform symetrical NF tensor [6 (3D) values] to Gema matrix [9 (3D) or 4 (2D) values].
 
void buildFielIdsMap (NfrResultType resType, int stepId, QMap< QString, int > &fieldIdsMap)
 
int nlin (GmDimType t, int ndim) const
 
int ncol (GmDimType t, int ndim) const
 

Private Attributes

QString _nfFileName
 The neutral file name.
 
QVector< int > _elementIds
 Correspondence table between nfr and gema element ids.
 
int _ndim
 Input mesh dimension.
 
int _ruleSet
 Input mesh rule set.
 
bool _dataOnly
 True, if the GeMA mesh to fill already has nodes and cells.
 
NfrImport * _imp
 
NfrFile * _nf
 
QMap< NfrResultType, QStringList_nfValuesMap
 
int _caseId
 
int _nSteps
 
QVector< int > _stepIds
 
QMultiMap< NfrResultType, GmValueAccessor * > _nodeAccMap
 
QMultiMap< NfrResultType, GmGaussAccessor * > _gaussAccMap
 

Additional Inherited Members

- Protected Member Functions inherited from GmNfFileFormat
int nf2gmCellNodeIndex (GmCellType type, int nfId)
 
int nf2gmCellGaussIndex (GmCellType type, int ngp, int nfId)
 
unsigned int offset (unsigned int n)
 
- Protected Attributes inherited from GmFileReader
const GmLogCategory_logger
 The logger used to report errors.
 
- Static Protected Attributes inherited from GmNfFileFormat
static const SupportedTypesT supportedTypes []
 
static const int supportedTypesSize
 
static const nfrType nfrTypeTable []
 
static const nfrElement nfrElementTable []
 

Detailed Description

A file deserializer for reading data in the "Neutral File" file format.


The documentation for this class was generated from the following files: