|
| 1 | +############################################################################## |
| 2 | +# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. |
| 3 | +# Produced at the Lawrence Livermore National Laboratory. |
| 4 | +# |
| 5 | +# This file is part of Spack. |
| 6 | +# Created by Todd Gamblin, [email protected], All rights reserved. |
| 7 | +# LLNL-CODE-647188 |
| 8 | +# |
| 9 | +# For details, see https://github.com/spack/spack |
| 10 | +# Please also see the NOTICE and LICENSE files for our notice and the LGPL. |
| 11 | +# |
| 12 | +# This program is free software; you can redistribute it and/or modify |
| 13 | +# it under the terms of the GNU Lesser General Public License (as |
| 14 | +# published by the Free Software Foundation) version 2.1, February 1999. |
| 15 | +# |
| 16 | +# This program is distributed in the hope that it will be useful, but |
| 17 | +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF |
| 18 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and |
| 19 | +# conditions of the GNU Lesser General Public License for more details. |
| 20 | +# |
| 21 | +# You should have received a copy of the GNU Lesser General Public |
| 22 | +# License along with this program; if not, write to the Free Software |
| 23 | +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 24 | +############################################################################## |
| 25 | +from spack import * |
| 26 | + |
| 27 | + |
| 28 | +class Albany(CMakePackage): |
| 29 | + """Albany is an implicit, unstructured grid, finite element code for the |
| 30 | + solution and analysis of multiphysics problems. The Albany repository |
| 31 | + on the GitHub site contains hundreds of regression tests and examples |
| 32 | + that demonstrate the code's capabilities on a wide variety of problems |
| 33 | + including fluid mechanics, solid mechanics (elasticity and plasticity), |
| 34 | + ice-sheet flow, quantum device modeling, and many other applications.""" |
| 35 | + |
| 36 | + homepage = "http://gahansen.github.io/Albany" |
| 37 | + url = "https://github.com/gahansen/Albany/tarball/master" |
| 38 | + |
| 39 | + maintainers = ['gahansen'] |
| 40 | + |
| 41 | + version('develop', git='https://github.com/gahansen/Albany.git', branch='master') |
| 42 | + |
| 43 | + variant('lcm', default=True, |
| 44 | + description='Enable LCM') |
| 45 | + variant('aeras', default=False, |
| 46 | + description='Enable AERAS') |
| 47 | + variant('qcad', default=False, |
| 48 | + description='Enable QCAD') |
| 49 | + variant('hydride', default=False, |
| 50 | + description='Enable HYDRIDE') |
| 51 | + variant('lcm_spec', default=False, |
| 52 | + description='Enable LCM_SPECULATIVE') |
| 53 | + variant('lame', default=False, |
| 54 | + description='Enable LAME') |
| 55 | + variant('debug', default=False, |
| 56 | + description='Enable DEBUGGING') |
| 57 | + variant('fpe', default=False, |
| 58 | + description='Enable CHECK_FPE') |
| 59 | + variant('scorec', default=False, |
| 60 | + description='Enable SCOREC') |
| 61 | + variant('felix', default=False, |
| 62 | + description='Enable FELIX') |
| 63 | + variant('mor', default=False, |
| 64 | + description='Enable MOR') |
| 65 | + variant('confgui', default=False, |
| 66 | + description='Enable Albany configuration (CI) GUI') |
| 67 | + variant('ascr', default=False, |
| 68 | + description='Enable ALBANY_ASCR') |
| 69 | + variant('perf', default=False, |
| 70 | + description='Enable PERFORMANCE_TESTS') |
| 71 | + variant('64bit', default=True, |
| 72 | + description='Enable 64BIT') |
| 73 | + |
| 74 | + # Add dependencies |
| 75 | + depends_on('mpi') |
| 76 | + depends_on('trilinos~superlu-dist+isorropia+tempus+rythmos+teko+intrepid+intrepid2+minitensor+phalanx+pnetcdf+nox+piro+rol+shards+stk+superlu@master,develop') |
| 77 | + |
| 78 | + def cmake_args(self): |
| 79 | + spec = self.spec |
| 80 | + trilinos_dir = spec['trilinos'].prefix |
| 81 | + options = [] |
| 82 | + |
| 83 | + options.extend([ |
| 84 | + '-DALBANY_TRILINOS_DIR:FILEPATH={0}'.format(trilinos_dir), |
| 85 | + '-DINSTALL_ALBANY:BOOL=ON' |
| 86 | + ]) |
| 87 | + |
| 88 | + options.extend([ |
| 89 | + '-DENABLE_LCM:BOOL=%s' % ( |
| 90 | + 'ON' if '+lcm' in spec else 'OFF'), |
| 91 | + '-DENABLE_AERAS:BOOL=%s' % ( |
| 92 | + 'ON' if '+aeras' in spec else 'OFF'), |
| 93 | + '-DENABLE_QCAD:BOOL=%s' % ( |
| 94 | + 'ON' if '+qcad' in spec else 'OFF'), |
| 95 | + '-DENABLE_HYDRIDE:BOOL=%s' % ( |
| 96 | + 'ON' if '+hydride' in spec else 'OFF'), |
| 97 | + '-DENABLE_LCM_SPECULATIVE:BOOL=%s' % ( |
| 98 | + 'ON' if '+lcm_spec' in spec else 'OFF'), |
| 99 | + '-DENABLE_LAME:BOOL=%s' % ( |
| 100 | + 'ON' if '+lame' in spec else 'OFF'), |
| 101 | + '-DENABLE_DEBUGGING:BOOL=%s' % ( |
| 102 | + 'ON' if '+debug' in spec else 'OFF'), |
| 103 | + '-DENABLE_CHECK_FPE:BOOL=%s' % ( |
| 104 | + 'ON' if '+fpe' in spec else 'OFF'), |
| 105 | + '-DENABLE_SCOREC:BOOL=%s' % ( |
| 106 | + 'ON' if '+scorec' in spec else 'OFF'), |
| 107 | + '-DENABLE_FELIX:BOOL=%s' % ( |
| 108 | + 'ON' if '+felix' in spec else 'OFF'), |
| 109 | + '-DENABLE_MOR:BOOL=%s' % ( |
| 110 | + 'ON' if '+mor' in spec else 'OFF'), |
| 111 | + '-DENABLE_ALBANY_CI:BOOL=%s' % ( |
| 112 | + 'ON' if '+ci' in spec else 'OFF'), |
| 113 | + '-DENABLE_ASCR:BOOL=%s' % ( |
| 114 | + 'ON' if '+ascr' in spec else 'OFF'), |
| 115 | + '-DENABLE_PERFORMANCE_TESTS:BOOL=%s' % ( |
| 116 | + 'ON' if '+perf' in spec else 'OFF'), |
| 117 | + '-DENABLE_64BIT_INT:BOOL=%s' % ( |
| 118 | + 'ON' if '+64bit' in spec else 'OFF') |
| 119 | + ]) |
| 120 | + |
| 121 | + return options |
0 commit comments