Nektar++
Classes | Functions
class_topology_unit_test Namespace Reference

Classes

class  Testing
 

Functions

def test0 (self)
 
def test1 (self)
 
def test2 (self)
 
def test3 (self)
 
def test4 (self)
 
def test5 (self)
 
def test6 (self)
 
def test8 (self)
 

Function Documentation

◆ test0()

def class_topology_unit_test.test0 (   self)

Definition at line 25 of file class_topology_unit_test.py.

25  def test0(self):
26  test_case = Topology(5, 4, 10, 2)
27  self.assertEqual(test_case.PROC_TOT, 20)
28 
29 # Check for correct basic core labeling

◆ test1()

def class_topology_unit_test.test1 (   self)

Definition at line 30 of file class_topology_unit_test.py.

30  def test1(self):
31  test_case = Topology(2, 5, 10, 2)
32  self.assertEqual(test_case.Core, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
33 
34 # Check for basic socket labeling

◆ test2()

def class_topology_unit_test.test2 (   self)

Definition at line 35 of file class_topology_unit_test.py.

35  def test2(self):
36  test_case = Topology(2, 5, 5, 1)
37  self.assertEqual(test_case.Socket, [0, 0, 0, 0, 0, 1, 1, 1, 1, 1])
38 
39 # Check for basic node labeling

◆ test3()

def class_topology_unit_test.test3 (   self)

Definition at line 40 of file class_topology_unit_test.py.

40  def test3(self):
41  test_case = Topology(2, 5, 2, 1)
42  self.assertEqual(test_case.Node, [0, 0, 1, 1, 2, 2, 3, 3, 4, 4])
43 
44 # Check neighbours that are identical

◆ test4()

def class_topology_unit_test.test4 (   self)

Definition at line 45 of file class_topology_unit_test.py.

45  def test4(self):
46  test_case = Topology(2, 5, 5, 1)
47  self.assertEqual(test_case.Check_Neighbour(0, 0), 0)
48 
49 # Check neighbours that are on same socket

◆ test5()

def class_topology_unit_test.test5 (   self)

Definition at line 50 of file class_topology_unit_test.py.

50  def test5(self):
51  test_case = Topology(2, 5, 5, 2)
52  self.assertEqual(test_case.Check_Neighbour(0, 1), 1)
53 
54 # Check neighbours that are on same node

◆ test6()

def class_topology_unit_test.test6 (   self)

Definition at line 55 of file class_topology_unit_test.py.

55  def test6(self):
56  test_case = Topology(2, 5, 5, 2)
57  self.assertEqual(test_case.Check_Neighbour(0, 8), 2)
58 
59 # Check neighbours that are on different nodes

◆ test8()

def class_topology_unit_test.test8 (   self)

Definition at line 60 of file class_topology_unit_test.py.

60  def test8(self):
61  test_case = Topology(4, 5, 2, 2)
62  self.assertEqual(test_case.Check_Neighbour(0, 9), 3)
63 
64