FMS  v0.2
Field and Mesh Specification
Macros | Typedefs | Enumerations | Functions | Variables
fms.h File Reference
#include <stddef.h>
#include <stdint.h>
Include dependency graph for fms.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FMS_VERSION   200
 FMS version constant of the form: ((major*100 + minor)*100 + patch). More...
 

Typedefs

typedef uint64_t FmsInt
 Type used by fms for representing and storing sizes and indices. More...
 
typedef struct FmsMesh_private * FmsMesh
 TODO: dox. More...
 
typedef struct FmsDomain_private * FmsDomain
 TODO: dox. More...
 
typedef struct FmsComponent_private * FmsComponent
 TODO: dox. More...
 
typedef struct FmsTag_private * FmsTag
 TODO: dox. More...
 
typedef const int * FmsEntityReordering[FMS_NUM_ENTITY_TYPES]
 A type describing user-defined local orderings of the side entities defining an enitity. More...
 
typedef uint8_t FmsOrientation
 A type used by fms to represent and store entity orientations. More...
 
typedef struct FmsMetaData_private * FmsMetaData
 TODO: dox. More...
 
typedef struct FmsFieldDescriptor_private * FmsFieldDescriptor
 TODO: dox. More...
 
typedef struct FmsField_private * FmsField
 Discrete field data type. More...
 
typedef struct FmsDataCollection_private * FmsDataCollection
 Data collection type: contains a mesh, discrete fileds, meta-data, etc. More...
 

Enumerations

enum  { FMS_INTERFACE_VERSION = FMS_VERSION }
 Interface version constant of the form: ((major*100 + minor)*100 + patch). More...
 
enum  FmsIntType {
  FMS_INT8, FMS_INT16, FMS_INT32, FMS_INT64,
  FMS_UINT8, FMS_UINT16, FMS_UINT32, FMS_UINT64,
  FMS_NUM_INT_TYPES, FMS_INT_TYPE = FMS_UINT64, FMS_ORIENTATION_INT_TYPE = FMS_UINT8
}
 TODO: dox. More...
 
enum  { FMS_INVALID_DIM = 127 }
 Constant used for initializing dimension variables. More...
 
enum  FmsEntityType {
  FMS_VERTEX, FMS_EDGE, FMS_TRIANGLE, FMS_QUADRILATERAL,
  FMS_TETRAHEDRON, FMS_HEXAHEDRON, FMS_WEDGE, FMS_PYRAMID,
  FMS_NUM_ENTITY_TYPES
}
 TODO: dox. More...
 
enum  { FMS_ORIENTATION_UNKNOWN = 255 }
 
enum  FmsScalarType {
  FMS_FLOAT, FMS_DOUBLE, FMS_COMPLEX_FLOAT, FMS_COMPLEX_DOUBLE,
  FMS_NUM_SCALAR_TYPES
}
 Scalar types supported by FMS: floating-point types, real and complex. More...
 
enum  FmsFieldDescriptorType { FMS_FIXED_ORDER }
 Field descriptor types supported by FMS, see FmsFieldDescriptor. More...
 
enum  FmsFieldType {
  FMS_CONTINUOUS, FMS_DISCONTINUOUS, FMS_DISCONTINUOUS_WEIGHTED, FMS_HCURL,
  FMS_HDIV
}
 TODO: dox. More...
 
enum  FmsBasisType {
  FMS_NODAL_GAUSS_OPEN, FMS_NODAL_GAUSS_CLOSED, FMS_NODAL_CHEBYSHEV_OPEN, FMS_NODAL_CHEBYSHEV_CLOSED,
  FMS_NODAL_UNIFORM_OPEN, FMS_NODAL_UNIFORM_CLOSED, FMS_POSITIVE
}
 TODO: dox. More...
 
enum  FmsLayoutType { FMS_BY_NODES, FMS_BY_VDIM }
 TODO: dox. More...
 
enum  FmsMetaDataType {
  FMS_INTEGER, FMS_SCALAR, FMS_STRING, FMS_META_DATA,
  FMS_NUM_METADATA_TYPES
}
 TODO: dox. More...
 

Functions

int FmsGetIntTypeFromName (const char *const name, FmsIntType *type)
 Get the enum representation of an int type from the string name. More...
 
int FmsGetEntityTypeFromName (const char *const name, FmsEntityType *ent_type)
 Convert an entity-type string to FmsEntityType value. More...
 
int FmsGetScalarTypeFromName (const char *const name, FmsScalarType *type)
 Get the enum representation of an int type from the string name. More...
 
int FmsGetMetaDataTypeFromName (const char *const name, FmsMetaDataType *type)
 Convert a meta-data-type string to FmsMetaDataType value. More...
 
int FmsGetInterfaceVersion (FmsInt *version)
 Get the interface version. More...
 
int FmsMeshConstruct (FmsMesh *mesh)
 Allocate a mesh structure and initialize it to be empty. More...
 
int FmsMeshFinalize (FmsMesh mesh)
 TODO: dox. More...
 
int FmsMeshValidate (FmsMesh mesh)
 TODO: dox. More...
 
int FmsMeshDestroy (FmsMesh *mesh)
 TODO: dox. More...
 
int FmsMeshSetPartitionId (FmsMesh mesh, FmsInt partition_id, FmsInt num_partitions)
 TODO: dox. More...
 
int FmsMeshAddDomains (FmsMesh mesh, const char *domain_name, FmsInt num_domains, FmsDomain **domains)
 Allocates an array of domains sharing the same name, initializes them, and returns a pointer to the array. More...
 
int FmsMeshAddComponent (FmsMesh mesh, const char *comp_name, FmsComponent *comp)
 Add a new empty component to the mesh with the given name and return the new component in comp. More...
 
int FmsMeshAddTag (FmsMesh mesh, const char *tag_name, FmsTag *tag)
 Add a new tag to the mesh with the given name and return the new tag in tag. More...
 
int FmsDomainSetNumVertices (FmsDomain domain, FmsInt num_verts)
 Set the number of vertices in a domain. More...
 
int FmsDomainSetNumEntities (FmsDomain domain, FmsEntityType type, FmsIntType id_store_type, FmsInt num_ents)
 Allocates memory for the specified entities. More...
 
int FmsDomainGetEntitiesArray (FmsDomain domain, FmsEntityType type, void **ents)
 TODO: dox. More...
 
int FmsDomainGetOrientationsArray (FmsDomain domain, FmsEntityType type, FmsOrientation **side_orients)
 TODO: dox. More...
 
int FmsDomainAddEntities (FmsDomain domain, FmsEntityType type, FmsEntityReordering reordering, FmsIntType ent_id_type, const void *ents, FmsInt num_ents)
 TODO: dox. More...
 
int FmsDomainAddOrientation (FmsDomain domain, FmsEntityType type, FmsInt ent_id, FmsInt loc_side_id, FmsOrientation side_orient)
 TODO: dox. More...
 
int FmsComponentAddDomain (FmsComponent comp, FmsDomain domain)
 TODO: dox. More...
 
int FmsComponentAddPart (FmsComponent comp, FmsDomain domain, FmsInt *part_id)
 TODO: dox. More...
 
int FmsComponentAddPartEntities (FmsComponent comp, FmsInt part_id, FmsEntityType type, FmsIntType id_store_type, FmsIntType ent_id_type, FmsIntType orient_type, const FmsOrientation *inv_orient_map, const void *ents, const void *ent_orients, FmsInt num_ents)
 TODO: dox. More...
 
int FmsComponentAddPartSubEntities (FmsComponent comp, FmsInt part_id, FmsEntityType type, FmsIntType id_store_type, FmsIntType ent_id_type, const void *ents, FmsInt num_ents)
 TODO: dox Similar to FmsComponentAddPartEntities() but for lower dimensional entities. More...
 
int FmsComponentAddRelation (FmsComponent comp, FmsInt other_comp_id)
 Describe a relation from one component to another. More...
 
int FmsComponentSetCoordinates (FmsComponent comp, FmsField coords)
 Set the coordinates field of a component. More...
 
int FmsTagSetComponent (FmsTag tag, FmsComponent comp)
 TODO: dox. More...
 
