19 #include "libmesh/libmesh.h" 20 #include "libmesh/equation_systems.h" 21 #include "libmesh/mesh.h" 22 #include "libmesh/namebased_io.h" 28 int main(
int argc,
char ** argv)
35 if (argc < 3 || argc > 4)
37 (
"Usage: " << argv[0] <<
38 " inputmesh [inputsolution] outputplot");
40 LOG_CALL(
"mesh.read()",
"main",
mesh.
read(argv[1]));
47 std::string solnname = argv[2];
49 LOG_CALL(
"es.read()",
"main",
56 libMesh::out <<
"Loaded solution " << solnname << std::endl;
60 std::string outputname(argv[argc-1]);
62 LOG_SCOPE(
"write_equation_systems()",
"main");
63 if ((outputname.find(
".xda") != std::string::npos) ||
64 (outputname.find(
".xdr") != std::string::npos))
67 es.write(
"soln-"+outputname);
73 libMesh::out <<
"Wrote output " << outputname << std::endl;
This class supports simple reads and writes in any libMesh-supported format, by dispatching to one of...
virtual void write_equation_systems(const std::string &filename, const EquationSystems &es, const std::set< std::string > *system_names=nullptr) override
This method implements writing a mesh with data to a specified file where the data is taken from the ...
This is the EquationSystems class.
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.
int main(int argc, char **argv)
The LibMeshInit class, when constructed, initializes the dependent libraries (e.g.
The libMesh namespace provides an interface to certain functionality in the library.
void print_info(std::ostream &os=libMesh::out, const unsigned int verbosity=0, const bool global=true) const
Prints relevant information about the mesh.
void init(triangulateio &t)
Initializes the fields of t to nullptr/0 as necessary.
virtual void write(const std::string &name)=0
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.