LifeV
lifev/heart/examples/basic_example/main.cpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 /*!
28  @file
29  @brief main for the test_heart
30 
31  @date 11−2007
32  @author Lucia Mirabella <lucia.mirabella@gmail.com>, Mauro Perego <perego.mauro@gmail.com>
33 
34  @contributor Simone Rossi <simone.rossi@epfl.ch>, Ricardo Ruiz-Baier <ricardo.ruiz@epfl.ch>
35  @mantainer Simone Rossi <simone.rossi@epfl.ch>
36  */
37 
38 
39 #include <Epetra_ConfigDefs.h>
40 #ifdef EPETRA_MPI
41 #include <mpi.h>
42 #include <Epetra_MpiComm.h>
43 #else
44 #include <Epetra_SerialComm.h>
45 #endif
46 
47 
48 
49 #include <lifev/core/LifeV.hpp>
50 #include <lifev/core/algorithm/PreconditionerIfpack.hpp>
51 #include <lifev/core/algorithm/PreconditionerML.hpp>
52 #include "heart.hpp"
53 
54 using namespace LifeV;
55 
56 Int main ( Int argc, char** argv )
57 {
58  //! Initializing Epetra communicator
59  MPI_Init (&argc, &argv);
60  Epetra_MpiComm Comm (MPI_COMM_WORLD);
61  if ( Comm.MyPID() == 0 )
62  {
63  cout << "% using MPI" << endl;
64  }
65  Heart heart ( argc, argv );
66  heart.run();
67 
68  //! Finalizing Epetra communicator
69  MPI_Finalize();
70  return ( EXIT_SUCCESS );
71 }
int32_type Int
Generic integer data.
Definition: LifeV.hpp:188
Heart(Int argc, char **argv)
Constructors.
Definition: heart.cpp:70
void run()
To build the system and iterate.
Definition: heart.cpp:94
int main(int argc, char **argv)