#include <libmesh.h>
LibMeshInit (int &argc, char **&argv, MPI_Comm COMM_WORLD_IN=MPI_COMM_WORLD)
LibMeshInit (int &argc, char **&argv)
~LibMeshInit ()
The LibMeshInit class, when constructed, initializes the dependent libraries (e.g. MPI or PETSC) and does the command line parsing needed by libMesh. The LibMeshInit destructor closes those libraries properly.
For most users, a single LibMeshInit object should be created at the start of your main() function. This object replaces the previous libMesh::init()/libMeshclose() methods, which are now deprecated.
Definition at line 57 of file libmesh.h.
Definition at line 378 of file libmesh.C.
References libMesh::_init(), EXTERN_C_FOR_PETSC_END::_ofstream, EXTERN_C_FOR_PETSC_END::cerr_buf(), EXTERN_C_FOR_PETSC_END::cout_buf(), libMesh::on_command_line(), and libMesh::processor_id().
{
libMesh::_init(argc, argv, COMM_WORLD_IN);
// Honor the --redirect-stdout command-line option.
// When this is specified each processor sends
// std::cout/std::cerr messages to
// stdout.processor.####
if (libMesh::on_command_line ('--redirect-stdout'))
{
char filechar[80];
sprintf (filechar, 'stdout.processor.%04d',
libMesh::processor_id());
_ofstream.reset (new std::ofstream (filechar));
// Redirect, saving the original streambufs!
cout_buf = std::cout.rdbuf (_ofstream->rdbuf());
cerr_buf = std::cerr.rdbuf (_ofstream->rdbuf());
}
}
Definition at line 373 of file libmesh.C.
References libMesh::_init().
{
libMesh::_init(argc, argv);
}
Definition at line 400 of file libmesh.C.
{
libMesh::_close();
}
Generated automatically by Doxygen for libMesh from the source code.