LifeV
lifev/core/testsuite/bdf/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 Simple Fourier test with Dirichlet Boundary condition
30 
31  @author Umberto Villa <uvilla@emory.edu>
32  @date 14-04-2010
33 
34  Solve the problem
35 
36  \partial_t u - \nu(t) \Delta u + sigma(t) u = f(t)
37 
38  u = g on the boundary
39  u(t=0) = u0 initial condition
40 
41  on a cube
42  \nu, \sigma and \source can be function of time
43  (which implies that the matrix needs to be reassembled each time)
44 
45  Purpose: Test BDF of different order
46 */
47 
48 // ===================================================
49 //! Includes
50 // ===================================================
51 
52 #include <Epetra_ConfigDefs.h>
53 #ifdef EPETRA_MPI
54 #include <mpi.h>
55 #include <Epetra_MpiComm.h>
56 #else
57 #include <Epetra_SerialComm.h>
58 #endif
59 
60 
61 #include <lifev/core/LifeV.hpp>
62 
63 #include <lifev/core/algorithm/PreconditionerIfpack.hpp>
64 #include <lifev/core/algorithm/PreconditionerML.hpp>
65 
66 #include "test_bdf.hpp"
67 
68 
69 // ===================================================
70 //! Namespaces
71 // ===================================================
72 using namespace LifeV;
73 
74 // ===================================================
75 //! Main
76 // ===================================================
77 int main (int argc, char** argv)
78 {
79 
80 #ifdef HAVE_MPI
81  MPI_Init (&argc, &argv);
82  std::cout << "MPI Initialization" << std::endl;
83 #endif
84 
85  test_bdf bdf_t ( argc, argv );
86  bdf_t.run();
87  bool check (true);
88  check = bdf_t.check();
89 
90 
91 #ifdef HAVE_MPI
92  MPI_Finalize();
93  std::cout << "MPI Finalization" << std::endl;
94 #endif
95 
96  if (check)
97  {
98  return ( EXIT_SUCCESS );
99  }
100  else
101  {
102  return ( EXIT_FAILURE );
103  }
104 }
void run()
Methods.
Definition: test_bdf.cpp:134
void updateInverseJacobian(const UInt &iQuadPt)
bool check()
Definition: test_bdf.cpp:393
int main(int argc, char **argv)
Definition: dummy.cpp:5
test_bdf(int argc, char **argv)
Constructors.
Definition: test_bdf.cpp:113