mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: openfoam shell session - improved and relocated
- '-c' option (as per shell), '-Dkey[=value]' option to provide
preferences via the command-line. For example,
etc/openfoam -DWM_COMPILER=Clang -int64 ./Allwmake -j -s -l
These can also be combined with other options. Eg,
etc/openfoam -DWM_COMPILER=Clang \
-c 'wmake -show-path-cxx -show-cxxflags'
- relocated from bin/tools/ => etc/ for easier access
- bin/tools/openfoam.in : for autoconfig-style installation
- Auto-detect if the shell script was executed with openfoam and
interpret accordingly.
Simple example,
--------------
#!/usr/bin/openfoam
cd "${0%/*}" || exit # Run -*-sh-*- from this dir
blockMesh
simpleFoam
--------------
Note it is NOT currently possible to provide any other parameters
this way. Eg,
`#!/usr/bin/openfoam -sp` (NOT)
This will either fail to run, or result in infinite recursion.
This commit is contained in:
70
doc/openfoam.1.in
Normal file
70
doc/openfoam.1.in
Normal file
@ -0,0 +1,70 @@
|
||||
.TH "OPENFOAM" 1 "OpenFOAM-version" "www.openfoam.com" "OpenFOAM Commands Manual"
|
||||
|
||||
.SH NAME
|
||||
openfoam \- OpenFOAM bash(1) session
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBopenfoam\fR [\fIOPTIONS\fR] [\fIapplication ...\fR]
|
||||
|
||||
.SH DESCRIPTION
|
||||
Activate an \fBOpenFOAM\fR environment in an interactive or
|
||||
non-interactive bash(1) session.
|
||||
|
||||
If no application is given, an interactive bash session will be used.
|
||||
If an application (optionally with arguments) is provided, the
|
||||
OpenFOAM \fIetc/bashrc\fR file will be sourced from the project directory
|
||||
prior to running the application.
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-c\fR \fIcommand\fR
|
||||
Execute shell commands with OpenFOAM environment
|
||||
.TP
|
||||
\fB\-D\fR\fIkey=[value]\fR
|
||||
Define key/value to pass as a preference
|
||||
.TP
|
||||
\fB\-sp\fR
|
||||
Use single precision for scalar-size
|
||||
.TP
|
||||
\fB\-dp\fR
|
||||
Use double precision for scalar-size
|
||||
.TP
|
||||
\fB\-spdp\fR
|
||||
Use single precision for scalar-size, double for solve-scalar size
|
||||
.TP
|
||||
\fB\-int32\fR
|
||||
Use 32-bit label-size
|
||||
.TP
|
||||
\fB\-int64\fR
|
||||
Use 64-bit label-size
|
||||
.TP
|
||||
\fB\-prefix=DIR\fR
|
||||
Specify alternative OpenFOAM project directory
|
||||
.TP
|
||||
\fB\-show-api\fR | \fB\-version\fR
|
||||
Print META-INFO api value and exit
|
||||
.TP
|
||||
\fB\-show-patch\fR
|
||||
Print META-INFO patch value and exit
|
||||
.TP
|
||||
\fB\-show-prefix\fR
|
||||
Print project directory and exit
|
||||
.TP
|
||||
\fB\-help\fR
|
||||
Print the usage
|
||||
|
||||
.SH ARGUMENTS
|
||||
|
||||
If arguments remain after option processing, the first argument is
|
||||
assumed to be an application with options and arguments.
|
||||
|
||||
.SH FILES
|
||||
|
||||
The \fIetc/bashrc\fR file from the OpenFOAM project directory supplies
|
||||
the environment settings.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
Online documentation https://www.openfoam.com/documentation/
|
||||
|
||||
.SH COPYRIGHT
|
||||
Copyright \(co 2020 OpenCFD Ltd.
|
||||
Reference in New Issue
Block a user