44 unsigned numNodesUp,
unsigned numElementsUp,
unsigned elementHeight,
45 unsigned numNodesDeep,
unsigned numElementsDeep,
unsigned elementDepth,
46 bool startAtBottomLeft,
bool isPeriodicInX,
bool isPeriodicInY ,
bool isPeriodicInZ)
48 assert(numNodesAcross > 0);
49 assert(numNodesUp > 0);
50 assert(numNodesDeep > 0);
52 assert(numElementsAcross*elementWidth <= numNodesAcross);
53 assert(numElementsUp*elementHeight <= numNodesUp);
54 assert(numElementsDeep*elementDepth <= numNodesDeep);
56 std::vector<Node<DIM>*> nodes;
57 std::vector<PottsElement<DIM>*> elements;
58 std::vector<std::set<unsigned> > moore_neighbours;
59 std::vector<std::set<unsigned> > von_neumann_neighbours;
61 unsigned num_nodes = numNodesAcross*numNodesUp*numNodesDeep;
63 unsigned next_node_index = 0;
64 boost::scoped_array<unsigned> node_indices(
new unsigned[elementWidth*elementHeight*elementDepth]);
65 unsigned element_index;
67 unsigned index_offset = 0;
69 if (!startAtBottomLeft)
72 unsigned across_gap = (numNodesAcross - numElementsAcross*elementWidth)/2;
73 unsigned up_gap = (numNodesUp - numElementsUp*elementHeight)/2;
74 unsigned deep_gap = (numNodesDeep - numElementsDeep*elementDepth)/2;
76 index_offset = deep_gap*numNodesAcross*numNodesUp + up_gap*numNodesAcross + across_gap;
85 for (
unsigned k=0; k<numNodesDeep; k++)
87 for (
unsigned j=0; j<numNodesUp; j++)
89 for (
unsigned i=0; i<numNodesAcross; i++)
91 bool is_boundary_node=
false;
94 is_boundary_node = (j==0 || j==numNodesUp-1 || (i==0 && !isPeriodicInX) || (i==numNodesAcross-1 && !isPeriodicInX) ) ?
true :
false;
98 is_boundary_node = (j==0 || j==numNodesUp-1 || (i==0 && !isPeriodicInX) || (i==numNodesAcross-1 && !isPeriodicInX) || k==0 || k==numNodesDeep-1) ?
true :
false;
101 nodes.push_back(p_node);
106 assert(nodes.size()==num_nodes);
112 for (
unsigned n=0; n<numElementsDeep; n++)
114 for (
unsigned j=0; j<numElementsUp; j++)
116 for (
unsigned i=0; i<numElementsAcross; i++)
118 for (
unsigned m=0; m<elementDepth; m++)
120 for (
unsigned l=0; l<elementHeight; l++)
122 for (
unsigned k=0; k<elementWidth; k++)
124 node_indices[m*elementHeight*elementWidth + l*elementWidth + k] = n*elementDepth*numNodesUp*numNodesAcross +
125 j*elementHeight*numNodesAcross +
127 m*numNodesAcross*numNodesUp +
133 std::vector<Node<DIM>*> element_nodes;
134 for (
unsigned k=0; k<elementDepth*elementHeight*elementWidth; k++)
136 element_nodes.push_back(nodes[node_indices[k]]);
139 element_index = n*numElementsAcross*numElementsUp + j*numElementsAcross + i;
141 elements.push_back(p_element);
150 moore_neighbours.resize(num_nodes);
151 von_neumann_neighbours.resize(num_nodes);
153 for (
unsigned node_index=0; node_index<num_nodes; node_index++)
157 moore_neighbours[node_index].clear();
177 std::vector<unsigned> moore_neighbour_indices_vector(8, node_index);
178 moore_neighbour_indices_vector[0] += numNodesAcross;
179 moore_neighbour_indices_vector[1] += numNodesAcross - 1;
180 moore_neighbour_indices_vector[2] -= 1;
181 moore_neighbour_indices_vector[3] -= numNodesAcross + 1;
182 moore_neighbour_indices_vector[4] -= numNodesAcross;
183 moore_neighbour_indices_vector[5] -= numNodesAcross - 1;
184 moore_neighbour_indices_vector[6] += 1;
185 moore_neighbour_indices_vector[7] += numNodesAcross + 1;
188 bool on_south_edge = (node_index < numNodesAcross);
189 bool on_north_edge = ((int) node_index > (
int)numNodesAcross*((int)numNodesUp - 1) - 1);
190 bool on_west_edge = (node_index%numNodesAcross == 0);
191 bool on_east_edge = (node_index%numNodesAcross == numNodesAcross - 1);
197 moore_neighbour_indices_vector[1] = node_index + 2*numNodesAcross - 1;
198 moore_neighbour_indices_vector[2] = node_index + numNodesAcross - 1;
199 moore_neighbour_indices_vector[3] = node_index - 1;
204 moore_neighbour_indices_vector[5] = node_index - 2*numNodesAcross + 1;
205 moore_neighbour_indices_vector[6] = node_index - numNodesAcross + 1;
206 moore_neighbour_indices_vector[7] = node_index + 1;
214 moore_neighbour_indices_vector[0] = node_index - numNodesAcross*(numNodesUp-1);
215 moore_neighbour_indices_vector[1] = moore_neighbour_indices_vector[0] - 1;
216 moore_neighbour_indices_vector[7] = moore_neighbour_indices_vector[0] + 1;
220 moore_neighbour_indices_vector[1] = moore_neighbour_indices_vector[1] + numNodesAcross;
224 moore_neighbour_indices_vector[7] = moore_neighbour_indices_vector[7] - numNodesAcross;
230 moore_neighbour_indices_vector[4] = node_index + numNodesAcross*(numNodesUp-1);
231 moore_neighbour_indices_vector[3] = moore_neighbour_indices_vector[4] - 1;
232 moore_neighbour_indices_vector[5] = moore_neighbour_indices_vector[4] + 1;
236 moore_neighbour_indices_vector[3] = moore_neighbour_indices_vector[3] + numNodesAcross;
240 moore_neighbour_indices_vector[5] = moore_neighbour_indices_vector[5] - numNodesAcross;
247 on_east_edge =
false;
248 on_west_edge =
false;
252 on_south_edge =
false;
253 on_north_edge =
false;
258 std::vector<bool> available_neighbours = std::vector<bool>(8,
true);
259 available_neighbours[0] = !on_north_edge;
260 available_neighbours[1] = !(on_north_edge || on_west_edge);
261 available_neighbours[2] = !on_west_edge;
262 available_neighbours[3] = !(on_south_edge || on_west_edge);
263 available_neighbours[4] = !on_south_edge;
264 available_neighbours[5] = !(on_south_edge || on_east_edge);
265 available_neighbours[6] = !on_east_edge;
266 available_neighbours[7] = !(on_north_edge || on_east_edge);
269 for (
unsigned i=0; i<8; i++)
271 if (available_neighbours[i])
273 assert(moore_neighbour_indices_vector[i] < nodes.size());
274 moore_neighbours[node_index].insert(moore_neighbour_indices_vector[i]);
295 std::vector<unsigned> moore_neighbour_indices_vector(26, node_index);
296 moore_neighbour_indices_vector[0] += numNodesAcross;
297 moore_neighbour_indices_vector[1] += numNodesAcross - 1;
298 moore_neighbour_indices_vector[2] -= 1;
299 moore_neighbour_indices_vector[3] -= numNodesAcross + 1;
300 moore_neighbour_indices_vector[4] -= numNodesAcross;
301 moore_neighbour_indices_vector[5] -= numNodesAcross - 1;
302 moore_neighbour_indices_vector[6] += 1;
303 moore_neighbour_indices_vector[7] += numNodesAcross + 1;
304 moore_neighbour_indices_vector[8] -= numNodesAcross*numNodesUp;
305 for (
unsigned i=9; i<17; i++)
307 moore_neighbour_indices_vector[i] = moore_neighbour_indices_vector[i-9]-numNodesAcross*numNodesUp;
309 moore_neighbour_indices_vector[17] += numNodesAcross*numNodesUp;
310 for (
unsigned i=18; i<26; i++)
312 moore_neighbour_indices_vector[i]=moore_neighbour_indices_vector[i-18]+numNodesAcross*numNodesUp;
316 bool on_south_edge = (node_index%(numNodesAcross*numNodesUp)<numNodesAcross);
317 bool on_north_edge = (node_index%(numNodesAcross*numNodesUp)>(numNodesAcross*numNodesUp-numNodesAcross-1));
318 bool on_west_edge = (node_index%numNodesAcross == 0);
319 bool on_east_edge = (node_index%numNodesAcross == numNodesAcross - 1);
320 bool on_front_edge = (node_index < numNodesAcross*numNodesUp);
321 bool on_back_edge = (node_index > numNodesAcross*numNodesUp*(numNodesDeep-1)-1);
327 moore_neighbour_indices_vector[1] = node_index + 2*numNodesAcross - 1;
328 moore_neighbour_indices_vector[2] = node_index + numNodesAcross - 1;
329 moore_neighbour_indices_vector[3] = node_index - 1;
331 moore_neighbour_indices_vector[10] = moore_neighbour_indices_vector[1] - numNodesAcross*numNodesUp;
332 moore_neighbour_indices_vector[11] = moore_neighbour_indices_vector[2] - numNodesAcross*numNodesUp;
333 moore_neighbour_indices_vector[12] = moore_neighbour_indices_vector[3] - numNodesAcross*numNodesUp;
335 moore_neighbour_indices_vector[19] = moore_neighbour_indices_vector[1] + numNodesAcross*numNodesUp;
336 moore_neighbour_indices_vector[20] = moore_neighbour_indices_vector[2] + numNodesAcross*numNodesUp;
337 moore_neighbour_indices_vector[21] = moore_neighbour_indices_vector[3] + numNodesAcross*numNodesUp;
342 moore_neighbour_indices_vector[5] = node_index - 2*numNodesAcross + 1;
343 moore_neighbour_indices_vector[6] = node_index - numNodesAcross + 1;
344 moore_neighbour_indices_vector[7] = node_index + 1;
346 moore_neighbour_indices_vector[14] = moore_neighbour_indices_vector[5] - numNodesAcross*numNodesUp;
347 moore_neighbour_indices_vector[15] = moore_neighbour_indices_vector[6] - numNodesAcross*numNodesUp;
348 moore_neighbour_indices_vector[16] = moore_neighbour_indices_vector[7] - numNodesAcross*numNodesUp;
350 moore_neighbour_indices_vector[23] = moore_neighbour_indices_vector[5] + numNodesAcross*numNodesUp;
351 moore_neighbour_indices_vector[24] = moore_neighbour_indices_vector[6] + numNodesAcross*numNodesUp;
352 moore_neighbour_indices_vector[25] = moore_neighbour_indices_vector[7] + numNodesAcross*numNodesUp;
360 moore_neighbour_indices_vector[0] = node_index - numNodesAcross*(numNodesUp-1);
361 moore_neighbour_indices_vector[1] = moore_neighbour_indices_vector[0] - 1;
362 moore_neighbour_indices_vector[7] = moore_neighbour_indices_vector[0] + 1;
364 moore_neighbour_indices_vector[10] = moore_neighbour_indices_vector[1] - numNodesAcross*numNodesUp;
365 moore_neighbour_indices_vector[9] = moore_neighbour_indices_vector[0] - numNodesAcross*numNodesUp;
366 moore_neighbour_indices_vector[16] = moore_neighbour_indices_vector[7] - numNodesAcross*numNodesUp;
368 moore_neighbour_indices_vector[19] = moore_neighbour_indices_vector[1] + numNodesAcross*numNodesUp;
369 moore_neighbour_indices_vector[18] = moore_neighbour_indices_vector[0] + numNodesAcross*numNodesUp;
370 moore_neighbour_indices_vector[25] = moore_neighbour_indices_vector[7] + numNodesAcross*numNodesUp;
374 moore_neighbour_indices_vector[1] = moore_neighbour_indices_vector[1] + numNodesAcross;
375 moore_neighbour_indices_vector[10] = moore_neighbour_indices_vector[10] + numNodesAcross;
376 moore_neighbour_indices_vector[19] = moore_neighbour_indices_vector[19] + numNodesAcross;
380 moore_neighbour_indices_vector[7] = moore_neighbour_indices_vector[7] - numNodesAcross;
381 moore_neighbour_indices_vector[16] = moore_neighbour_indices_vector[16] - numNodesAcross;
382 moore_neighbour_indices_vector[25] = moore_neighbour_indices_vector[25] - numNodesAcross;
388 moore_neighbour_indices_vector[4] = node_index + numNodesAcross*(numNodesUp-1);
389 moore_neighbour_indices_vector[3] = moore_neighbour_indices_vector[4] - 1;
390 moore_neighbour_indices_vector[5] = moore_neighbour_indices_vector[4] + 1;
392 moore_neighbour_indices_vector[12] = moore_neighbour_indices_vector[3] - numNodesAcross*numNodesUp;
393 moore_neighbour_indices_vector[13] = moore_neighbour_indices_vector[4] - numNodesAcross*numNodesUp;
394 moore_neighbour_indices_vector[14] = moore_neighbour_indices_vector[5] - numNodesAcross*numNodesUp;
396 moore_neighbour_indices_vector[21] = moore_neighbour_indices_vector[3] + numNodesAcross*numNodesUp;
397 moore_neighbour_indices_vector[22] = moore_neighbour_indices_vector[4] + numNodesAcross*numNodesUp;
398 moore_neighbour_indices_vector[23] = moore_neighbour_indices_vector[5] + numNodesAcross*numNodesUp;
402 moore_neighbour_indices_vector[3] = moore_neighbour_indices_vector[3] + numNodesAcross;
403 moore_neighbour_indices_vector[12] = moore_neighbour_indices_vector[12] + numNodesAcross;
404 moore_neighbour_indices_vector[21] = moore_neighbour_indices_vector[21] + numNodesAcross;
408 moore_neighbour_indices_vector[5] = moore_neighbour_indices_vector[5] - numNodesAcross;
409 moore_neighbour_indices_vector[14] = moore_neighbour_indices_vector[14] - numNodesAcross;
410 moore_neighbour_indices_vector[23] = moore_neighbour_indices_vector[23] - numNodesAcross;
419 moore_neighbour_indices_vector[17] = node_index - numNodesAcross*numNodesUp*(numNodesDeep-1);
420 moore_neighbour_indices_vector[20] = moore_neighbour_indices_vector[17] - 1;
421 moore_neighbour_indices_vector[24] = moore_neighbour_indices_vector[17] + 1;
423 moore_neighbour_indices_vector[21] = moore_neighbour_indices_vector[20] - numNodesAcross;
424 moore_neighbour_indices_vector[22] = moore_neighbour_indices_vector[17] - numNodesAcross;
425 moore_neighbour_indices_vector[23] = moore_neighbour_indices_vector[24] - numNodesAcross;
427 moore_neighbour_indices_vector[19] = moore_neighbour_indices_vector[20] + numNodesAcross;
428 moore_neighbour_indices_vector[18] = moore_neighbour_indices_vector[17] + numNodesAcross;
429 moore_neighbour_indices_vector[25] = moore_neighbour_indices_vector[24] + numNodesAcross;
433 moore_neighbour_indices_vector[19] = moore_neighbour_indices_vector[19] + numNodesAcross;
434 moore_neighbour_indices_vector[20] = moore_neighbour_indices_vector[20] + numNodesAcross;
435 moore_neighbour_indices_vector[21] = moore_neighbour_indices_vector[21] + numNodesAcross;
439 moore_neighbour_indices_vector[23] = moore_neighbour_indices_vector[23] - numNodesAcross;
440 moore_neighbour_indices_vector[24] = moore_neighbour_indices_vector[24] - numNodesAcross;
441 moore_neighbour_indices_vector[25] = moore_neighbour_indices_vector[25] - numNodesAcross;
446 moore_neighbour_indices_vector[21] = moore_neighbour_indices_vector[21] + numNodesAcross*numNodesUp;
447 moore_neighbour_indices_vector[22] = moore_neighbour_indices_vector[22] + numNodesAcross*numNodesUp;
448 moore_neighbour_indices_vector[23] = moore_neighbour_indices_vector[23] + numNodesAcross*numNodesUp;
453 moore_neighbour_indices_vector[18] = moore_neighbour_indices_vector[18] - numNodesAcross*numNodesUp;
454 moore_neighbour_indices_vector[19] = moore_neighbour_indices_vector[19] - numNodesAcross*numNodesUp;
455 moore_neighbour_indices_vector[25] = moore_neighbour_indices_vector[25] - numNodesAcross*numNodesUp;
461 moore_neighbour_indices_vector[8] = node_index + numNodesAcross*numNodesUp*(numNodesDeep-1);
462 moore_neighbour_indices_vector[11] = moore_neighbour_indices_vector[8] - 1;
463 moore_neighbour_indices_vector[15] = moore_neighbour_indices_vector[8] + 1;
465 moore_neighbour_indices_vector[12] = moore_neighbour_indices_vector[11] - numNodesAcross;
466 moore_neighbour_indices_vector[13] = moore_neighbour_indices_vector[8] - numNodesAcross;
467 moore_neighbour_indices_vector[14] = moore_neighbour_indices_vector[15] - numNodesAcross;
469 moore_neighbour_indices_vector[10] = moore_neighbour_indices_vector[11] + numNodesAcross;
470 moore_neighbour_indices_vector[9] = moore_neighbour_indices_vector[8] + numNodesAcross;
471 moore_neighbour_indices_vector[16] = moore_neighbour_indices_vector[15] + numNodesAcross;
475 moore_neighbour_indices_vector[10] = moore_neighbour_indices_vector[10] + numNodesAcross;
476 moore_neighbour_indices_vector[11] = moore_neighbour_indices_vector[11] + numNodesAcross;
477 moore_neighbour_indices_vector[12] = moore_neighbour_indices_vector[12] + numNodesAcross;
481 moore_neighbour_indices_vector[14] = moore_neighbour_indices_vector[14] - numNodesAcross;
482 moore_neighbour_indices_vector[15] = moore_neighbour_indices_vector[15] - numNodesAcross;
483 moore_neighbour_indices_vector[16] = moore_neighbour_indices_vector[16] - numNodesAcross;
488 moore_neighbour_indices_vector[12] = moore_neighbour_indices_vector[12] + numNodesAcross*numNodesUp;
489 moore_neighbour_indices_vector[13] = moore_neighbour_indices_vector[13] + numNodesAcross*numNodesUp;
490 moore_neighbour_indices_vector[14] = moore_neighbour_indices_vector[14] + numNodesAcross*numNodesUp;
495 moore_neighbour_indices_vector[9] = moore_neighbour_indices_vector[9] - numNodesAcross*numNodesUp;
496 moore_neighbour_indices_vector[10] = moore_neighbour_indices_vector[10] - numNodesAcross*numNodesUp;
497 moore_neighbour_indices_vector[16] = moore_neighbour_indices_vector[16] - numNodesAcross*numNodesUp;
504 on_east_edge =
false;
505 on_west_edge =
false;
509 on_south_edge =
false;
510 on_north_edge =
false;
514 on_front_edge =
false;
515 on_back_edge =
false;
520 std::vector<bool> available_neighbours = std::vector<bool>(26,
true);
521 available_neighbours[0] = !on_north_edge;
522 available_neighbours[1] = !(on_north_edge || on_west_edge);
523 available_neighbours[2] = !on_west_edge;
524 available_neighbours[3] = !(on_south_edge || on_west_edge);
525 available_neighbours[4] = !on_south_edge;
526 available_neighbours[5] = !(on_south_edge || on_east_edge);
527 available_neighbours[6] = !on_east_edge;
528 available_neighbours[7] = !(on_north_edge || on_east_edge);
529 available_neighbours[8] = !(on_front_edge);
530 for (
unsigned i=9; i<17; i++)
532 available_neighbours[i] = (available_neighbours[i-9] && !(on_front_edge));
534 available_neighbours[17] = !(on_back_edge);
535 for (
unsigned i=18; i<26; i++)
537 available_neighbours[i] = (available_neighbours[i-18] && !(on_back_edge));
541 for (
unsigned i=0; i<26; i++)
543 if (available_neighbours[i] && moore_neighbour_indices_vector[i] < numNodesAcross*numNodesUp*numNodesDeep)
545 assert(moore_neighbour_indices_vector[i] < nodes.size());
546 moore_neighbours[node_index].insert(moore_neighbour_indices_vector[i]);
556 von_neumann_neighbours[node_index].clear();
575 std::vector<unsigned> von_neumann_neighbour_indices_vector(4, node_index);
576 von_neumann_neighbour_indices_vector[0] += numNodesAcross;
577 von_neumann_neighbour_indices_vector[1] -= 1;
578 von_neumann_neighbour_indices_vector[2] -= numNodesAcross;
579 von_neumann_neighbour_indices_vector[3] += 1;
582 bool on_south_edge = (node_index < numNodesAcross);
583 bool on_north_edge = ((int)node_index > (
int)numNodesAcross*((int)numNodesUp - 1) - 1);
584 bool on_west_edge = (node_index%numNodesAcross == 0);
585 bool on_east_edge = (node_index%numNodesAcross == numNodesAcross - 1);
591 von_neumann_neighbour_indices_vector[1] = node_index + numNodesAcross - 1;
592 on_west_edge =
false;
597 von_neumann_neighbour_indices_vector[3] = node_index - numNodesAcross + 1;
598 on_east_edge =
false;
606 von_neumann_neighbour_indices_vector[0] = node_index - numNodesAcross*(numNodesUp-1);
607 on_north_edge =
false;
612 von_neumann_neighbour_indices_vector[2] = node_index + numNodesAcross*(numNodesUp-1);
613 on_south_edge =
false;
619 std::vector<bool> available_neighbours = std::vector<bool>(2*DIM,
true);
620 available_neighbours[0] = !on_north_edge;
621 available_neighbours[1] = !on_west_edge;
622 available_neighbours[2] = !on_south_edge;
623 available_neighbours[3] = !on_east_edge;
626 for (
unsigned i=0; i<4; i++)
628 if (available_neighbours[i])
630 assert(von_neumann_neighbour_indices_vector[i] < nodes.size());
631 von_neumann_neighbours[node_index].insert(von_neumann_neighbour_indices_vector[i]);
652 std::vector<unsigned> von_neumann_neighbour_indices_vector(6, node_index);
653 von_neumann_neighbour_indices_vector[0] += numNodesAcross;
654 von_neumann_neighbour_indices_vector[1] -= 1;
655 von_neumann_neighbour_indices_vector[2] -= numNodesAcross;
656 von_neumann_neighbour_indices_vector[3] += 1;
657 von_neumann_neighbour_indices_vector[4] -= numNodesAcross*numNodesUp;
658 von_neumann_neighbour_indices_vector[5] += numNodesAcross*numNodesUp;
661 bool on_south_edge = (node_index%(numNodesAcross*numNodesUp)<numNodesAcross);
662 bool on_north_edge = (node_index%(numNodesAcross*numNodesUp)>(numNodesAcross*numNodesUp-numNodesAcross-1));
663 bool on_west_edge = (node_index%numNodesAcross== 0);
664 bool on_east_edge = (node_index%numNodesAcross == numNodesAcross - 1);
665 bool on_front_edge = (node_index < numNodesAcross*numNodesUp);
666 bool on_back_edge = (node_index > numNodesAcross*numNodesUp*(numNodesDeep-1)-1);
672 von_neumann_neighbour_indices_vector[1] = node_index + numNodesAcross - 1;
673 on_west_edge =
false;
678 von_neumann_neighbour_indices_vector[3] = node_index - numNodesAcross + 1;
679 on_east_edge =
false;
687 von_neumann_neighbour_indices_vector[0] = node_index - numNodesAcross*(numNodesUp-1);
688 on_north_edge =
false;
693 von_neumann_neighbour_indices_vector[2] = node_index + numNodesAcross*(numNodesUp-1);
694 on_south_edge =
false;
702 von_neumann_neighbour_indices_vector[4] = node_index + numNodesAcross*numNodesUp*(numNodesDeep-1);
703 on_front_edge =
false;
708 von_neumann_neighbour_indices_vector[5] = node_index - numNodesAcross*numNodesUp*(numNodesDeep-1);
709 on_back_edge =
false;
715 std::vector<bool> available_neighbours = std::vector<bool>(2*DIM,
true);
716 available_neighbours[0] = !on_north_edge;
717 available_neighbours[1] = !on_west_edge;
718 available_neighbours[2] = !on_south_edge;
719 available_neighbours[3] = !on_east_edge;
720 available_neighbours[4] = !on_front_edge;
721 available_neighbours[5] = !on_back_edge;
724 for (
unsigned i=0; i<6; i++)
726 if (available_neighbours[i] && von_neumann_neighbour_indices_vector[i]<numNodesAcross*numNodesUp*numNodesDeep)
728 assert(von_neumann_neighbour_indices_vector[i] < nodes.size());
729 von_neumann_neighbours[node_index].insert(von_neumann_neighbour_indices_vector[i]);
739 mpMesh = boost::make_shared<PottsMesh<DIM> >(nodes, elements, von_neumann_neighbours, moore_neighbours);