From: Wolfgang Bangerth Date: Tue, 4 Mar 2008 18:54:27 +0000 (+0000) Subject: Make the program run sequentially, i.e. without MPI. Define the DIMENSION in the... X-Git-Tag: v8.0.0~9325 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25750e0251296c4680a81e914f806148e7ce8179;p=dealii.git Make the program run sequentially, i.e. without MPI. Define the DIMENSION in the program, at least for the moment. git-svn-id: https://svn.dealii.org/trunk@15845 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-33/step-33.cc b/deal.II/examples/step-33/step-33.cc index 4e0d8afb61..136f06ac46 100644 --- a/deal.II/examples/step-33/step-33.cc +++ b/deal.II/examples/step-33/step-33.cc @@ -17,14 +17,10 @@ //

Include files

- // Aztecoo require mpi (even though we run on only - // one processor in this example). -#include - // Here we have the necessary TRILINOS includes. // // Epetra is the basic trilinos vector/matrix library. -#include +#include #include #include #include @@ -86,13 +82,15 @@ // Introduce the dealii library into the current namespace. using namespace dealii; +#define DIMENSION 2 + // We define a shorter name for the automatic differentiation // type. typedef Sacado::Fad::DFad fad_double; typedef unsigned int UInt; // The Epetra library requires a 'communicator', which describes // the layout of a parallel (or serial) set of processors. -Epetra_MpiComm *Comm; +Epetra_SerialComm *Comm; //

Flux function definition

// Here we define the flux function for this system of conservation @@ -1936,10 +1934,9 @@ void ConsLaw::run () GridIn grid_in; grid_in.attach_triangulation(triangulation); std::cout << "Opening mesh <" << mesh << ">" << std::endl; - std::ifstream input_file(mesh.c_str(), std::ios::in); + std::ifstream input_file(mesh.c_str()); - Assert (infile, - ExcFileNotOpen()); + Assert (input_file, ExcFileNotOpen(mesh.c_str())); grid_in.read_ucd(input_file); input_file.close(); @@ -2067,8 +2064,7 @@ void ConsLaw::run () int main (int argc, char *argv[]) { - MPI_Init(&argc, &argv); - Comm = new Epetra_MpiComm(MPI_COMM_WORLD); + Comm = new Epetra_SerialComm(); if (argc != 2) { std::cout << "Usage:" << argv[0] << " infile" << std::endl;