  Dislocations corresponding to a change of stacking in two-dimensional
hexagonal bilayers, graphene and boron nitride, and associated with boundaries
between commensurate domains are investigated using the two-chain
Frenkel-Kontorova model on top of ab initio calculations. Structural
transformations of bilayers in which the bottom layer is stretched and the
upper one is left to relax freely are considered for gradually increased
elongation of the bottom layer. Formation energies of dislocations, dislocation
width and orientation of the boundary between commensurate domains are analyzed
depending on the magnitude and direction of elongation. The second-order phase
transition from the commensurate phase to the incommensurate one with multiple
dislocations is predicted to take place at some critical elongation. The order
parameter for this transition corresponds to the density of dislocations, which
grows continuously upon increasing the elongation of the bottom layer above the
critical value. In graphene and metastable boron nitride with the layers
aligned in the same direction, where elementary dislocations are partial, this
transition, however, is preceded by formation of the first dislocation at the
elongation smaller than the critical one. The phase diagrams including this
intermediate state are plotted in coordinates of the magnitude and direction of
elongation of the bottom layer.
