From db1e7e0954ec8c12085fb8e81bf7004ff3b268a2 Mon Sep 17 00:00:00 2001 From: bangerth Date: Tue, 4 Mar 2008 18:54:27 +0000 Subject: [PATCH] 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 --- deal.II/examples/step-33/step-33.cc | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) 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; -- 2.39.5