libMesh
Public Member Functions | Private Attributes | List of all members
ParallelGhostSyncTest Class Reference
Inheritance diagram for ParallelGhostSyncTest:
[legend]

Public Member Functions

 LIBMESH_CPPUNIT_TEST_SUITE (ParallelGhostSyncTest)
 
 CPPUNIT_TEST (testByXYZ)
 
 CPPUNIT_TEST_SUITE_END ()
 
void setUp ()
 
void tearDown ()
 
void testByXYZ ()
 

Private Attributes

std::unique_ptr< Mesh_mesh
 

Detailed Description

Definition at line 74 of file parallel_ghost_sync_test.C.

Member Function Documentation

◆ CPPUNIT_TEST()

ParallelGhostSyncTest::CPPUNIT_TEST ( testByXYZ  )

◆ CPPUNIT_TEST_SUITE_END()

ParallelGhostSyncTest::CPPUNIT_TEST_SUITE_END ( )

◆ LIBMESH_CPPUNIT_TEST_SUITE()

ParallelGhostSyncTest::LIBMESH_CPPUNIT_TEST_SUITE ( ParallelGhostSyncTest  )

◆ setUp()

void ParallelGhostSyncTest::setUp ( )
inline

Definition at line 86 of file parallel_ghost_sync_test.C.

References libMesh::MeshTools::Generation::build_cube(), and libMesh::HEX27.

87  {
88  _mesh = std::make_unique<Mesh>(*TestCommWorld);
89  constexpr unsigned int n = 3;
90  MeshTools::Generation::build_cube (*_mesh, n, n, n, -2.0, 3.0, -4.0, 5.0, -6.0, 7.0, HEX27);
91  }
std::unique_ptr< Mesh > _mesh
void build_cube(UnstructuredMesh &mesh, const unsigned int nx=0, const unsigned int ny=0, const unsigned int nz=0, const Real xmin=0., const Real xmax=1., const Real ymin=0., const Real ymax=1., const Real zmin=0., const Real zmax=1., const ElemType type=INVALID_ELEM, const bool gauss_lobatto_grid=false)
Builds a (elements) cube.

◆ tearDown()

void ParallelGhostSyncTest::tearDown ( )
inline

Definition at line 93 of file parallel_ghost_sync_test.C.

94  {}

◆ testByXYZ()

void ParallelGhostSyncTest::testByXYZ ( )
inline

Definition at line 96 of file parallel_ghost_sync_test.C.

References libMesh::LocationMap< T >::init(), libMesh::Parallel::sync_dofobject_data_by_xyz(), and TestCommWorld.

97  {
98  LOG_UNIT_TEST;
99 
100  SyncAndTest sync(*_mesh);
101  LocationMap<Node> loc_map;
102  loc_map.init(*_mesh);
104  (*TestCommWorld, _mesh->nodes_begin(), _mesh->nodes_end(),
105  loc_map, sync);
106  }
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:171
void sync_dofobject_data_by_xyz(const Communicator &comm, const Iterator &range_begin, const Iterator &range_end, LocationMap< DofObjType > &location_map, SyncFunctor &sync)
Request data about a range of ghost nodes uniquely identified by their xyz location or a range of act...
std::unique_ptr< Mesh > _mesh
Data structures that enable location-based lookups The key is a hash of the Point location...
Definition: location_maps.h:53
void init(MeshBase &)
Definition: location_maps.C:47

Member Data Documentation

◆ _mesh

std::unique_ptr<Mesh> ParallelGhostSyncTest::_mesh
private

Definition at line 83 of file parallel_ghost_sync_test.C.


The documentation for this class was generated from the following file: