Skip to content

Commit b88cea7

Browse files
committed
Adding fclean implementation
1 parent fb5fb8b commit b88cea7

File tree

1 file changed

+27
-0
lines changed
  • src/ansys/mapdl/core/_commands/session

1 file changed

+27
-0
lines changed

src/ansys/mapdl/core/_commands/session/files.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,33 @@ def copy(self, fname1="", ext1="", fname2="", ext2="", distkey="", **kwargs):
383383
command = f"/COPY,{fname1},{ext1},,{fname2},{ext2},,{distkey}"
384384
return self.run(command, **kwargs)
385385

386+
def fclean(self, **kwargs):
387+
"""Deletes all local files in all processors in a distributed parallel processing run.
388+
389+
APDL Command: /FCLEAN
390+
391+
Deletes all local files (``.rst``, ``.esav``, ``.emat``, ``.mode``, ``.mlv``,
392+
``.seld``, ``.dsub``, ``.ist``, ``.full``, ``.rdsp``, ``.rfrq``, ``.rnnn``,
393+
``.resf``, ``.stat``, ``.modesym``, ``.osave``, ``.erot``, ``.log``)
394+
in all processors in a distributed parallel processing run.
395+
396+
.. warning:: Because ``/FCLEAN`` deletes all local files, it should only be issued if you are sure that
397+
none of those files are needed in downstream analyses. Deleting files that are necessary for
398+
the next substep, load step, or analysis will prevent continuation of the run.
399+
400+
Notes
401+
-----
402+
403+
Issue ``/FCLEAN`` to delete all local files having the current Jobname (``/FILNAME``) and save
404+
disk space in a distributed parallel processing run. Like other file deletion commands, deletion happens
405+
immediately upon issuing this command. Different than other file deletion commands, it enables the
406+
convenience of deleting all ``Jobname.*`` local files without having to issue separate commands specifying
407+
each file type
408+
409+
This command is valid only at the Begin Level.
410+
"""
411+
return self.run("/FCLEAN", **kwargs)
412+
386413
def fcomp(self, ident="", level="", **kwargs):
387414
"""Specifies file compression level.
388415

0 commit comments

Comments
 (0)