int FmsTagSet (FmsTag tag, FmsIntType stored_tag_type, FmsIntType input_tag_type, const void *ent_tags, FmsInt num_ents)
 TODO: dox. More...
 
int FmsTagAllocate (FmsTag tag, FmsIntType stored_tag_type, void **ent_tags, FmsInt *num_ents)
 TODO: dox. More...
 
int FmsTagAddDescriptions (FmsTag tag, FmsIntType tag_type, const void *tags, const char *const *tag_descr, FmsInt num_tags)
 TODO: dox. More...
 
int FmsDataCollectionCreate (FmsMesh mesh, const char *dc_name, FmsDataCollection *dc)
 TODO: dox The new object, dc, assumes ownership of the mesh. More...
 
int FmsDataCollectionDestroy (FmsDataCollection *dc)
 Destroy a data collection object. More...
 
int FmsDataCollectionAddFieldDescriptor (FmsDataCollection dc, const char *fd_name, FmsFieldDescriptor *fd)
 TODO: dox. More...
 
int FmsDataCollectionAddField (FmsDataCollection dc, const char *field_name, FmsField *field)
 TODO: dox. More...
 
int FmsDataCollectionAttachMetaData (FmsDataCollection dc, FmsMetaData *mdata)
 Make sure the meta-data structure associated with a data collection is allocated and return it in mdata. More...
 
int FmsFieldDescriptorSetComponent (FmsFieldDescriptor fd, FmsComponent comp)
 TODO: dox. More...
 
int FmsFieldDescriptorSetFixedOrder (FmsFieldDescriptor fd, FmsFieldType field_type, FmsBasisType basis_type, FmsInt order)
 TODO: dox. More...
 
int FmsFieldSet (FmsField field, FmsFieldDescriptor fd, FmsInt num_vec_comp, FmsLayoutType layout_type, FmsScalarType data_type, const void *data)
 TODO: dox The size of the data array is num_vec_comp times the number of DOFs as defined by the field descriptor fd. More...
 
int FmsFieldAttachMetaData (FmsField field, FmsMetaData *mdata)
 Make sure the meta-data structure associated with a field is allocated and return it in mdata. More...
 
int FmsMetaDataSetIntegers (FmsMetaData mdata, const char *mdata_name, FmsIntType int_type, FmsInt size, void **data)
 Set the contents of a meta-data structure to store an array of integers. More...
 
int FmsMetaDataSetScalars (FmsMetaData mdata, const char *mdata_name, FmsScalarType scal_type, FmsInt size, void **data)
 Set the contents of a meta-data structure to store an array of scalars. More...
 
int FmsMetaDataSetString (FmsMetaData mdata, const char *mdata_name, const char *c_string)
 Set the contents of a meta-data structure to store a c-string. More...
 
int FmsMetaDataSetMetaData (FmsMetaData mdata, const char *mdata_name, FmsInt size, FmsMetaData **data)
 Set the contents of a meta-data structure to store an array of meta-data structures. More...
 
int FmsMetaDataClear (FmsMetaData mdata)
 Clear the contents of mdata without destroying the object. More...
 
int FmsMetaDataDestroy (FmsMetaData *mdata)
 Destroy the object that *mdata refers to and set *mdata to NULL. More...
 
int FmsMeshGetPartitionId (FmsMesh mesh, FmsInt *partition_id, FmsInt *num_partitions)
 TODO: dox. More...
 
int FmsMeshGetNumDomainNames (FmsMesh mesh, FmsInt *num_domain_names)
 TODO: dox. More...
 
int FmsMeshGetDomains (FmsMesh mesh, FmsInt domain_name_id, const char **domain_name, FmsInt *num_domains, FmsDomain **domains)
 TODO: dox. More...
 
int FmsMeshGetDomainsByName (FmsMesh mesh, const char *domain_name, FmsInt *num_domains, FmsDomain **domains)
 TODO: dox. More...
 
int FmsMeshGetNumComponents (FmsMesh mesh, FmsInt *num_comp)
 TODO: dox. More...
 
int FmsMeshGetComponent (FmsMesh mesh, FmsInt comp_id, FmsComponent *comp)
 TODO: dox. More...
 
int FmsMeshGetNumTags (FmsMesh mesh, FmsInt *num_tags)
 TODO: dox. More...
 
int FmsMeshGetTag (FmsMesh mesh, FmsInt tag_id, FmsTag *tag)
 TODO: dox. More...
 
int FmsDomainGetName (FmsDomain domain, const char **domain_name, FmsInt *domain_id)
 Return the name and id of a mesh domain. More...
 
int FmsDomainGetDimension (FmsDomain domain, FmsInt *dim)
 Return the highest dimension of an entry in a mesh domain. More...
 
int FmsDomainGetNumVertices (FmsDomain domain, FmsInt *num_verts)
 Get the number of vertices in a domain. More...
 
int FmsDomainGetNumEntities (FmsDomain domain, FmsEntityType type, FmsInt *num_ents)
 Get the number of entities of a given type in a domain. More...
 
int FmsDomainGetAllEntities (FmsDomain domain, FmsEntityType type, FmsIntType *ent_id_type, const void **ents, FmsInt *num_ents)
 TODO: dox No copy, read only access to all entity definitions. More...
 
int FmsDomainGetEntities (FmsDomain domain, FmsEntityType type, FmsEntityReordering reordering, FmsIntType ent_id_type, FmsInt first_ent, void *ents, FmsInt num_ents)
 TODO: dox Extract a subset of the entity definitions. More...
 
int FmsDomainGetEntitiesVerts (FmsDomain domain, FmsEntityType type, FmsEntityReordering vert_reordering, FmsIntType ent_id_type, FmsInt first_ent, void *ents_verts, FmsInt num_ents)
 TODO: dox Extract a subset of the entity definitions in terms of their vertices. More...
 
int FmsDomainGetAllOrientations (FmsDomain domain, FmsEntityType type, const FmsOrientation **side_orients, FmsInt *num_ents)
 TODO: dox No copy, read only access to all entity side orientations. More...
 
int FmsComponentGetName (FmsComponent comp, const char **comp_name)
 Return the name of a mesh component. More...
 
int FmsComponentGetDimension (FmsComponent comp, FmsInt *dim)
 Return the dimension of a mesh component. More...
 
int FmsComponentGetNumParts (FmsComponent comp, FmsInt *num_parts)
 TODO: dox. More...
 
int FmsComponentGetPart (FmsComponent comp, FmsInt part_id, FmsEntityType type, FmsDomain *domain, FmsIntType *ent_id_type, const void **ents, const FmsOrientation **ent_orients, FmsInt *num_ents)
 TODO: dox. More...
 
int FmsComponentGetPartSubEntities (FmsComponent comp, FmsInt part_id, FmsEntityType type, FmsIntType *ent_id_type, const void **ents, FmsInt *num_ents)
 TODO: dox Similar to FmsComponentGetPart() but for lower dimensional entities. More...
 
int FmsComponentGetNumEntities (FmsComponent comp, FmsInt *num_ents)
 Return the total number of main entities across all parts in the component. More...
 
int FmsComponentGetRelations (FmsComponent comp, const FmsInt **rel_comps, FmsInt *num_rel_comps)
 TODO: dox. More...
 
int FmsComponentGetCoordinates (FmsComponent comp, FmsField *coords)
 Return the coordinates field of a component. More...
 
int FmsTagGetName (FmsTag tag, const char **tag_name)
 TODO: dox. More...
 
int FmsTagGetComponent (FmsTag tag, FmsComponent *comp)
 TODO: dox. More...
 
int FmsTagGet (FmsTag tag, FmsIntType *tag_type, const void **ent_tags, FmsInt *num_ents)
 TODO: dox No copy, read only access to the entity-tag array. More...
 
int FmsTagGetDescriptions (FmsTag tag, FmsIntType *tag_type, const void **tags, const char *const **tag_descr, FmsInt *num_tags)
 TODO: dox. More...
 
int FmsDataCollectionGetName (FmsDataCollection dc, const char **name)
 Get the name of the data collection. More...
 
