LifeV
fsi_blocks/testsuite/fsi_restart/boundaryConditions.hpp
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 File containing the boundary conditions for the Monolithic Test
30  *
31  * @date 2009-04-09
32  * @author Davide Forti <davide.forti@epfl.ch>
33  *
34  * Contains the functions to be assigned as boundary conditions, in the file boundaryConditions.hpp . The functions
35  * can depend on time and space, while they can take in input an ID specifying one of the three principal axis
36  * if the functions to assign is vectorial and the boundary condition is of type \c Full \c.
37  */
38 
39 #ifndef BCFSITUBE_HPP
40 #define BCFSITUBE_HPP
41 
42 // LifeV includes
43 #include <lifev/core/LifeV.hpp>
44 #include <lifev/core/fem/BCHandler.hpp>
45 
46 #include "ud_functions.hpp"
47 
48 #define OUTLET 3
49 #define INLET 2
50 #define WALL 1
51 #define INOUTEDGE 20
52 #define OUTERWALL 10
53 #define FLUIDINTERFACE 1
54 
55 namespace LifeV
56 {
57 
59 
60 // Set here the BCs for the fluid
62 {
63  BCFunctionBase zero_function (fZero);
64  BCFunctionBase pressure_wave (pressure);
65 
66  bcPtr_Type bc (new BCHandler );
67  bc->addBC ("Inflow", INLET, Natural, Normal, pressure_wave);
68  bc->addBC ("INOUTEDGE", INOUTEDGE, EssentialEdges, Full, zero_function, 3);
69  bc->addBC ("Outflow", OUTLET, Natural, Normal, zero_function);
70 
71  return bc;
72 }
73 
74 // Set here the BCs for the structure
76 {
77  BCFunctionBase zero_function (fZero);
78 
79  bcPtr_Type bc (new BCHandler );
80 
81  bc->addBC ("Inflow", INLET, Essential, Full, zero_function, 3);
82  bc->addBC ("Outflow", OUTLET, Essential, Full, zero_function, 3);
83 
84  return bc;
85 }
86 
87 // Set here the BCs for the ale
89 {
90  BCFunctionBase zero_function (fZero);
91 
92  bcPtr_Type bc (new BCHandler );
93 
94  bc->addBC ("Inflow", INLET, Essential, Full, zero_function, 3);
95  bc->addBC ("Outflow", OUTLET, Essential, Full, zero_function, 3);
96 
97  return bc;
98 }
99 
100 // Whatever problem is solved, this function below need to be present
101 // as we use it to apply dirichlet BCs at the fluid interface when
102 // using the FaCSI preconditioner
104 {
105  BCFunctionBase zero_function (fZero);
106 
107  bcPtr_Type bc (new BCHandler );
108 
109  bc->addBC ("Interface", FLUIDINTERFACE, Essential, Full, zero_function, 3);
110 
111  return bc;
112 }
113 
114 }
115 
116 #endif
boost::shared_ptr< BCHandler > bcPtr_Type