1 #include "libmesh/distributed_mesh.h" 2 #include "libmesh/replicated_mesh.h" 3 #include "libmesh/checkpoint_io.h" 4 #include "libmesh/mesh_generation.h" 5 #include "libmesh/parallel.h" 6 #include "libmesh/partitioner.h" 22 CPPUNIT_TEST( testAsciiDistRepSplitter );
23 CPPUNIT_TEST( testBinaryDistRepSplitter );
24 CPPUNIT_TEST( testAsciiRepDistSplitter );
25 CPPUNIT_TEST( testBinaryRepDistSplitter );
26 CPPUNIT_TEST( testAsciiRepRepSplitter );
27 CPPUNIT_TEST( testBinaryRepRepSplitter );
28 CPPUNIT_TEST( testAsciiDistDistSplitter );
29 CPPUNIT_TEST( testBinaryDistDistSplitter );
32 CPPUNIT_TEST_SUITE_END();
46 template <
typename MeshA,
typename MeshB>
50 #ifdef LIBMESH_HAVE_XDR 55 const unsigned int n_procs = using_distmesh ?
63 const std::string filename =
64 std::string(
"checkpoint_splitter.cp") + (binary ?
"r" :
"a");
106 std::size_t read_in_elements = 0;
111 mesh.pid_elements_end(pid));
116 CPPUNIT_ASSERT_EQUAL(static_cast<dof_id_type>(read_in_elements), original_n_elem);
118 #endif // LIBMESH_HAVE_XDR 125 testSplitter<DistributedMesh, ReplicatedMesh>(
false,
true);
132 testSplitter<DistributedMesh, ReplicatedMesh>(
true,
true);
139 testSplitter<ReplicatedMesh, DistributedMesh>(
false,
true);
146 testSplitter<ReplicatedMesh, DistributedMesh>(
true,
true);
153 testSplitter<ReplicatedMesh, ReplicatedMesh>(
false,
false);
160 testSplitter<ReplicatedMesh, ReplicatedMesh>(
true,
false);
167 testSplitter<DistributedMesh, DistributedMesh>(
false,
true);
174 testSplitter<DistributedMesh, DistributedMesh>(
true,
true);
The CheckpointIO class can be used to write simplified restart files that can be used to restart simu...
virtual void write(const std::string &name) override
This method implements writing a mesh to a specified file.
const processor_id_type & current_n_processors() const
Get/Set the n_processors to use.
void testBinaryRepRepSplitter()
void testSplitter(bool binary, bool using_distmesh)
libMesh::Parallel::Communicator * TestCommWorld
virtual void read(const std::string &input_name) override
This method implements reading a mesh from a specified file.
const Parallel::Communicator & comm() const
The libMesh namespace provides an interface to certain functionality in the library.
bool parallel() const
Get/Set the flag indicating if we should read/write binary.
Real distance(const Point &p)
virtual void partition(const unsigned int n_parts)
Call the default partitioner (currently metis_partition()).
void testBinaryDistDistSplitter()
const std::vector< processor_id_type > & current_processor_ids() const
Get/Set the processor id or processor ids to use.
processor_id_type size() const
uint8_t processor_id_type
processor_id_type n_processors() const
void testAsciiRepRepSplitter()
CPPUNIT_TEST_SUITE_REGISTRATION(CheckpointIOTest)
void testAsciiDistDistSplitter()
void testAsciiDistRepSplitter()
bool binary() const
Get/Set the flag indicating if we should read/write binary.
void testBinaryDistRepSplitter()
void testBinaryRepDistSplitter()
virtual dof_id_type n_elem() const =0
processor_id_type processor_id() const
void testAsciiRepDistSplitter()