int FmsDataCollectionGetMesh (FmsDataCollection dc, FmsMesh *mesh)
 TODO: dox. More...
 
int FmsDataCollectionGetFieldDescriptors (FmsDataCollection dc, FmsFieldDescriptor **fds, FmsInt *num_fds)
 TODO: dox. More...
 
int FmsDataCollectionGetFields (FmsDataCollection dc, FmsField **fields, FmsInt *num_fields)
 TODO: dox. More...
 
int FmsDataCollectionGetMetaData (FmsDataCollection dc, FmsMetaData *mdata)
 TODO: dox. More...
 
int FmsFieldDescriptorGetName (FmsFieldDescriptor fd, const char **fd_name)
 TODO: dox. More...
 
int FmsFieldDescriptorGetComponent (FmsFieldDescriptor fd, FmsComponent *comp)
 TODO: dox. More...
 
int FmsFieldDescriptorGetType (FmsFieldDescriptor fd, FmsFieldDescriptorType *fd_type)
 TODO: dox. More...
 
int FmsFieldDescriptorGetFixedOrder (FmsFieldDescriptor fd, FmsFieldType *field_type, FmsBasisType *basis_type, FmsInt *order)
 TODO: dox. More...
 
int FmsFieldDescriptorGetNumDofs (FmsFieldDescriptor fd, FmsInt *num_dofs)
 TODO: dox. More...
 
int FmsFieldGetName (FmsField field, const char **field_name)
 TODO: dox. More...
 
int FmsFieldGet (FmsField field, FmsFieldDescriptor *fd, FmsInt *num_vec_comp, FmsLayoutType *layout_type, FmsScalarType *data_type, const void **data)
 TODO: dox. More...
 
int FmsFieldGetMetaData (FmsField field, FmsMetaData *mdata)
 TODO: dox. More...
 
int FmsMetaDataGetType (FmsMetaData mdata, FmsMetaDataType *type)
 TODO: dox. More...
 
int FmsMetaDataGetIntegers (FmsMetaData mdata, const char **mdata_name, FmsIntType *int_type, FmsInt *size, const void **data)
 Get the contents of a meta-data structure that stores an array of integers. More...
 
int FmsMetaDataGetScalars (FmsMetaData mdata, const char **mdata_name, FmsScalarType *scal_type, FmsInt *size, const void **data)
 Get the contents of a meta-data structure that stores an array of scalars. More...
 
int FmsMetaDataGetString (FmsMetaData mdata, const char **mdata_name, const char **c_string)
 Get the contents of a meta-data structure that stores a c-string. More...
 
int FmsMetaDataGetMetaData (FmsMetaData mdata, const char **mdata_name, FmsInt *size, FmsMetaData **data)
 Get the contents of a meta-data structure that stores an array of meta-data structures. More...
 
int FmsDataCollectionCompare (FmsDataCollection, FmsDataCollection)
 Comparison interface. More...
 
int FmsMeshCompare (FmsMesh, FmsMesh)
 Return 0 if equivalent, not 0 otherwise. More...
 
int FmsFieldDescriptorCompare (FmsFieldDescriptor, FmsFieldDescriptor)
 Return 0 if equivalent, not 0 otherwise. More...
 
int FmsFieldCompare (FmsField, FmsField)
 Return 0 if equivalent, not 0 otherwise. More...
 
int FmsMetaDataCompare (FmsMetaData, FmsMetaData)
 Return 0 if equivalent, not 0 otherwise. More...
 
int FmsDomainCompare (FmsDomain, FmsDomain)
 Return 0 if equivalent, not 0 otherwise. More...
 
int FmsComponentCompare (FmsComponent, FmsComponent)
 Return 0 if equivalent, not 0 otherwise. More...
 
int FmsTagCompare (FmsTag, FmsTag)
 Return 0 if equivalent, not 0 otherwise. More...
 

Variables

const size_t FmsIntTypeSize [FMS_NUM_INT_TYPES]
 
const char *const FmsIntTypeNames [FMS_NUM_INT_TYPES]
 Added in version: v0.2. More...
 
const char *const FmsEntityTypeNames [FMS_NUM_ENTITY_TYPES]
 String representations of each entity type. More...
 
const FmsInt FmsEntityDim [FMS_NUM_ENTITY_TYPES]
 Dimensions of the entity types. More...
 
const FmsInt FmsEntityNumSides [FMS_NUM_ENTITY_TYPES]
 Number of sides of the entity types. More...
 
const FmsInt FmsEntityNumVerts [FMS_NUM_ENTITY_TYPES]
 Number of vertices of the entity types. More...
 
const size_t FmsScalarTypeSize [FMS_NUM_SCALAR_TYPES]
 
const char *const FmsScalarTypeNames [FMS_NUM_SCALAR_TYPES]
 Added in version: v0.2. More...
 
const char *const FmsMetaDataTypeNames [FMS_NUM_METADATA_TYPES]
 Added in version: v0.2. More...
 

Macro Definition Documentation

◆ FMS_VERSION

#define FMS_VERSION   200

FMS version constant of the form: ((major*100 + minor)*100 + patch).

For example, value of 10203 means v1.2.3.

The version is also defined in the files: CMakeLists.txt and Doxyfile.

This macro was added in version: v0.2.

Definition at line 36 of file fms.h.

Typedef Documentation

◆ FmsComponent

typedef struct FmsComponent_private* FmsComponent

TODO: dox.

Components are sets of parts. A part is a set of entities of the same type, described as a subset of the entities of a domain. All entities in the component must have (i) the same dimension and (ii) specified orientation (relative to the entity as described in its domain).

FIXME: parts can hold more than one type of main entities!

In order to facilitate the definition of fields on the component, the following additional data can be stored in every part of the component: for all lower dimensional entities that are boundary to the main entities of the part, define an array that maps the local (to the part) indices to the domain-indices. These arrays plus the main array (the one describing the highest dimensional entities of the component) define local numberings of all entities inside each part. These numberings will be used to define the ordering of the degrees of freedom of a field. When the main entity array is NULL (indicating that all entities in the domain are used) then the lower dimensional entities will also be NULL because there is no need to have local numbering of the entities - the original numbering used by the domain can be reused.

A component has a coordinates field (FmsField) which may be NULL.

In addition to the parts, a component also stores relations to other components. A relation to a component of lower or higher dimension indicates a boundary or interface relation, i.e. the lower dimensional component describes a subset of the boundary entities of the higher dimensional component. A relation to another component of the same dimension is acceptable but has no specified meaning.

TODO: introduce additional topological constraints in a component, e.g. to enforce periodicity on a non-periodic component.

The arrays storing the entity indices into the domains use user-specified integer type.

The arrays storing the entity orientations are of type FmsOrientation.

A domain associated with a part is stored as a domain names plus a domain id of type FmsInt.

The relations to other components are stored as an array of component ids of type FmsInt.

Mesh tags are defined on the set of all entities in a mesh component.

Discrete fields are defined on mesh components. Unlike tags, discrete fields generally associate data not only with the entities described by the mesh component but also with the lower-dimensional boundary entities of the component entities.

Definition at line 159 of file fms.h.

◆ FmsDataCollection

typedef struct FmsDataCollection_private* FmsDataCollection

Data collection type: contains a mesh, discrete fileds, meta-data, etc.

A data collection structure contains:

  • a name (const char *)
  • meta-data (FmsMetaData, can be NULL)
  • a mesh (FmsMesh)
  • number of field-descriptors (FmsInt)
  • an array of field-descriptors (FmsFieldDescriptor *)
  • number of fields (FmsInt)
  • an array of fields (FmsField *)

Definition at line 447 of file fms.h.

◆ FmsDomain

typedef struct FmsDomain_private* FmsDomain

TODO: dox.

Domains describe sets of interconnected mesh entities:

  • 0d-entities / vertices
  • 1d-entities / edges
  • 2d-entities / faces: triangles, quads
  • 3d-entities / volumes / regions: tets, hexes, wedges, pyramids.

All entities in a domain are enumerated within the domain.

Connections to other domains are described using shared entities. (TODO)

Other relations, such as refinement (parent-child) and non-conforming (master-slave) relations can also be represented. (TODO)

