run_jobs Module

TODO: support old=no

pyNastran.bdf.mesh_utils.run_jobs.cmd_line_run_jobs(argv=None, quiet: bool = False) int[source]

run_nastran_job dirname run_nastran_job fem.bdf -x C:binnastran.exe run_nastran_job . -x C:binnastran.exe –cleanup -r –test run_nastran_job . –outfile files_to_run.out –test -args “old=no mem=10gb” run_nastran_job junk –infile files_to_run.out run_nastran_job fem1.bdf fem2.bdf run_nastran_job . –skip fem1.bdf fem2.bdf –all

pyNastran.bdf.mesh_utils.run_jobs.get_bdf_filenames_to_run(bdf_filename_dirname: str | PurePath | list[str | PurePath], extensions: str | list[str], recursive: bool = False, process_all: bool = False) list[Path][source]
pyNastran.bdf.mesh_utils.run_jobs.load_infile(infilename: str, extensions: list[str]) tuple[list[Path], list[list[str]]][source]
pyNastran.bdf.mesh_utils.run_jobs.run_jobs(bdf_filename_dirname: str | PurePath | list[str | PurePath], nastran_exe: str | PurePath, extensions: str | list[str], cleanup: bool = True, recursive: bool = False, keywords: str | list[str] | dict[str, str] | list[list[str]] | None = None, run: bool = True, out_filename: str | PurePath = '', skip_files: str | PurePath | list[str | PurePath] = '', process_all: bool = False, debug: bool = False, log: SimpleLogger | str = 'debug') int[source]

Runs a series of jobs in a specific folder with specific file extensions

Parameters:
bdf_filename_dirname: PathLike | list[PathLike]

a series of filenames or directories to process

nastran_exe: str, list[str]

the path to Nastran

extensions: str, list[str]

the file extensions that will be analyzed (*.dat, *.bdf)

recursive: bool; default=False

finds all bdf/dat files in all sub-directories NOTE: doesn’t apply to files

keywordsstr, list[str], dict[str, Any]

keywords = ‘old=no’ keywords = [‘old=no’, ‘parallel=8’] keywords = {‘old’: ‘no’, ‘parallel’: 8}

out_filename: PathLike; default=’’

file to load previously saved jobs

skip_files: PathLike | list[skip_files]; default=’’

files that should be skipped

process_all: bool; default=False
True: process all bdf/dat files in all sub-directories

other than those specified by skip_files

False: skip files that have op2s

run: bool; default=True

lets you disable actually running Nastran to test out code/get the call arguments

cleanup: bool; default=False

removes the *.asg, *.asm, *.log, *.f04, *.mon1, *.mon2 and *.plt files

debug: bool; default=False

print the call args

log: SimpleLogger

logging for the job runner

Returns:
nfiles: int

the number of files

TODO: remove failed jobs from the time estimator
TODO: add out_filenames to output
pyNastran.bdf.mesh_utils.run_jobs.run_jobs_by_filenames(bdf_filenames: list[str | PurePath], nastran_exe: str | PurePath, keywords: list[str], log: SimpleLogger, process_all: bool = False, cleanup: bool = True, run: bool = True, debug: bool = False) tuple[int, list[list[str]]][source]