Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions include/mesh/distributed_mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,15 +312,6 @@ class DistributedMesh : public UnstructuredMesh
virtual Node * add_node (Node * n) override final;
virtual Node * add_node (std::unique_ptr<Node> 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<Node> 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
Expand Down
20 changes: 0 additions & 20 deletions include/mesh/mesh_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -716,26 +716,6 @@ class MeshBase : public ParallelObject
*/
virtual Node * add_node (std::unique_ptr<Node> 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<Node> n) = 0;
#endif

/**
* Removes the Node n from the mesh.
*/
Expand Down
18 changes: 0 additions & 18 deletions include/mesh/replicated_mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<Node> 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<Node> 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;
Expand Down
16 changes: 0 additions & 16 deletions src/mesh/distributed_mesh.C
Original file line number Diff line number Diff line change
Expand Up @@ -912,22 +912,6 @@ Node * DistributedMesh::add_node (std::unique_ptr<Node> 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<Node> n)
{
libmesh_deprecated();
return insert_node(n.release());
}

#endif

void DistributedMesh::delete_node(Node * n)
{
libmesh_assert(n);
Expand Down
60 changes: 0 additions & 60 deletions src/mesh/replicated_mesh.C
Original file line number Diff line number Diff line change
Expand Up @@ -544,66 +544,6 @@ Node * ReplicatedMesh::add_node (std::unique_ptr<Node> 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<Node> 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);
Expand Down