## grain_num

### Syntax

grain_num grain_number

• grain_number = positive integer

### Examples

grain_num 2


### Description

This command sets the number of grains in the simulation cell. When grain_number > 1, grains are stacked along the grain stack direction. Each grain has its own crystallographic orientations, origin displacements, and number of subdomains.

In commands grain_mat, grain_move, subdomain, unit_num, and unit_type, all information related to grain_id that is larger than grain_number in this command will be discarded.

This command becomes irrelevant when boolean_restart = t, in which case there is no need for the grain information.

box_init.f90 and grain.f90

### Default

grain_num 1