Go to the documentation of this file.
32 #include "libmesh/libmesh.h"
34 #include "libmesh/mesh.h"
39 int main (
int argc,
char ** argv)
57 libmesh_error_msg(
"Usage: " << argv[0] <<
" -d 2 in.mesh [-o out.mesh]");
61 const unsigned int dim = std::atoi(argv[2]);
64 libmesh_example_requires(
dim <= LIBMESH_DIM,
"2D/3D support");
71 std::string input_filename = argv[3];
72 #ifndef LIBMESH_HAVE_XDR
73 libmesh_example_requires(input_filename.rfind(
".xdr") >=
74 input_filename.size(),
"XDR support");
85 if (argc >= 6 && std::string(
"-o") == argv[4])
88 std::string output_filename = argv[5];
89 #ifndef LIBMESH_HAVE_XDR
90 libmesh_example_requires(output_filename.rfind(
".xdr") >=
91 output_filename.size(),
"XDR support");
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
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.
virtual void write(const std::string &name)=0
The libMesh namespace provides an interface to certain functionality in the library.
int main(int argc, char **argv)
void init(triangulateio &t)
Initializes the fields of t to nullptr/0 as necessary.
The LibMeshInit class, when constructed, initializes the dependent libraries (e.g.
void print_info(std::ostream &os=libMesh::out) const
Prints relevant information about the mesh.