Files
OpenFOAM-12/etc
Chris Greenshields 1c6d785c1c foamFind: script to find files in OpenFOAM and optionally process the contents
by printing their contents or lines which match a search string.

Usage: ${0##*/} [OPTIONS] <filename>
options:
  -a | -applications     search for the file from the \$FOAM_APP directory
  -d | -dir <dir>        specify search directory
  -f | -files            find wmake 'files' file associated with searched file
  -h | -help             help
  -i | -isearch <string> searches files for a <string>, case insensitive
  -m | -modules          search for the file from the \$FOAM_MODULES directory
  -n | -numbers          print line numbers with file output
  -o | -options          find wmake 'options' file associated with searched file
  -p | -print            print the file(s)
  -s | -search <string>  searches files for a <string>, case sensitive
  -t | -tutorials        search for the file from the \$FOAM_TUTORIALS directory

Finds one or more files in OpenFOAM and optionally processes the contents by:
+ printing the file ('-print' option);
+ printing lines within the file matching a search string ('-search' option).

With source code files, can locate the 'files' and 'options' files associated
with their compilation using 'wmake'.

By default, files are searched from the src (\$FOAM_SRC) directory.
Alternatively the '-dir' option allows the user to specify the search directory
The '-applications', '-modules' and '-tutorials' options specifically set the
search path to the \$FOAM_APP, \$FOAM_MODULES and \$FOAM_TUTORIALS directories,
respectively.

Examples:
    foamFind -print wallHeatFlux.C | less
    + click space bar to scroll down
    + enter line number (after ":") to jump to line
    + enter "/text" to search for "text" (or any other string)

    foamFind -applications -isearch "momentumtransport" -options fluid.C
    foamFind -numbers -search laminar BirdCarreau.C
2024-04-05 13:28:41 +01:00
..
2023-07-11 16:47:25 +01:00
2016-02-10 20:49:04 +00:00

OpenFOAM Configuration

The main OpenFOAM settings are located in the parent etc/ directory. The bash and csh shells are supported and to configure OpenFOAM source etc/bashrc or etc/cshrc respectively which source the following files in the config.sh or config.csh respectively:

  • settings: core settings
  • aliases: aliases for interactive shells
  • unset: sourced to clear as many OpenFOAM environment settings as possible
  • mpi: MPI communications library settings
  • ensight: application settings for EnSight
  • paraview: application settings for ParaView
  • scotch: application settings for compiling against scotch
  • metis: application settings for compiling against metis 5

The config.*/example directories contains various example configuration files for the corresponding shell:

  • compiler: an example of fine tuning ThirdParty compiler settings
  • openmpi: an example of fine tuning openmpi settings for OpenFOAM
  • paraview: an example of chaining to the standard config/paraview with a different ParaView_VERSION
  • prefs: an example of supplying alternative site-defined settings