addFile_ANSYS_APDL (Structuredatabase, string filename) Adds information from an ANSYS Mechanical APDL file either in APDL-style format, or in cdb blocked as well as unblocked format.
setImportItem (number item, bool do_import) Sets if the item is to be imported There is no error checking!
setImportIdent (number item, string ident, Structuredatabase) Sets the new ident used for import The ident is automatically modified to be unique and allowed. Further, the list of items is resorted!
check_on_duplicate_idents_in_database defines if quantities to be imported must not exist in the global database In this case, all methods will propose idents which make the new imported data unique.
defines information on imported data and files given a reference designThis class contains settings for an example design directory (the base_path). These settings include file formats, data items to be imported etc.Note, the currently stored data must be kept “functional” at all times. If you add a new file using the appropriate function, this will take care for you. If you change the data items from outside (GUI etc.) you must use the function check() in order to approve the changes. If the changes are erroneous, the next addFIle-method call may lead to undefined behaviour.
Constructor & Destructor Documentation
ReferenceDesign()
ReferenceDesign(string the_base_path)
Initializes the object with the base path given and sets further defaults.Parameters
Name
Description
the_base_path
Defines the base path. Refer to base_path for further remarks,
Adds information from a CSV file with Grid information.Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.Parameters
Name
Description
database
The current database where the items are to be imported
filename
The file to be parsed. Relative to the base path, or if not existing, relative to the working directory. Otherwise it will be tried to interpret the filename as absolute path
Adds information from a CSV file with Grid information.Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.Parameters
Name
Description
database
The current database where the items are to be imported
filename
The file to be parsed. Relative to the base path, or if not existing, relative to the working directory. Otherwise it will be tried to interpret the filename as absolute path
Adds information from a file in Abaqus format.Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.Parameters
Name
Description
database
The current database where the items are to be imported
filename
The file to be parsed. Relative to the base path, or if not existing, relative to the working directory. Otherwise it will be tried to interpret the filename as absolute path
Adds information from an ANSYS Mechanical APDL file either in APDL-style format, or in cdb blocked as well as unblocked format.Parameters
Name
Description
database
The current database where the items are to be imported
filename
The file to be parsed. Interpred either relative to the base path or to the working directory, or interpreted as absolute path. If none of these options match an exsisting file, an exception will be thrown
Adds information from an ANSYS binary structural or coupled-field analysis file.Parameters
Name
Description
database
The current database where the items are to be imported
filename
The file to be parsed. Interpred either relative to the base path or to the working directory, or interpreted as absolute path. If none of these options match an exsisting file, an exception will be thrown
Adds element data information from a file in CSV format.Only element data items are supported. If the data items are already existing, their names will be changed. The vector is reordered.Parameters
Name
Description
database
the current database where the items are to be imported
filename
the file to be parsed. Is relative the base_path or (if this is not existing, take it as absolute path or relative to working dir)
adds information from a file in FLUENT result CSV format.Parameters
Name
Description
database
The current database where the items are to be imported
filename
The file to be parsed. Relative to the base path, or if not existing, relative to the working directory or it will be tried to interpret the filename as absolute path
Adds information from a file in a pixel image format.Multiple data items per file are supported. It is checked on validity using the pixel dimensions (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.Parameters
Name
Description
database
The current database where the items are to be imported
filename
The file to be parsed. Interpred either relative to the base path or to the working directory, or interpreted as absolute path. If none of these options match an exsisting file, an exception will be thrown
adds information from a file in LS-DYNA Dynain format.Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.Parameters
Name
Description
database
The current database where the items are to be imported
filename
The file to be parsed. Relative to the base path, or if not existing, relative to the working directory or it will be tried to interpret the filename as absolute path
adds information from a file in LS-PrePost (LS-DYNA) format.Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.Parameters
Name
Description
database
The current database where the items are to be imported
filename
The file to be parsed. Relative to the base path, or if not existing, relative to the working directory or it will be tried to interpret the filename as absolute path
Adds information from a file in NASTRAN format.The file will be read and interpreted as input file (*.dat, *bdf) with a clearly and reliable defined data structure described in MSC Nastran Quick Reference Guide Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive).Parameters
Name
Description
database
The current database where the items are to be imported
filename
The file to be parsed. Is relative to the base_path or if this is not existing, try to take it as absolute path or relative to the working dir.
Adds node data information from a file in CSV format.Only node data items are supported. If the data items are already existing, their names will be changed. The vector is reordered.Parameters
Name
Description
database
the current database where the items are to be imported
filename
the file to be parsed. Is relative the base_path or (if this is not existing, take it as absolute path or relative to working dir)
Adds information from a file in NASTRAN format.The file will be read and interpreted as data file. At this time we don’t know any standard or at least a common format for Nastran output data. In fact, we don’t know where the data format comes from… Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.Parameters
Name
Description
database
The current database where the items are to be imported
filename
The file to be parsed. Is relative to the base_path or if this is not existing, try to take it as absolute path or relative to the working dir.
Adds information from a file in PERMAS format.Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.Parameters
Name
Description
database
The current database where the items are to be imported
filename
The file to be parsed. Relative to the base path, or if not existing, relative to the working directory or it will be tried to interpret the filename as absolute path
Adds node data information from a signal file in CSV format.Only node data items are supported. If the data items are already existing, their names will be changed. The vector is reordered.Only the data and not the mesh will be imported.Parameters
Name
Description
database
The database where the items are to be imported
filename
The file to be parsed. As first guess, the path is interpreted relative to the base_path. If this fails, the path is read as absolute path or - as last option - relative to the working dir.
Adds node data information from a signal file in CSV format.Only node data items are supported. If the data items are already existing, their names will be changed. The vector is reordered.Both data and mesh will be imported.Parameters
Name
Description
database
The database where the items are to be imported
filename
The file to be parsed. As first guess, the path is interpreted relative to the base_path. If this fails, the path is read as absolute path or - as last option - relative to the working dir.
addFile_STL()
addFile_STL( Structure database, string filename)
Adds information from a file in STL format.Only geometric information can be imported. STL import makes only sense in combination with incompatible mesh mappers.Parameters
Name
Description
database
the current database where the items are to be imported
filename
The file to be parsed. Relative to the base path, or if not existing, relative to the working directory or it will be tried to interpret the filename as absolute path
addFile_VTK()
addFile_VTK( Structure database, string filename)
Adds information from a file in VTK format.Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.Parameters
Name
Description
database
The current database where the items are to be imported
filename
The file to be parsed. Relative to the base path, or if not existing, relative to the working directory. Otherwise it will be tried to interpret the filename as absolute path
adds a single item to trhe list of import dataParameters
Name
Description
database
the database we refer to
new_item
the new item
This method is used for directly modifying the data. It is not intended to be used by the user/GUI, but by generateScriptOfSettingsDefinition().
check()
check(Structure database)
checks if the settings are valid and produces an error.Parameters
Name
Description
database
the data base
generateScriptOfSettingsDefinition()
string generateScriptOfSettingsDefinition()
Generates a Lua script that is used to build up this object.ReturnsThe script code. Ends with a newline.
This script works only for the global reference design (due to restrictions in itself and other classes)
getFiles()
std::vector< string > getFiles()
assembles the complete list of files being known to this classThis is a compact view onto the contained data, since multiple items may be imported from a single file.Returnsa list of filenames. The file names are relative to the base path.
getFilesToImport()
std::vector< string > getFilesToImport()
Assembles a list of files which are to be imported (only the files for which one selected “import” are exported here)This is a compact view onto the contained data, since multiple items may be imported from a single file and some files may be inactive.Returnsa list of filenames. The file names are relative to the base path.
getItemIndex()
number getItemIndex( string filename, ImportItemInfo::Type data_type, string input_ident, number column = 0)
gets the index of the respective item if existingParameters
Name
Description
filename
the filename relative to the base directory
data_type
the data type, e.g. “coordinate along x direction”
input_ident
the input ident, e.g. “thickness”
column
the column index for tensor fields (else 0)
Returnsindex to the item in the vector items. Throws an exception if not existing
getItemsForFile()
std::vector< number > getItemsForFile(string filename)
assembles a list of items which are to be imported from a specific fileParameters
Name
Description
filename
the file name for which all items to be imported are searched.
Returnsa list of integer indices in ascending order. Each index refers to an Item in the vector items. If no data is to be imported from the requested file, an empty list is returned.
the design number which is used to define the design ident string for all new data in the database
design_path
if this is empty, one takes the base_path. Else one takes this string instead of this->base_path
do_not_check_settings
If this is true, then the contents of design_info will not be checked on validity before starting the import. This is helpful when importing multiple designs at once. If this settings object is configured to check on duplicates in the global database, then a duplicate would be found after import of the first design always leading to an error! In this case, set this parameter to true.
ReturnsReturns an projection error report for each imported quantity. If no projection error occured during import, an empty quantity report will be returned. See DesignProjectionErrorReport for further details If an error appears during import, an exception is thrown. Nevertheless, the method tries to import as much data as possible before quit.
meshMapper()
MeshMapperBase meshMapper()
Returnsa reference to the (in)compatible mesh mapper object
meshMapperRef()
MeshMapperBase meshMapperRef()
Returnsa modifyable reference to the (in)compatible mesh mapper object
removeFileFromList()
removeFileFromList(string filename)
removes all import data from item list which is associated with the sepcified fileParameters
Name
Description
filename
the file name of the file which is to be removed from import item list (exact match!).
Exceptions
Name
Description
std::exception
if the file does not exist in the list.
setBasePath()
setBasePath(string path)
sets a new base path. This includes changing the relative path definition of the already parsed files.Parameters
Name
Description
path
the base path
setImportIdent()
setImportIdent( number item, string ident, Structure database)
Sets the new ident used for import The ident is automatically modified to be unique and allowed. Further, the list of items is resorted!Parameters
Name
Description
item
the index in items vector
ident
the new value of “imported_ident”
database
the database (used for checking the ident on being allowed).
setImportItem()
setImportItem( number item, bool do_import)
Sets if the item is to be imported There is no error checking!Parameters
Name
Description
item
the index in items vector
do_import
the new value of “do_import”.
setMeshMapper()
setMeshMapper(MeshMapperBase mapper)
sets the (in)compatible mesh mapper objectParameters
Name
Description
mapper
the new mapping handler
Member Data Documentation
base_path
string base_path
Specifies the base path. Must be changed only via setBasePath()!base_path should always point to an existing absolute filesystem directory otherwise an exception may occour during program execution.
Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.