Domains are assigned a string name and an integer id. Thus, a domain is identified uniquely by the tuple: (name, id, partition-id) where the partition id is the one assigned to the containing mesh.

The arrays storing the entity definitions use user-specified integer type.

The domain names are stored in the mesh structure and the domains store just pointer to the name.

Definition at line 106 of file fms.h.

◆ FmsEntityReordering

typedef const int* FmsEntityReordering[FMS_NUM_ENTITY_TYPES]

A type describing user-defined local orderings of the side entities defining an enitity.

User-ordering to fms-ordering is performed as follows: let u=[u_0,...,u_n] be the user-ordered indices for one of the entity types, say t, which has reordering array ra (of size n+1), i.e. ra is the pointer given by entry t from a variable of type FmsEntityReordering (which is an array of pointers). Then the fms-ordered indices, v=[v_0,...,v_n], are computed as v[i] = u[ra[i]], i=0,...,n. Conversely, if v is given, then u is computed as u[ra[i]] = v[i], i=0,...,n. In other words, ra[fms-index] = user-index. If a pointer ra is NULL, then no reordering is performed.

This type can be used to describe orderings of other types of boundary entities, e.g. reorderings for the vertices.

Definition at line 281 of file fms.h.

◆ FmsField

typedef struct FmsField_private* FmsField

Discrete field data type.

A field structure contains:

  • a field name
  • meta-data - e.g. time (FmsMetaData, can be NULL)
  • a field-descriptor (FmsFieldDescriptor)
  • number of vector components (FmsInt)
  • a layout type, i.e. ordering for the vector components (FmsLayoutType)
  • a scalar type (FmsScalarType)
  • a data array of the given scalar type.

Definition at line 435 of file fms.h.

◆ FmsFieldDescriptor

typedef struct FmsFieldDescriptor_private* FmsFieldDescriptor

TODO: dox.

A field-descriptor structure contains:

  • a field-descriptor name
  • an associated mesh component (FmsComponent)
  • a descriptor-type (FmsFieldDescriptorType)
  • if descriptor-type == "fixed-order":
    • a field type (FmsFieldType)
    • a basis-type (FmsBasisType)
    • an order
  • total number of DOFs

The degrees of freedom are ordered part-by-part of the associated mesh component. Within each part, the dofs are ordered as follows:

  • first, all DOFs on all vertices ordered according to the local (to the part) enumeration of the vertices
  • second, all DOFs on all edges ordered according to the local (to the part) enumeration of the edges
  • similarly, continue adding DOFs for all remaining entity types in the order used by FmsEntityType.

Definition at line 423 of file fms.h.

◆ FmsInt

typedef uint64_t FmsInt

Type used by fms for representing and storing sizes and indices.

Definition at line 43 of file fms.h.

◆ FmsMesh

typedef struct FmsMesh_private* FmsMesh

TODO: dox.

A mesh consists of:

  • mesh domains
  • mesh components, described in terms of the domains
  • mesh tags (attributes), defined on components.

The mesh is also assigned a partition id, e.g. an MPI rank.

Definition at line 82 of file fms.h.

◆ FmsMetaData

typedef struct FmsMetaData_private* FmsMetaData

TODO: dox.

A meta-data structure contains:

  • a meta-data type (FmsMetaDataType)
  • a meta-data subtype, e.g. FmsIntType, FmsScalarType; TODO: for FMS_STRING type define FmsEncoding subtype
  • a meta-data name (const char *)
  • number of entries in the data array (FmsInt); the type of the entries in the data array is based on the meta-data type and subtype, when subtype is applicable; in the case of FMS_STRING, the entries are of type char (or some other type depending on the FmsEncoding subtype when introduced)
  • a data array (void *)

Definition at line 401 of file fms.h.

◆ FmsOrientation

typedef uint8_t FmsOrientation

A type used by fms to represent and store entity orientations.

Orientations identify specific permutations to the d-1 dimensional boundary entities that describe a d-dimensional entity. Orientations are always relative to a specific entity described as a tuple of d-1 dimensional entities. For example, if the triangle A, given as A=(a,b,c) where a, b, and c are edges (i.e. edge indices) then we say that the triangle B=(b,c,a) has orientation 2 relative to A, see the definitions below.

In general, the orientation of an entity B relative to an entity A is different from the orientation of A relative to B. These two orientations are inversees of each other: mathematically the set of all orientation of an entity type form a group.

Orientation 0 always represents the identity permutation.

For FMS_EDGE, the orientations of an edge "ab" are defined as:

0: ab   1: ba

For FMS_TRIANGLE, the orientations of a triangle "abc" are defined as:

0: abc   1: acb   2: bca   3: bac   4: cab   5: cba

The inverses of the orientations 012345 are the orientations 014325, respectively, i.e. the orientations 2 and 4 are inverses of each other while all other orientations are inverses of themselves.

For FMS_QUADRILATERAL, the orientations of a quad "abcd" are defined as:

0: abcd   1: adcb   2: bcda   3: badb
4: cdab   5: cbad   6: dabc   7: dcba

The inverses of the orientations 01234567 are the orientations 01634527, respectively, i.e. 2 and 6 are inverses of each other while all other orientations are inverses of themselves.

Definition at line 319 of file fms.h.

◆ FmsTag

typedef struct FmsTag_private* FmsTag

TODO: dox.

A tag is an array of integers describing the entities in a given component. Optionally, the integer tags can be assigned string descriptions.

The array with the integer tags is ordered part-by-part within the mesh component.

The associated component is stored as a component id of type FmsInt.

A tag naturally defines a non-overlapping decomposition of the associated component.

Tags can be used to store the orders (polynomial degrees) associated with the component entities in variable order discrete spaces.

Definition at line 176 of file fms.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Interface version constant of the form: ((major*100 + minor)*100 + patch).

Since FMS v0.2, this value is the same as the macro FMS_VERSION.

Enumerator
FMS_INTERFACE_VERSION 

Definition at line 40 of file fms.h.

◆ anonymous enum

anonymous enum

Constant used for initializing dimension variables.

Enumerator
FMS_INVALID_DIM 

Definition at line 179 of file fms.h.

◆ anonymous enum

anonymous enum
Enumerator
FMS_ORIENTATION_UNKNOWN 

Definition at line 321 of file fms.h.

◆ FmsBasisType

TODO: dox.

Enumerator
FMS_NODAL_GAUSS_OPEN 
FMS_NODAL_GAUSS_CLOSED 
FMS_NODAL_CHEBYSHEV_OPEN 
FMS_NODAL_CHEBYSHEV_CLOSED 
FMS_NODAL_UNIFORM_OPEN 
FMS_NODAL_UNIFORM_CLOSED 
FMS_POSITIVE 

Definition at line 357 of file fms.h.

◆ FmsEntityType

TODO: dox.

An entity is described by a tuple of its side entity indices. For an entity of dimension d, its side entities are its boundary entities of dimension d-1.

For FMS_TRIANGLE and FMS_QUADRILATERAL, the edges (sides), "abc"/"abcd" and the vertices "012"/"0123" are ordered counterclockwise, as illustrated in the following diagram:

3--c--2       2
|     |      / \
d     b     c   b
|     |    /     \
0--a--1   0---a---1

For 3D entities, the ordering of the edges inside the faces should follow the counterclockwise ordering when looking the the face from outside. This rule is followed by the choices given below.

For FMS_TETRAHEDRON, the faces (sides), "ABCD", the edges, "abcdef", and the vertices, "0123" are ordered as follows:

   z=0         y=0         x=0       x+y+z=1
    2           3           3           3
   / \         / \         / \         / \
  b   c       d   e       f   d       e   f
 /  A  \     /  B  \     /  C  \     /  D  \
1---a---0   0---a---1   2---c---0   1---b---2

For example, vertex "0" has coordinates (x,y,z)=(0,0,0), vertex "1" has coordinates (1,0,0), etc.

For FMS_HEXAHEDRON, the faces (sides), "ABCDEF", the edges, "abcdefghijkl" and the vertices, "01234567", are ordered as follows:

