2 Dimensional Ising Model
Simulate the change in energy and magnetization in a ferro magnet
Loading...
Searching...
No Matches
test_suite.cpp File Reference

Sweep over different temperatures and generate data. More...

#include "IsingModel.hpp"
#include "testlib.hpp"

Go to the source code of this file.

Classes

class  IsingModelTest
 Test class for the Ising model. More...
 

Macros

#define EPS_2   (-2 * std::sinh(8.)) / (std::cosh(8.) + 3)
 The analytic expected energy for a \( 2 \times 2 \) lattice.
 
#define MAG_2   (std::exp(8.) + 1) / (2 * (cosh(8.) + 3))
 The analytic expected magnetization for a \( 2 \times 2 \) lattice.
 
#define CV_2    16 * (3 * std::cosh(8.) + 1) / ((std::cosh(8.) + 3) * (std::cosh(8.) + 3))
 The analytic heat capacity for a \( 2 \times 2 \) lattice.
 
#define X_2
 The analytic susceptibility for a \( 2 \times 2 \) lattice.
 

Functions

int main ()
 The main function.
 

Detailed Description

Sweep over different temperatures and generate data.

Author
Cory Alexander Balaton (coryab)
Janita Ovidie Sandtrøen Willumsen (janitaws)
Version
1.0
Bug:
No known bugs

Definition in file test_suite.cpp.

Macro Definition Documentation

◆ CV_2

#define CV_2    16 * (3 * std::cosh(8.) + 1) / ((std::cosh(8.) + 3) * (std::cosh(8.) + 3))

The analytic heat capacity for a \( 2 \times 2 \) lattice.

Definition at line 26 of file test_suite.cpp.

◆ EPS_2

#define EPS_2   (-2 * std::sinh(8.)) / (std::cosh(8.) + 3)

The analytic expected energy for a \( 2 \times 2 \) lattice.

Definition at line 17 of file test_suite.cpp.

◆ MAG_2

#define MAG_2   (std::exp(8.) + 1) / (2 * (cosh(8.) + 3))

The analytic expected magnetization for a \( 2 \times 2 \) lattice.

Definition at line 22 of file test_suite.cpp.

◆ X_2

#define X_2
Value:
(3 * std::exp(8.) + std::exp(-8.) + 3) \
/ ((std::cosh(8.) + 3) * (std::cosh(8.) + 3))

The analytic susceptibility for a \( 2 \times 2 \) lattice.

Definition at line 30 of file test_suite.cpp.

Function Documentation

◆ main()

int main ( )

The main function.

Definition at line 110 of file test_suite.cpp.