LifeV
lifev/core/testsuite/hyperbolic/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
Simple hyperbolic test with Dirichlet, Neumann and Robin boundary conditions
29
30
*/
31
32
33
/**
34
@file
35
@author A. Fumagalli <alessio.fumagalli@mail.polimi.it>
36
@author M. Kern <michel.kern@inria.fr>
37
@date 2010-07-29
38
39
*/
40
41
42
// ===================================================
43
//! Includes
44
// ===================================================
45
46
47
#
include
<
Epetra_ConfigDefs
.
h
>
48
#
ifdef
EPETRA_MPI
49
#
include
<
mpi
.
h
>
50
#
include
<
Epetra_MpiComm
.
h
>
51
#
else
52
#
include
<
Epetra_SerialComm
.
h
>
53
#
endif
54
55
56
#
include
<
lifev
/
core
/
LifeV
.
hpp
>
57
58
#
include
"hyperbolic.hpp"
59
60
61
62
// ===================================================
63
//! Namespaces
64
// ===================================================
65
using
namespace
LifeV;
66
67
// ===================================================
68
//! Main
69
// ===================================================
70
int
main
(
int
argc,
char
** argv)
71
{
72
73
#
ifdef
HAVE_MPI
74
MPI_Init (&argc, &argv);
75
std::cout <<
"MPI Initialization"
<< std::endl;
76
#
endif
77
78
79
// Error of the problem
80
LifeV::Real error (0);
81
// Error known
82
const
LifeV::Real errorKnown ( 0.357740920454703 );
83
// Tollerance between the error and the errorKnown
84
const
LifeV::Real tolerance ( 1e-8 );
85
86
hyperbolic
Hyperbolic
(
argc
,
argv
)
;
87
88
// Error of the problem
89
error = Hyperbolic.run();
90
91
bool
success = std::fabs ( error - errorKnown ) <= tolerance;
92
93
#
ifdef
HAVE_MPI
94
MPI_Finalize();
95
std::cout <<
"MPI Finalization"
<< std::endl;
96
#
endif
97
98
// For tribits handling of success/failure
99
//! @todo Add verbose to avoid all processes printing this stuff
100
if
(!success)
101
{
102
std::cout <<
"End Result: TEST NOT PASSED"
<< std::endl;
103
return
( EXIT_FAILURE );
104
}
105
else
106
{
107
std::cout <<
"End Result: TEST PASSED"
<< std::endl;
108
}
109
110
return
( EXIT_SUCCESS );
111
}
hyperbolic::hyperbolic
hyperbolic(int argc, char **argv)
Constructors.
Definition:
hyperbolic.cpp:307
hyperbolic
Includes.
Definition:
hyperbolic.hpp:60
main
int main(int argc, char **argv)
Definition:
lifev/structure/testsuite/evaluateNodalETA/main.cpp:921
lifev-release-doc
lifev
core
testsuite
hyperbolic
main.cpp
Generated on Wed Mar 7 2018 19:43:57 for LifeV by
1.8.13