LifeV
navier_stokes/examples/resistanceBCs/flowConditions.hpp
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-19
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 cylinder.hpp
27  \author Christophe Prud'homme <christophe.prudhomme@epfl.ch>
28  \date 2005-04-19
29  */
30 
31 #ifndef __FLOWCONDITION_H
32 #define __FLOWCONDITION_H 1
33 
34 // Tell the compiler to ignore specific kind of warnings:
35 #pragma GCC diagnostic ignored "-Wunused-variable"
36 #pragma GCC diagnostic ignored "-Wunused-parameter"
37 
38 #include <Epetra_SerialDenseVector.h>
39 
40 // Tell the compiler to ignore specific kind of warnings:
41 #pragma GCC diagnostic warning "-Wunused-variable"
42 #pragma GCC diagnostic warning "-Wunused-parameter"
43 
44 #include <lifev/core/LifeV.hpp>
45 #include <lifev/navier_stokes/solver/OseenSolver.hpp>
46 #include <lifev/core/mesh/RegionMesh.hpp>
47 #include <lifev/core/array/VectorEpetra.hpp>
48 /*!
49  * \class Outflow
50  * \brief 2D/3D Cylinder Simulation class
51  *
52  * @author Christophe Prud'homme
53  * @see
54  */
55 
56 namespace LifeV
57 {
58 
59 class FlowConditions
60 {
61 public:
62 
64 
65  void initParameters ( const int outflowFlag, const Real resistance, const Real hydrostatic, const std::string name );
66 
67  void renewParameters ( OseenSolver<RegionMesh<LinearTetra> >& solver, const VectorEpetra& solution );
68 
69  Real fZero ( const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& /*i*/ );
70 
71  static Real outPressure0 (const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& /*i*/);
72  static Real outPressure1 (const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& /*i*/);
73  static Real outPressure2 (const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& /*i*/);
74  static Real outPressure3 (const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& /*i*/);
75  static Real outPressure4 (const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& /*i*/);
76  static Real outPressure5 (const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& /*i*/);
77  static Real outPressure6 (const Real& /*t*/, const Real& /*x*/, const Real& /*y*/, const Real& /*z*/, const ID& /*i*/);
78 
79  inline Real resistance( )
80  {
81  return M_resistance;
82  }
83 
84  inline Real flow( )
85  {
86  return M_outflux;
87  }
88 
89  inline std::string name( )
90  {
91  return M_name;
92  }
93 
94  inline Real hydrostatic( )
95  {
96  return M_hydrostaticP;
97  }
98 
99  inline Real outP( )
100  {
101  return M_outP;
102  }
103 
104 private:
105  Real pi;
106 
107  Real M_outflux;
110  Real M_outP;
111  int M_flag;
112  std::string M_name;
113 
114  UInt conditionNumber;
115 
116  static std::vector<Real> outputVector;
117 };
118 }
119 #endif /* __FLOWCONDITION_H */
VectorEpetra - The Epetra Vector format Wrapper.
static Real outPressure1(const Real &, const Real &, const Real &, const Real &, const ID &)
static Real outPressure5(const Real &, const Real &, const Real &, const Real &, const ID &)
void updateInverseJacobian(const UInt &iQuadPt)
void renewParameters(OseenSolver< RegionMesh< LinearTetra > > &solver, const VectorEpetra &solution)
uint32_type ID
IDs.
Definition: LifeV.hpp:194
static Real outPressure4(const Real &, const Real &, const Real &, const Real &, const ID &)
void initParameters(const int outflowFlag, const Real resistance, const Real hydrostatic, const std::string name)
Real fZero(const Real &, const Real &, const Real &, const Real &, const ID &)
double Real
Generic real data.
Definition: LifeV.hpp:175
static Real outPressure6(const Real &, const Real &, const Real &, const Real &, const ID &)
static Real outPressure3(const Real &, const Real &, const Real &, const Real &, const ID &)
static Real outPressure2(const Real &, const Real &, const Real &, const Real &, const ID &)
static Real outPressure0(const Real &, const Real &, const Real &, const Real &, const ID &)
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191