36 #define FMS_VERSION 200 483 FmsInt num_partitions);
490 FmsDomain **domains);
502 int FmsMeshAddTag(FmsMesh mesh,
const char *tag_name, FmsTag *tag);
512 FmsIntType id_store_type, FmsInt num_ents);
524 FmsOrientation **side_orients);
534 FmsEntityReordering reordering, FmsIntType ent_id_type,
535 const void *ents, FmsInt num_ents);
539 FmsInt loc_side_id, FmsOrientation side_orient);
564 FmsEntityType type, FmsIntType id_store_type,
565 FmsIntType ent_id_type, FmsIntType orient_type,
566 const FmsOrientation *inv_orient_map,
567 const void *ents,
const void *ent_orients,
573 FmsEntityType type, FmsIntType id_store_type,
574 FmsIntType ent_id_type,
const void *ents,
590 int FmsTagSet(FmsTag tag, FmsIntType stored_tag_type, FmsIntType input_tag_type,
591 const void *ent_tags, FmsInt num_ents);
595 int FmsTagAllocate(FmsTag tag, FmsIntType stored_tag_type,
void **ent_tags,
603 const char *
const *tag_descr, FmsInt num_tags);
608 FmsDataCollection *dc);
618 FmsFieldDescriptor *fd);
633 FmsFieldType field_type,
634 FmsBasisType basis_type, FmsInt order);
639 int FmsFieldSet(FmsField field, FmsFieldDescriptor fd, FmsInt num_vec_comp,
640 FmsLayoutType layout_type, FmsScalarType data_type,
650 FmsIntType int_type, FmsInt size,
void **data);
655 FmsScalarType scal_type, FmsInt size,
void **data);
659 const char *c_string);
666 FmsInt size, FmsMetaData **data);
681 FmsInt *num_partitions);
688 const char **domain_name, FmsInt *num_domains,
689 FmsDomain **domains);
693 FmsInt *num_domains, FmsDomain **domains);
724 FmsIntType *ent_id_type,
const void **ents,
730 FmsEntityReordering reordering, FmsIntType ent_id_type,
731 FmsInt first_ent,
void *ents, FmsInt num_ents);
736 FmsEntityReordering vert_reordering,
737 FmsIntType ent_id_type, FmsInt first_ent,
738 void *ents_verts, FmsInt num_ents);
743 const FmsOrientation **side_orients,
765 FmsDomain *domain, FmsIntType *ent_id_type,
766 const void **ents,
const FmsOrientation **ent_orients,
772 FmsEntityType type, FmsIntType *ent_id_type,
773 const void **ents, FmsInt *num_ents);
780 FmsInt *num_rel_comps);
794 int FmsTagGet(FmsTag tag, FmsIntType *tag_type,
const void **ent_tags,
802 const char *
const **tag_descr, FmsInt *num_tags);
819 FmsFieldDescriptor **fds, FmsInt *num_fds);
836 FmsFieldDescriptorType *fd_type);
840 FmsFieldType *field_type,
841 FmsBasisType *basis_type, FmsInt *order);
850 int FmsFieldGet(FmsField field, FmsFieldDescriptor *fd, FmsInt *num_vec_comp,
851 FmsLayoutType *layout_type, FmsScalarType *data_type,
864 FmsIntType *int_type, FmsInt *size,
870 FmsScalarType *scal_type, FmsInt *size,
875 const char **c_string);
881 FmsInt *size, FmsMetaData **data);
int FmsComponentCompare(FmsComponent, FmsComponent)
Return 0 if equivalent, not 0 otherwise.
int FmsDataCollectionGetFieldDescriptors(FmsDataCollection dc, FmsFieldDescriptor **fds, FmsInt *num_fds)
TODO: dox.
int FmsDomainSetNumVertices(FmsDomain domain, FmsInt num_verts)
Set the number of vertices in a domain.
int FmsDomainCompare(FmsDomain, FmsDomain)
Return 0 if equivalent, not 0 otherwise.
int FmsTagGetDescriptions(FmsTag tag, FmsIntType *tag_type, const void **tags, const char *const **tag_descr, FmsInt *num_tags)
TODO: dox.
int FmsTagCompare(FmsTag, FmsTag)
Return 0 if equivalent, not 0 otherwise.
int FmsComponentAddPart(FmsComponent comp, FmsDomain domain, FmsInt *part_id)
TODO: dox.
int FmsDataCollectionAddField(FmsDataCollection dc, const char *field_name, FmsField *field)
TODO: dox.
int FmsFieldDescriptorGetFixedOrder(FmsFieldDescriptor fd, FmsFieldType *field_type, FmsBasisType *basis_type, FmsInt *order)
TODO: dox.
const char *const FmsIntTypeNames[FMS_NUM_INT_TYPES]
Added in version: v0.2.
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.
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.
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.
int FmsMeshGetDomains(FmsMesh mesh, FmsInt domain_name_id, const char **domain_name, FmsInt *num_domains, FmsDomain **domains)
TODO: dox.
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.
int FmsTagAddDescriptions(FmsTag tag, FmsIntType tag_type, const void *tags, const char *const *tag_descr, FmsInt num_tags)
TODO: dox.
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.
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...
const char *const FmsScalarTypeNames[FMS_NUM_SCALAR_TYPES]
Added in version: v0.2.
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.
const size_t FmsScalarTypeSize[FMS_NUM_SCALAR_TYPES]
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.
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.
int FmsFieldAttachMetaData(FmsField field, FmsMetaData *mdata)
Make sure the meta-data structure associated with a field is allocated and return it in mdata...
const int * FmsEntityReordering[FMS_NUM_ENTITY_TYPES]
A type describing user-defined local orderings of the side entities defining an enitity.
const size_t FmsIntTypeSize[FMS_NUM_INT_TYPES]
int FmsFieldGetName(FmsField field, const char **field_name)
TODO: dox.
FmsMetaDataType
TODO: dox.
int FmsFieldDescriptorSetFixedOrder(FmsFieldDescriptor fd, FmsFieldType field_type, FmsBasisType basis_type, FmsInt order)
TODO: dox.
int FmsDataCollectionAttachMetaData(FmsDataCollection dc, FmsMetaData *mdata)
Make sure the meta-data structure associated with a data collection is allocated and return it in mda...
struct FmsFieldDescriptor_private * FmsFieldDescriptor
TODO: dox.
int FmsMetaDataClear(FmsMetaData mdata)
Clear the contents of mdata without destroying the object.
int FmsGetIntTypeFromName(const char *const name, FmsIntType *type)
Get the enum representation of an int type from the string name.
int FmsFieldDescriptorGetType(FmsFieldDescriptor fd, FmsFieldDescriptorType *fd_type)
TODO: dox.
int FmsDomainAddOrientation(FmsDomain domain, FmsEntityType type, FmsInt ent_id, FmsInt loc_side_id, FmsOrientation side_orient)
TODO: dox.
int FmsTagAllocate(FmsTag tag, FmsIntType stored_tag_type, void **ent_tags, FmsInt *num_ents)
TODO: dox.
The type of FmsInt identified as FmsIntType.
struct FmsComponent_private * FmsComponent
TODO: dox.
int FmsMeshCompare(FmsMesh, FmsMesh)
Return 0 if equivalent, not 0 otherwise.
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 a...
int FmsComponentGetName(FmsComponent comp, const char **comp_name)
Return the name of a mesh component.
int FmsDomainGetName(FmsDomain domain, const char **domain_name, FmsInt *domain_id)
Return the name and id of a mesh domain.
int FmsMeshFinalize(FmsMesh mesh)
TODO: dox.
int FmsTagSetComponent(FmsTag tag, FmsComponent comp)
TODO: dox.
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.
int FmsMeshGetPartitionId(FmsMesh mesh, FmsInt *partition_id, FmsInt *num_partitions)
TODO: dox.
FmsFieldDescriptorType
Field descriptor types supported by FMS, see FmsFieldDescriptor.
int FmsComponentGetNumEntities(FmsComponent comp, FmsInt *num_ents)
Return the total number of main entities across all parts in the component.
int FmsFieldGetMetaData(FmsField field, FmsMetaData *mdata)
TODO: dox.
int FmsComponentSetCoordinates(FmsComponent comp, FmsField coords)
Set the coordinates field of a component.
const FmsInt FmsEntityDim[FMS_NUM_ENTITY_TYPES]
Dimensions of the entity types.
struct FmsDomain_private * FmsDomain
TODO: dox.
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.
See FmsFieldDescriptorSetFixedOrder()
int FmsComponentAddRelation(FmsComponent comp, FmsInt other_comp_id)
Describe a relation from one component to another.
int FmsDomainSetNumEntities(FmsDomain domain, FmsEntityType type, FmsIntType id_store_type, FmsInt num_ents)
Allocates memory for the specified entities.
int FmsDomainGetEntitiesArray(FmsDomain domain, FmsEntityType type, void **ents)
TODO: dox.
uint64_t FmsInt
Type used by fms for representing and storing sizes and indices.
int FmsComponentGetNumParts(FmsComponent comp, FmsInt *num_parts)
TODO: dox.
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.
int FmsMeshValidate(FmsMesh mesh)
TODO: dox.
const char *const FmsMetaDataTypeNames[FMS_NUM_METADATA_TYPES]
Added in version: v0.2.
int FmsComponentGetDimension(FmsComponent comp, FmsInt *dim)
Return the dimension of a mesh component.
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.
int FmsGetEntityTypeFromName(const char *const name, FmsEntityType *ent_type)
Convert an entity-type string to FmsEntityType value.
int FmsDataCollectionGetMesh(FmsDataCollection dc, FmsMesh *mesh)
TODO: dox.
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.
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.
The type of FmsOrientation as FmsIntType.
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...
int FmsMetaDataCompare(FmsMetaData, FmsMetaData)
Return 0 if equivalent, not 0 otherwise.
int FmsComponentGetCoordinates(FmsComponent comp, FmsField *coords)
Return the coordinates field of a component.
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.
int FmsDomainAddEntities(FmsDomain domain, FmsEntityType type, FmsEntityReordering reordering, FmsIntType ent_id_type, const void *ents, FmsInt num_ents)
TODO: dox.
int FmsGetScalarTypeFromName(const char *const name, FmsScalarType *type)
Get the enum representation of an int type from the string name.
int FmsMeshGetComponent(FmsMesh mesh, FmsInt comp_id, FmsComponent *comp)
TODO: dox.
int FmsComponentAddDomain(FmsComponent comp, FmsDomain domain)
TODO: dox.
int FmsMeshGetNumDomainNames(FmsMesh mesh, FmsInt *num_domain_names)
TODO: dox.
struct FmsTag_private * FmsTag
TODO: dox.
int FmsDataCollectionAddFieldDescriptor(FmsDataCollection dc, const char *fd_name, FmsFieldDescriptor *fd)
TODO: dox.
struct FmsField_private * FmsField
Discrete field data type.
int FmsDataCollectionGetFields(FmsDataCollection dc, FmsField **fields, FmsInt *num_fields)
TODO: dox.
int FmsMeshConstruct(FmsMesh *mesh)
Allocate a mesh structure and initialize it to be empty.
int FmsFieldGet(FmsField field, FmsFieldDescriptor *fd, FmsInt *num_vec_comp, FmsLayoutType *layout_type, FmsScalarType *data_type, const void **data)
TODO: dox.
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.
int FmsFieldDescriptorGetName(FmsFieldDescriptor fd, const char **fd_name)
TODO: dox.
FmsScalarType
Scalar types supported by FMS: floating-point types, real and complex.
int FmsDataCollectionCompare(FmsDataCollection, FmsDataCollection)
Comparison interface.
int FmsDomainGetNumEntities(FmsDomain domain, FmsEntityType type, FmsInt *num_ents)
Get the number of entities of a given type in a domain.
struct FmsDataCollection_private * FmsDataCollection
Data collection type: contains a mesh, discrete fileds, meta-data, etc.
int FmsTagGetName(FmsTag tag, const char **tag_name)
TODO: dox.
int FmsDataCollectionGetMetaData(FmsDataCollection dc, FmsMetaData *mdata)
TODO: dox.
int FmsDataCollectionCreate(FmsMesh mesh, const char *dc_name, FmsDataCollection *dc)
TODO: dox The new object, dc, assumes ownership of the mesh.
struct FmsMesh_private * FmsMesh
TODO: dox.
int FmsMeshGetTag(FmsMesh mesh, FmsInt tag_id, FmsTag *tag)
TODO: dox.
int FmsMeshSetPartitionId(FmsMesh mesh, FmsInt partition_id, FmsInt num_partitions)
TODO: dox.
const char *const FmsEntityTypeNames[FMS_NUM_ENTITY_TYPES]
String representations of each entity type.
int FmsGetInterfaceVersion(FmsInt *version)
Get the interface version.
int FmsTagSet(FmsTag tag, FmsIntType stored_tag_type, FmsIntType input_tag_type, const void *ent_tags, FmsInt num_ents)
TODO: dox.
int FmsDataCollectionGetName(FmsDataCollection dc, const char **name)
Get the name of the data collection.
int FmsDomainGetOrientationsArray(FmsDomain domain, FmsEntityType type, FmsOrientation **side_orients)
TODO: dox.
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.
int FmsMeshGetNumComponents(FmsMesh mesh, FmsInt *num_comp)
TODO: dox.
int FmsGetMetaDataTypeFromName(const char *const name, FmsMetaDataType *type)
Convert a meta-data-type string to FmsMetaDataType value.
struct FmsMetaData_private * FmsMetaData
TODO: dox.
int FmsDomainGetNumVertices(FmsDomain domain, FmsInt *num_verts)
Get the number of vertices in a domain.
#define FMS_VERSION
FMS version constant of the form: ((major*100 + minor)*100 + patch).
int FmsDomainGetDimension(FmsDomain domain, FmsInt *dim)
Return the highest dimension of an entry in a mesh domain.
int FmsMeshGetDomainsByName(FmsMesh mesh, const char *domain_name, FmsInt *num_domains, FmsDomain **domains)
TODO: dox.
int FmsComponentGetRelations(FmsComponent comp, const FmsInt **rel_comps, FmsInt *num_rel_comps)
TODO: dox.
int FmsFieldDescriptorGetNumDofs(FmsFieldDescriptor fd, FmsInt *num_dofs)
TODO: dox.
int FmsMetaDataGetType(FmsMetaData mdata, FmsMetaDataType *type)
TODO: dox.
int FmsFieldDescriptorCompare(FmsFieldDescriptor, FmsFieldDescriptor)
Return 0 if equivalent, not 0 otherwise.
int FmsTagGetComponent(FmsTag tag, FmsComponent *comp)
TODO: dox.
int FmsMeshGetNumTags(FmsMesh mesh, FmsInt *num_tags)
TODO: dox.
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.
uint8_t FmsOrientation
A type used by fms to represent and store entity orientations.
int FmsFieldDescriptorGetComponent(FmsFieldDescriptor fd, FmsComponent *comp)
TODO: dox.
const FmsInt FmsEntityNumVerts[FMS_NUM_ENTITY_TYPES]
Number of vertices of the entity types.
int FmsFieldDescriptorSetComponent(FmsFieldDescriptor fd, FmsComponent comp)
TODO: dox.
int FmsMetaDataDestroy(FmsMetaData *mdata)
Destroy the object that *mdata refers to and set *mdata to NULL.
const FmsInt FmsEntityNumSides[FMS_NUM_ENTITY_TYPES]
Number of sides of the entity types.
int FmsFieldCompare(FmsField, FmsField)
Return 0 if equivalent, not 0 otherwise.
int FmsDataCollectionDestroy(FmsDataCollection *dc)
Destroy a data collection object.
int FmsMeshDestroy(FmsMesh *mesh)
TODO: dox.