### Syntax

`[m, asym] = sw_basismat(symop, r, tol)`

### Description

`[m, asym] = sw_basismat(symop, r, tol)`

determines the allowed tensor
elements compatible with a given point group symmetry. The tensor can
describe exchange interaction or single ion anisotropy. The function
applies the symmetry invariance of the classical energy
. Thus this symmetry
analysis includes the transformation properties of spin operators as
well.

### Input Arguments

`symOp`

- Generators of the point group symmetry, in a matrix with dimensions of
where each
`symOp(:,:,ii)`

matrix defines a rotation. `r`

- Distance column vector between the two interacting atoms. For anisotropy .
`tol`

- Tolerance, optional, default value is .

### Output Arguments

`M`

- Matrices, that span out the vector space of the symmetry allowed matrices, dimensions are . Any matrix is allowed that can be expressed as a linear combination of the symmetry allowed matrices.
`asym`

- Logical vector, for each matrix in , tells whether it is antisymmetric stored in a row vector with elements.