obr.core.caseOrigins

Module Contents

Classes

MultiCase

For now does only create a dummy directory

CaseOnDisk

Copies an OpenFOAM case from disk and copies it into the workspace

OpenFOAMTutorialCase

Copies an OpenFOAM case from the FOAM_TUTORIALS folder

GitRepo

Clones an OpenFOAM case from a git repository into the workspace

Functions

instantiate_origin_class(→ Union[CaseOnDisk, ...)

Quick factory function to instantiate the wanted class handler.

Attributes

obr.core.caseOrigins.logger
class obr.core.caseOrigins.MultiCase(origin: str | pathlib.Path, **kwargs)

For now does only create a dummy directory

init(path)
class obr.core.caseOrigins.CaseOnDisk(origin: str | pathlib.Path, **kwargs)

Copies an OpenFOAM case from disk and copies it into the workspace needs origin, solver to be specified

init(path: str)
class obr.core.caseOrigins.OpenFOAMTutorialCase(domain: str, application: str, case: str, **args_dict)

Bases: CaseOnDisk

Copies an OpenFOAM case from the FOAM_TUTORIALS folder needs a dict specifying:

resolve_of_path()
class obr.core.caseOrigins.GitRepo(url: str, commit=None, branch=None, folder=None, cache_folder=None, **kwargs)

Clones an OpenFOAM case from a git repository into the workspace

init(path)
obr.core.caseOrigins.instantiate_origin_class(class_name: str, args: dict) CaseOnDisk | OpenFOAMTutorialCase | GitRepo | None

Quick factory function to instantiate the wanted class handler. Returns:

  • CaseOnDisk, OpenFOAMTutorialCase, or GitRepo on success

  • None on failure.