Skip to content

Commit aa592bb

Browse files
committed
Merge branch 'housekeeping_2025-03-20' into 'development'
housekeeping 2025-03-20 See merge request damask/DAMASK!1050
2 parents 18b1245 + f65e389 commit aa592bb

12 files changed

+429
-210
lines changed

.gitlab-ci.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ doctest:
128128
- export DAMASK_ROOT=$(pwd)
129129
- PYTHONPATH=${DAMASK_ROOT}/python:$PYTHONPATH
130130
- cd python
131-
- python3 -m pytest -v --doctest-modules -k 'not result and not configmaterial and not orientation and not geomgrid' damask
131+
- cp tests/resources/doctest/* .
132+
# pretend neper to be present such that call to /bin/neper does not fail
133+
- echo '#!/usr/bin/env bash' > /bin/neper
134+
- chmod +x /bin/neper
135+
- python3 -m pytest -v --doctest-modules -k 'not result' damask
132136

133137
mypy:
134138
extends: .python_default

cmake/Compiler-IntelLLVM.cmake

+4-5
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@ if (OPENMP)
66
endif ()
77

88
if (OPTIMIZATION STREQUAL "OFF" OR OPTIMIZATION STREQUAL "DEBUG")
9-
set (OPTIMIZATION_FLAGS "-O0")
9+
set (OPTIMIZATION_FLAGS "-O0")
1010
elseif (OPTIMIZATION STREQUAL "DEFENSIVE")
11-
set (OPTIMIZATION_FLAGS "-O2")
11+
set (OPTIMIZATION_FLAGS "-O2")
1212
elseif (OPTIMIZATION STREQUAL "AGGRESSIVE")
13-
#set (OPTIMIZATION_FLAGS "-ipo -O3 -fp-model fast=2 -xHost") # ifx 2022.0 has problems with YAML types and IPO
14-
set (OPTIMIZATION_FLAGS "-O3 -fp-model strict -xHost")
13+
set (OPTIMIZATION_FLAGS "-O3 -fp-model strict -xHost -align array64byte") # -ipo/-flto give linker error
1514
endif ()
1615

1716
# -assume std_mod_proc_name (included in -standard-semantics) causes problems if other modules
1817
# (PETSc, HDF5) are not compiled with this option (https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/62172)
19-
set (STANDARD_CHECK "-stand f18 -assume nostd_mod_proc_name")
18+
set (STANDARD_CHECK "-stand f23 -assume nostd_mod_proc_name")
2019
set (LINKER_FLAGS "${LINKER_FLAGS} -shared-intel")
2120
# Link against shared Intel libraries instead of static ones
2221
set (LINKER_FLAGS "${LINKER_FLAGS} -fc=ifx")

env/DAMASK.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if [ ! -z "$PS1" ]; then
5050
echo
5151
echo Düsseldorf Advanced Materials Simulation Kit --- DAMASK
5252
echo Max-Planck-Institut für Nachhaltige Materialien GmbH, Düsseldorf
53-
echo https://damask.mpie.de
53+
echo https://damask-multiphysics.org
5454
echo
5555
echo Using environment with ...
5656
echo "DAMASK $DAMASK_ROOT $BRANCH"

env/DAMASK.zsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if [ ! -z "$PS1" ]; then
4040
echo
4141
echo Düsseldorf Advanced Materials Simulation Kit --- DAMASK
4242
echo Max-Planck-Institut für Nachhaltige Materialien GmbH, Düsseldorf
43-
echo https://damask.mpie.de
43+
echo https://damask-multiphysics.org
4444
echo
4545
echo "Using environment with ..."
4646
echo "DAMASK $DAMASK_ROOT $BRANCH"

python/damask/_geomgrid.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def load_Neper(fname: Union[str, Path]) -> 'GeomGrid':
291291
>>> N_grains = 20
292292
>>> cells = (32,32,32)
293293
>>> damask.util.run(f'neper -T -n {N_grains} -tesrsize {cells[0]}:{cells[1]}:{cells[2]} -periodicity all -format vtk')
294-
running 'neper -T -n 20 -tesrsize 32:32:32 -periodicity all -format vtk' ...
294+
stdioTuple(stdout=...
295295
>>> damask.GeomGrid.load_Neper(f'n{N_grains}-id1.vtk').renumber()
296296
cells: 32 × 32 × 32
297297
size: 1.0 × 1.0 × 1.0 m³

python/damask/_orientation.py

+21-20
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ class Orientation(Rotation,Crystal):
4343
- cubic
4444
4545
and enables symmetry-related operations such as
46-
"equivalent", "reduced", "disorientation", "IPF_color", or "to_SST".
46+
:func:`equivalent`, :func:`reduced` :func:`disorientation`,
47+
:func:`IPF_color`, or :func:`to_SST`.
4748
4849
The Bravais lattice is given in the Pearson notation:
4950
@@ -74,8 +75,9 @@ class Orientation(Rotation,Crystal):
7475
7576
and inherits the corresponding crystal family.
7677
Specifying a Bravais lattice, compared to just the crystal family,
77-
extends the functionality of Orientation objects to include operations such as
78-
"Schmid", "related", or "to_frame" that require a lattice type and its parameters.
78+
extends the functionality of Orientation objects to include operations
79+
such as :func:`Schmid`, :func:`related`, or :func:`to_frame` that
80+
require a lattice type and its parameters.
7981
8082
Examples
8183
--------
@@ -1177,7 +1179,7 @@ def disorientation(self: MyType,
11771179
>>> b = damask.Orientation.from_Euler_angles(phi=[104,11,87],degrees=True,family='hexagonal')
11781180
>>> a.disorientation(b)
11791181
Crystal family: hexagonal
1180-
Quaternion [0.976 0.189 0.018 0.103]
1182+
array((0.976478 , 0.18880082, 0.01784483, 0.10259889))
11811183
11821184
Plot a sample from the Mackenzie distribution.
11831185
@@ -1188,8 +1190,8 @@ def disorientation(self: MyType,
11881190
>>> b = damask.Orientation.from_random(shape=N,family='cubic')
11891191
>>> n,omega = a.disorientation(b).as_axis_angle(degrees=True,pair=True)
11901192
>>> plt.hist(omega,25)
1191-
[...]
1192-
>>> plt.show()
1193+
(...)
1194+
>>> plt.show(block=False)
11931195
"""
11941196
# For extension to cases with differing symmetry see
11951197
# https://doi.org/10.1107/S0021889808016373 and https://doi.org/10.1107/S0108767391006864
@@ -1495,10 +1497,10 @@ def IPF_color(self,
14951497
>>> coord = damask.util.project_equal_area(o.to_SST(lab))
14961498
>>> color = o.IPF_color(lab)
14971499
>>> plt.scatter(coord[:,0],coord[:,1],color=color,s=.06)
1498-
[...]
1500+
<matplotlib.collections.PathCollection object at ...>
14991501
>>> plt.axis('scaled')
1500-
[...]
1501-
>>> plt.show()
1502+
(...)
1503+
>>> plt.show(block=False)
15021504
"""
15031505
if np.array(vector).shape[-1] != 3:
15041506
raise ValueError('input is not a field of three-dimensional vectors')
@@ -1565,11 +1567,11 @@ def to_lattice(self, *,
15651567
>>> import numpy as np
15661568
>>> import damask
15671569
>>> cubic = damask.Orientation.from_axis_angle(n_omega=[1,0,0,90],degrees=True,lattice='cI')
1568-
>>> cubic.to_lattice(direction=[1, 0, 0])
1570+
>>> np.round(cubic.to_lattice(direction=[1, 0, 0]),3)
15691571
array([1., 0., 0.])
1570-
>>> cubic.to_lattice(direction=[0, 1, 0])
1571-
array([0., 0., -1.])
1572-
>>> cubic.to_lattice(direction=[0, 0, 1])
1572+
>>> np.round(cubic.to_lattice(direction=[0, 1, 0]),3)
1573+
array([ 0., 0., -1.])
1574+
>>> np.round(cubic.to_lattice(direction=[0, 0, 1]),3)
15731575
array([-0., 1., 0.])
15741576
>>> tetragonal = damask.Orientation(lattice='tI',c=0.5)
15751577
>>> damask.util.scale_to_coprime(tetragonal.to_lattice(direction=[1,1,1]))
@@ -1656,9 +1658,9 @@ def Schmid(self, *,
16561658
>>> import damask
16571659
>>> O = damask.Orientation.from_Euler_angles(phi=[0,45,0],degrees=True,lattice='cF')
16581660
>>> O.Schmid(N_slip=[12])[0]
1659-
array([[ 0.000, 0.000, 0.000],
1660-
[ 0.577, -0.000, 0.816],
1661-
[ 0.000, 0.000, 0.000]])
1661+
array([[ 0. , 0. , 0. ],
1662+
[ 0.408, 0.408, 0.408],
1663+
[-0.408, -0.408, -0.408]])
16621664
"""
16631665
if len(self.shape) == 0:
16641666
return self @ super().Schmid(N_slip=N_slip, N_twin=N_twin)
@@ -1700,10 +1702,9 @@ def related(self: MyType,
17001702
Bravais lattice: cI
17011703
a=1 m, b=1 m, c=1 m
17021704
α=90°, β=90°, γ=90°
1703-
Quaternions of shape (3,)
1704-
[[ 6.53281482e-01 2.70598050e-01 6.53281482e-01 2.70598050e-01]
1705-
[ 2.70598050e-01 -2.70598050e-01 -6.53281482e-01 -6.53281482e-01]
1706-
[ 9.23879533e-01 -5.55111512e-17 -2.77555756e-17 -3.82683432e-01]]
1705+
array([( 6.53281482e-01, 2.70598050e-01, 6.53281482e-01, 2.70598050e-01),
1706+
( 2.70598050e-01, -2.70598050e-01, -6.53281482e-01, -6.53281482e-01),
1707+
( 9.23879533e-01, -5.55111512e-17, -2.77555756e-17, -3.82683432e-01)])
17071708
"""
17081709
lattice,o = self.relation_operations(model,target)
17091710
target = Crystal(lattice=lattice) if target is None else target

0 commit comments

Comments
 (0)