IFM Kernel Methods¶
-
class
ifm.
ifm
¶ -
enableScripting
(enable)¶ Enables FEFLOW internal Python scripts.
Parameters: enable (bool) – True to enable Script execution, False to disable.
-
forceLicense
(options)¶ Force FEFLOW to use a specific license option when opening the model.
Parameters: options (str) – license options - e.g. “FM2”, “FMH3”, “Viewer” Example
>>> doc = ifm.forceLicense("Viewer")
-
getDocument
(document_id)¶ Get an active FEFLOW document. Used in Multi-Document operations when multiple FEFLOW models are loaded by the ifm at the same time.
Parameters: document_id (int) – The id of the document. Returns: The requested FEFLOW document. Return type: ifm.FeflowDoc See also
-
getKernelRevision
()¶ Retrieve build system version number Currently, this version number corresponds with the SVN revision of the source code control system.
Returns: Returns decimal FEM kernel version, e.g., 18503 for FEFLOW 7.3.0.18503 Return type: int
-
getKernelVersion
()¶ Retrieve FEFLOW kernel version
Returns: Returns decimal FEM kernel version, e.g., 7000 for FEFLOW 7.0 Return type: int
-
getNumberOfDocuments
()¶ Get the total number of active FEFLOW documents.
Returns: The total number of active FEFLOW documents. Return type: int
-
loadDocument
(filename)¶ Load a FEFLOW model (.fem) or FEFLOW results file (.dac) as a FEFLOW document.
Parameters: filename (str) – path to FEFLOW model . Returns: Returns decimal FEM kernel version, e.g., 7000 for FEFLOW 7.0 Return type: ifm.FeflowDoc Example
>>> doc = ifm.loadDocument("MyModel.fem")
-
registerIfmModules
(module_path)¶ Register IFM module(s) to the current user’s profile
Parameters: module (str or list of str) – module_path or list of module_paths
-
setThreads
(threads_assembly, threads_solver)¶ Set threads for matrix assembly and matrix solving
Parameters: - threads_assembly (int) – number of threads for matrix assembly
- threads_solver (int, optional) – number of threads for matrix solving
Example
>>> n_threads = 4 >>> doc = ifm.setThreads(n_threads) >>> n_threads_solver = 2 >>> doc = ifm.setThreads(n_threads, n_threads_solver)
-
unregisterIfmModules
(module_id)¶ Unregister IFM module(s) from the current user’s profile
Parameters: module_id – Module_id or list of module ids.
-