blob: 4f083c9959915ff510deddd0420b0095131f53f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# Maintainer: Martin Diehl <martin.diehl@kuleuven.be>
pkgbase=damask
pkgname=('damask' 'damask-grid' 'damask-mesh' 'python-damask')
pkgver=3.0.0
pkgrel=3
pkgdesc='DAMASK - The Duesseldorf Advanced Material Simulation Kit'
arch=('x86_64')
url='https://damask-multiphysics.org'
license=('AGPL-3.0-or-later')
makedepends=('cmake' 'python-setuptools'
'petsc<3.22' 'hdf5-openmpi' 'fftw-openmpi' 'zlib' 'libfyaml'
'python-pandas' 'python-numpy' 'python-scipy' 'python-h5py' 'vtk' 'python-matplotlib' 'python-pyaml')
optdepends=('paraview: post-processing')
source=(https://damask-multiphysics.org/download/damask-${pkgver}.tar.xz)
sha512sums=('f8e2f398c558f90ed4cac8fa60d57bd179a98f1d437ed0b5a5bd9801354cf74f12dba40551dbeabe00ad6e53709bd2daa3b64f759f3170c4766d8795d3f76483')
build() {
cmake -S ${pkgbase}-${pkgver} \
-B build-test \
-D DAMASK_SOLVER:STRING=test \
-D CMAKE_INSTALL_PREFIX:PATH=/usr \
-D CMAKE_BUILD_TYPE:STRING=Performance
make -C build-test
cmake -S ${pkgbase}-${pkgver} \
-B build-grid \
-D DAMASK_SOLVER:STRING=grid \
-D CMAKE_INSTALL_PREFIX:PATH=/usr \
-D CMAKE_BUILD_TYPE:STRING=Performance
make -C build-grid
cmake -S ${pkgbase}-${pkgver} \
-B build-mesh \
-D DAMASK_SOLVER:STRING=mesh \
-D CMAKE_INSTALL_PREFIX:PATH=/usr \
-D CMAKE_BUILD_TYPE:STRING=Performance
make -C build-mesh
cd ${pkgbase}-${pkgver}/python
python -m build --wheel --no-isolation
}
check() {
mpirun -np 2 build-test/src/DAMASK_test
example_dir=$(pwd)/${pkgbase}-${pkgver}/examples/grid
mpirun -np 2 build-grid/src/DAMASK_grid \
-l ${example_dir}/tensionX.yaml \
-g ${example_dir}/20grains16x16x16.vti \
-m ${example_dir}/material.yaml \
-w $(mktemp -d)
example_dir=$(pwd)/${pkgbase}-${pkgver}/examples/mesh
mpirun -np 2 build-mesh/src/DAMASK_mesh \
-l ${example_dir}/tensionY_mono.yaml \
-g ${example_dir}/monocrystal.msh \
-m ${example_dir}/material.yaml \
-w $(mktemp -d)
PYTHONPATH=${pkgbase}-${pkgver}/python:${PYTHONPATH}
python -c "import damask;print(damask.__version__)"
}
package_damask-grid() {
pkgdesc='Grid solver for DAMASK'
depends=('petsc<3.22' 'openmpi' 'hdf5-openmpi' 'libfyaml' 'zlib' 'fftw-openmpi')
optdepends=('dream3d: pre-processing')
mkdir -p ${pkgdir}/usr/share/doc/${pkgname}
cp -r ${pkgbase}-${pkgver}/examples/grid/* ${pkgdir}/usr/share/doc/${pkgname}/
DESTDIR=${pkgdir} cmake --install build-grid
}
package_damask-mesh() {
pkgdesc='Mesh solver for DAMASK'
depends=('petsc<3.22' 'openmpi' 'hdf5-openmpi' 'libfyaml')
optdepends=('neper: pre-processing')
mkdir -p ${pkgdir}/usr/share/doc/${pkgname}
cp -r ${pkgbase}-${pkgver}/examples/mesh/* ${pkgdir}/usr/share/doc/${pkgname}/
DESTDIR=${pkgdir} cmake --install build-mesh
}
package_python-damask() {
pkgdesc='Pre- and post-processing tools for DAMASK'
depends=('python-pandas' 'python-numpy' 'python-scipy' 'python-h5py' 'vtk' 'python-matplotlib' 'python-pyaml')
optdepends=('python-seaborn: post-processing'
'jupyterlab: comfortable shell'
'ipython: comfortable shell')
python -m installer --destdir=${pkgdir} ${pkgbase}-${pkgver}/python/dist/*.whl
}
package_damask() {
depends=('python-damask' 'damask-grid' 'damask-mesh')
mkdir -p ${pkgdir}/usr/share/doc/${pkgname}
cp -r ${pkgbase}-${pkgver}/examples/config/* ${pkgdir}/usr/share/doc/${pkgname}/
}
|