z  y
| /     7--g--6
|/     /|    /|
+--x  / l   / k   z=0      z=1      y=0      y=1      x=0      x=1
     h  |  f  |   bottom   top      front    back     left     right
    /   3-/c--2   2--c--3  7--g--6  4--e--5  6--g--7  7--h--4  5--f--6
   /   / /   /    |     |  |     |  |     |  |     |  |     |  |     |
  4--e--5   /     b  A  d  h  B  f  i  C  j  k  D  l  l  E  i  j  F  k
  |  d  |  b      |     |  |     |  |     |  |     |  |     |  |     |
  i /   j /       1--a--0  4--e--5  0--a--1  2--c--3  3--d--0  1--b--2
  |/    |/
  0--a--1

For example, vertex "0" has coordinates (x,y,z)=(0,0,0), vertex "6" has coordinates (1,1,1), etc.

TODO: describe the side entity orderings for all ramaining entity types used by fms.

Enumerator
FMS_VERTEX 
FMS_EDGE 
FMS_TRIANGLE 
FMS_QUADRILATERAL 
FMS_TETRAHEDRON 
FMS_HEXAHEDRON 
FMS_WEDGE 
FMS_PYRAMID 
FMS_NUM_ENTITY_TYPES 

Definition at line 235 of file fms.h.

◆ FmsFieldDescriptorType

Field descriptor types supported by FMS, see FmsFieldDescriptor.

Enumerator
FMS_FIXED_ORDER 

See FmsFieldDescriptorSetFixedOrder()

Definition at line 343 of file fms.h.

◆ FmsFieldType

TODO: dox.

Enumerator
FMS_CONTINUOUS 
FMS_DISCONTINUOUS 
FMS_DISCONTINUOUS_WEIGHTED 
FMS_HCURL 
FMS_HDIV 

Definition at line 348 of file fms.h.

◆ FmsIntType

enum FmsIntType

TODO: dox.

Enumerator
FMS_INT8 
FMS_INT16 
FMS_INT32 
FMS_INT64 
FMS_UINT8 
FMS_UINT16 
FMS_UINT32 
FMS_UINT64 
FMS_NUM_INT_TYPES 
FMS_INT_TYPE 

The type of FmsInt identified as FmsIntType.

FMS_ORIENTATION_INT_TYPE 

The type of FmsOrientation as FmsIntType.

Definition at line 46 of file fms.h.

◆ FmsLayoutType

TODO: dox.

Enumerator
FMS_BY_NODES 
FMS_BY_VDIM 

Definition at line 368 of file fms.h.

◆ FmsMetaDataType

TODO: dox.

Enumerator
FMS_INTEGER 
FMS_SCALAR 
FMS_STRING 
FMS_META_DATA 
FMS_NUM_METADATA_TYPES 

Added in version: v0.2.

Definition at line 374 of file fms.h.

◆ FmsScalarType

Scalar types supported by FMS: floating-point types, real and complex.

Enumerator
FMS_FLOAT 
FMS_DOUBLE 
FMS_COMPLEX_FLOAT 
FMS_COMPLEX_DOUBLE 
FMS_NUM_SCALAR_TYPES 

Definition at line 324 of file fms.h.

Function Documentation

◆ FmsComponentAddDomain()

int FmsComponentAddDomain ( FmsComponent  comp,
FmsDomain  domain 
)

TODO: dox.

All entities of the highest dimension in the domain are added to the component.

Definition at line 1443 of file fms.c.

◆ FmsComponentAddPart()

int FmsComponentAddPart ( FmsComponent  comp,
FmsDomain  domain,
FmsInt part_id 
)

TODO: dox.

Definition at line 1482 of file fms.c.

◆ FmsComponentAddPartEntities()

int FmsComponentAddPartEntities ( FmsComponent  comp,
FmsInt  part_id,
FmsEntityType  type,
FmsIntType  id_store_type,
FmsIntType  ent_id_type,
FmsIntType  orient_type,
const FmsOrientation inv_orient_map,
const void *  ents,
const void *  ent_orients,
FmsInt  num_ents 
)

TODO: dox.

The pointer ents can be NULL to signify that all entities in the domain of the given type are being added.

The pointer ent_orients can be NULL to signify that all orientations are 0, i.e. the identity permutation.

The arrays ents and ent_orients (if not NULL) have the same size, num_ents.

The content of the arrays ents and ent_orients is copied internally after applying the inv_orient_map to the second array.

TODO: inv_orient_map[user-orientation] -> fms-orientation.

Definition at line 1504 of file fms.c.

◆ FmsComponentAddPartSubEntities()

int FmsComponentAddPartSubEntities ( FmsComponent  comp,
FmsInt  part_id,
FmsEntityType  type,
FmsIntType  id_store_type,
FmsIntType  ent_id_type,
const void *  ents,
FmsInt  num_ents 
)

TODO: dox Similar to FmsComponentAddPartEntities() but for lower dimensional entities.

Definition at line 1577 of file fms.c.

◆ FmsComponentAddRelation()

int FmsComponentAddRelation ( FmsComponent  comp,
FmsInt  other_comp_id 
)

Describe a relation from one component to another.

Definition at line 1624 of file fms.c.

◆ FmsComponentCompare()

int FmsComponentCompare ( FmsComponent  ,
FmsComponent   
)

Return 0 if equivalent, not 0 otherwise.

Added in version: v0.2.

Definition at line 3427 of file fms.c.

◆ FmsComponentGetCoordinates()

int FmsComponentGetCoordinates ( FmsComponent  comp,
FmsField coords 
)

Return the coordinates field of a component.

Note that the returned FmsField, *coords, can be NULL.

Definition at line 2722 of file fms.c.

◆ FmsComponentGetDimension()

int FmsComponentGetDimension ( FmsComponent  comp,
FmsInt dim 
)

Return the dimension of a mesh component.

Definition at line 2665 of file fms.c.

◆ FmsComponentGetName()

int FmsComponentGetName ( FmsComponent  comp,
const char **  comp_name 
)

Return the name of a mesh component.

Definition at line 2659 of file fms.c.

◆ FmsComponentGetNumEntities()

int FmsComponentGetNumEntities ( FmsComponent  comp,
FmsInt num_ents 
)

Return the total number of main entities across all parts in the component.

Definition at line 2708 of file fms.c.

◆ FmsComponentGetNumParts()

int FmsComponentGetNumParts ( FmsComponent  comp,
FmsInt num_parts 
)

TODO: dox.

Definition at line 2671 of file fms.c.

◆ FmsComponentGetPart()

int FmsComponentGetPart ( FmsComponent  comp,
FmsInt  part_id,
FmsEntityType  type,
FmsDomain domain,
FmsIntType ent_id_type,
const void **  ents,
const FmsOrientation **  ent_orients,
FmsInt num_ents 
)

TODO: dox.

No copy, read only access to the description of part part_id in the component.

If the pointer returned in ents is NULL, then all entities in the domain of the specified type are used.

If the pointer returned in ent_orients is NULL, then all orientations are 0, i.e. the identity permutation.

Definition at line 2677 of file fms.c.

◆ FmsComponentGetPartSubEntities()

int FmsComponentGetPartSubEntities ( FmsComponent  comp,
FmsInt  part_id,
FmsEntityType  type,
FmsIntType ent_id_type,
const void **  ents,
FmsInt num_ents 
)

TODO: dox Similar to FmsComponentGetPart() but for lower dimensional entities.

Definition at line 2694 of file fms.c.

◆ FmsComponentGetRelations()

int FmsComponentGetRelations ( FmsComponent  comp,
const FmsInt **  rel_comps,
FmsInt num_rel_comps 
)

TODO: dox.

Definition at line 2714 of file fms.c.

◆ FmsComponentSetCoordinates()

int FmsComponentSetCoordinates ( FmsComponent  comp,
FmsField  coords 
)

Set the coordinates field of a component.

Definition at line 1639 of file fms.c.

◆ FmsDataCollectionAddField()

int FmsDataCollectionAddField ( FmsDataCollection  dc,
const char *  field_name,
FmsField field 
)

TODO: dox.

Definition at line 1834 of file fms.c.

◆ FmsDataCollectionAddFieldDescriptor()

