LifeV
mainKimMoin.cpp
Go to the documentation of this file.
1 /* -*- mode: c++ -*-
2 
3  This file is part of the LifeV Applications.
4 
5  Author(s): Christophe Prud'homme <christophe.prudhomme@epfl.ch>
6  Gwenol Grandperrin <gwenol.grandperrin@epfl.ch>
7  Date: 2011-03-08
8 
9  Copyright (C) 2010 EPFL
10 
11  This program is free software; you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation; either version 2.1 of the License, or
14  (at your option) any later version.
15 
16  This program is distributed in the hope that it will be useful, but
17  WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with this program; if not, write to the Free Software
23  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
24  USA
25 */
26 /**
27  \file main.cpp
28  \author Christophe Prud'homme <christophe.prudhomme@epfl.ch>
29  \author Gwenol Grandperrin <gwenol.grandperrin@epfl.ch>
30  \date 2011-03-08
31  */
32 
33 
34 #include <Epetra_ConfigDefs.h>
35 #ifdef EPETRA_MPI
36 #include <mpi.h>
37 #include <Epetra_MpiComm.h>
38 #else
39 #include <Epetra_SerialComm.h>
40 #endif
41 
42 
43 #include <lifev/core/LifeV.hpp>
44 
45 #include <lifev/core/algorithm/PreconditionerIfpack.hpp>
46 #include <lifev/core/algorithm/PreconditionerML.hpp>
47 #include <lifev/navier_stokes/function/KimMoin.hpp>
48 
49 #include "navierStokes.hpp"
50 
51 using namespace LifeV;
52 
53 int
54 main ( int argc, char** argv )
55 {
56 
57  bool verbose (false);
58 #ifdef HAVE_MPI
59  MPI_Init (&argc, &argv);
60  Epetra_MpiComm Comm (MPI_COMM_WORLD);
61  if ( Comm.MyPID() == 0 )
62  {
63  verbose = true;
64  }
65 #else
66  Epetra_SerialComm Comm;
67  verbose = true;
68 #endif
69 
70  NavierStokes<RegionMesh<LinearTriangle>, KimMoin >
71  ns ( argc, argv, "dataKimMoin", "kimMoin" );
72 
73  ns.run();
74 
75  if (verbose)
76  {
77  std::cout << "End Result: TEST PASSED" << std::endl;
78  }
79 
80 #ifdef HAVE_MPI
81  if (verbose)
82  {
83  std::cout << "MPI Finalization" << std::endl;
84  }
85  MPI_Finalize();
86 #endif
87  return ( EXIT_SUCCESS );
88 }
int main(int argc, char **argv)