LifeV
lifev/navier_stokes/examples/resistanceBCs/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): Christophe Prud'homme <christophe.prudhomme@epfl.ch>
6
Date: 2005-04-16
7
8
Copyright (C) 2005 EPFL
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
\file main.cpp
27
\author Christophe Prud'homme <christophe.prudhomme@epfl.ch>
28
\date 2005-04-16
29
*/
30
31
#
ifdef
TWODIM
32
#
error
example_resistance
cannot
be
compiled
in
2D
33
#
endif
34
35
// Tell the compiler to ignore specific kind of warnings:
36
#
pragma
GCC
diagnostic
ignored
"-Wunused-variable"
37
#
pragma
GCC
diagnostic
ignored
"-Wunused-parameter"
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
//Tell the compiler to restore the warning previously silented
48
#
pragma
GCC
diagnostic
warning
"-Wunused-variable"
49
#
pragma
GCC
diagnostic
warning
"-Wunused-parameter"
50
51
#
include
<
lifev
/
core
/
LifeV
.
hpp
>
52
#
include
<
lifev
/
core
/
algorithm
/
PreconditionerIfpack
.
hpp
>
53
#
include
<
lifev
/
core
/
algorithm
/
PreconditionerML
.
hpp
>
54
55
#
include
"resistance.hpp"
56
57
58
using
namespace
LifeV
;
59
60
std
::
set
<
UInt
>
parseList
(
const
std
::
string
&
list
)
61
{
62
std::string stringList = list;
63
std::set<UInt> setList;
64
if
( list ==
""
)
65
{
66
return
setList;
67
}
68
size_t commaPos = 0;
69
while
( commaPos != std::string::npos )
70
{
71
commaPos = stringList.find (
","
);
72
setList.insert ( atoi ( stringList.substr ( 0, commaPos ).c_str() ) );
73
stringList = stringList.substr ( commaPos + 1 );
74
}
75
setList.insert ( atoi ( stringList.c_str() ) );
76
return
setList;
77
}
78
79
int
80
main
(
int
argc,
char
** argv )
81
{
82
#
ifdef
HAVE_MPI
83
MPI_Init (&argc, &argv);
84
#
endif
85
86
//**************** cylinder
87
// MPI_Init(&argc,&argv);
88
89
ResistanceTest
res
(
argc
,
argv
)
;
90
res
.
run
(
)
;
91
92
#
ifdef
HAVE_MPI
93
MPI_Finalize();
94
#
endif
95
return
( EXIT_SUCCESS );
96
}
ETCurrentFE::updateInverseJacobian
void updateInverseJacobian(const UInt &iQuadPt)
Definition:
ETCurrentFE.cpp:405
parseList
std::set< UInt > parseList(const std::string &list)
Definition:
lifev/navier_stokes/examples/resistanceBCs/main.cpp:60
ResistanceTest::ResistanceTest
ResistanceTest(int argc, char **argv)
Definition:
navier_stokes/examples/resistanceBCs/resistance.cpp:266
ResistanceTest::run
void run()
Definition:
navier_stokes/examples/resistanceBCs/resistance.cpp:301
main
int main(int argc, char **argv)
Definition:
dummy.cpp:5
ResistanceTest
2D/3D Cylinder Simulation class
Definition:
navier_stokes/examples/resistanceBCs/resistance.hpp:42
lifev-release-doc
lifev
navier_stokes
examples
resistanceBCs
main.cpp
Generated on Wed Mar 7 2018 19:46:11 for LifeV by
1.8.13