Declare a set¶
saf_declare_set is a function defined in set.c.
Synopsis:
-
SAF_Set *
saf_declare_set(SAF_ParMode pmode, SAF_Db *db, const char *name, int max_topo_dim, SAF_SilRole role, SAF_ExtendMode extmode, SAF_Set *set)¶
Formal Arguments:
pmode: The parallel mode.db: The database handle in which to create the set.name: The name of the set being declared.max_topo_dim: The topological dimension of the set. If the set will contain sets of different topological dimensions then this must be the maximum topological dimension of any set in the subset inclusion lattice rooted belowset.role: The role of the set. Possible values areSAF__SPACEfor a spatial set,SAF__TIMEfor a time-base set,SAF__PARAMfor a parameter space set, orSAF__USERDfor a user-defined role.extmode: Indicates whether or not the base-space represented by the set is extendible. Possible values areSAF__EXTENDIBLE_TRUEorSAF__EXTENDIBLE_FALSEset: [OUT] Optional memory for link to the newly declared set.
Description: Every set has a maximum topological dimension indicating how the infinity of points that are the set are organized. Are they organized along some curve (1D), surface (2D), volume (3D), etc.? More formally, the maximum topological dimension of a set indicates the maximum rank of local coordinate systems over all neighborhoods of the infinite point set.
Note that a maximum topological dimension of 0 does not mean that the set contains a single point or no points. It means that the set contains only a finite number of points. That is the set is not an infinite point set but a finite one.
Preconditions:
pmodemust be valid. (low-cost)DATABASEmust be a valid handle. (low-cost)namecannot beNULL. (low-cost)namemust not begin with a leading ‘@’. (low-cost)max_topo_dimmust be positive. (low-cost)rolemust beSAF__TIME,SAF__SPACE, orSAF__PARAM. (low-cost)- If
roleisSAF__TIMEthenmax_topo_dimmust be 1. (low-cost) extmodemust be eitherSAF__EXTENDIBLE_TRUEorSAF__EXTENDIBLE_FALSE. (low-cost)
Return Value: Returns a pointer to a set link on success; null on failure. The set argument is the successful return value,
or if set is null, a new set link is allocated for the return.
Issues: Eventually roles specific to the creation of algebraic types and cell types will be added.
I think we can eliminate the role argument here and instead deduce it from the SAF__Quantity associated
with the default coordinates for the set. For example, if the default coordinates represent a length quantity,
then the role must be SAF__SPACE. If they represent a time quantity, then the role must be SAF__TIME.
See Also:
- Sets: Introduction for current chapter