39 {
40 LOG_UNIT_TEST;
41
43
45 xmin = 0., xmax = 1.,
46 ymin = 0., ymax = 10.;
47
49 10,
50 100,
51 xmin, xmax,
52 ymin, ymax,
54
55
56
58
59
60
63
64
65
66
67
68
69
70
73 {
76 }
77
78
79 {
81 for (
auto & elem :
mesh.element_ptr_range())
82 {
83 elem->subdomain_id() = current_subdomain_id++;
84
85
86 if (current_subdomain_id == n_subdomains)
87 current_subdomain_id = 0;
88 }
89 }
90
91
93
94
95 for (
auto & elem :
mesh.element_ptr_range())
96 {
97
98 CPPUNIT_ASSERT_EQUAL(static_cast<int>(elem->subdomain_id()/2),
99 static_cast<int>(elem->processor_id()));
100 }
101 }
The MappedSubdomainPartitioner partitions the elements based on their subdomain ids.
std::map< subdomain_id_type, processor_id_type > subdomain_to_proc
Before calling partition() or partition_range(), the user must assign all the Mesh subdomains to cert...
virtual std::unique_ptr< Partitioner > & partitioner()
A partitioner to use at each partitioning.
virtual void partition(const unsigned int n_parts)
Call the default partitioner (currently metis_partition()).
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
Communicator * TestCommWorld
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real