Skip to content

Commit 784f329

Browse files
committed
Merge branch 'housekeeping_2025-05-31' into 'development'
Housekeeping 2025 05 31 See merge request damask/DAMASK!1082
2 parents 1e633df + 52f1afa commit 784f329

22 files changed

+330
-117
lines changed

.github/workflows/Fortran.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Grid and Mesh Solver
22
on: [push]
33

44
env:
5-
PETSC_VERSION: '3.23.1'
5+
PETSC_VERSION: '3.23.3'
66
HOMEBREW_NO_ANALYTICS: 'ON' # Make Homebrew installation a little quicker
77
HOMEBREW_NO_AUTO_UPDATE: 'ON'
88
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 'ON'
@@ -17,7 +17,7 @@ jobs:
1717

1818
strategy:
1919
matrix:
20-
gcc_v: [11, 12, 13]
20+
gcc_v: [11, 12, 13, 14, 15]
2121
fail-fast: false
2222

2323
env:

.gitlab-ci.yml

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
stages:
33
- processing
44
- core
5-
- finalize
6-
5+
- update_repositories
6+
- documentation
77

88
###################################################################################################
99
variables:
@@ -14,16 +14,16 @@ variables:
1414
# ===============================================================================================
1515
# Shortcut names
1616
# ===============================================================================================
17-
MARC_VERSION: "2024.1"
18-
PETSC_GCC_LATEST: "2025.05.27"
19-
PETSC_ONEAPI_LATEST: "2025.04.30"
17+
MARC_VERSION: '2024.1'
18+
PETSC_GCC_LATEST: '2025.05.27'
19+
PETSC_ONEAPI_LATEST: '2025.04.30'
2020

2121

2222
###################################################################################################
2323
# https://docs.gitlab.com/ci/yaml/workflow
2424
workflow:
2525
rules:
26-
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
26+
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
2727
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
2828
when: never
2929
- if: $CI_COMMIT_BRANCH
@@ -55,7 +55,6 @@ workflow:
5555

5656
mypy:
5757
extends: .python_default
58-
needs: []
5958
script:
6059
- cd python
6160
- mypy damask
@@ -241,10 +240,10 @@ Marc_patch:
241240
script:
242241
- source env/DAMASK.sh
243242
- export TMPDIR=/tmp
244-
- python3 install/MarcMentat/MSC_modifications.py --editor=gted --marc-version="${MARC_VERSION}" --damask-root="${CI_PROJECT_DIR}" --marc-root=/opt/msc
245-
- test -f "/opt/msc/mentat${MARC_VERSION}/bin/kill6"
243+
- python3 install/MarcMentat/MSC_modifications.py --editor=gted --marc-version=${MARC_VERSION} --damask-root=${CI_PROJECT_DIR} --marc-root=/opt/msc
244+
- test -f /opt/msc/mentat${MARC_VERSION}/bin/kill6
246245
- cd examples/Marc && python3 -c "import damask;damask.solver.Marc(version=${MARC_VERSION}).submit_job('r-value','texture',True,'h')"
247-
- test -f "${CI_PROJECT_DIR}/src/Marc/DAMASK_Marc.marc" || { echo "Marc simulation failed, DAMASK_Marc.marc not generated"; exit 1; }
246+
- test -f ${CI_PROJECT_DIR}/src/Marc/DAMASK_Marc.marc || { echo 'Marc simulation failed, DAMASK_Marc.marc not generated'; exit 1; }
248247

249248
Marc_compile:
250249
stage: core
@@ -320,26 +319,10 @@ grid_performance:
320319
untracked: true
321320
paths: [performance.txt]
322321

323-
324322
###################################################################################################
325-
update_website_master:
326-
stage: finalize
327-
trigger:
328-
project: damask/website
329-
branch: master
330-
only:
331-
- development
332-
333-
update_website_3.0:
334-
stage: finalize
335-
trigger:
336-
project: damask/website
337-
branch: "3.0"
338-
only:
339-
- "3.0"
340323

341324
update_statistics:
342-
stage: finalize
325+
stage: update_repositories
343326
tags:
344327
- matesting_bare-metal # could be any runner, needs git and should be fast to set up
345328
dependencies:
@@ -351,11 +334,10 @@ update_statistics:
351334
- git add performance.txt
352335
- git commit -m ${CI_PIPELINE_ID}_${CI_COMMIT_SHA}
353336
- git push
354-
only:
355-
- development
337+
rules: [if: $CI_COMMIT_BRANCH == 'development']
356338

