Grid Solver

1. Pre-Processing

Besides the material configuration (material.yaml), pre-processing for the grid solver needs to result in two files:

Grid solver geometry file *.vtr

The geometry file defines the layout of the Volume Element. The Python library includes functionality for geometry file generation and manipulation. Also see the application examples.

Grid solver loadfile *.yaml

The loadfile defines the loadcases for a simulation run. The Python library includes functionality for load file generation. The file format is documented here.


A collection of example files can be downloaded here .



2. Run

Basic invocation

To start a simulation imposing a load defined in FileNameOfLoad.yaml on NameOfGeomFile.vtr, type


DAMASK_grid --geom PathToGeomFile/NameOfGeomFile.vtr --load PathToLoadFile/FileNameOfLoad.yaml


Thread parallelism (openMP)

export OMP_TREADS=4

Node parallelism

The solver can use an MPI environment to decompose the geometry into multiple domains that get solved in parallel. For this, the grid dimension along z has to be an integer multiple of the intended number of domains (compute nodes) to be used. For instance, using four domains could be invoked by

mpiexec -np 4 DAMASK_grid --load loadcase --geom geometry


mpirun -np 4 DAMASK_grid --load loadcase --geom geometry


Valid command line arguments

Invoke the executable with the --help option for an overview of command line arguments. An overview of all arguments is given in the table below.

DAMASK_grid --help

comand line argument Meaning
--geom / -g / --geometry Specifies the location of the geometry definition file
--load / -l / --loadcase Specifies the location of the load case definition file
--workingdir / -w / --wd / --workingdirectory Specifies the working directory
--restart / -r / --rs XX Reads in total increment No. XX and continues to calculate total increment No. XX+1
Appends to existing results file
--help / -h Prints help message and exits


Working directory

The configuration files must be located (also see general steps) in the working directory, i.e. the location where DAMASK_grid is invoked. The command line switch --workingdir can be used to specify another working directory:

DAMASK_grid --geom PathToGeomFile/NameOfGeomFile.vtr --load PathToLoadFile/NameOfLoadFile.yaml --workingdir PathToWorkingDir

Solver job name

The SolverJobName is the base name of the geom file and the base name of the load case file concatenated by an underscore »_«. For the command

DAMASK_grid --geom PathToGeomFile/NameOfGeomFile.vtr --load PathToLoadFile/NameOfLoadFile.yaml

the solver job name will be NameOfGeomFile_NameOfLoadFile.* and placed in PathToGeomFile. All output files, i.e. result files, restart information and DAMASK files will share that base name.




To enable restart, set a restart write frequency in the load case file. This will trigger the writing of all necessary information for restarting an aborted simulation.

Additionally, the files needed by DAMASK for restart are required. To restart a simulation aborted after increment XX, call the spectral solver to start with calculation at step XX+1

DAMASK_grid --geom PathToGeomFile/NameOfGeomFile.vtr --load PathToLoadFile/NameOfLoadFile.yaml[--workingdir PathToWorkingDir] --restart XX

The output results will be appended to SolverJobName.hdf5, if results were written to that file after writing the restart information, they will appear double. It works only if the restart information for total increment XX and the usual configuration files are available in the working directory. Please Note: The solver cannot determine to which increment the restart information belongs. It is highly recommended to backup the output file (*.hdf5) before restarting the calculation.