easyblock = 'EB_OpenFOAM'

name = 'OpenFOAM-Extend'
version = '1.6'
versionsuffix = '-20130711'

homepage = 'http://www.extend-project.de/'
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': 'ictce', 'version': '4.1.13'}

sources = ['OpenFOAM-%(version)s-ext%(versionsuffix)s.tar.gz']

patches = [
    'OpenFOAM-Extend-%(version)s_METIS-ParMGridGen.patch',
    'OpenFOAM-Extend-%(version)s_comp-mpi.patch',
    'OpenFOAM-Extend-%(version)s_ictce.patch',
]

dependencies = [
    ('ParMETIS', '3.2.0'),
    ('METIS', '4.0.3'),  # order matters, METIS need to be listed after ParMETIS to get $CPATH right
    ('SCOTCH', '5.1.12b_esmumps'),
    ('Mesquite', '2.3.0'),
    ('ParMGridGen', '1.0'),
]

builddependencies = [('flex', '2.5.35')]

moduleclass = 'cae'
