LifeV
lifev/core/examples/utility_mesh_extractor/main.cpp
Go to the documentation of this file.
1 /*
2  * test_genAlpha.cpp
3  *
4  * Created on: Jul 27, 2010
5  * Author: uvilla
6  */
7 
8 #include <Epetra_ConfigDefs.h>
9 #include <Epetra_Comm.h>
10 
11 #include <lifev/core/LifeV.hpp>
12 #include <lifev/core/filter/GetPot.hpp>
13 #include <lifev/core/util/LifeChrono.hpp>
14 
15 
16 using namespace LifeV;
17 
18 int run (GetPot& dataFile, bool verbose, std::shared_ptr<Epetra_Comm>& comm);
19 
20 // Do not edit
21 int main (int argc, char** argv)
22 {
23  using namespace LifeV;
24 #ifdef HAVE_MPI
25  MPI_Init (&argc, &argv);
26  std::cout << "MPI Initialization\n";
27 #endif
28 
29 #ifdef EPETRA_MPI
30  std::shared_ptr<Epetra_Comm> comm (new Epetra_MpiComm (MPI_COMM_WORLD) );
31 #else
32  std::shared_ptr<Epetra_Comm> comm (new Epetra_SerialComm() );
33 #endif
34  bool verbose = comm->MyPID() == 0;
35 
36  std::string dataFileName;
37  GetPot command_line (argc, argv);
38  dataFileName = command_line.follow ("data", 2, "-f", "--file");
39  GetPot dataFile (dataFileName);
40 
41  int check;
42  check = run (dataFile, verbose, comm);
43 
44  comm.reset();
45 
46 #ifdef HAVE_MPI
47  MPI_Finalize();
48  std::cout << "MPI Finalization \n";
49 #endif
50 
51  return check;
52 }
GetPot(const int argc_, char **argv_, const char *FieldSeparator=0x0)
Definition: GetPot.hpp:507
void updateInverseJacobian(const UInt &iQuadPt)
int run(GetPot &dataFile, bool verbose, std::shared_ptr< Epetra_Comm > &comm)
int main(int argc, char **argv)
Definition: dummy.cpp:5
GetPot(const STRING_VECTOR &FileNameList)
Definition: GetPot.hpp:645
const std::string follow(const char *Default, unsigned No, const char *Option,...)
Definition: GetPot.hpp:1510