Go to the source code of this file.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 41 of file splitter.C.
47 libMesh::out <<
"Example: " << argv[0] <<
" --mesh=filename.e --n-procs='4 8 16' "
48 "[--num-ghost-layers <n>] [--dry-run] [--ascii]\n\n"
49 <<
"--mesh Full name of the mesh file to read in. \n"
50 <<
"--n-procs Vector of number of processors.\n"
51 <<
"--num-ghost-layers Number of layers to ghost when partitioning (Default: 1).\n"
52 <<
"--dry-run Only test the partitioning, don't write any files.\n"
53 <<
"--ascii Write ASCII cpa files rather than binary cpr files.\n"
61 std::vector<processor_id_type> all_n_procs;
70 if (num_ghost_layers > 1)
80 for (
const auto & n_procs : all_n_procs)
82 libMesh::out <<
"splitting " << n_procs <<
" ways..." << std::endl;
88 libMesh::out <<
" * writing " << cpr->current_processor_ids().size() <<
" files per process..." << std::endl;
92 cpr->binary() = binary;
93 std::ostringstream outputname;
95 cpr->write(outputname.str());
References libMesh::MeshBase::add_ghosting_functor(), libMesh::command_line_value(), libMesh::command_line_vector(), libMesh::TriangleWrapper::init(), mesh, libMesh::on_command_line(), libMesh::out, libMesh::MeshBase::read(), remove_extension(), libMesh::DefaultCoupling::set_n_levels(), and libMesh::split_mesh().
◆ remove_extension()
std::string remove_extension |
( |
const std::string & |
filename | ) |
|
Definition at line 31 of file splitter.C.
33 size_t lastdot = filename.find_last_of(
".");
35 if (lastdot == std::string::npos)
38 return filename.substr(0, lastdot);
Referenced by main().
virtual void read(const std::string &name, void *mesh_data=nullptr, bool skip_renumber_nodes_and_elements=false, bool skip_find_neighbors=false)=0
Interfaces for reading/writing a mesh to/from a file.