36 #include "PottsMeshGenerator.hpp"
38 #include <boost/scoped_array.hpp>
40 template<
unsigned DIM>
42 unsigned numNodesUp,
unsigned numElementsUp,
unsigned elementHeight,
43 unsigned numNodesDeep,
unsigned numElementsDeep,
unsigned elementDepth,
44 bool startAtBottomLeft,
bool isPeriodicInX,
bool isPeriodicInY ,
bool isPeriodicInZ)
46 assert(numNodesAcross > 0);
47 assert(numNodesUp > 0);
48 assert(numNodesDeep > 0);
50 assert(numElementsAcross*elementWidth <= numNodesAcross);
51 assert(numElementsUp*elementHeight <= numNodesUp);
52 assert(numElementsDeep*elementDepth <= numNodesDeep);
54 std::vector<Node<DIM>*> nodes;
55 std::vector<PottsElement<DIM>*> elements;
56 std::vector<std::set<unsigned> > moore_neighbours;
57 std::vector<std::set<unsigned> > von_neumann_neighbours;
59 unsigned num_nodes = numNodesAcross*numNodesUp*numNodesDeep;
61 unsigned next_node_index = 0;
62 boost::scoped_array<unsigned> node_indices(
new unsigned[elementWidth*elementHeight*elementDepth]);
63 unsigned element_index;
65 unsigned index_offset = 0;
67 if (!startAtBottomLeft)
70 unsigned across_gap = (numNodesAcross - numElementsAcross*elementWidth)/2;
71 unsigned up_gap = (numNodesUp - numElementsUp*elementHeight)/2;
72 unsigned deep_gap = (numNodesDeep - numElementsDeep*elementDepth)/2;
74 index_offset = deep_gap*numNodesAcross*numNodesUp + up_gap*numNodesAcross + across_gap;
83 for (
unsigned k=0; k<numNodesDeep; k++)
85 for (
unsigned j=0; j<numNodesUp; j++)
87 for (
unsigned i=0; i<numNodesAcross; i++)
89 bool is_boundary_node=
false;
92 is_boundary_node = (j==0 || j==numNodesUp-1 || (i==0 && !isPeriodicInX) || (i==numNodesAcross-1 && !isPeriodicInX) ) ?
true :
false;
96 is_boundary_node = (j==0 || j==numNodesUp-1 || (i==0 && !isPeriodicInX) || (i==numNodesAcross-1 && !isPeriodicInX) || k==0 || k==numNodesDeep-1) ?
true :
false;
99 nodes.push_back(p_node);
104 assert(nodes.size()==num_nodes);
110 for (
unsigned n=0; n<numElementsDeep; n++)
112 for (
unsigned j=0; j<numElementsUp; j++)
114 for (
unsigned i=0; i<numElementsAcross; i++)
116 for (
unsigned m=0; m<elementDepth; m++)
118 for (
unsigned l=0; l<elementHeight; l++)
120 for (
unsigned k=0; k<elementWidth; k++)
122 node_indices[m*elementHeight*elementWidth + l*elementWidth + k] = n*elementDepth*numNodesUp*numNodesAcross +
123 j*elementHeight*numNodesAcross +
125 m*numNodesAcross*numNodesUp +
131 std::vector<Node<DIM>*> element_nodes;
132 for (
unsigned k=0; k<elementDepth*elementHeight*elementWidth; k++)
134 element_nodes.push_back(nodes[node_indices[k]]);
137 element_index = n*numElementsAcross*numElementsUp + j*numElementsAcross + i;
139 elements.push_back(p_element);
148 moore_neighbours.resize(num_nodes);
149 von_neumann_neighbours.resize(num_nodes);
151 for (
unsigned node_index=0; node_index<num_nodes; node_index++)
155 moore_neighbours[node_index].clear();
175 std::vector<unsigned> moore_neighbour_indices_vector(8, node_index);
176 moore_neighbour_indices_vector[0] += numNodesAcross;
177 moore_neighbour_indices_vector[1] += numNodesAcross - 1;
178 moore_neighbour_indices_vector[2] -= 1;
179 moore_neighbour_indices_vector[3] -= numNodesAcross + 1;
180 moore_neighbour_indices_vector[4] -= numNodesAcross;
181 moore_neighbour_indices_vector[5] -= numNodesAcross - 1;
182 moore_neighbour_indices_vector[6] += 1;
183 moore_neighbour_indices_vector[7] += numNodesAcross + 1;
186 bool on_south_edge = (node_index < numNodesAcross);
187 bool on_north_edge = ((int) node_index > (
int)numNodesAcross*((int)numNodesUp - 1) - 1);
188 bool on_west_edge = (node_index%numNodesAcross == 0);
189 bool on_east_edge = (node_index%numNodesAcross == numNodesAcross - 1);
195 moore_neighbour_indices_vector[1] = node_index + 2*numNodesAcross - 1;
196 moore_neighbour_indices_vector[2] = node_index + numNodesAcross - 1;
197 moore_neighbour_indices_vector[3] = node_index - 1;
202 moore_neighbour_indices_vector[5] = node_index - 2*numNodesAcross + 1;
203 moore_neighbour_indices_vector[6] = node_index - numNodesAcross + 1;
204 moore_neighbour_indices_vector[7] = node_index + 1;
212 moore_neighbour_indices_vector[0] = node_index - numNodesAcross*(numNodesUp-1);
213 moore_neighbour_indices_vector[1] = moore_neighbour_indices_vector[0] - 1;
214 moore_neighbour_indices_vector[7] = moore_neighbour_indices_vector[0] + 1;
218 moore_neighbour_indices_vector[1] = moore_neighbour_indices_vector[1] + numNodesAcross;
222 moore_neighbour_indices_vector[7] = moore_neighbour_indices_vector[7] - numNodesAcross;
228 moore_neighbour_indices_vector[4] = node_index + numNodesAcross*(numNodesUp-1);
229 moore_neighbour_indices_vector[3] = moore_neighbour_indices_vector[4] - 1;
230 moore_neighbour_indices_vector[5] = moore_neighbour_indices_vector[4] + 1;
234 moore_neighbour_indices_vector[3] = moore_neighbour_indices_vector[3] + numNodesAcross;
238 moore_neighbour_indices_vector[5] = moore_neighbour_indices_vector[5] - numNodesAcross;
245 on_east_edge =
false;
246 on_west_edge =
false;
250 on_south_edge =
false;
251 on_north_edge =
false;
256 std::vector<bool> available_neighbours = std::vector<bool>(8,
true);
257 available_neighbours[0] = !on_north_edge;
258 available_neighbours[1] = !(on_north_edge || on_west_edge);
259 available_neighbours[2] = !on_west_edge;
260 available_neighbours[3] = !(on_south_edge || on_west_edge);
261 available_neighbours[4] = !on_south_edge;
262 available_neighbours[5] = !(on_south_edge || on_east_edge);
263 available_neighbours[6] = !on_east_edge;
264 available_neighbours[7] = !(on_north_edge || on_east_edge);
267 for (
unsigned i=0; i<8; i++)
269 if (available_neighbours[i])
271 assert(moore_neighbour_indices_vector[i] < nodes.size());
272 moore_neighbours[node_index].insert(moore_neighbour_indices_vector[i]);
293 std::vector<unsigned> moore_neighbour_indices_vector(26, node_index);
294 moore_neighbour_indices_vector[0] += numNodesAcross;
295 moore_neighbour_indices_vector[1] += numNodesAcross - 1;
296 moore_neighbour_indices_vector[2] -= 1;
297 moore_neighbour_indices_vector[3] -= numNodesAcross + 1;
298 moore_neighbour_indices_vector[4] -= numNodesAcross;
299 moore_neighbour_indices_vector[5] -= numNodesAcross - 1;
300 moore_neighbour_indices_vector[6] += 1;
301 moore_neighbour_indices_vector[7] += numNodesAcross + 1;
302 moore_neighbour_indices_vector[8] -= numNodesAcross*numNodesUp;
303 for (
unsigned i=9; i<17; i++)
305 moore_neighbour_indices_vector[i] = moore_neighbour_indices_vector[i-9]-numNodesAcross*numNodesUp;
307 moore_neighbour_indices_vector[17] += numNodesAcross*numNodesUp;
308 for (
unsigned i=18; i<26; i++)
310 moore_neighbour_indices_vector[i]=moore_neighbour_indices_vector[i-18]+numNodesAcross*numNodesUp;
314 bool on_south_edge = (node_index%(numNodesAcross*numNodesUp)<numNodesAcross);
315 bool on_north_edge = (node_index%(numNodesAcross*numNodesUp)>(numNodesAcross*numNodesUp-numNodesAcross-1));
316 bool on_west_edge = (node_index%numNodesAcross == 0);
317 bool on_east_edge = (node_index%numNodesAcross == numNodesAcross - 1);
318 bool on_front_edge = (node_index < numNodesAcross*numNodesUp);
319 bool on_back_edge = (node_index > numNodesAcross*numNodesUp*(numNodesDeep-1)-1);
325 moore_neighbour_indices_vector[1] = node_index + 2*numNodesAcross - 1;
326 moore_neighbour_indices_vector[2] = node_index + numNodesAcross - 1;
327 moore_neighbour_indices_vector[3] = node_index - 1;
329 moore_neighbour_indices_vector[10] = moore_neighbour_indices_vector[1] - numNodesAcross*numNodesUp;
330 moore_neighbour_indices_vector[11] = moore_neighbour_indices_vector[2] - numNodesAcross*numNodesUp;
331 moore_neighbour_indices_vector[12] = moore_neighbour_indices_vector[3] - numNodesAcross*numNodesUp;
333 moore_neighbour_indices_vector[19] = moore_neighbour_indices_vector[1] + numNodesAcross*numNodesUp;
334 moore_neighbour_indices_vector[20] = moore_neighbour_indices_vector[2] + numNodesAcross*numNodesUp;
335 moore_neighbour_indices_vector[21] = moore_neighbour_indices_vector[3] + numNodesAcross*numNodesUp;
340 moore_neighbour_indices_vector[5] = node_index - 2*numNodesAcross + 1;
341 moore_neighbour_indices_vector[6] = node_index - numNodesAcross + 1;
342 moore_neighbour_indices_vector[7] = node_index + 1;
344 moore_neighbour_indices_vector[14] = moore_neighbour_indices_vector[5] - numNodesAcross*numNodesUp;
345 moore_neighbour_indices_vector[15] = moore_neighbour_indices_vector[6] - numNodesAcross*numNodesUp;
346 moore_neighbour_indices_vector[16] = moore_neighbour_indices_vector[7] - numNodesAcross*numNodesUp;
348 moore_neighbour_indices_vector[23] = moore_neighbour_indices_vector[5] + numNodesAcross*numNodesUp;
349 moore_neighbour_indices_vector[24] = moore_neighbour_indices_vector[6] + numNodesAcross*numNodesUp;
350 moore_neighbour_indices_vector[25] = moore_neighbour_indices_vector[7] + numNodesAcross*numNodesUp;
358 moore_neighbour_indices_vector[0] = node_index - numNodesAcross*(numNodesUp-1);
359 moore_neighbour_indices_vector[1] = moore_neighbour_indices_vector[0] - 1;
360 moore_neighbour_indices_vector[7] = moore_neighbour_indices_vector[0] + 1;
362 moore_neighbour_indices_vector[10] = moore_neighbour_indices_vector[1] - numNodesAcross*numNodesUp;
363 moore_neighbour_indices_vector[9] = moore_neighbour_indices_vector[0] - numNodesAcross*numNodesUp;
364 moore_neighbour_indices_vector[16] = moore_neighbour_indices_vector[7] - numNodesAcross*numNodesUp;
366 moore_neighbour_indices_vector[19] = moore_neighbour_indices_vector[1] + numNodesAcross*numNodesUp;
367 moore_neighbour_indices_vector[18] = moore_neighbour_indices_vector[0] + numNodesAcross*numNodesUp;
368 moore_neighbour_indices_vector[25] = moore_neighbour_indices_vector[7] + numNodesAcross*numNodesUp;
372 moore_neighbour_indices_vector[1] = moore_neighbour_indices_vector[1] + numNodesAcross;
373 moore_neighbour_indices_vector[10] = moore_neighbour_indices_vector[10] + numNodesAcross;
374 moore_neighbour_indices_vector[19] = moore_neighbour_indices_vector[19] + numNodesAcross;
378 moore_neighbour_indices_vector[7] = moore_neighbour_indices_vector[7] - numNodesAcross;
379 moore_neighbour_indices_vector[16] = moore_neighbour_indices_vector[16] - numNodesAcross;
380 moore_neighbour_indices_vector[25] = moore_neighbour_indices_vector[25] - numNodesAcross;
386 moore_neighbour_indices_vector[4] = node_index + numNodesAcross*(numNodesUp-1);
387 moore_neighbour_indices_vector[3] = moore_neighbour_indices_vector[4] - 1;
388 moore_neighbour_indices_vector[5] = moore_neighbour_indices_vector[4] + 1;
390 moore_neighbour_indices_vector[12] = moore_neighbour_indices_vector[3] - numNodesAcross*numNodesUp;
391 moore_neighbour_indices_vector[13] = moore_neighbour_indices_vector[4] - numNodesAcross*numNodesUp;
392 moore_neighbour_indices_vector[14] = moore_neighbour_indices_vector[5] - numNodesAcross*numNodesUp;
394 moore_neighbour_indices_vector[21] = moore_neighbour_indices_vector[3] + numNodesAcross*numNodesUp;
395 moore_neighbour_indices_vector[22] = moore_neighbour_indices_vector[4] + numNodesAcross*numNodesUp;
396 moore_neighbour_indices_vector[23] = moore_neighbour_indices_vector[5] + numNodesAcross*numNodesUp;
400 moore_neighbour_indices_vector[3] = moore_neighbour_indices_vector[3] + numNodesAcross;
401 moore_neighbour_indices_vector[12] = moore_neighbour_indices_vector[12] + numNodesAcross;
402 moore_neighbour_indices_vector[21] = moore_neighbour_indices_vector[21] + numNodesAcross;
406 moore_neighbour_indices_vector[5] = moore_neighbour_indices_vector[5] - numNodesAcross;
407 moore_neighbour_indices_vector[14] = moore_neighbour_indices_vector[14] - numNodesAcross;
408 moore_neighbour_indices_vector[23] = moore_neighbour_indices_vector[23] - numNodesAcross;
417 moore_neighbour_indices_vector[17] = node_index - numNodesAcross*numNodesUp*(numNodesDeep-1);
418 moore_neighbour_indices_vector[20] = moore_neighbour_indices_vector[17] - 1;
419 moore_neighbour_indices_vector[24] = moore_neighbour_indices_vector[17] + 1;
421 moore_neighbour_indices_vector[21] = moore_neighbour_indices_vector[20] - numNodesAcross;
422 moore_neighbour_indices_vector[22] = moore_neighbour_indices_vector[17] - numNodesAcross;
423 moore_neighbour_indices_vector[23] = moore_neighbour_indices_vector[24] - numNodesAcross;
425 moore_neighbour_indices_vector[19] = moore_neighbour_indices_vector[20] + numNodesAcross;
426 moore_neighbour_indices_vector[18] = moore_neighbour_indices_vector[17] + numNodesAcross;
427 moore_neighbour_indices_vector[25] = moore_neighbour_indices_vector[24] + numNodesAcross;
431 moore_neighbour_indices_vector[19] = moore_neighbour_indices_vector[19] + numNodesAcross;
432 moore_neighbour_indices_vector[20] = moore_neighbour_indices_vector[20] + numNodesAcross;
433 moore_neighbour_indices_vector[21] = moore_neighbour_indices_vector[21] + numNodesAcross;
437 moore_neighbour_indices_vector[23] = moore_neighbour_indices_vector[23] - numNodesAcross;
438 moore_neighbour_indices_vector[24] = moore_neighbour_indices_vector[24] - numNodesAcross;
439 moore_neighbour_indices_vector[25] = moore_neighbour_indices_vector[25] - numNodesAcross;
444 moore_neighbour_indices_vector[21] = moore_neighbour_indices_vector[21] + numNodesAcross*numNodesUp;
445 moore_neighbour_indices_vector[22] = moore_neighbour_indices_vector[22] + numNodesAcross*numNodesUp;
446 moore_neighbour_indices_vector[23] = moore_neighbour_indices_vector[23] + numNodesAcross*numNodesUp;
451 moore_neighbour_indices_vector[18] = moore_neighbour_indices_vector[18] - numNodesAcross*numNodesUp;
452 moore_neighbour_indices_vector[19] = moore_neighbour_indices_vector[19] - numNodesAcross*numNodesUp;
453 moore_neighbour_indices_vector[25] = moore_neighbour_indices_vector[25] - numNodesAcross*numNodesUp;
459 moore_neighbour_indices_vector[8] = node_index + numNodesAcross*numNodesUp*(numNodesDeep-1);
460 moore_neighbour_indices_vector[11] = moore_neighbour_indices_vector[8] - 1;
461 moore_neighbour_indices_vector[15] = moore_neighbour_indices_vector[8] + 1;
463 moore_neighbour_indices_vector[12] = moore_neighbour_indices_vector[11] - numNodesAcross;
464 moore_neighbour_indices_vector[13] = moore_neighbour_indices_vector[8] - numNodesAcross;
465 moore_neighbour_indices_vector[14] = moore_neighbour_indices_vector[15] - numNodesAcross;
467 moore_neighbour_indices_vector[10] = moore_neighbour_indices_vector[11] + numNodesAcross;
468 moore_neighbour_indices_vector[9] = moore_neighbour_indices_vector[8] + numNodesAcross;
469 moore_neighbour_indices_vector[16] = moore_neighbour_indices_vector[15] + numNodesAcross;
473 moore_neighbour_indices_vector[10] = moore_neighbour_indices_vector[10] + numNodesAcross;
474 moore_neighbour_indices_vector[11] = moore_neighbour_indices_vector[11] + numNodesAcross;
475 moore_neighbour_indices_vector[12] = moore_neighbour_indices_vector[12] + numNodesAcross;
479 moore_neighbour_indices_vector[14] = moore_neighbour_indices_vector[14] - numNodesAcross;
480 moore_neighbour_indices_vector[15] = moore_neighbour_indices_vector[15] - numNodesAcross;
481 moore_neighbour_indices_vector[16] = moore_neighbour_indices_vector[16] - numNodesAcross;
486 moore_neighbour_indices_vector[12] = moore_neighbour_indices_vector[12] + numNodesAcross*numNodesUp;
487 moore_neighbour_indices_vector[13] = moore_neighbour_indices_vector[13] + numNodesAcross*numNodesUp;
488 moore_neighbour_indices_vector[14] = moore_neighbour_indices_vector[14] + numNodesAcross*numNodesUp;
493 moore_neighbour_indices_vector[9] = moore_neighbour_indices_vector[9] - numNodesAcross*numNodesUp;
494 moore_neighbour_indices_vector[10] = moore_neighbour_indices_vector[10] - numNodesAcross*numNodesUp;
495 moore_neighbour_indices_vector[16] = moore_neighbour_indices_vector[16] - numNodesAcross*numNodesUp;
502 on_east_edge =
false;
503 on_west_edge =
false;
507 on_south_edge =
false;
508 on_north_edge =
false;
512 on_front_edge =
false;
513 on_back_edge =
false;
518 std::vector<bool> available_neighbours = std::vector<bool>(26,
true);
519 available_neighbours[0] = !on_north_edge;
520 available_neighbours[1] = !(on_north_edge || on_west_edge);
521 available_neighbours[2] = !on_west_edge;
522 available_neighbours[3] = !(on_south_edge || on_west_edge);
523 available_neighbours[4] = !on_south_edge;
524 available_neighbours[5] = !(on_south_edge || on_east_edge);
525 available_neighbours[6] = !on_east_edge;
526 available_neighbours[7] = !(on_north_edge || on_east_edge);
527 available_neighbours[8] = !(on_front_edge);
528 for (
unsigned i=9; i<17; i++)
530 available_neighbours[i] = (available_neighbours[i-9] && !(on_front_edge));
532 available_neighbours[17] = !(on_back_edge);
533 for (
unsigned i=18; i<26; i++)
535 available_neighbours[i] = (available_neighbours[i-18] && !(on_back_edge));
539 for (
unsigned i=0; i<26; i++)
541 if (available_neighbours[i] && moore_neighbour_indices_vector[i] < numNodesAcross*numNodesUp*numNodesDeep)
543 assert(moore_neighbour_indices_vector[i] < nodes.size());
544 moore_neighbours[node_index].insert(moore_neighbour_indices_vector[i]);
554 von_neumann_neighbours[node_index].clear();
573 std::vector<unsigned> von_neumann_neighbour_indices_vector(4, node_index);
574 von_neumann_neighbour_indices_vector[0] += numNodesAcross;
575 von_neumann_neighbour_indices_vector[1] -= 1;
576 von_neumann_neighbour_indices_vector[2] -= numNodesAcross;
577 von_neumann_neighbour_indices_vector[3] += 1;
580 bool on_south_edge = (node_index < numNodesAcross);
581 bool on_north_edge = ((int)node_index > (
int)numNodesAcross*((int)numNodesUp - 1) - 1);
582 bool on_west_edge = (node_index%numNodesAcross == 0);
583 bool on_east_edge = (node_index%numNodesAcross == numNodesAcross - 1);
589 von_neumann_neighbour_indices_vector[1] = node_index + numNodesAcross - 1;
590 on_west_edge =
false;
595 von_neumann_neighbour_indices_vector[3] = node_index - numNodesAcross + 1;
596 on_east_edge =
false;
604 von_neumann_neighbour_indices_vector[0] = node_index - numNodesAcross*(numNodesUp-1);
605 on_north_edge =
false;
610 von_neumann_neighbour_indices_vector[2] = node_index + numNodesAcross*(numNodesUp-1);
611 on_south_edge =
false;
617 std::vector<bool> available_neighbours = std::vector<bool>(2*DIM,
true);
618 available_neighbours[0] = !on_north_edge;
619 available_neighbours[1] = !on_west_edge;
620 available_neighbours[2] = !on_south_edge;
621 available_neighbours[3] = !on_east_edge;
624 for (
unsigned i=0; i<4; i++)
626 if (available_neighbours[i])
628 assert(von_neumann_neighbour_indices_vector[i] < nodes.size());
629 von_neumann_neighbours[node_index].insert(von_neumann_neighbour_indices_vector[i]);
650 std::vector<unsigned> von_neumann_neighbour_indices_vector(6, node_index);
651 von_neumann_neighbour_indices_vector[0] += numNodesAcross;
652 von_neumann_neighbour_indices_vector[1] -= 1;
653 von_neumann_neighbour_indices_vector[2] -= numNodesAcross;
654 von_neumann_neighbour_indices_vector[3] += 1;
655 von_neumann_neighbour_indices_vector[4] -= numNodesAcross*numNodesUp;
656 von_neumann_neighbour_indices_vector[5] += numNodesAcross*numNodesUp;
659 bool on_south_edge = (node_index%(numNodesAcross*numNodesUp)<numNodesAcross);
660 bool on_north_edge = (node_index%(numNodesAcross*numNodesUp)>(numNodesAcross*numNodesUp-numNodesAcross-1));
661 bool on_west_edge = (node_index%numNodesAcross== 0);
662 bool on_east_edge = (node_index%numNodesAcross == numNodesAcross - 1);
663 bool on_front_edge = (node_index < numNodesAcross*numNodesUp);
664 bool on_back_edge = (node_index > numNodesAcross*numNodesUp*(numNodesDeep-1)-1);
670 von_neumann_neighbour_indices_vector[1] = node_index + numNodesAcross - 1;
671 on_west_edge =
false;
676 von_neumann_neighbour_indices_vector[3] = node_index - numNodesAcross + 1;
677 on_east_edge =
false;
685 von_neumann_neighbour_indices_vector[0] = node_index - numNodesAcross*(numNodesUp-1);
686 on_north_edge =
false;
691 von_neumann_neighbour_indices_vector[2] = node_index + numNodesAcross*(numNodesUp-1);
692 on_south_edge =
false;
700 von_neumann_neighbour_indices_vector[4] = node_index + numNodesAcross*numNodesUp*(numNodesDeep-1);
701 on_front_edge =
false;
706 von_neumann_neighbour_indices_vector[5] = node_index - numNodesAcross*numNodesUp*(numNodesDeep-1);
707 on_back_edge =
false;
713 std::vector<bool> available_neighbours = std::vector<bool>(2*DIM,
true);
714 available_neighbours[0] = !on_north_edge;
715 available_neighbours[1] = !on_west_edge;
716 available_neighbours[2] = !on_south_edge;
717 available_neighbours[3] = !on_east_edge;
718 available_neighbours[4] = !on_front_edge;
719 available_neighbours[5] = !on_back_edge;
722 for (
unsigned i=0; i<6; i++)
724 if (available_neighbours[i] && von_neumann_neighbour_indices_vector[i]<numNodesAcross*numNodesUp*numNodesDeep)
726 assert(von_neumann_neighbour_indices_vector[i] < nodes.size());
727 von_neumann_neighbours[node_index].insert(von_neumann_neighbour_indices_vector[i]);
737 mpMesh =
new PottsMesh<DIM>(nodes, elements, von_neumann_neighbours, moore_neighbours);
740 template<
unsigned DIM>
746 template<
unsigned DIM>
virtual PottsMesh< DIM > * GetMesh()
virtual ~PottsMeshGenerator()