int FmsDataCollectionAddFieldDescriptor ( FmsDataCollection  dc,
const char *  fd_name,
FmsFieldDescriptor fd 
)

TODO: dox.

Definition at line 1808 of file fms.c.

◆ FmsDataCollectionAttachMetaData()

int FmsDataCollectionAttachMetaData ( FmsDataCollection  dc,
FmsMetaData mdata 
)

Make sure the meta-data structure associated with a data collection is allocated and return it in mdata.

Definition at line 1861 of file fms.c.

◆ FmsDataCollectionCompare()

int FmsDataCollectionCompare ( FmsDataCollection  ,
FmsDataCollection   
)

Comparison interface.

Return 0 if equivalent, not 0 otherwise Added in version: v0.2.

Definition at line 3035 of file fms.c.

◆ FmsDataCollectionCreate()

int FmsDataCollectionCreate ( FmsMesh  mesh,
const char *  dc_name,
FmsDataCollection dc 
)

TODO: dox The new object, dc, assumes ownership of the mesh.

Definition at line 1750 of file fms.c.

◆ FmsDataCollectionDestroy()

int FmsDataCollectionDestroy ( FmsDataCollection dc)

Destroy a data collection object.

Destroys the mesh, all field-descriptors, and all fields stored by the data collection.

Definition at line 1765 of file fms.c.

◆ FmsDataCollectionGetFieldDescriptors()

int FmsDataCollectionGetFieldDescriptors ( FmsDataCollection  dc,
FmsFieldDescriptor **  fds,
FmsInt num_fds 
)

TODO: dox.

Definition at line 2786 of file fms.c.

◆ FmsDataCollectionGetFields()

int FmsDataCollectionGetFields ( FmsDataCollection  dc,
FmsField **  fields,
FmsInt num_fields 
)

TODO: dox.

Definition at line 2794 of file fms.c.

◆ FmsDataCollectionGetMesh()

int FmsDataCollectionGetMesh ( FmsDataCollection  dc,
FmsMesh mesh 
)

TODO: dox.

Definition at line 2779 of file fms.c.

◆ FmsDataCollectionGetMetaData()

int FmsDataCollectionGetMetaData ( FmsDataCollection  dc,
FmsMetaData mdata 
)

TODO: dox.

Definition at line 2802 of file fms.c.

◆ FmsDataCollectionGetName()

int FmsDataCollectionGetName ( FmsDataCollection  dc,
const char **  name 
)

Get the name of the data collection.

Parameters
dcthe data collection.
[out]nameA char pointer that will be set to point to the name string. The name is owned by the data collection so it should not be freed or modified.
Returns
0 on success, non-zero otherwise.

Added in version: v0.2.

Definition at line 2772 of file fms.c.

◆ FmsDomainAddEntities()

int FmsDomainAddEntities ( FmsDomain  domain,
FmsEntityType  type,
FmsEntityReordering  reordering,
FmsIntType  ent_id_type,
const void *  ents,
FmsInt  num_ents 
)

TODO: dox.

Entities of dimension d are described by tuples of its side entities (entity indices), or in other words, by a list of its boundary entities of dimension d-1.

The content of the array ents is copied internally after applying the side entity reordering.

Definition at line 1402 of file fms.c.

◆ FmsDomainAddOrientation()

int FmsDomainAddOrientation ( FmsDomain  domain,
FmsEntityType  type,
FmsInt  ent_id,
FmsInt  loc_side_id,
FmsOrientation  side_orient 
)

TODO: dox.

Definition at line 1426 of file fms.c.

◆ FmsDomainCompare()

int FmsDomainCompare ( FmsDomain  ,
FmsDomain   
)

Return 0 if equivalent, not 0 otherwise.

Added in version: v0.2.

Definition at line 3362 of file fms.c.

◆ FmsDomainGetAllEntities()

int FmsDomainGetAllEntities ( FmsDomain  domain,
FmsEntityType  type,
FmsIntType ent_id_type,
const void **  ents,
FmsInt num_ents 
)

TODO: dox No copy, read only access to all entity definitions.

Definition at line 2287 of file fms.c.

◆ FmsDomainGetAllOrientations()

int FmsDomainGetAllOrientations ( FmsDomain  domain,
FmsEntityType  type,
const FmsOrientation **  side_orients,
FmsInt num_ents 
)

TODO: dox No copy, read only access to all entity side orientations.

Definition at line 2644 of file fms.c.

◆ FmsDomainGetDimension()

int FmsDomainGetDimension ( FmsDomain  domain,
FmsInt dim 
)

Return the highest dimension of an entry in a mesh domain.

Definition at line 2264 of file fms.c.

◆ FmsDomainGetEntities()

int FmsDomainGetEntities ( FmsDomain  domain,
FmsEntityType  type,
FmsEntityReordering  reordering,
FmsIntType  ent_id_type,
FmsInt  first_ent,
void *  ents,
FmsInt  num_ents 
)

TODO: dox Extract a subset of the entity definitions.

Definition at line 2298 of file fms.c.

◆ FmsDomainGetEntitiesArray()

int FmsDomainGetEntitiesArray ( FmsDomain  domain,
FmsEntityType  type,
void **  ents 
)

TODO: dox.

This function allows the internal entities array to be set directly by the user.

Definition at line 1381 of file fms.c.

◆ FmsDomainGetEntitiesVerts()

int FmsDomainGetEntitiesVerts ( FmsDomain  domain,
FmsEntityType  type,
FmsEntityReordering  vert_reordering,
FmsIntType  ent_id_type,
FmsInt  first_ent,
void *  ents_verts,
FmsInt  num_ents 
)

TODO: dox Extract a subset of the entity definitions in terms of their vertices.

Definition at line 2329 of file fms.c.

◆ FmsDomainGetName()

int FmsDomainGetName ( FmsDomain  domain,
const char **  domain_name,
FmsInt domain_id 
)

Return the name and id of a mesh domain.

Definition at line 2256 of file fms.c.

◆ FmsDomainGetNumEntities()

int FmsDomainGetNumEntities ( FmsDomain  domain,
FmsEntityType  type,
FmsInt num_ents 
)

Get the number of entities of a given type in a domain.

Definition at line 2278 of file fms.c.

◆ FmsDomainGetNumVertices()

int FmsDomainGetNumVertices ( FmsDomain  domain,
FmsInt num_verts 
)

Get the number of vertices in a domain.

Definition at line 2271 of file fms.c.

◆ FmsDomainGetOrientationsArray()

int FmsDomainGetOrientationsArray ( FmsDomain  domain,
FmsEntityType  type,
FmsOrientation **  side_orients 
)

TODO: dox.

This function allows the internal entity side orientations array to be set directly by the user.

Definition at line 1393 of file fms.c.

◆ FmsDomainSetNumEntities()

int FmsDomainSetNumEntities ( FmsDomain  domain,
FmsEntityType  type,
FmsIntType  id_store_type,
FmsInt  num_ents 
)

Allocates memory for the specified entities.

Destroys any existing entities of the given type. The value of num_ents can be an upper bound of the actual number of entities.

Definition at line 1334 of file fms.c.

◆ FmsDomainSetNumVertices()

int FmsDomainSetNumVertices ( FmsDomain  domain,
FmsInt  num_verts 
)

Set the number of vertices in a domain.

Definition at line 1327 of file fms.c.

◆ FmsFieldAttachMetaData()

int FmsFieldAttachMetaData ( FmsField  field,
FmsMetaData mdata 
)

Make sure the meta-data structure associated with a field is allocated and return it in mdata.

Definition at line 2016 of file fms.c.

◆ FmsFieldCompare()

int FmsFieldCompare ( FmsField  ,
FmsField   
)

Return 0 if equivalent, not 0 otherwise.

Added in version: v0.2.

Definition at line 3236 of file fms.c.

◆ FmsFieldDescriptorCompare()

int FmsFieldDescriptorCompare ( FmsFieldDescriptor  ,
FmsFieldDescriptor   
)

Return 0 if equivalent, not 0 otherwise.

Added in version: v0.2.

Definition at line 3174 of file fms.c.

◆ FmsFieldDescriptorGetComponent()

