Configuration / Environment
Mesa / llvm
If using a non-clang compiler suite (gcc, intel, etc) the additional lbraries required for mesa with llvm pipelines may not be found. These can now be added as a mesa_llvm configuration within the vtk config file. Can use the usual types of settings:
- mesa_llvm=llvm-4.0.1
- mesa_llvm=none
- mesa_llvm=system
Direct access to compiler settings
Keywords: wmake -show options for compiler information
When building other libraries directly, with autoconfig or cmake, it
will be useful or necessary to use the same compiler and compiler
settings as are used by OpenFOAM itself. These are now obtained from the
wmake
show options and can be used to set corresponding environment
variables. For example,
CC="$(wmake -show-c)" CFLAGS="$(wmake -show-cflags)" ./configure
Here is the correspondence to commonly used environment variables
Env variable | Obtaining from wmake | Meaning |
---|---|---|
CC | wmake -show-c | C compiler |
CFLAGS | wmake -show-cflags | C compiler flags |
CXX | wmake -show-cxx | C++ compiler |
CXXFLAGS | wmake -show-cxxflags | C++ compiler flags |
wmake -show-cflags-arch | Architecture information when linking | |
wmake -show-cxxflags-arch | Architecture information when linking |
In some situations it can also be useful to have the compiler and flags
together (similar to mpicc -show
and mpicxx -show
):
wmake -show-compile-c
wmake -show-compile-cxx
This system replaces the additional environment variables (WM_CC, WM_CFLAGS, WM_CXX, WM_CXXFLAGS, WM_LDFLAGS) used in previous versions, but which have been proved to be inadequate for a number of reasons:
- fragile to maintain
- not guaranteed to be consistent
- does not provided the full compilation flags
- annoying clutter for the environment
Space characters in fileName
Allowing space characters in fileName is now user-configurable.
Having whitespace in fileName
can be somewhat fragile since it means
that the fileName components do not necessarily correspond to a
Foam::word
. But in many cases it will work provided that spaces
are not present in the final portion of the simulation directory
itself.
InfoSwitches
{
// Allow space character in fileName (use with caution)
// Default: 0 for non-Windows, 1 for Windows
allowSpaceInFileName 1;
}
Input Dictionaries
-
The compile-time value of
foamVersion::api
is now exported as an internal environment variableFOAM_API
, which also makes it available for dictionaries. This value is independent of anything set in the parent environment. -
The
foamDictionary
utility now accepts a-precision
option to specify non-default precision values. This is needed since the precision used byfoamDictionary
is normally unaffected by the contents or even the presence/absence of asystem/controlDict
file. -
Example annotated dictionaries are now centralized under
etc/
, which makes them more convenient to find. This location becomes especially necessary when the OpenFOAM installation is without sources or tutorials. -
The new
foamGetDict
utility provides a convenient means of retrieving an OpenFOAM dictionary file frometc/caseDicts/
. For example,foamGetDict decomposeParDict
Existing files will not be overwritten.
Surface sampling
As mentioned in the Release notes, surface sampling and writers have received an overhaul and improved functionality. For the end-user, these are the most relevant points:
- surfaces can be specified as sub-dictionaries or (as previously) a single list entry.
- optional
enabled
keyword to selectively disable a single sampled surface. - each surface can have its own output format, or format options.
- the ability to
store
sampled information to an internal registry for reuse with averaging, surfaceFieldValue, runTimePostProcessing etc.
Removed
All surfMesh samplers have been removed since this functionality has been superseded by the improved sampledSurfaces. This functionality was originally added to allow sampling of volume fields onto a surface in order to perform calculations on them. Moreover, the sampling framework essentially mirrored that of sampledSurfaces, but was less complete.
It is now possible to store sampled surfaces on a registry and do calculation with their fields. This is the preferred method, and thus removing the surfMeshSample duplicate code.
Removed items
Reduced the clutter in the bin/
directory by removing
many old, unused legacy and deprecated tools.
-
Information about deprecated applications is now addressed via wiki pages.
-
Less frequently used scripts are now located in
bin/tools/
- findEmptyMake
- foamAllHC
- foamUpdateCaseFileHeader