357339
update_revision:
358-
stage: finalize
340+
stage: update_repositories
359341
tags:
360342
- matesting_bare-metal # could be any runner, needs git and should be fast to set up
361343
script:
@@ -365,7 +347,22 @@ update_revision:
365347
- echo ${VERSION:1} > VERSION
366348
- >
367349
git diff-index --quiet HEAD ||
368-
git commit VERSION -m "[skip ci] updated version information after successful test of $VERSION"
350+
git commit VERSION -m "[skip ci] updated version information after successful test of ${VERSION}"
369351
- if [ ${CI_COMMIT_SHA} == $(git rev-parse HEAD^) ]; then git push --atomic --no-verify origin HEAD:development HEAD:master; fi
370-
only:
371-
- development
352+
rules: [if: $CI_COMMIT_BRANCH == 'development']
353+
354+
###################################################################################################
355+
356+
publish_website_master:
357+
stage: documentation
358+
trigger:
359+
project: damask/website
360+
branch: master
361+
rules: [if: $CI_COMMIT_BRANCH == 'development']
362+
363+
publish_website_3.0:
364+
stage: documentation
365+
trigger:
366+
project: damask/website
367+
branch: '3.0'
368+
rules: [if: $CI_COMMIT_BRANCH == '3.0']

.gitlab/issue_templates/new_release.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Detailed instructions for each step are documented in the [wiki](https://git.dam
55
1. [ ] Update repository
66
1. [ ] Create and upload tarball
77
1. [ ] Create GitLab release
8+
1. [ ] Create GitHub release
9+
1. [ ] Fix Zenodo release
810
1. [ ] Update examples repository
911
1. [ ] Update website
1012
1. Packages

CITATION.cff

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ identifiers:
6161
description: >-
6262
D. Otto de Mentock et al.: A Python Library for Pre-
6363
and Post-Processing of DAMASK Simulations
64-
repository-code: 'https://github.com/eisenforschung/damask'
64+
repository-code: 'https://github.com/damask-multiphysics/DAMASK'
6565
url: 'https://damask-multiphysics.org'
6666
repository: 'https://doi.org/10.5281/zenodo.14586837'
6767
abstract: >-
@@ -85,9 +85,9 @@ keywords:
8585
- simulation
8686
- multi-physics
8787
license: AGPL-3.0-or-later
88-
commit: 06c6851a3f2ef5dd6e57fb7475cf646312176876
89-
version: 3.0.1
90-
date-released: '2024-10-18'
88+
commit: 810df52f6d98c0a3603c0fc88b9912c450b56e06
89+
version: 3.0.2
90+
date-released: '2024-06-09'
9191
preferred-citation:
9292
type: article
9393
authors:

CMakeLists.txt

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,49 +17,53 @@ pkg_get_variable(CMAKE_Fortran_COMPILER PETSc fcompiler)
1717
pkg_get_variable(CMAKE_C_COMPILER PETSc ccompiler)
1818
pkg_get_variable(CMAKE_CXX_COMPILER PETSc cxxcompiler)
1919

20+
# Get version
21+
file(STRINGS ${PROJECT_SOURCE_DIR}/VERSION DAMASK_VERSION_STRING)
22+
string(REPLACE "-" ";" DAMASK_VERSION_LIST "${DAMASK_VERSION_STRING}")
23+
list(LENGTH DAMASK_VERSION_LIST CHUNKS)
24+
if(CHUNKS GREATER 2)
25+
list(GET DAMASK_VERSION_LIST 0 DAMASK_VERSION_MAIN)
26+
list(GET DAMASK_VERSION_LIST 1 DAMASK_VERSION_TWEAK)
27+
list(GET DAMASK_VERSION_LIST 2 PROJECT_VERSION_HASH)
28+
set(DAMASK_VERSION_CMAKE "${DAMASK_VERSION_MAIN}.${DAMASK_VERSION_TWEAK}")
29+
else()
30+
set(DAMASK_VERSION_CMAKE "${DAMASK_VERSION_STRING}")
31+
endif()
2032
# Solver determines name of project
2133
string(TOUPPER "${DAMASK_SOLVER}" DAMASK_SOLVER_UPPER)
2234
string(TOLOWER "${DAMASK_SOLVER}" DAMASK_SOLVER_LOWER)
2335
if("${DAMASK_SOLVER_UPPER}" MATCHES "^(GRID|MESH|TEST)$")
24-
project("damask-${DAMASK_SOLVER_LOWER}" HOMEPAGE_URL https://damask-multiphysics.org LANGUAGES Fortran C CXX)
36+
project("damask-${DAMASK_SOLVER_LOWER}"
37+
DESCRIPTION "${DAMASK_SOLVER_LOWER} solver for DAMASK"
38+
HOMEPAGE_URL https://damask-multiphysics.org
39+
LANGUAGES Fortran C CXX VERSION "${DAMASK_VERSION_CMAKE}")
2540
else()
2641
message(FATAL_ERROR "Invalid solver: DAMASK_SOLVER=${DAMASK_SOLVER}")
2742
endif()
2843
add_definitions("-D${DAMASK_SOLVER_UPPER}")
2944

3045
set(CMAKE_Fortran_PREPROCESS "ON")
3146

32-
# EXPERIMENTAL: This might help to detect HDF5 and FFTW3 in the future if PETSc is not aware of them
47+
# EXPERIMENTAL: This might help to detect external packages in future if PETSc is not aware of them
3348
set(ENV{PKG_CONFIG_PATH} "$ENV{PETSC_DIR}/$ENV{PETSC_ARCH}/externalpackages:$ENV{PKG_CONFIG_PATH}")
3449
pkg_check_modules(HDF5 hdf5)
35-
pkg_check_modules(FFTW3 fftw3)
3650
pkg_check_modules(fYAML libfyaml)
51+
pkg_check_modules(LAPACK lapack)
3752
find_package(Boost)
3853
if(DAMASK_SOLVER_UPPER STREQUAL "GRID")
3954
pkg_check_modules(zlib zlib)
55+
pkg_check_modules(FFTW3 fftw3)
4056
endif()
4157

42-
file(STRINGS ${PROJECT_SOURCE_DIR}/VERSION DAMASK_VERSION)
43-
string(REPLACE "." ";" DAMASK_VERSION_LIST "${DAMASK_VERSION}")
44-
list(GET DAMASK_VERSION_LIST 0 DAMASK_VERSION_MAJOR)
45-
list(GET DAMASK_VERSION_LIST 1 DAMASK_VERSION_MINOR)
46-
list(GET DAMASK_VERSION_LIST 2 DAMASK_VERSION_PATCH)
47-
string(REPLACE "-" ";" DAMASK_VERSION_PATCH_LIST "${DAMASK_VERSION_PATCH}")
48-
list(LENGTH DAMASK_VERSION_PATCH_LIST PATCH_CHUNKS)
49-
if(PATCH_CHUNKS GREATER 1)
50-
list(GET DAMASK_VERSION_PATCH_LIST 0 DAMASK_VERSION_PATCH)
51-
list(GET DAMASK_VERSION_PATCH_LIST 2 DAMASK_VERSION_HASH)
52-
endif()
53-
54-
message("\nBuilding ${CMAKE_PROJECT_NAME} ${DAMASK_VERSION}\n")
58+
message("\nBuilding ${CMAKE_PROJECT_NAME} ${DAMASK_VERSION_STRING}\n")
5559

5660
add_definitions(-DPETSC)
57-
add_definitions(-DDAMASK_VERSION="${DAMASK_VERSION}")
58-
add_definitions(-DDAMASK_VERSION_MAJOR="${DAMASK_VERSION_MAJOR}")
59-
add_definitions(-DDAMASK_VERSION_MINOR="${DAMASK_VERSION_MINOR}")
60-
add_definitions(-DDAMASK_VERSION_PATCH="${DAMASK_VERSION_PATCH}")
61-
if(DEFINED DAMASK_VERSION_HASH)
62-
add_definitions(-DDAMASK_VERSION_HASH="${DAMASK_VERSION_HASH}")
61+
add_definitions(-DDAMASK_VERSION="${DAMASK_VERSION_STRING}")
62+
add_definitions(-DDAMASK_VERSION_MAJOR="${PROJECT_VERSION_MAJOR}")
63+
add_definitions(-DDAMASK_VERSION_MINOR="${PROJECT_VERSION_MINOR}")
64+
add_definitions(-DDAMASK_VERSION_PATCH="${PROJECT_VERSION_PATCH}")
65+
if(DEFINED PROJECT_VERSION_HASH)
66+
add_definitions(-DDAMASK_VERSION_HASH="${PROJECT_VERSION_HASH}")
6367
endif()
6468

6569
add_definitions(-DCMAKE_SYSTEM_NAME="${CMAKE_SYSTEM_NAME}")
@@ -169,7 +173,8 @@ endif()
169173

170174
set(CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${PETSC_INCLUDES} ${BUILDCMD_POST}")
171175

172-
set(CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -L${PETSC_LIBRARY_DIRS} -lpetsc ${PETSC_EXTERNAL_LIB}")
176+
set(CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -L${PETSC_LIBRARY_DIRS} -lpetsc ${PETSC_EXTERNAL_LIB}")
177+
173178
if(DAMASK_SOLVER_UPPER STREQUAL "GRID")
174179
set(CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} -lz")
175180
endif()

PRIVATE

cmake/Compiler-GNU.cmake

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@ elseif (OPTIMIZATION STREQUAL "AGGRESSIVE")
1717
set (OPTIMIZATION_FLAGS "-O3 -march=native -funroll-loops -ftree-vectorize -flto")
1818
endif ()
1919

20-
set (STANDARD_CHECK "-std=f2018 -pedantic-errors" )
20+
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 14)
21+
set (STANDARD_CHECK "-std=f2018 -pedantic-errors" )
22+
else ()
23+
set (STANDARD_CHECK "-std=f2023 -pedantic-errors" )
24+
endif ()
25+
26+
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 12)
27+
add_definitions(-DOLD_STYLE_C_TO_FORTRAN_STRING)
28+
endif ()
2129

2230
#------------------------------------------------------------------------------------------------
2331
# Fine tuning compilation options

codemeta.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@
8686
],
8787
"codeRepository": "https://github.com/damask-multiphysics/DAMASK.git",
8888
"dateCreated": "2007-03-20",
89-
"dateModified": "2024-10-18",
89+
"dateModified": "2025-06-09",
9090
"datePublished": "2012-11-15",
9191
"description": "DAMASK® is 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.",
92-
"downloadUrl": "https://damask-multiphysics.org/download/damask-3.0.1.tar.xz",
92+
"downloadUrl": "https://damask-multiphysics.org/download/damask-3.0.2.tar.xz",
9393
"identifier": "10.5281/zenodo.14586837",
9494
"keywords": [
9595
"crystal plasticity",
@@ -108,7 +108,7 @@
108108
"Python"
109109
],
110110
"softwareRequirements": "PETSc, FFTW, zlib, HDF5, Python, pandas, NumPy, SciPy, h5py, VTK, Matplotlib, PyYAML",
111-
"version": "3.0.1",
111+
"version": "3.0.2",
112112
"developmentStatus": "active",
113113
"referencePublication": "https://doi.org/10.1016/j.commatsci.2018.04.030"
114114
}

python/damask/_orientation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def __ne__(self,
192192
other : Orientation
193193
Orientation to check for equality.
194194
"""
195-
return np.logical_not(self==other)
195+
return np.logical_not(self==other) if isinstance(other, Orientation) else NotImplemented
196196

197197

198198
def isclose(self: MyType,

python/damask/_rotation.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def __ne__(self,
169169
other : Rotation
170170
Rotation to check for inequality.
171171
"""
172-
return np.logical_not(self==other)
172+
return np.logical_not(self==other) if isinstance(other, Rotation) else NotImplemented
173173

174174

175175
def isclose(self: MyType,
@@ -238,17 +238,16 @@ def shape(self) -> tuple[int, ...]:
238238
return self.quaternion[...,0].shape
239239

240240

241-
def __array__(self,dtype = None,copy: Optional[bool] = None) -> np.ndarray:
241+
def __array__(self: MyType,
242+
dtype: Optional[npt.DTypeLike] = None,
243+
*,
244+
copy: Optional[bool] = None) -> np.ndarray:
242245
"""Initializer for numpy."""
243-
if dtype is None or dtype == self.quaternion.dtype:
244-
return self.quaternion.copy() if copy is True else self.quaternion
245-
elif copy is not False:
246-
return self.quaternion.astype(dtype)
247-
else:
248-
raise ValueError("`copy=False` isn't supported for mismatching `dtype`")
246+
return self.quaternion.__array__(dtype) if np.lib.NumpyVersion(np.__version__) < '2.0.0' else \
247+
self.quaternion.__array__(dtype,copy=copy) # type: ignore[arg-type]
249248

250249

251-
def __len__(self) -> int:
250+
def __len__(self: MyType) -> int:
252251
"""
253252
Return len(self).
254253

0 commit comments

Comments
 (0)