Each library device module contains a function to return the Library object being used internally to manage generic library information, (eg. vdm_SDRCLibGetLibrary). In a DataFun object, this function is accessed using vdm_DataFunGetLibrary. Once the Library object associated with a specific library device is obtained, general information such as the number of library datasets, dataset name and parameters, the number of dataset attributes, and attribute parameters and values may be queried.
Note that the actual reading of the contents of a dataset is performed by a library device function, (eg. vdm_SDRCLibReadDataset). In a DataFun object this function is accessed using vdm_DataFunReadDataset.
*vdm_LibraryBegin - create an instance of a Library object vdm_LibraryEnd - destroy an instance of a Library object vdm_LibraryError - return Library object error flag
vdm_LibraryAddDataset - add dataset object to library vdm_LibraryDef - define library path and type Inq - inquire library path and type vdm_LibraryGetDataset - get dataset object vdm_LibraryGetNumDatasets - get number of library datasets vdm_LibraryMaxIds - query for maximum dataset ids vdm_LibrarySearchDataset - search for datasets by name vdm_LibraryTOC - print a library table of contents
*vdm_LibraryBegin - create an instance of a Library object
vdm_Library *vdm_LibraryBegin ()
None
Destroy an instance of a Library object using
void vdm_LibraryEnd (vdm_Library *library)
Return the current value of a Library object error flag using
Vint vdm_LibraryError (vdm_Library *library)
vdm_LibraryAddDataset - add dataset object to library
void vdm_LibraryAddDataset (vdm_Library *library, vdm_Dataset *dataset)
library Pointer to Library object. dataset Pointer to Dataset object to add.
None
vdm_LibraryDef - define library path and type
void vdm_LibraryDef (vdm_Library *library, const Vchar *path, Vint type)
library Pointer to Library object. path Pathname to host file associated with the library type Type of library file =SYS_ABAQUS_FIL ABAQUS .fil data file =SYS_ABAQUS_INPUT ABAQUS .inp input file =SYS_ABAQUS_ODB ABAQUS .odb output data base =SYS_ADAMS MSC/Adams =SYS_AFLR AFLR grid file =SYS_ANSYS_INPUT ANSYS input (CDWRITE) file =SYS_ANSYS_RESULT ANSYS results file =SYS_AUTODYN_RES AUTODYN results file =SYS_CGNS CGNS data base =SYS_CFX_RESULT CFX results file =SYS_COMSOL_SECTION COMSOL Sectionwise file =SYS_COMSOL_MPH COMSOL mph ascii file =SYS_COMSOL_MPHBIN COMSOL mph binary file =SYS_ENSIGHT CEI/Ensight file format =SYS_FEMAP_NEUTRAL FEMAP neutral file =SYS_FDI_NEUTRAL FIDAP neutral file =SYS_FLUENT_MESH FLUENT mesh and data file =SYS_GMV GMV file =SYS_HYPERMESH_ASCII Altair HyperMesh ASCII file =SYS_H3D Altair H3D file =SYS_LSTC_INPUT LSTC/DYNA3D input file =SYS_LSTC_HISTORY LSTC/DYNA3D time history data base =SYS_LSTC_STATE LSTC/DYNA3D state data base =SYS_LSTC_STATEFEMZIP LSTC/DYNA3D FEMZIP state data base =SYS_MARC_POST MSC/Marc post data file =SYS_MECHANICA_FNF PTC/Mechanica FEM Neutral File =SYS_MECHANICA_STUDY PTC/Mechanica design study =SYS_MEMORY VKI memory object =SYS_NASTRAN_BULKDATA MSC/NASTRAN bulk data file =SYS_NASTRAN_OUTPUT2 MSC/NASTRAN OUTPUT2 data file =SYS_NASTRAN_XDB MSC/NASTRAN XDB data file =SYS_NASTRAN_H5 MSC/NASTRAN .h5 data file =SYS_NATIVE VKI native data base =SYS_NATIVE_HDF5 VKI native HDF5 data base =SYS_OBJ OBJ file =SYS_OPENFOAM OpenFOAM file =SYS_PAM_DAISY ESI/PAM-CRASH DAISY file =SYS_PAM_ERF ESI/PAM-CRASH ERF file =SYS_PATRAN_NEUTRAL MSC/Patran neutral file =SYS_PATRAN_RESULT MSC/Patran result file =SYS_PERMAS_POST INTES/PERMAS result file =SYS_PLOT3D_GRID NASA/PLOT3D grid file =SYS_PLOT3D_SOLUTION NASA/PLOT3D solution or function file =SYS_POLYFLOW POLYFLOW mesh file =SYS_SAMCEF SAMCEF des file =SYS_SDRC_UNIVERSAL SDRC universal file =SYS_STARCCM STAR-CCM results file =SYS_STL STL ASCII text format =SYS_STLBIN STL binary format =SYS_TECPLOT Tecplot file format =SYS_VTK_LEGACY Vtk legacy file format
None
Inquire of defined path and type as output arguments using
void vdm_LibraryInq (vdm_Library *library, Vchar *path, Vint *type)
vdm_LibraryGetDataset - get library dataset object
void vdm_LibraryGetDataset (vdm_Library *library, Vint idst, vdm_Dataset **dataset)
library Pointer to Library object. idst Index of dataset object to get
dataset Pointer to Dataset object.
vdm_LibraryGetNumDatasets - get number of datasets on library
void vdm_LibraryGetNumDatasets (vdm_Library *library, Vint *numdatasets)
library Pointer to Library object.
numdatasets Number of datasets on library.
vdm_LibraryMaxIds - query for maximum dataset ids
void vdm_LibraryMaxIds (vdm_Library *library, Vint *id1, Vint *id2, Vint *id3)
library Pointer to Library object.
id1 Maximum dataset first numeric identifier id2 Maximum dataset second numeric identifier id3 Maximum dataset third numeric identifier
vdm_LibrarySearchDataset - search for datasets by name
void vdm_LibrarySearchDataset (vdm_Library *library, const Vchar *name, Vint max, Vint idsts[], Vint *num)
library Pointer to Library object. name Dataset name to search for. This name may contain wild card characters. max The maximum number of matching dataset indices to return. This number is the allocated size of the idsts array.
idsts Array of matching dataset indices. num The number of matching datasets returned.
vdm_LibraryTOC - print a library table of contents
void vdm_LibraryTOC (vdm_Library *library, const Vchar *name) Vint flag)
library Pointer to Library object. name Dataset names to list This name may contain wild card characters. flag Flag to list dataset attributes =SYS_OFF Do not print dataset attributes =SYS_ON Print dataset attributes
None
*vdm_DatasetBegin - create an instance of a Dataset object vdm_DatasetEnd - destroy an instance of a Dataset object vdm_DatasetError - return Dataset object error flag
vdm_DatasetAddAttribute - add attribute object to dataset vdm_DatasetDef - define dataset parameters Inq - inquire dataset parameters vdm_DatasetComplx - get complex type vdm_DatasetContents - get Contents attribute vdm_DatasetCplx - parse result complex type vdm_DatasetDataType - get DataType attribute vdm_DatasetDecode - decode dataset name into fields vdm_DatasetDimensions - return dataset type physical dimensions vdm_DatasetEntType - parse result entity types vdm_DatasetGetNCol - get number of dataset columns vdm_DatasetGetNRow - get number of dataset rows vdm_DatasetHist - parse result history flag vdm_DatasetIds - parse result identifiers vdm_DatasetQual - parse result qualifiers vdm_DatasetQualStrings - return qualifier strings vdm_DatasetQualVal - parse valued qualifiers vdm_DatasetResType - parse result type vdm_DatasetResult - parse result dataset component name vdm_DatasetSect - parse result section vdm_DatasetGetAttribute - get attribute object vdm_DatasetGetNumAttributes - get number of dataset attributes vdm_DatasetSearchAttribute - search for attributes by name
A special set of functions are provided to manage result datasets. These datasets have the following form:
The dataset_name is an alphanumeric string consisting of two or more fields delimited by periods. A result dataset is characterized by a first field containing a supported result type and the last field indicating a node (.N), element (.E) or element node (.EL) result quantity. Use the function vdm_DatasetResult to determine if a dataset contains a supported result type. The function vdm_DatasetDecode will decode the numeric identifiers, id1, id2 and id3. The convenience routines vdm_DatasetContents and vdm_DatasetDataType will return the values of the Contents and DataType attributes. These attributes should be defined for any result dataset.dataset_name:id1:id2:id3
*vdm_DatasetBegin - create an instance of a Dataset object
vdm_Dataset *vdm_DatasetBegin ()
None
Destroy an instance of a Dataset object using
void vdm_DatasetEnd (vdm_Dataset *dataset)
Return the current value of a Dataset object error flag using
Vint vdm_DatasetError (vdm_Dataset *dataset)
vdm_DatasetAddAttribute - add attribute object to dataset
void vdm_DatasetAddAttribute (vdm_Dataset *dataset, vdm_Attribute *attribute)
dataset Pointer to Dataset object. attribute Pointer to Attribute object to add
None
vdm_DatasetComplx - get complex type
void vdm_DatasetComplx (vdm_Dataset *dataset, Vint *cplx)
dataset Pointer to Dataset object.
cplx Complex type =SYS_COMPLEX_NONE Real, not part of complex number =SYS_COMPLEX_REAL Real part of complex number =SYS_COMPLEX_MAGNITUDE Magnitude part of complex number =SYS_COMPLEX_IMAGINARY Imaginary part of complex number =SYS_COMPLEX_PHASE Phase part of complex number =SYS_COMPLEX_REALIMAGINARY Real and imaginary =SYS_COMPLEX_MAGNITUDEPHASE Phase and magnitude
vdm_DatasetContents - get Contents attribute
void vdm_DatasetContents (vdm_Dataset *dataset, Vchar *ancont)
dataset Pointer to Dataset object.
ancont Contents attribute value
vdm_DatasetCplx - parse result complex type
void vdm_DatasetCplx (vdm_Dataset *dataset, Vint *cplx)
dataset Pointer to Dataset object.
cplx Complex flag =0 No I field encountered =1 An I field encountered
vdm_DatasetDataType - get DataType attribute
void vdm_DatasetDataType (vdm_Dataset *dataset, Vchar *andata, Vint *datatype)
dataset Pointer to Dataset object.
andata DataType attribute value datatype Data type =SYS_SCALAR Scalar data =SYS_VECTOR Vector data =SYS_TENSOR Symmetric tensor data =SYS_GENERALTENSOR General Tensor data =SYS_MATRIX_DIAG Diagonal Matrix data =SYS_MATRIX_SYMM Symmetric Matrix data =SYS_MATRIX_USYMM Unsymmetric Matrix data =SYS_SCALARS Scalars data =SYS_SIXDOF Translation and rotation vector data =SYS_DATATYPE_NONE No DataType present
vdm_DatasetDecode - decode a dataset name
void vdm_DatasetDecode (vdm_Dataset *dataset, Vchar *name, Vint *id1, Vint *id2, Vint *id3)
dataset Pointer to Dataset object.
name Dataset alphanumeric component name id1 First numeric identifier id2 Second numeric identifier id3 Third numeric identifier
vdm_DatasetDimensions - return dataset type physical dimensions
void vdm_DatasetDimensions (vdm_Dataset *dataset, Vchar *dimensions)
dataset Pointer to Dataset object.
dimensions Dataset result type physical dimension string
vdm_DatasetEntType - parse result entity types
void vdm_DatasetEntType (vdm_Dataset *dataset, Vint *enttype, Vint *subtype)
dataset Pointer to Dataset object.
enttype Parent entity type, see vdm_DatasetResult subtype Child entity type
vdm_DatasetGetNCol - get number of dataset columns
void vdm_DatasetGetNCol (vdm_Dataset *dataset, Vint *ncol)
dataset Pointer to Dataset object.
ncol Number of dataset columns.
vdm_DatasetGetNRow - get number of dataset rows
void vdm_DatasetGetNRow (vdm_Dataset *dataset, Vint *nrow)
dataset Pointer to Dataset object.
nrow Number of dataset rows.
vdm_DatasetHist - parse result history flag
void vdm_DatasetHist (vdm_Dataset *dataset, Vint *hist)
dataset Pointer to Dataset object.
hist History flag =0 No HIST field encountered =1 A HIST field encountered
vdm_DatasetIds - parse result identifiers
void vdm_DatasetIds (vdm_Dataset *dataset, Vint *id1, Vint *id2, Vint *id3)
dataset Pointer to Dataset object.
id1 First numeric identifier id2 Second numeric identifier id3 Third numeric identifier
vdm_DatasetQual - parse result qualifiers
void vdm_DatasetQual (vdm_Dataset *dataset, Vint *nqua, Vint iqua[], Vchar *cqua)
dataset Pointer to Dataset object.
nqua Number of qualifier types, 0 <= nqua <= SYS_NQUA_MAX iqua Array of nqua qualifier types cqua Optional generic qualifier string
vdm_DatasetQualStrings - return qualifier strings
void vdm_DatasetQualStrings (vdm_Dataset *dataset, Vint ith, Vchar *name, Vchar *contents)
dataset Pointer to Dataset object. iqlr Ith position of qualifier in iqua (vdm_DatasetQual).
name Qualifier short name contents Qualifier long descriptive contents
vdm_DatasetQualVal - parse valued qualifiers
void vdm_DatasetQualVal (vdm_Dataset *dataset, Vint *nqua, Vint iqua[], Vint dtyp[], Vint ival[], Vfloat fval[])
dataset Pointer to Dataset object.
nqua Number of valued qualifier types iqua Array of nqua valued qualifier types dtyp Data type of qualifier value =SYS_INTEGER Integer value =SYS_FLOAT Float value ival Array of nqua integer values fval Array of nqua float values
vdm_DatasetResType - parse result type
void vdm_DatasetResType (vdm_Dataset *dataset, Vint *type)
dataset Pointer to Dataset object.
type Result type =SYS_RES_NONE Unrecognized result >=0 Result type
vdm_DatasetResult - parse result dataset component name
void vdm_DatasetResult (vdm_Dataset *dataset, Vchar *root, Vint *type, Vint *hist, Vint *nqua, Vint iqua[], Vchar *cqua, Vint *cplx, Vchar *caux, Vint *sect, Vint *enttype, Vint *subtype, Vint *id1, Vint *id2, Vint *id3)
dataset Pointer to Dataset object.
root Dataset alphanumeric result name type Result type =SYS_RES_NONE Unrecognized result >=0 Result type hist History flag =0 No HIST field encountered =1 A HIST field encountered nqua Number of qualifier types, 0 <= nqua <= SYS_NQUA_MAX iqua Array of nqua qualifier types cqua Optional generic qualifier string cplx Complex flag =0 No I field encountered =1 An I field encountered caux Auxiliary alphanumeric string sect Result section number =SYS_ELEMSEC_BOT Shell bottom =SYS_ELEMSEC_TOP Shell top =SYS_ELEMSEC_MID Shell midsurface =SYS_ELEMSEC_ALL All sections =0 No section >0 Section number enttype Parent entity type =SYS_NODE Node =SYS_ELEM Element =SYS_FACE Element Face =SYS_EDGE Element Edge =SYS_DOF Degree of Freedom =SYS_PARTICLE Particle =SYS_MODE Mode =SYS_PANEL Panel subtype Child entity type =SYS_NODE Node =SYS_INTPNT Integration Point =SYS_NONE None id1 First numeric identifier id2 Second numeric identifier id3 Third numeric identifier
If a SEC field is encountered indicating a result section point then the section location or number is returned in sect.
A set of qualifiers are delimited by left and right brackets, [ and ]. Each qualifier in turn is delimited by commas. If a qualifier string matches one of the specific supported types it is returned in iqua. All unsupported qualifier strings are returned in cqua separated by commas.
If the final field is N then a node based result is assumed. If the final field is E, EL or EIP then an element, element node or element integration point result is assumed respectively. If the final field is EF, EFN, EE or EEN then an element face, element face node, element edge or element edge node result is assumed respectively. If the final field is D then a degree of freedom based result is assumed. If the final field is PCL then a particle based result is assumed. If the final field is MOD then a mode based result is assumed. If the final field is PNL then a panel based result is assumed.
The component string itself is delimited from the dataset numeric identifiers, if they exist, by a colon.
vdm_DatasetSect - parse result section
void vdm_DatasetSect (vdm_Dataset *dataset, Vint *sect)
dataset Pointer to Dataset object.
sect Result section number, see vdm_DatasetResult
vdm_DatasetDef - define dataset parameters
void vdm_DatasetDef (vdm_Dataset *dataset, const Vchar *name, Vlong lrec, Vint nrow, Vint ncol, Vint type)
dataset Pointer to Dataset object. name Name given to dataset lrec Length of dataset contents in type units nrow Number of dataset rows ncol Number of dataset columns type Data type of dataset contents =SYS_INTEGER Integer, type Vint =SYS_FLOAT Single precision, type Vfloat =SYS_HOLLERITH Hollerith, type Vuint =SYS_DOUBLE Double precision, type Vdouble =SYS_COMPLEX Complex, type Vfloat[2] =SYS_DOUBLECOMPLEX Double Complex, type Vdouble[2]
None
Inquire of defined name, lrec, nrow, ncol and type as output arguments using
void vdm_DatasetInq (vdm_Dataset *dataset, Vchar *name, Vlong *lrec, Vint *nrow, Vint *ncol, Vint *type)
vdm_DatasetGetAttribute - get dataset attribute object
void vdm_DatasetGetAttribute (vdm_Dataset *dataset, Vint iatt, vdm_Attribute **attribute)
dataset Pointer to Dataset object. iatt Index of attribute object to get
attribute Pointer to Attribute object.
vdm_DatasetGetNumAttributes - get number of dataset attributes
void vdm_DatasetGetNumAttributes (vdm_Dataset *dataset, Vint *numattributes)
dataset Pointer to Dataset object.
numattributes Number of dataset attributes.
vdm_DatasetSearchAttribute - search for dataset attributes by name
void vdm_DatasetSearchAttribute (vdm_Dataset *dataset, const Vchar *name, Vint max, Vint iatts[], Vint *num)
dataset Pointer to Dataset object. name Attribute name to search for. This name may contain wild card characters. max The maximum number of matching dataset attribute indices to return. This number is the allocated size of the iatts array.
iatts Array of matching attribute indices. num The number of matching dataset attributes.
*vdm_AttributeBegin - create an instance of a Attribute object vdm_AttributeEnd - destroy an instance of a Attribute object vdm_AttributeError - return Attribute object error flag vdm_AttributeCopy - copy an Attribute object
vdm_AttributeDef - define attribute parameters Inq - inquire attribute parameters vdm_AttributeSetValuec - set string attribute values vdm_AttributeSetValuedv - set double attribute values vdm_AttributeSetValuefv - set float attribute values vdm_AttributeSetValueiv - set integer attribute values vdm_AttributeValueDouble - get double attribute values vdm_AttributeValueFloat - get float attribute values vdm_AttributeValueInteger - get integer attribute values vdm_AttributeValueString - get string attribute values
*vdm_AttributeBegin - create an instance of an Attribute object
vdm_Attribute *vdm_AttributeBegin ()
None
Destroy an instance of an Attribute object using
void vdm_AttributeEnd (vdm_Attribute *attribute)
Return the current value of an Attribute object error flag using
Vint vdm_AttributeError (vdm_Attribute *attribute)Make a copy of an Attribute object. The private data from the fromattribute object is copied to the attribute object. Any previous private data in attribute is lost.
void vdm_AttributeCopy (vdm_Attribute *attribute, vdm_Attribute *fromattribute)
vdm_AttributeDef - define attribute parameters
void vdm_AttributeDef (vdm_Attribute *attribute, const Vchar *name, Vint length, Vint type)
attribute Pointer to Attribute object. name Name given to attribute length Length of attribute value in type units type Data type of attribute value =SYS_INTEGER Integer, type Vint =SYS_FLOAT Single precision, type Vfloat =SYS_CHAR Character, type Vchar =SYS_WCHAR Wide character, type Vwchar =SYS_DOUBLE Double precision, type Vdouble
None
Inquire of defined name, length, and type as output arguments using
void vdm_AttributeInq (vdm_Attribute *attribute, Vchar *name, Vint *length, Vint *type)
vdm_AttributeSetValuec - set string attribute values
void vdm_AttributeSetValuec (vdm_Attribute *attribute, const Vchar *cvalue)
attribute Pointer to Attribute object. cvalue Attribute value
None
vdm_AttributeSetValuedv - set double attribute values
void vdm_AttributeSetValuedv (vdm_Attribute *attribute, const Vdouble *dvalue)
attribute Pointer to Attribute object. dvalue Attribute value
None
vdm_AttributeSetValuefv - set float attribute values
void vdm_AttributeSetValuefv (vdm_Attribute *attribute, const Vfloat *fvalue)
attribute Pointer to Attribute object. fvalue Attribute value
None
vdm_AttributeSetValueiv - set integer attribute values
void vdm_AttributeSetValueiv (vdm_Attribute *attribute, const Vint *ivalue)
attribute Pointer to Attribute object. ivalue Attribute value
None
vdm_AttributeValueDouble - get double attribute values
void vdm_AttributeValueDouble (vdm_Attribute *attribute, Vdouble dvalue[])
attribute Pointer to Attribute object.
dvalue Double attribute values
vdm_AttributeValueFloat - get float attribute values
void vdm_AttributeValueFloat (vdm_Attribute *attribute, Vfloat fvalue[])
attribute Pointer to Attribute object.
fvalue Float attribute values
vdm_AttributeValueInteger - get integer attribute values
void vdm_AttributeValueInteger (vdm_Attribute *attribute, Vint ivalue[])
attribute Pointer to Attribute object.
ivalue Integer attribute values
vdm_AttributeValueString - get character attribute values
void vdm_AttributeValueString (vdm_Attribute *attribute, Vchar cvalue[])
attribute Pointer to Attribute object.
cvalue Character attribute values