-
-
Notifications
You must be signed in to change notification settings - Fork 33
OpenFOAM(R) v1912 and Homebrew
- Switched C++ standard compilation flag to
std=c++14
to comile CGAL-dependent parts of the code (Homebrew's CGAL is at version 5.x and requires C++14); - As a result of 1 it was necessary to fix location of
[deprecated]
attribute; - Imported HashTable modifications to avoid ugly conditional compilation in HashSet and bitSet;
- Modified OpenMP wmake rules.
The only required dependency to compile the software is a C++ compiler. Patches here is for Apples clang. One can try to build OpenFOAM(R) with Intel or PGI compilers, yet, the process is untested.
The following optional software could be installed to enable additional features:
- Open MPI (parallel execution)
- boost (mesh renumbering and dependency for CGAL)
- CGAL (mainly foamyMesh)
- Scotch, METIS, KaHIP (corresponding decomposition methods)
- FFTW
- ADIOS2 (ADIOS I/O)
To do the installation with Homebrew one can use the following command:
$ brew install adios2 boost cgal fftw kahip metis open-mpi
since Scotch is not in homebrew/core
, it can be installed from formula in the repository with a command:
$ brew install https://raw.githubusercontent.com/mrklein/openfoam-os-x/master/formulae/scotch.rb
Certain run-time post-processing depends on VTK, unfortunately due to names clash between case-sensitive and case-insensitive file systems, this functionality is disabled.
OpenFOAM(R) uses case-sensitive source files naming scheme, so it is necessary to have case-sensitive file system to compile it. If your home folder is on case-sesitive FS, you can skip this step. If you are not sure, create disk image.
The image is created with the following command:
$ hdiutil create -size 64g -type SPARSEBUNDLE -fs HFSX -volname OpenFOAM -fsargs -s OpenFOAM.sparsebundle
You can adjust image size and name according to your needs and preferences. Since it is sparse bundle, initial image size is smaller.
Further steps are easier if the image is mounted into $HOME/OpenFOAM
, since
it is default location (if you prefer another location, adjust settings
accordingly).
Disk is mounted with the following command:
$ mkdir -p $HOME/OpenFOAM
$ hdiutil attach -mountpoint $HOME/OpenFOAM OpenFOAM.sparsebundle
This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM(R) and OpenCFD(R) trade marks.
OPENFOAM(R) is a registered trade mark of OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com.