LifeV
FSIFixedPoint.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 Implementation of an FSI with fixed point iterations.
30 
31  @author Miguel Fernandez
32  @author Gilles Fourestey
33  @date 10-06-2010
34 
35  @contributor Simone Deparis <simone.deparis@epfl.ch>
36  @maintainer Simone Deparis <simone.deparis@epfl.ch>
37  */
38 
39 
40 #ifndef FSIFIXEDPOINT_HPP
41 #define FSIFIXEDPOINT_HPP
42 
43 #include <lifev/core/algorithm/NonLinearAitken.hpp>
44 #include <lifev/fsi/solver/FSIOperator.hpp>
45 
46 namespace LifeV
47 {
48 
49 //! FSIFixedPont - Implementation of an FSI with fixed point iterations.
50 /*!
51 
52  @author Miguel Fernandez
53  @author Gilles Fourestey
54  @author Paolo Crosetto <paolo.crosetto@epfl.ch>
55  @see
56  \cite DeparisDiscacciati2006 (Dirichlet--Neumann )
57  \cite BadiaNobileVergara2008 (Robin Neumann)
58  FSI
59 
60  This class implements an FSI that will solve the FSI problem by a
61  relaxed fixed point method.
62 */
63 
64 class FSIFixedPoint : public FSIOperator
65 {
66 public:
67 
68  //! @name Public Types
69  //@{
70  typedef FSIOperator super;
71 
72  typedef super::vector_Type vector_Type;
73  typedef super::vectorPtr_Type vectorPtr_type;
74 
77 
78 
79  //typedef super::fluid_Type fluid_Type;
80  typedef super::solid_Type solid_Type;
81 
82  // //! OBSOLETE typedefs
83  // //typedef super::fluidBchandler_Type fluidBchandler_Type;
84 
85  // typedef super::fluid_Type fluid_type;
86  // typedef super::solid_Type solid_type;
87  // typedef super::vector_Type vector_Type;
88 
89  // typedef super::fluidBchandler_Type bchandler_type;
90 
91  // typedef fluid_Type::matrix_Type matrix_types;
92  // typedef fluid_Type::matrixPtr_Type matrix_ptrtype;
93 
94  //@}
95 
96  //! @name Constructor & Destructor
97  //@{
98 
99  //! Empty Constructor
100  FSIFixedPoint();
101 
102  //! Destructor
103  ~FSIFixedPoint();
104 
105  //! @name Methods
106  //@{
107 
108  //! solves the Jacobian system
109  /**
110  The implementation of this method distinguish the various FSI formulations which derive from this class.
111  For this reason it must be pure virtual, snd implemented in the child classes.
112  \param muk: unknown solution at the k-th nonlinear iteration
113  \param res: residual vector (the right hand side of the Jacobian system)
114  \param linearRelTol: tolerance for the nonlinear solver
115  \todo{replace Real with Real& }
116  */
117  void solveJac (vector_Type& _muk,
118  const vector_Type& _res,
119  const Real _linearRelTol);
120 
121 
122  //! Evaluates the nonlinear residual of the FSI system
123  /**
124  The implementation of this method also depends on the child classes, though it does not characterize them.
125  \param res: residual vector to be computed
126  \param disp: current unknown solution
127  \param iter: nonlinear iteration counter. The part of th rhs related to the time discretization is computed only for iter=0
128  */
129  void evalResidual (vector_Type& _res,
130  const vector_Type& _disp,
131  const UInt _iter);
132 
133 
134  //! sets the space discretization parameters
135  /*!
136  The FE discretization is set accordingly to what specified in the FSIdata member (order of accuracy for the fluid
137  pressure, velocity and for the structure).
138  */
139  void setupFEspace();
140 
141  //! setup of the fluid and solid solver classes
142  /**
143  This method computes the number of fluxes assigned at the boundaries and calls setupFluidSolid(UInt fluxes)
144  */
145  void setupFluidSolid();
146 
147  //! initializes the GetPot data file
148  void setDataFile ( GetPot const& data );
149 
150  //! register the product for the factory
151  void registerMyProducts( );
152 
153  // OBSOLETE
154  void setUpBC ();
155 
156  //@}
157 
158 
159 private:
160 
161  //! @name Private Methods
162  //@{
163 
164  void eval ( const vector_Type& disp, UInt status );
165 
166  //@}
167 
169 
170  vectorPtr_Type M_rhsNew;
171  vectorPtr_Type M_beta;
172 
173 
174 }; // end class fixedPointBase
175 
176 
177 inline FSIOperator* createFP()
178 {
179  return new FSIFixedPoint();
180 }
181 namespace
182 {
183 //static bool registerFP = FSIOperator::FSIFactory_Type::instance().registerProduct( "fixedPoint", &createFP );
184 }
185 
186 } // Namespace LifeV
187 
188 
189 #endif // FIXEDPOINTBASE_HPP
void registerMyProducts()
register the product for the factory
FSIFixedPoint()
Empty Constructor.
void assignFunction(bcBase_Type &base)
Assign the function to the base of the BCHandler.
fluid_Type::matrix_Type matrix_Type
FSIOperator * createFP()
NonLinearAitken< vector_Type > M_nonLinearAitken
void setupFEspace()
sets the space discretization parameters
NonLinearAitken - LifeV class for the non-linear generalized Aitken algorithm.
vectorPtr_Type M_rhsNew
double Real
Generic real data.
Definition: LifeV.hpp:175
FSIFixedPont - Implementation of an FSI with fixed point iterations.
void setupFluidSolid()
setup of the fluid and solid solver classes
fluid_Type::matrixPtr_Type matrixPtr_Type
void evalResidual(vector_Type &_res, const vector_Type &_disp, const UInt _iter)
Evaluates the nonlinear residual of the FSI system.
void solveJac(vector_Type &_muk, const vector_Type &_res, const Real _linearRelTol)
solves the Jacobian system
vectorPtr_Type M_beta
void setDataFile(GetPot const &data)
initializes the GetPot data file
~FSIFixedPoint()
Destructor.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191
void eval(const vector_Type &disp, UInt status)
super::vectorPtr_Type vectorPtr_type