int FmsFieldDescriptorGetComponent ( FmsFieldDescriptor  fd,
FmsComponent comp 
)

TODO: dox.

Definition at line 2821 of file fms.c.

◆ FmsFieldDescriptorGetFixedOrder()

int FmsFieldDescriptorGetFixedOrder ( FmsFieldDescriptor  fd,
FmsFieldType field_type,
FmsBasisType basis_type,
FmsInt order 
)

TODO: dox.

Definition at line 2836 of file fms.c.

◆ FmsFieldDescriptorGetName()

int FmsFieldDescriptorGetName ( FmsFieldDescriptor  fd,
const char **  fd_name 
)

TODO: dox.

Definition at line 2814 of file fms.c.

◆ FmsFieldDescriptorGetNumDofs()

int FmsFieldDescriptorGetNumDofs ( FmsFieldDescriptor  fd,
FmsInt num_dofs 
)

TODO: dox.

Definition at line 2847 of file fms.c.

◆ FmsFieldDescriptorGetType()

int FmsFieldDescriptorGetType ( FmsFieldDescriptor  fd,
FmsFieldDescriptorType fd_type 
)

TODO: dox.

Definition at line 2828 of file fms.c.

◆ FmsFieldDescriptorSetComponent()

int FmsFieldDescriptorSetComponent ( FmsFieldDescriptor  fd,
FmsComponent  comp 
)

TODO: dox.

Definition at line 1882 of file fms.c.

◆ FmsFieldDescriptorSetFixedOrder()

int FmsFieldDescriptorSetFixedOrder ( FmsFieldDescriptor  fd,
FmsFieldType  field_type,
FmsBasisType  basis_type,
FmsInt  order 
)

TODO: dox.

Definition at line 1888 of file fms.c.

◆ FmsFieldGet()

int FmsFieldGet ( FmsField  field,
FmsFieldDescriptor fd,
FmsInt num_vec_comp,
FmsLayoutType layout_type,
FmsScalarType data_type,
const void **  data 
)

TODO: dox.

Definition at line 2866 of file fms.c.

◆ FmsFieldGetMetaData()

int FmsFieldGetMetaData ( FmsField  field,
FmsMetaData mdata 
)

TODO: dox.

Definition at line 2878 of file fms.c.

◆ FmsFieldGetName()

int FmsFieldGetName ( FmsField  field,
const char **  field_name 
)

TODO: dox.

Definition at line 2859 of file fms.c.

◆ FmsFieldSet()

int FmsFieldSet ( FmsField  field,
FmsFieldDescriptor  fd,
FmsInt  num_vec_comp,
FmsLayoutType  layout_type,
FmsScalarType  data_type,
const void *  data 
)

TODO: dox The size of the data array is num_vec_comp times the number of DOFs as defined by the field descriptor fd.

Definition at line 1985 of file fms.c.

◆ FmsGetEntityTypeFromName()

int FmsGetEntityTypeFromName ( const char *const  name,
FmsEntityType ent_type 
)

Convert an entity-type string to FmsEntityType value.

Added in version: v0.2.

Definition at line 921 of file fms.c.

◆ FmsGetInterfaceVersion()

int FmsGetInterfaceVersion ( FmsInt version)

Get the interface version.

Version is of the form: ((major*100 + minor)*100 + patch).

Definition at line 871 of file fms.c.

◆ FmsGetIntTypeFromName()

int FmsGetIntTypeFromName ( const char *const  name,
FmsIntType type 
)

Get the enum representation of an int type from the string name.

Added in version: v0.2.

Definition at line 877 of file fms.c.

◆ FmsGetMetaDataTypeFromName()

int FmsGetMetaDataTypeFromName ( const char *const  name,
FmsMetaDataType type 
)

Convert a meta-data-type string to FmsMetaDataType value.

Added in version: v0.2.

Definition at line 947 of file fms.c.

◆ FmsGetScalarTypeFromName()

int FmsGetScalarTypeFromName ( const char *const  name,
FmsScalarType type 
)

Get the enum representation of an int type from the string name.

Added in version: v0.2.

Definition at line 903 of file fms.c.

◆ FmsMeshAddComponent()

int FmsMeshAddComponent ( FmsMesh  mesh,
const char *  comp_name,
FmsComponent comp 
)

Add a new empty component to the mesh with the given name and return the new component in comp.

After this call, the component should be described via the FmsComponentAdd* functions.

Definition at line 1270 of file fms.c.

◆ FmsMeshAddDomains()

int FmsMeshAddDomains ( FmsMesh  mesh,
const char *  domain_name,
FmsInt  num_domains,
FmsDomain **  domains 
)

Allocates an array of domains sharing the same name, initializes them, and returns a pointer to the array.

After this call, the domains should be described via the FmsDomainSet* and FmsDomainAdd* functions.

Definition at line 1211 of file fms.c.

◆ FmsMeshAddTag()

int FmsMeshAddTag ( FmsMesh  mesh,
const char *  tag_name,
FmsTag tag 
)

Add a new tag to the mesh with the given name and return the new tag in tag.

The tag should be set via the FmsTagSet* functions.

Definition at line 1298 of file fms.c.

◆ FmsMeshCompare()

int FmsMeshCompare ( FmsMesh  ,
FmsMesh   
)

Return 0 if equivalent, not 0 otherwise.

Added in version: v0.2.

Definition at line 3097 of file fms.c.

◆ FmsMeshConstruct()

int FmsMeshConstruct ( FmsMesh mesh)

Allocate a mesh structure and initialize it to be empty.

After this call, the content of the mesh should be described by calling the functions FmsMeshAdd* and, if the mesh is partitioned, FmsMeshSetPartitionId.

To complete the construction of the mesh structure, the function FmsMeshFinalize must be called.

Definition at line 970 of file fms.c.

◆ FmsMeshDestroy()

int FmsMeshDestroy ( FmsMesh mesh)

TODO: dox.

Definition at line 1142 of file fms.c.

◆ FmsMeshFinalize()

int FmsMeshFinalize ( FmsMesh  mesh)

TODO: dox.

Definition at line 980 of file fms.c.

◆ FmsMeshGetComponent()

int FmsMeshGetComponent ( FmsMesh  mesh,
FmsInt  comp_id,
FmsComponent comp 
)

TODO: dox.

Definition at line 2228 of file fms.c.

◆ FmsMeshGetDomains()

int FmsMeshGetDomains ( FmsMesh  mesh,
FmsInt  domain_name_id,
const char **  domain_name,
FmsInt num_domains,
FmsDomain **  domains 
)

TODO: dox.

Definition at line 2184 of file fms.c.

◆ FmsMeshGetDomainsByName()

int FmsMeshGetDomainsByName ( FmsMesh  mesh,
const char *  domain_name,
FmsInt num_domains,
FmsDomain **  domains 
)

TODO: dox.

Definition at line 2200 of file fms.c.

◆ FmsMeshGetNumComponents()

int FmsMeshGetNumComponents ( FmsMesh  mesh,
FmsInt num_comp 
)

TODO: dox.

Definition at line 2221 of file fms.c.

◆ FmsMeshGetNumDomainNames()

int FmsMeshGetNumDomainNames ( FmsMesh  mesh,
FmsInt num_domain_names 
)

TODO: dox.

Definition at line 2177 of file fms.c.

◆ FmsMeshGetNumTags()

int FmsMeshGetNumTags ( FmsMesh  mesh,
FmsInt num_tags 
)

TODO: dox.

Definition at line 2236 of file fms.c.

◆ FmsMeshGetPartitionId()

int FmsMeshGetPartitionId ( FmsMesh  mesh,
FmsInt partition_id,
FmsInt num_partitions 
)

TODO: dox.

Definition at line 2169 of file fms.c.

◆ FmsMeshGetTag()

int FmsMeshGetTag ( FmsMesh  mesh,
FmsInt  tag_id,
FmsTag tag 
)

TODO: dox.

Definition at line 2243 of file fms.c.

◆ FmsMeshSetPartitionId()

int FmsMeshSetPartitionId ( FmsMesh  mesh,
FmsInt  partition_id,
FmsInt  num_partitions 
)

TODO: dox.

