LifeV
lifev/darcy/examples/twophase_impes/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): A. Fumagalli <alessio.fumagalli@mail.polimi.it>
6
Date: 2010-07-29
7
8
Copyright (C) 2010 EPFL, Politecnico di Milano
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
27
Simple Darcy test with Dirichlet, Neumann and Robin boundary conditions
28
29
Solve the problem
30
31
div u - f = 0 in \Omega
32
33
K^{-1} u + \nabla p = 0 in \Omega
34
35
*/
36
37
38
/**
39
@file main.hpp
40
@author A. Fumagalli <alessio.fumagalli@mail.polimi.it>
41
@date 2010-07-29
42
*/
43
44
45
// ===================================================
46
//! Includes
47
// ===================================================
48
49
50
#
include
<
Epetra_ConfigDefs
.
h
>
51
#
ifdef
EPETRA_MPI
52
#
include
<
mpi
.
h
>
53
#
include
<
Epetra_MpiComm
.
h
>
54
#
else
55
#
include
<
Epetra_SerialComm
.
h
>
56
#
endif
57
58
59
#
include
<
lifev
/
core
/
LifeV
.
hpp
>
60
61
#
include
<
lifev
/
core
/
algorithm
/
PreconditionerIfpack
.
hpp
>
62
#
include
<
lifev
/
core
/
algorithm
/
PreconditionerML
.
hpp
>
63
64
#
include
"impes.hpp"
65
66
// ===================================================
67
//! Namespaces
68
// ===================================================
69
using
namespace
LifeV;
70
71
// ===================================================
72
//! Main
73
// ===================================================
74
int
main
(
int
argc,
char
** argv)
75
{
76
77
#
ifdef
HAVE_MPI
78
MPI_Init (&argc, &argv);
79
std::cout <<
"MPI Initialization"
<< std::endl;
80
#
endif
81
82
// Error of the problem
83
LifeV::Real error (0);
84
// Error known
85
const
LifeV::Real errorKnown ( 0.200340988220163 );
86
// Tollerance between the error and the errorKnown
87
const
LifeV::Real tollerance ( 1e-8 );
88
89
impes
IMPES
(
argc
,
argv
)
;
90
error = IMPES.run();
91
92
93
#
ifdef
HAVE_MPI
94
MPI_Finalize();
95
std::cout <<
"MPI Finalization"
<< std::endl;
96
#
endif
97
98
if
( std::fabs ( error - errorKnown ) > tollerance )
99
{
100
return
( EXIT_FAILURE );
101
}
102
else
103
{
104
return
( EXIT_SUCCESS );
105
}
106
}
impes::impes
impes(int argc, char **argv)
Constructors.
Definition:
impes.cpp:204
impes
Definition:
impes.hpp:61
main
int main(int argc, char **argv)
Definition:
lifev/structure/testsuite/evaluateNodalETA/main.cpp:921
lifev-release-doc
lifev
darcy
examples
twophase_impes
main.cpp
Generated on Wed Mar 7 2018 19:44:10 for LifeV by
1.8.13