|
__init__(self,
name,
region=None)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addBackup(self,
pth)
add file to list of files that are to be copied to the archive |
source code
|
|
|
addLocalConfig(self)
Add the local configuration file of the case to the configuration |
source code
|
|
|
|
|
|
|
addToHistory(self,
*text)
Adds a line with date and username to a file 'PyFoamHistory' that
resides in the local directory |
source code
|
|
|
addToTar(self,
tar,
pattern,
exclude=[ ] ,
base=None)
The workhorse for the packCase-method |
source code
|
|
str
|
|
str
|
|
|
clear(self,
after=None,
processor=True,
pyfoam=True,
keepLast=False,
vtk=True,
keepRegular=False,
keepParallel=False,
keepInterval=None,
removeAnalyzed=False,
clearHistory=False,
clearParameters=False,
functionObjectData=False,
additional=[ ] )
One-stop-shop to remove data |
source code
|
|
|
clearOther(self,
pyfoam=True,
removeAnalyzed=False,
clearHistory=False,
clearParameters=False)
Remove additional directories |
source code
|
|
|
|
|
clearResults(self,
after=None,
removeProcs=False,
keepLast=False,
vtk=True,
keepRegular=False,
keepParallel=False,
keepInterval=None,
functionObjectData=False,
additional=[ ] )
remove all time-directories after a certain time. |
source code
|
|
SolutionDirectory or correct subclass
|
cloneCase(self,
name,
svnRemove=True,
followSymlinks=False)
create a clone of this case directory. |
source code
|
|
str
|
|
str
|
|
|
determineVCS(self)
Find out whether this directory is controlled by a VCS and return the
abbreviation of that VCS |
source code
|
|
|
|
|
|
|
|
str
|
|
str
|
|
|
getParallelTimes(self)
Get a list of the times in the processor0-directory |
source code
|
|
|
getParametersFromFile(self)
Get Parameters from the file created by PrepareCase |
source code
|
|
|
getRegions(self,
defaultRegion=False)
Gets a list of all the available mesh regions by checking all
directories in constant and using all those that have a
polyMesh-subdirectory |
source code
|
|
|
|
str
|
|
|
isValid(self)
Checks whether this is a valid case directory by looking for the
system- and constant-directories and the controlDict-file |
source code
|
|
|
|
str
|
|
|
listFiles(self,
directory=None)
List all the plain files (not directories) in a subdirectory of the
case |
source code
|
|
BasicFile
|
makeFile(self,
name)
create a file in the solution directory and return a corresponding
BasicFile-object |
source code
|
|
|
missingFiles(self)
Return a list of all the missing files and directories that are
needed for a valid case |
source code
|
|
|
nrProcs(self)
The number of directories with processor-data |
source code
|
|
|
packCase(self,
tarname,
last=False,
exclude=[ ] ,
additional=[ ] ,
base=None)
Packs all the important files into a compressed tarfile. |
source code
|
|
str
|
|
|
processorDirs(self)
List with the processor directories |
source code
|
|
|
reread(self,
force=False)
Rescan the directory for the time directories |
source code
|
|
|
|
SolutionDirectory or correct subclass
|
symlinkCase(self,
name,
followSymlinks=False,
maxLevel=1,
relPath=False)
create a clone of this case directory by creating a directory with
symbolic links |
source code
|
|
str
|
|
|
timeIndex(self,
item,
minTime=False)
Finds the index of a directory that corresponds with the given
parameter |
source code
|
|
|
timeName(self,
item,
minTime=False)
Finds the name of a directory that corresponds with the given
parameter |
source code
|
|
|
|
|
|
|
copyfile(self,
src,
dst)
Encapsulates the shutil copyfile and provides an alternative for old
Python-version |
source code
|
|
|
copytree(self,
src,
dst,
symlinks=False,
force=False)
Encapsulates the shutil copytree and provides an alternative for old
Python-version |
source code
|
|
|
diskUsage(self,
fpath)
Calculate the disk space used at the specified path in bytes |
source code
|
|
|
execute(self,
cmd,
debug=False,
workdir=None,
echo=None)
Execute the command cmd. |
source code
|
|
|
find(self,
pattern,
path,
directoriesToo=True)
Find all files whose names match |
source code
|
|
|
humanReadableSize(self,
num)
Lifted from
http://stackoverflow.com/questions/1094841/reusable-library-to-get-human-readable-version-of-file-size
Gets a number in bytes and returns a human readable string |
source code
|
|
|
listDirectory(self,
d)
Lists the files in a directory, but excludes certain names and files
with certain endings |
source code
|
|
|
remove(self,
f)
Remove a file if it exists. |
source code
|
|
|
rmtree(self,
dst,
ignore_errors=False)
Encapsulates the shutil rmtree and provides an alternative for old
Python-version |
source code
|
|
|
|
|
|