40{
41
42
43
44
45
47
48
49
50
51
52
53 libmesh_error_msg_if(argc < 4, "Usage: " << argv[0] << " -d 2 in.mesh [-o out.mesh]");
54
55
56 const unsigned int dim =
58 libmesh_error_msg_if(
dim > 3,
"Usage: " << argv[0] <<
" -d 2 in.mesh [-o out.mesh]");
59
60
61 libmesh_example_requires(
dim <= LIBMESH_DIM,
"2D/3D support");
62
63
64
66
67
68 const std::string input_filename = argv[3];
69#ifndef LIBMESH_HAVE_XDR
70 libmesh_example_requires(input_filename.rfind(".xdr") >=
71 input_filename.size(), "XDR support");
72#endif
73
74
76
77
79
80
81
83 {
84
85 const std::string output_filename =
87#ifndef LIBMESH_HAVE_XDR
88 libmesh_example_requires(output_filename.rfind(".xdr") >=
89 output_filename.size(), "XDR support");
90#endif
91
93 }
94
95
96
97
98
99 return 0;
100}
The LibMeshInit class, when constructed, initializes the dependent libraries (e.g.
virtual void write(const std::string &name) const =0
virtual void read(const std::string &name, void *mesh_data=nullptr, bool skip_renumber_nodes_and_elements=false, bool skip_find_neighbors=false, bool skip_detect_interior_parents=false)=0
Interfaces for reading/writing a mesh to/from a file.
void print_info(std::ostream &os=libMesh::out, const unsigned int verbosity=0, const bool global=true) const
Prints relevant information about the mesh.
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
void init(triangulateio &t)
Initializes the fields of t to nullptr/0 as necessary.
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
T command_line_next(std::string name, T default_value)
Use GetPot's search()/next() functions to get following arguments from the command line.
bool on_command_line(std::string arg)