diff --git a/framework/include/mesh/MooseMesh.h b/framework/include/mesh/MooseMesh.h index 9e44720b3edf..31413ce2b389 100644 --- a/framework/include/mesh/MooseMesh.h +++ b/framework/include/mesh/MooseMesh.h @@ -683,9 +683,8 @@ class MooseMesh : MooseMesh::MortarInterface * getMortarInterface(BoundaryID master, BoundaryID slave); /** - * Setter and getter for custom partitioner + * Setter for custom partitioner */ - Partitioner * getCustomPartitioner() const; void setCustomPartitioner(Partitioner * partitioner); /** @@ -713,7 +712,7 @@ class MooseMesh : bool _partitioner_overridden; /// The custom partitioner - Partitioner * _custom_partitioner; + UniquePtr _custom_partitioner; bool _custom_partitioner_requested; /// Convenience enums diff --git a/framework/src/mesh/MooseMesh.C b/framework/src/mesh/MooseMesh.C index 9fa06c0975e0..c2aeccf3a097 100644 --- a/framework/src/mesh/MooseMesh.C +++ b/framework/src/mesh/MooseMesh.C @@ -211,11 +211,6 @@ MooseMesh::MooseMesh(const MooseMesh & other_mesh) : for (std::vector::const_iterator it = node_boundaries.begin(); it != node_boundaries.end(); ++it) boundary_info.nodeset_name(*it) = other_boundary_info.get_nodeset_name(*it); - - if (other_mesh.getCustomPartitioner()) - setCustomPartitioner(other_mesh.getCustomPartitioner()); - else - _custom_partitioner = NULL; } MooseMesh::~MooseMesh() @@ -1713,7 +1708,7 @@ MooseMesh::init() // Set custom partitioner if (!_custom_partitioner) mooseError("Custom partitioner requested but not set!"); - getMesh().partitioner().reset(_custom_partitioner); + getMesh().partitioner().reset(_custom_partitioner.release()); } else { @@ -2187,16 +2182,10 @@ MooseMesh::getMortarInterface(BoundaryID master, BoundaryID slave) mooseError("Requesting non-existing mortar interface (master = " << master << ", slave = " << slave << ")."); } -Partitioner * -MooseMesh::getCustomPartitioner() const -{ - return _custom_partitioner; -} - void MooseMesh::setCustomPartitioner(Partitioner * partitioner) { - _custom_partitioner = partitioner->clone().release(); + _custom_partitioner = partitioner->clone(); } bool