Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
class_topology_unit_test Namespace Reference

Classes

class  Testing
 

Functions

def test0
 
def test1
 
def test2
 
def test3
 
def test4
 
def test5
 
def test6
 
def test8
 

Function Documentation

def class_topology_unit_test.test0 (   self)

Definition at line 25 of file class_topology_unit_test.py.

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

Definition at line 30 of file class_topology_unit_test.py.

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

Definition at line 35 of file class_topology_unit_test.py.

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

Definition at line 40 of file class_topology_unit_test.py.

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

Definition at line 45 of file class_topology_unit_test.py.

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

Definition at line 50 of file class_topology_unit_test.py.

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

Definition at line 55 of file class_topology_unit_test.py.

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

Definition at line 60 of file class_topology_unit_test.py.

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