GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
GmNfFileFormat Class Reference

File format specifications for the "Neutral File" file format. More...

#include <gmNfFileFormat.h>

Inheritance diagram for GmNfFileFormat:
Collaboration diagram for GmNfFileFormat:

Classes

struct  nfrElement
 
struct  nfrType
 
struct  SupportedTypesT
 

Public Member Functions

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.
 
virtual const QVector< int > & gaussNumbering (GmCellType type, int numIp) const
 Returns the Gauss point numbering order for a given cell type and number of integration points. Returns an empty vector for unsupported types.
 
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.
 
- Public Member Functions inherited from GmFileFormat

Static Public Member Functions

static void registerSupportedCellType (GmCellType type, SupportedTypesT &cellData)
 Registers the information needed about each element type to save it on the NF file. An entry for each supported cell type should be registered before any attempt to save a file.
 

Protected Member Functions

unsigned int offset (unsigned int n)
 

Static Protected Member Functions

static SupportedTypesTsupportedTypesList ()
 Returns the vector with the definition of the GeMA supported types and their mapping to xdmf types. The vector has GM_NUM_CELL_TYPES entries.
 

Static Protected Attributes

static const nfrType nfrTypeTable []
 
static const nfrElement nfrElementTable []
 

Detailed Description

File format specifications for the "Neutral File" file format.

Member Function Documentation

◆ acceptsCellType()

virtual int GmNfFileFormat::acceptsCellType ( GmCellType type) const
inlinevirtual

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.

Implements GmFileFormat.

◆ acceptsDataType()

virtual bool GmNfFileFormat::acceptsDataType ( const GmValueInfo * info,
int nodeDim,
int dimFilter = -1 ) const
inlinevirtual

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)

Implements GmFileFormat.

◆ acceptsDiscontinuitySet()

virtual bool GmNfFileFormat::acceptsDiscontinuitySet ( GmDiscontinuitySet::DiscontinuityType type) const
inlinevirtual

Implements GmFileFormat.

◆ acceptsGaussRuleForElement()

bool GmNfFileFormat::acceptsGaussRuleForElement ( GmCellType type,
const GmIntegrationRule * ir ) const
virtual

Does the file support exporting data at Gauss points for an element of type type with the supplied integration rule?

Implements GmFileFormat.

◆ acceptsMultipleGaussProfiles()

virtual bool GmNfFileFormat::acceptsMultipleGaussProfiles ( ) const
inlinevirtual

Does the file supports multiple Gauss points per element type?

Implements GmFileFormat.

◆ acceptsNodeDimension()

virtual bool GmNfFileFormat::acceptsNodeDimension ( int ndim) const
inlinevirtual

Returns true if this file format accepts meshes with nodes of the given dimension.

Implements GmFileFormat.

◆ cellNumbering()

virtual const QVector< int > & GmNfFileFormat::cellNumbering ( GmCellType type) const
inlinevirtual

Returns the node cell type numbering order in the file format view or an empty vector for unsupported types.

For each cell type, the exported node ordering can be different from the natural GeMA node ordering. This function returns a vector that defines the order in which the set of GeMA cell node indices should be exported. It can have a size that is different from the number of GeMA nodes. A negative value means that the saved node is an extra node that should have been created as the result of the set of standard Gema transformations for changing quadratic interface elements that do not have mid nodes into the "flow" side (int2dl6 and int3dl12, for example) into quadratic quad/hex elements as specified by acceptsCellType() returning 2. Negative values should be the "1-based" number of the element edge used to calculate the interpolated nodes, so a -3 value means that the node should be calculated from the third element edge (edge 2).

Implements GmFileFormat.

◆ fileCellType()

virtual int GmNfFileFormat::fileCellType ( GmCellType type) const
inlinevirtual

Returns the cell type code as seen by the file format. Currently used only by HDF5 based formats.

Implements GmFileFormat.

◆ fileCellTypeName()

virtual const char * GmNfFileFormat::fileCellTypeName ( GmCellType type) const
inlinevirtual

Returns the cell type name as seen by the exported file format.

Implements GmFileFormat.

◆ formatName()

virtual const char * GmNfFileFormat::formatName ( ) const
inlinevirtual

Returns the file format name.

Implements GmFileFormat.

◆ gaussNumbering()

virtual const QVector< int > & GmNfFileFormat::gaussNumbering ( GmCellType type,
int numIp ) const
inlinevirtual

Returns the Gauss point numbering order for a given cell type and number of integration points. Returns an empty vector for unsupported types.

For each cell type, the exported gauss point ordering can be different from the natural GeMA node ordering. This function returns a vector that defines the order in which the set of GeMA cell gauss points indices should be exported according to the given integration rule. TODO - use a better indexing other than the number of integration points.

Implements GmFileFormat.

◆ registerSupportedCellType()

