1#include <libmesh/distributed_mesh.h>
2#include <libmesh/elem.h>
3#include "libmesh/enum_partitioner_type.h"
4#include <libmesh/mesh_generation.h>
5#include <libmesh/parallel.h>
6#include <libmesh/partitioner.h>
7#include <libmesh/replicated_mesh.h>
54 std::vector<std::vector<int>> deletions =
55 {{1, 2, 4}, {0, 3}, {0, 2}, {1}};
57 for (
auto deletionset : deletions)
59 for (
int e : deletionset)
void testDeleteElem(UnstructuredMesh &mesh)
CPPUNIT_TEST(testDeleteElemDistributed)
void testDeleteElemReplicated()
CPPUNIT_TEST(testDeleteElemReplicated)
LIBMESH_CPPUNIT_TEST_SUITE(MeshDeletionsTest)
This test ensures operations like delete_elem don't cause problems with later mesh preparation.
void testDeleteElemDistributed()
The DistributedMesh class is derived from the MeshBase class, and is intended to provide identical fu...
This is the base class from which all geometric element types are derived.
void remove_links_to_me()
Resets this element's neighbors' appropriate neighbor pointers and its parent's and children's approp...
virtual std::unique_ptr< Partitioner > & partitioner()
A partitioner to use at each partitioning.
virtual dof_id_type n_elem() const =0
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly created (or read) mesh for use.
virtual void delete_elem(Elem *e)=0
Removes element e from the mesh.
virtual const Elem * query_elem_ptr(const dof_id_type i) const =0
static std::unique_ptr< Partitioner > build(const PartitionerType solver_package)
Builds a Partitioner of the type specified by partitioner_type.
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
The UnstructuredMesh class is derived from the MeshBase class.
Communicator * TestCommWorld
CPPUNIT_TEST_SUITE_REGISTRATION(MeshDeletionsTest)
The libMesh namespace provides an interface to certain functionality in the library.