new package(s): DAMASK (damask, damask-grid, damask-mesh) (#25692)

This commit is contained in:
Martin Diehl 2021-09-29 19:57:01 +02:00 committed by GitHub
parent c75e84e9f3
commit f32feeee45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 169 additions and 0 deletions

View File

@ -0,0 +1,19 @@
--- DAMASK.orig/CMakeLists.txt 2021-08-30 07:46:00.432886577 +0200
+++ DAMASK/CMakeLists.txt 2021-08-30 08:21:42.249937025 +0200
@@ -38,11 +38,14 @@
endif ()
# Predefined sets for OPTIMIZATION/OPENMP based on BUILD_TYPE
-if (CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "SYNTAXONLY")
+string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE)
+if (CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR
+ CMAKE_BUILD_TYPE STREQUAL "SYNTAXONLY")
set (DEBUG_FLAGS "${DEBUG_FLAGS} -DDEBUG")
set (PARALLEL "OFF")
set (OPTI "OFF")
-elseif (CMAKE_BUILD_TYPE STREQUAL "RELEASE")
+elseif (CMAKE_BUILD_TYPE STREQUAL "RELEASE" OR
+ CMAKE_BUILD_TYPE STREQUAL "DEBUGRELEASE")
set (PARALLEL "ON")
set (OPTI "DEFENSIVE")
elseif (CMAKE_BUILD_TYPE STREQUAL "PERFORMANCE")

View File

@ -0,0 +1,37 @@
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
class DamaskGrid(CMakePackage):
"""Grid solver for DAMASK"""
homepage = "https://damask3.mpie.de"
url = "https://damask3.mpie.de/download/damask-3.0.0.tar.xz"
maintainers = ['MarDieh']
version('3.0.0-alpha4', sha256='0bb8bde43b27d852b1fb6e359a7157354544557ad83d87987b03f5d629ce5493')
depends_on('cmake@3.10:', type='build')
depends_on('petsc+fftw@3.14.0:3.14.99,3.15.1:3.15.99')
depends_on('hdf5+fortran')
patch('CMakeDebugRelease.patch', when='@3.0.0-alpha4')
variant('build_type', default='DebugRelease',
description='The build type to build',
values=('Debug', 'Release', 'DebugRelease'))
def cmake_args(self):
args = ['-DDAMASK_SOLVER:STRING=grid']
return args
@run_after('install')
@on_package_attributes(run_tests=True)
def execute(self):
damask_grid = Executable('DAMASK_grid')
damask_grid('--help')

View File

@ -0,0 +1,19 @@
--- DAMASK.orig/CMakeLists.txt 2021-08-30 07:46:00.432886577 +0200
+++ DAMASK/CMakeLists.txt 2021-08-30 08:21:42.249937025 +0200
@@ -38,11 +38,14 @@
endif ()
# Predefined sets for OPTIMIZATION/OPENMP based on BUILD_TYPE
-if (CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "SYNTAXONLY")
+string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE)
+if (CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR
+ CMAKE_BUILD_TYPE STREQUAL "SYNTAXONLY")
set (DEBUG_FLAGS "${DEBUG_FLAGS} -DDEBUG")
set (PARALLEL "OFF")
set (OPTI "OFF")
-elseif (CMAKE_BUILD_TYPE STREQUAL "RELEASE")
+elseif (CMAKE_BUILD_TYPE STREQUAL "RELEASE" OR
+ CMAKE_BUILD_TYPE STREQUAL "DEBUGRELEASE")
set (PARALLEL "ON")
set (OPTI "DEFENSIVE")
elseif (CMAKE_BUILD_TYPE STREQUAL "PERFORMANCE")

View File

@ -0,0 +1,37 @@
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
class DamaskMesh(CMakePackage):
"""Mesh solver for DAMASK"""
homepage = "https://damask3.mpie.de"
url = "https://damask3.mpie.de/download/damask-3.0.0.tar.xz"
maintainers = ['MarDieh']
version('3.0.0-alpha4', sha256='0bb8bde43b27d852b1fb6e359a7157354544557ad83d87987b03f5d629ce5493')
depends_on('cmake@3.10:', type='build')
depends_on('petsc@3.14.0:3.14.99,3.15.1:3.15.99')
depends_on('hdf5+fortran')
patch('CMakeDebugRelease.patch', when='@3.0.0-alpha4')
variant('build_type', default='DebugRelease',
description='The build type to build',
values=('Debug', 'Release', 'DebugRelease'))
def cmake_args(self):
args = ['-DDAMASK_SOLVER:STRING=mesh']
return args
@run_after('install')
@on_package_attributes(run_tests=True)
def execute(self):
damask_mesh = Executable('DAMASK_mesh')
damask_mesh('--help')

View File

@ -0,0 +1,32 @@
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
class Damask(BundlePackage):
"""
DAMASK - The Duesseldorf Advanced Material Simulation Kit
A unified multi-physics crystal plasticity simulation package. The solution of
continuum mechanical boundary value problems requires a constitutive response
that connects deformation and stress at each material point. This problem is
solved in DAMASK on the basis of crystal plasticity using a variety of constitutive
models and homogenization approaches. However, treating mechanics in isolation is
no longer sufficient to study emergent advanced high-strength materials. In these
materials, deformation happens interrelated with displacive phase transformation,
significant heating, and potential damage evolution. Therefore, DAMASK is capable
of handling multi-physics problems. Following a modular approach, additional field
equations are solved in a fully coupled way using a staggered approach.
"""
homepage = "https://damask3.mpie.de"
maintainers = ['MarDieh']
version('3.0.0-alpha4')
depends_on('damask-grid@3.0.0-alpha4', when='@3.0.0-alpha4', type='run')
depends_on('damask-mesh@3.0.0-alpha4', when='@3.0.0-alpha4', type='run')
depends_on('py-damask@3.0.0-alpha4', when='@3.0.0-alpha4', type='run')

View File

@ -0,0 +1,25 @@
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
class PyDamask(PythonPackage):
"""Pre- and post-processing tools for DAMASK"""
homepage = "https://damask3.mpie.de"
url = "https://damask3.mpie.de/download/damask-3.0.0.tar.xz"
maintainers = ['MarDieh']
version('3.0.0-alpha4', sha256='0bb8bde43b27d852b1fb6e359a7157354544557ad83d87987b03f5d629ce5493')
depends_on('python@3.7:', type=('build', 'run'))
depends_on('vtk+python')
depends_on('py-pandas')
depends_on('py-scipy')
depends_on('py-h5py')
depends_on('py-matplotlib')
depends_on('py-pyyaml')
build_directory = 'python'