From: kronbichler Date: Fri, 24 Oct 2008 16:21:47 +0000 (+0000) Subject: Some small updates. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85d3dfb74a2f8df563f759a64ebddc258da7abe9;p=dealii-svn.git Some small updates. git-svn-id: https://svn.dealii.org/trunk@17337 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/utilities.h b/deal.II/base/include/base/utilities.h index bc86d128c8..2e951716c2 100644 --- a/deal.II/base/include/base/utilities.h +++ b/deal.II/base/include/base/utilities.h @@ -236,30 +236,31 @@ namespace Utilities /** - * This class provides the basic structures for the use of the - * Trilinos classes such as matrices, vectors, and - * preconditioners. The most important function in this class is - * comm(), which is needed for the initialization of - * Trilinos Epetra_Maps, which design the parallel distribution of - * vectors and matrices. Moreover, this class provides a unified - * interface to both serial and parallel implementations of - * Trilinos, sets up the MPI communicator in case the programs are - * run in parallel, and correctly terminates all processes when the - * destructor is called. An example usage of this class is shown in - * @ref step_32 step-32. + * This class provides the basic structures for the use of the Trilinos + * classes such as matrices, vectors, and preconditioners. The most + * important function in this class is comm(), which is needed + * for the initialization of Trilinos Epetra_Maps, which design the + * parallel distribution of vectors and matrices. Moreover, this class + * provides a unified interface to both serial and parallel + * implementations of Trilinos, sets up the MPI communicator in case the + * programs are run in parallel, and correctly terminates all processes + * when the destructor is called. An example usage of this class is shown + * in the tutorial program @ref step_32 "step-32". */ #ifdef DEAL_II_USE_TRILINOS class TrilinosTools { public: /** - * Constructor. Takes the - * arguments from the command - * line (in case of MPI, the - * number of processes is - * specified there), and sets up - * a respective communicator by - * calling MPI_Init(). + * Constructor. Takes the arguments + * from the command line (in case of + * MPI, the number of processes is + * specified there), and sets up a + * respective communicator by calling + * MPI_Init(). This + * constructor can only be called once + * in a program, since MPI cannot be + * initialized twice. */ TrilinosTools (int* argc, char*** argv); diff --git a/deal.II/base/source/utilities.cc b/deal.II/base/source/utilities.cc index 6d5cb76a81..d8334f4e97 100644 --- a/deal.II/base/source/utilities.cc +++ b/deal.II/base/source/utilities.cc @@ -477,13 +477,13 @@ namespace Utilities #ifdef DEAL_II_COMPILER_SUPPORTS_MPI int MPI_has_been_started = 0; MPI_Initialized(&MPI_has_been_started); - Assert (MPI_has_been_started == 0, - ExcMessage ("MPI error. You can only start MPI once!")); + AssertThrow (MPI_has_been_started == 0, + ExcMessage ("MPI error. You can only start MPI once!")); int mpi_err; mpi_err = MPI_Init (argc, argv); - Assert (mpi_err == 0, - ExcMessage ("MPI could not be initialized.")); + AssertThrow (mpi_err == 0, + ExcMessage ("MPI could not be initialized.")); communicator = Teuchos::rcp (new Epetra_MpiComm (MPI_COMM_WORLD), true); #else @@ -515,8 +515,8 @@ namespace Utilities mpi_err = MPI_Finalize(); #endif - Assert (mpi_err == 0, - ExcMessage ("An error occurred while calling MPI_Finalize()")); + AssertThrow (mpi_err == 0, + ExcMessage ("An error occurred while calling MPI_Finalize()")); }