LifeV
lifev/navier_stokes/examples/cylinder/main.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  Date: 2005-04-16
7 
8  Copyright (C) 2005 EPFL
9 
10  This program is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 2.1 of the License, or
13  (at your option) any later version.
14 
15  This program is distributed in the hope that it will be useful, but
16  WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23  USA
24 */
25 /**
26  \file main.cpp
27  \author Christophe Prud'homme <christophe.prudhomme@epfl.ch>
28  \date 2005-04-16
29  */
30 
31 #ifdef TWODIM
32 #error test_cylinder cannot be compiled in 2D
33 #endif
34 
35 
36 #include <Epetra_ConfigDefs.h>
37 #ifdef EPETRA_MPI
38 #include <mpi.h>
39 #include <Epetra_MpiComm.h>
40 #else
41 #include <Epetra_SerialComm.h>
42 #endif
43 
44 
45 #include <lifev/core/LifeV.hpp>
46 #include <lifev/core/algorithm/PreconditionerIfpack.hpp>
47 #include <lifev/core/algorithm/PreconditionerML.hpp>
48 
49 #include "cylinder.hpp"
50 
51 
52 using namespace LifeV;
53 
55 {
56  std::string stringList = list;
57  std::set<UInt> setList;
58  if ( list == "" )
59  {
60  return setList;
61  }
62  size_t commaPos = 0;
63  while ( commaPos != std::string::npos )
64  {
65  commaPos = stringList.find ( "," );
66  setList.insert ( atoi ( stringList.substr ( 0, commaPos ).c_str() ) );
67  stringList = stringList.substr ( commaPos + 1 );
68  }
69  setList.insert ( atoi ( stringList.c_str() ) );
70  return setList;
71 }
72 
73 int
74 main ( int argc, char** argv )
75 {
76 #ifdef HAVE_MPI
77  MPI_Init (&argc, &argv);
78 #endif
79 
80  //**************** cylinder
81  // MPI_Init(&argc,&argv);
82 
83  Cylinder cyl ( argc, argv );
84  cyl.run();
85 
86 #ifdef HAVE_MPI
87  MPI_Finalize();
88 #endif
89  return ( EXIT_SUCCESS );
90 }
void updateInverseJacobian(const UInt &iQuadPt)
std::set< UInt > parseList(const std::string &list)
int main(int argc, char **argv)
Definition: dummy.cpp:5