Beispiel #1
0
        public void TestNeighborHood()
        {
            var theMesh = new GlobalMesh(1000);
            var nr      = theMesh.MeshNumber(Constants.MyHome);
            var n0      = theMesh.Neighborhood(nr, 0);

            Assert.AreEqual(n0.Count, 1);
            Assert.AreEqual(n0[0], nr);
            var n1 = theMesh.Neighborhood(nr, 1);

            Assert.AreEqual(n1.Count, 8);
            var n2 = theMesh.Neighborhood(nr, 2);

            Assert.AreEqual(n2.Count, 16);
            var n3 = theMesh.Neighborhood(nr, 3);

            Assert.AreEqual(n3.Count, 24);
        }
        public void TestNeighborHood()
        {
            var theMesh = new GlobalMesh(1000);
            var nr      = theMesh.MeshNumber(Constants.MyHome);
            var n0      = theMesh.Neighborhood(nr, 0);

            Assert.IsTrue(n0.Count == 1);
            Assert.AreEqual(nr, n0[0]);
            var n1 = theMesh.Neighborhood(nr, 1);

            Assert.AreEqual(8, n1.Count);
            var n2 = theMesh.Neighborhood(nr, 2);

            Assert.AreEqual(16, n2.Count);
            var n3 = theMesh.Neighborhood(nr, 3);

            Assert.AreEqual(24, n3.Count);
        }