Representation of a two-spin interaction.
More...
#include <LatticeModelFactory.hpp>
|
LatticeSite | from |
| Site from which the interaction emanates.
|
|
LatticeSite | to |
| Site to which the interaction couples.
|
|
float | interactionStrength [3][3] |
| Interaction strength, encoded as interactionStrength[s1][s2], where s1 is the x, y, or z (0, 1, or 2) component of the first spin and s2 is the component of the second spin.
|
|
Representation of a two-spin interaction.
◆ SpinInteraction()
Construct a two-spin interaction between two lattice sites and set the interaction strength to zero.
- Parameters
-
from | First interaction site. |
to | Second interaction site. |
◆ isConnectingFromTo()
bool LatticeModelFactory::SpinInteraction::isConnectingFromTo |
( |
const LatticeSite & |
siteFrom, |
|
|
const LatticeSite & |
siteTo |
|
) |
| const |
Determine whether the spin interaction couples two lattice sites.
- Parameters
-
siteFrom | Site from which the interaction emanates. |
siteTo | Site to which the interaction couples. |
- Returns
- bool Returns true if the interaction couples the two lattice sites. Returns false otherwise.
◆ isConnectingSites()
int LatticeModelFactory::SpinInteraction::isConnectingSites |
( |
const LatticeSite & |
site1, |
|
|
const LatticeSite & |
site2 |
|
) |
| const |
Determine whether the spin interaction couples two lattice sites, neglecting its orientation.
- Parameters
-
site1 | Site from which the interaction emanates.
|
site2 | Site to which the interaction couples. |
- Returns
- int Returns 1 if the interaction connects the two sites and the orientation matches. Returns -1 if the orientation does not match. Returns zero if the sites are not connecte by the interaction.
◆ operator+=()
Addition assignment operator. Adds the interaction strength of a second SpinInteraction object describing coupling between the same two sites.
- Parameters
-
rhs | Right hand site operand. |
- Returns
- SpinInteraction& Reference to self.
The documentation for this struct was generated from the following files: