2#include <libmesh/distributed_mesh.h>
3#include <libmesh/elem.h>
4#include <libmesh/mesh.h>
5#include <libmesh/mesh_generation.h>
6#include <libmesh/mesh_refinement.h>
7#include <libmesh/mesh_tools.h>
8#include <libmesh/replicated_mesh.h>
163 for (
auto & elem :
mesh.element_ptr_range())
164 if (elem->vertex_average()(0) > 0.5)
167 elem->set_neighbor(1,
nullptr);
void testDistributedMeshVerifyHasNeighborPtrs()
void testReplicatedMeshVerifyHasNeighborPtrs()
void testMeshBaseVerifyHasNeighborPtrs(UnstructuredMesh &mesh)
CPPUNIT_TEST(testReplicatedMeshVerifyRemovalPreparation)
CPPUNIT_TEST(testMeshVerifyHasCachedElemData)
void testMeshBaseVerifyRemovalPreparation(UnstructuredMesh &mesh)
void testMeshVerifyRemovalPreparation()
CPPUNIT_TEST(testReplicatedMeshVerifyHasCachedElemData)
LIBMESH_CPPUNIT_TEST_SUITE(MeshBaseTest)
This test verifies various operations on the MeshBase and derived classes.
void testMeshVerifyHasCachedElemData()
CPPUNIT_TEST(testDistributedMeshVerifyIsPrepared)
CPPUNIT_TEST(testReplicatedMeshVerifyHasNeighborPtrs)
void testReplicatedMeshVerifyRemovalPreparation()
CPPUNIT_TEST(testDistributedMeshVerifyHasNeighborPtrs)
CPPUNIT_TEST(testDistributedMeshVerifyHasCachedElemData)
void testDistributedMeshVerifyIsPrepared()
CPPUNIT_TEST(testReplicatedMeshVerifyIsPrepared)
void testDistributedMeshVerifyRemovalPreparation()
void testMeshBaseVerifyHasCachedElemData(UnstructuredMesh &mesh)
void testReplicatedMeshVerifyIsPrepared()
void testDistributedMeshVerifyHasCachedElemData()
void BrokenNeighborMesh(UnstructuredMesh &mesh)
CPPUNIT_TEST(testDistributedMeshVerifyRemovalPreparation)
CPPUNIT_TEST(testMeshVerifyIsPrepared)
void testMeshBaseVerifyIsPrepared(UnstructuredMesh &mesh)
CPPUNIT_TEST(testMeshVerifyRemovalPreparation)
CPPUNIT_TEST(testMeshVerifyHasNeighborPtrs)
void testMeshVerifyIsPrepared()
void testReplicatedMeshVerifyHasCachedElemData()
void testMeshVerifyHasNeighborPtrs()
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 set_neighbor(const unsigned int i, Elem *n)
Assigns n as the neighbor.
unsigned int which_neighbor_am_i(const Elem *e) const
This function tells you which neighbor e is.
subdomain_id_type subdomain_id() const
const Elem * neighbor_ptr(unsigned int i) const
IntRange< unsigned short > side_index_range() const
void complete_preparation()
void unset_has_neighbor_ptrs()
Tells this we have done some operation (e.g.
void unset_has_boundary_id_sets()
Tells this we have done some operation which may have invalidated our cached boundary id sets.
virtual void delete_elem(Elem *e)=0
Removes element e from the mesh.
void unset_has_removed_orphaned_nodes()
Tells this we have done some operation (e.g.
void unset_is_partitioned()
Tells this we have done some operation creating unpartitioned elements.
void unset_has_cached_elem_data()
Tells this we have done some operation (e.g.
virtual const Elem * query_elem_ptr(const dof_id_type i) const =0
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
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(MeshBaseTest)
The libMesh namespace provides an interface to certain functionality in the library.
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...