static void GmNfFileFormat::registerSupportedCellType ( GmCellType type,
SupportedTypesT & cellData )
inlinestatic

Registers the information needed about each element type to save it on the NF file. An entry for each supported cell type should be registered before any attempt to save a file.

Empty -> uses gema order

Important: For that to work, the Geometry metadata for the cell type MUST have been already initialized.

◆ supportedTypesList()

static SupportedTypesT * GmNfFileFormat::supportedTypesList ( )
inlinestaticprotected

Returns the vector with the definition of the GeMA supported types and their mapping to xdmf types. The vector has GM_NUM_CELL_TYPES entries.

The static supported types vectors is wrapped in this function to make sure that registerSupportedCellType() can be called from other module's dynamic initialization step without incurring in an initialization fiasco problem.

◆ supportsMeshChanges()

virtual bool GmNfFileFormat::supportsMeshChanges ( ) const
inlinevirtual

Returns true if this writer can cope with mesh changes during the simulation.

Implements GmFileFormat.

◆ supportsMultipleIterations()

virtual bool GmNfFileFormat::supportsMultipleIterations ( ) const
inlinevirtual

Returns true if this file type supports multiple iterations (result sets)

Implements GmFileFormat.

◆ supportsSplitVectors()

virtual bool GmNfFileFormat::supportsSplitVectors ( ) const
inlinevirtual

Returns true if this writer prefers to split vector values into scalar values by itself.

Implements GmFileFormat.

Member Data Documentation

◆ nfrTypeTable

const GmNfFileFormat::nfrType GmNfFileFormat::nfrTypeTable
staticprotected
Initial value:
= {
{NFR_RES_NODAL_DISPLACEMENT, GM_NODE_STATEVAR, GM_SCALAR_VALUE, 1},
{NFR_RES_NODAL_SCALAR, GM_NODE_STATEVAR, GM_SCALAR_VALUE, 1},
{NFR_RES_ELE_NODAL_SCALAR, GM_CELL_ATTRIBUTE, GM_SCALAR_VALUE, 1},
{NFR_RES_ELE_GAUSS_SCALAR, GM_GAUSS_ATTRIBUTE, GM_SCALAR_VALUE, 1},
{NFR_RES_ELE_SCALAR, GM_CELL_ATTRIBUTE, GM_SCALAR_VALUE, 1},
{NFR_RES_NODAL_VECTOR, GM_NODE_STATEVAR, GM_VECTOR_VALUE, 3},
{NFR_RES_ELE_NODAL_VECTOR, GM_CELL_ATTRIBUTE, GM_VECTOR_VALUE, 3},
{NFR_RES_ELE_GAUSS_VECTOR, GM_GAUSS_ATTRIBUTE, GM_VECTOR_VALUE, 3},
{NFR_RES_ELE_VECTOR, GM_CELL_ATTRIBUTE, GM_VECTOR_VALUE, 3},
{NFR_RES_NODAL_TENSOR, GM_NODE_STATEVAR, GM_MATRIX_VALUE, 6},
{NFR_RES_ELE_NODAL_TENSOR, GM_CELL_ATTRIBUTE, GM_MATRIX_VALUE, 6},
{NFR_RES_ELE_GAUSS_TENSOR, GM_GAUSS_ATTRIBUTE, GM_MATRIX_VALUE, 6},
{NFR_RES_ELE_TENSOR, GM_CELL_ATTRIBUTE, GM_MATRIX_VALUE, 6},
{NFR_RES_NODAL_PRINCIPAL_TENSOR, GM_NODE_STATEVAR, GM_MATRIX_VALUE, 6},
{NFR_RES_ELE_NODAL_PRINCIPAL_TENSOR, GM_CELL_ATTRIBUTE, GM_MATRIX_VALUE, 6},
{NFR_RES_ELE_GAUSS_PRINCIPAL_TENSOR, GM_GAUSS_ATTRIBUTE, GM_MATRIX_VALUE, 6},
{NFR_RES_ELE_PRINCIPAL_TENSOR, GM_CELL_ATTRIBUTE, GM_MATRIX_VALUE, 6},
}
@ GM_SCALAR_VALUE
Means that the value is a scalar number.
Definition gmValueInfo.h:73
@ GM_MATRIX_VALUE
Means that the value is a 2D matrix of numbers.
Definition gmValueInfo.h:75
@ GM_VECTOR_VALUE
Means that the value is a 1D vector of numbers.
Definition gmValueInfo.h:74
@ GM_GAUSS_ATTRIBUTE
This value set stores attributes attached to Gauss points.
Definition gmValueInfo.h:43
@ GM_CELL_ATTRIBUTE
This value set stores attributes attached to cells.
Definition gmValueInfo.h:41
@ GM_NODE_STATEVAR
This value set stores state variables attached to nodes.
Definition gmValueInfo.h:40

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