diff --git a/include/mesh/distributed_mesh.h b/include/mesh/distributed_mesh.h index 8b186ba796..8f610c9b13 100644 --- a/include/mesh/distributed_mesh.h +++ b/include/mesh/distributed_mesh.h @@ -312,15 +312,6 @@ class DistributedMesh : public UnstructuredMesh virtual Node * add_node (Node * n) override final; virtual Node * add_node (std::unique_ptr n) override final; -#ifdef LIBMESH_ENABLE_DEPRECATED - /** - * These methods are deprecated. Please use \p add_node instead - * Calls add_node(). - */ - virtual Node * insert_node(Node * n) override final; - virtual Node * insert_node(std::unique_ptr n) override final; -#endif - /** * Takes ownership of node \p n on this partition of a distributed * mesh, by setting n.processor_id() to this->processor_id(), as diff --git a/include/mesh/mesh_base.h b/include/mesh/mesh_base.h index dbd39b5a93..ecd1dd595a 100644 --- a/include/mesh/mesh_base.h +++ b/include/mesh/mesh_base.h @@ -716,26 +716,6 @@ class MeshBase : public ParallelObject */ virtual Node * add_node (std::unique_ptr n) = 0; -#ifdef LIBMESH_ENABLE_DEPRECATED - /** - * This method is deprecated. Please use \p add_node instead - * Insert \p Node \p n into the Mesh at a location consistent with - * n->id(), allocating extra storage if necessary. Will error - * rather than overwriting an existing Node. Only use if you know what - * you are doing... - */ - virtual Node * insert_node(Node * n) = 0; - - /** - * This method is deprecated. Please use \p add_node instead - * Version of insert_node() taking a std::unique_ptr by value. This API is - * intended to indicate that ownership of the Node is transferred to the Mesh - * when this function is called, and it should play more nicely with the - * Node::build() API which has always returned a std::unique_ptr. - */ - virtual Node * insert_node(std::unique_ptr n) = 0; -#endif - /** * Removes the Node n from the mesh. */ diff --git a/include/mesh/replicated_mesh.h b/include/mesh/replicated_mesh.h index 42ef7c522d..9e2d5e950b 100644 --- a/include/mesh/replicated_mesh.h +++ b/include/mesh/replicated_mesh.h @@ -191,24 +191,6 @@ class ReplicatedMesh : public UnstructuredMesh const processor_id_type proc_id = DofObject::invalid_processor_id) override final; virtual Node * add_node (Node * n) override final; virtual Node * add_node (std::unique_ptr n) override final; - -#ifdef LIBMESH_ENABLE_DEPRECATED - /** - * These methods are deprecated. Please use \p add_node instead - * Insert \p Node \p n into the Mesh at a location consistent with - * n->id(), allocating extra storage if necessary. Throws an error if: - * .) n==nullptr - * .) n->id() == DofObject::invalid_id - * .) A node already exists in position n->id(). - * - * This function differs from the ReplicatedMesh::add_node() function, - * which is only capable of appending nodes at the end of the nodes - * storage. - */ - virtual Node * insert_node(Node * n) override final; - virtual Node * insert_node(std::unique_ptr n) override final; -#endif - virtual void delete_node (Node * n) override final; virtual void renumber_node (dof_id_type old_id, dof_id_type new_id) override final; virtual Elem * add_elem (Elem * e) override final; diff --git a/src/mesh/distributed_mesh.C b/src/mesh/distributed_mesh.C index 344d8281e0..24e352322d 100644 --- a/src/mesh/distributed_mesh.C +++ b/src/mesh/distributed_mesh.C @@ -912,22 +912,6 @@ Node * DistributedMesh::add_node (std::unique_ptr n) return add_node(n.release()); } -#ifdef LIBMESH_ENABLE_DEPRECATED - -Node * DistributedMesh::insert_node(Node * n) -{ - libmesh_deprecated(); - return DistributedMesh::add_node(n); -} - -Node * DistributedMesh::insert_node(std::unique_ptr n) -{ - libmesh_deprecated(); - return insert_node(n.release()); -} - -#endif - void DistributedMesh::delete_node(Node * n) { libmesh_assert(n); diff --git a/src/mesh/replicated_mesh.C b/src/mesh/replicated_mesh.C index 3ea0bb6362..059d3fcbe7 100644 --- a/src/mesh/replicated_mesh.C +++ b/src/mesh/replicated_mesh.C @@ -544,66 +544,6 @@ Node * ReplicatedMesh::add_node (std::unique_ptr n) return add_node(n.release()); } -#ifdef LIBMESH_ENABLE_DEPRECATED - -Node * ReplicatedMesh::insert_node(Node * n) -{ - libmesh_deprecated(); - libmesh_error_msg_if(!n, "Error, attempting to insert nullptr node."); - libmesh_error_msg_if(n->id() == DofObject::invalid_id, "Error, cannot insert node with invalid id."); - - if (n->id() < _nodes.size()) - { - // Trying to add an existing node is a no-op. This lets us use - // a straightforward MeshCommunication::allgather() to fix a - // not-actually-replicated-yet ReplicatedMesh, as occurs when - // reading Nemesis files. - if (n->valid_id() && _nodes[n->id()] == n) - return n; - - // Don't allow anything else to replace an existing Node. - libmesh_error_msg_if(_nodes[ n->id() ] != nullptr, - "Error, cannot insert new node on top of existing node."); - } - else - { - // Allocate just enough space to store the new node. This will - // cause highly non-ideal memory allocation behavior if called - // repeatedly... - _nodes.resize(n->id() + 1); - } - -#ifdef LIBMESH_ENABLE_UNIQUE_ID - if (!n->valid_unique_id()) - n->set_unique_id(_next_unique_id++); - else - _next_unique_id = std::max(_next_unique_id, n->unique_id()+1); -#endif - - n->add_extra_integers(_node_integer_names.size(), - _node_integer_default_values); - - // We have enough space and this spot isn't already occupied by - // another node, so go ahead and add it. - ++_n_nodes; - _nodes[ n->id() ] = n; - - // If we made it this far, we just inserted the node the user handed - // us, so we can give it right back. - return n; -} - -Node * ReplicatedMesh::insert_node(std::unique_ptr n) -{ - libmesh_deprecated(); - // The mesh now takes ownership of the Node. Eventually the guts of - // insert_node(Node*) will get moved to a private helper function, and - // calling insert_node(Node*) directly will be deprecated. - return insert_node(n.release()); -} - -#endif - void ReplicatedMesh::delete_node(Node * n) { libmesh_assert(n);