Processing Tools#

The Python package damask contains versatile tools for pre and post-processing. The Index gives a list of all available functions in alphabetical order.

Relevant Python classes for the different tasks include:


A typical pre- or post-processing job starts with:

import numpy as np
import matplotlib.pyplot as plt
import damask


As is standard, the Python help function is applicable with all damask classes and their methods/attributes, e.g.:

>>> help(damask.GeomGrid.from_Voronoi_tessellation)

Help on function from_Voronoi_tessellation in module damask._grid:

from_Voronoi_tessellation(cells: Union[numpy.ndarray, Sequence[int]], size: Union[numpy.ndarray, Sequence[float]], seeds: numpy.ndarray, material: Union[numpy.ndarray, Sequence[int], NoneType] = None, periodic: bool = True) -> 'Grid'
   Create grid from Voronoi tessellation.

   cells : sequence of int, len (3)
      Cell counts along x,y,z direction.
   size : sequence of float, len (3)
      Edge lengths of the grid in meter.
   seeds : numpy.ndarray of float, shape (:,3)
      Position of the seed points in meter. All points need to lay within the box.
   material : sequence of int, len (seeds.shape[0]), optional
      Material ID of the seeds.
      Defaults to None, in which case materials are consecutively numbered.
   periodic : bool, optional
      Assume grid to be periodic. Defaults to True.

   new : damask.GeomGrid
      GeomGrid-based geometry from tessellation.

Moreover, many Python IDEs offer code completion features that present similar help.