Definition at line 1201 of file fms.c.

◆ FmsMeshValidate()

int FmsMeshValidate ( FmsMesh  mesh)

TODO: dox.

Definition at line 1094 of file fms.c.

◆ FmsMetaDataClear()

int FmsMetaDataClear ( FmsMetaData  mdata)

Clear the contents of mdata without destroying the object.

Definition at line 2126 of file fms.c.

◆ FmsMetaDataCompare()

int FmsMetaDataCompare ( FmsMetaData  ,
FmsMetaData   
)

Return 0 if equivalent, not 0 otherwise.

Added in version: v0.2.

Definition at line 3276 of file fms.c.

◆ FmsMetaDataDestroy()

int FmsMetaDataDestroy ( FmsMetaData mdata)

Destroy the object that *mdata refers to and set *mdata to NULL.

Definition at line 2152 of file fms.c.

◆ FmsMetaDataGetIntegers()

int FmsMetaDataGetIntegers ( FmsMetaData  mdata,
const char **  mdata_name,
FmsIntType int_type,
FmsInt size,
const void **  data 
)

Get the contents of a meta-data structure that stores an array of integers.

Returns a pointer to the meta-data array in data.

Definition at line 2897 of file fms.c.

◆ FmsMetaDataGetMetaData()

int FmsMetaDataGetMetaData ( FmsMetaData  mdata,
const char **  mdata_name,
FmsInt size,
FmsMetaData **  data 
)

Get the contents of a meta-data structure that stores an array of meta-data structures.

Returns a pointer to the meta-data array in data.

Definition at line 2927 of file fms.c.

◆ FmsMetaDataGetScalars()

int FmsMetaDataGetScalars ( FmsMetaData  mdata,
const char **  mdata_name,
FmsScalarType scal_type,
FmsInt size,
const void **  data 
)

Get the contents of a meta-data structure that stores an array of scalars.

Returns a pointer to the meta-data array in data.

Definition at line 2908 of file fms.c.

◆ FmsMetaDataGetString()

int FmsMetaDataGetString ( FmsMetaData  mdata,
const char **  mdata_name,
const char **  c_string 
)

Get the contents of a meta-data structure that stores a c-string.

Definition at line 2919 of file fms.c.

◆ FmsMetaDataGetType()

int FmsMetaDataGetType ( FmsMetaData  mdata,
FmsMetaDataType type 
)

TODO: dox.

If the mdata structure is empty, returns an error code of 1.

Definition at line 2890 of file fms.c.

◆ FmsMetaDataSetIntegers()

int FmsMetaDataSetIntegers ( FmsMetaData  mdata,
const char *  mdata_name,
FmsIntType  int_type,
FmsInt  size,
void **  data 
)

Set the contents of a meta-data structure to store an array of integers.

Returns the uninitialized meta-data array in data.

Definition at line 2037 of file fms.c.

◆ FmsMetaDataSetMetaData()

int FmsMetaDataSetMetaData ( FmsMetaData  mdata,
const char *  mdata_name,
FmsInt  size,
FmsMetaData **  data 
)

Set the contents of a meta-data structure to store an array of meta-data structures.

Returns the meta-data array in data. Each meta-data entry in the array is initialized to be empty.

Definition at line 2095 of file fms.c.

◆ FmsMetaDataSetScalars()

int FmsMetaDataSetScalars ( FmsMetaData  mdata,
const char *  mdata_name,
FmsScalarType  scal_type,
FmsInt  size,
void **  data 
)

Set the contents of a meta-data structure to store an array of scalars.

Returns the uninitialized meta-data array in data.

Definition at line 2058 of file fms.c.

◆ FmsMetaDataSetString()

int FmsMetaDataSetString ( FmsMetaData  mdata,
const char *  mdata_name,
const char *  c_string 
)

Set the contents of a meta-data structure to store a c-string.

Definition at line 2079 of file fms.c.

◆ FmsTagAddDescriptions()

int FmsTagAddDescriptions ( FmsTag  tag,
FmsIntType  tag_type,
const void *  tags,
const char *const *  tag_descr,
FmsInt  num_tags 
)

TODO: dox.

The arrays tags and tag_descr have the same size, num_tags. The tags and their descriptions are copied internally. The tag_type is the type of the input array tags.

Definition at line 1705 of file fms.c.

◆ FmsTagAllocate()

int FmsTagAllocate ( FmsTag  tag,
FmsIntType  stored_tag_type,
void **  ent_tags,
FmsInt num_ents 
)

TODO: dox.

The pointer num_ents can be NULL.

Definition at line 1682 of file fms.c.

◆ FmsTagCompare()

int FmsTagCompare ( FmsTag  ,
FmsTag   
)

Return 0 if equivalent, not 0 otherwise.

Added in version: v0.2.

Definition at line 3501 of file fms.c.

◆ FmsTagGet()

int FmsTagGet ( FmsTag  tag,
FmsIntType tag_type,
const void **  ent_tags,
FmsInt num_ents 
)

TODO: dox No copy, read only access to the entity-tag array.

Definition at line 2745 of file fms.c.

◆ FmsTagGetComponent()

int FmsTagGetComponent ( FmsTag  tag,
FmsComponent comp 
)

TODO: dox.

Definition at line 2739 of file fms.c.

◆ FmsTagGetDescriptions()

int FmsTagGetDescriptions ( FmsTag  tag,
FmsIntType tag_type,
const void **  tags,
const char *const **  tag_descr,
FmsInt num_tags 
)

TODO: dox.

The arrays tags and tag_descr have the same size, num_tags.

The tag_type is the type of the entries in the tags array.

Definition at line 2754 of file fms.c.

◆ FmsTagGetName()

int FmsTagGetName ( FmsTag  tag,
const char **  tag_name 
)

TODO: dox.

Definition at line 2733 of file fms.c.

◆ FmsTagSet()

int FmsTagSet ( FmsTag  tag,
FmsIntType  stored_tag_type,
FmsIntType  input_tag_type,
const void *  ent_tags,
FmsInt  num_ents 
)

TODO: dox.

The array ent_tags is converted and copied internally. The value of num_ents must be the same as the number of main entities in the associated mesh component.

Definition at line 1658 of file fms.c.

◆ FmsTagSetComponent()

int FmsTagSetComponent ( FmsTag  tag,
FmsComponent  comp 
)

TODO: dox.

Definition at line 1651 of file fms.c.

Variable Documentation

◆ FmsEntityDim

const FmsInt FmsEntityDim[FMS_NUM_ENTITY_TYPES]

Dimensions of the entity types.

Definition at line 180 of file fms.c.

◆ FmsEntityNumSides

const FmsInt FmsEntityNumSides[FMS_NUM_ENTITY_TYPES]

Number of sides of the entity types.

The sides of an entity of dimension d are its boundary entities of dimension d-1.

Definition at line 184 of file fms.c.

◆ FmsEntityNumVerts

const FmsInt FmsEntityNumVerts[FMS_NUM_ENTITY_TYPES]

Number of vertices of the entity types.

Definition at line 188 of file fms.c.

◆ FmsEntityTypeNames

const char* const FmsEntityTypeNames[FMS_NUM_ENTITY_TYPES]

String representations of each entity type.

Added in version: v0.2.

Definition at line 169 of file fms.c.

◆ FmsIntTypeNames

const char* const FmsIntTypeNames[FMS_NUM_INT_TYPES]

Added in version: v0.2.

Definition at line 158 of file fms.c.

◆ FmsIntTypeSize

const size_t FmsIntTypeSize[FMS_NUM_INT_TYPES]

Definition at line 154 of file fms.c.

◆ FmsMetaDataTypeNames

const char* const FmsMetaDataTypeNames[FMS_NUM_METADATA_TYPES]

Added in version: v0.2.

Definition at line 203 of file fms.c.

◆ FmsScalarTypeNames

const char* const FmsScalarTypeNames[FMS_NUM_SCALAR_TYPES]

Added in version: v0.2.

Definition at line 196 of file fms.c.

◆ FmsScalarTypeSize

const size_t FmsScalarTypeSize[FMS_NUM_SCALAR_TYPES]

Definition at line 192 of file fms.c.