Skip to content

Adding /FCLEAN implementation #1633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/ansys/mapdl/core/_commands/session/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,33 @@ def copy(self, fname1="", ext1="", fname2="", ext2="", distkey="", **kwargs):
command = f"/COPY,{fname1},{ext1},,{fname2},{ext2},,{distkey}"
return self.run(command, **kwargs)

def fclean(self, **kwargs):
"""Deletes all local files in all processors in a distributed parallel processing run.
APDL Command: /FCLEAN
Deletes all local files (``.rst``, ``.esav``, ``.emat``, ``.mode``, ``.mlv``,
``.seld``, ``.dsub``, ``.ist``, ``.full``, ``.rdsp``, ``.rfrq``, ``.rnnn``,
``.resf``, ``.stat``, ``.modesym``, ``.osave``, ``.erot``, ``.log``)
in all processors in a distributed parallel processing run.
.. warning:: Because ``/FCLEAN`` deletes all local files, it should only be issued if you are sure that
none of those files are needed in downstream analyses. Deleting files that are necessary for
the next substep, load step, or analysis will prevent continuation of the run.
Notes
-----
Issue ``/FCLEAN`` to delete all local files having the current Jobname (``/FILNAME``) and save
disk space in a distributed parallel processing run. Like other file deletion commands, deletion happens
immediately upon issuing this command. Different than other file deletion commands, it enables the
convenience of deleting all ``Jobname.*`` local files without having to issue separate commands specifying
each file type
This command is valid only at the Begin Level.
"""
return self.run("/FCLEAN", **kwargs)

def fcomp(self, ident="", level="", **kwargs):
"""Specifies file compression level.
Expand Down