name = 'OpenFOAM'
version = '4.1'

homepage = 'http://www.openfoam.com/'
description = """OpenFOAM is a free, open source CFD software package.
 OpenFOAM has an extensive range of features to solve anything from complex fluid flows
 involving chemical reactions, turbulence and heat transfer,
 to solid dynamics and electromagnetics."""

toolchain = {'name': 'intel', 'version': '2017a'}
toolchainopts = {'cstd': 'c++11'}

source_urls = ['https://github.com/OpenFOAM/OpenFOAM-%(version_major)s.x/archive']
sources = ['version-%(version)s.tar.gz']

checksums = ['318a446c4ae6366c7296b61184acd37c']

patches = ['OpenFOAM-%(version)s-cleanup.patch']

dependencies = [
    ('libreadline', '6.3', '', True),
    ('ncurses', '6.0', '', True),
    # OpenFOAM requires 64 bit METIS using 32 bit indexes (array indexes)
    ('METIS', '5.1.0'),
    ('SCOTCH', '6.0.4'),
    ('CGAL', '4.8.1'),
    # Maximum ParaView version 5.2! (ADD_PARAVIEW_OBJECT_PANEL is no longer supported)
    ('ParaView', '5.1.2', '-mpi'),
]

builddependencies = [
    ('Bison', '3.0.4', '', True),
    ('CMake', '3.7.2', '', True),
    ('flex', '2.6.0', '', True),
]

modextrapaths = {'PATH': 'OpenFOAM-%(version)s/bin'}

moduleclass = 'cae'
