LifeV
FSIcouplingCE.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 Settings - File which handles the coupling blocks of fluid and solid variables
30  at the fluid-structure interface when conforming discretizations are used.
31 
32 @author Davide Forti <davide.forti@epfl.ch>
33 @date 28-10-2014
34 
35 @maintainer Simone Deparis <simone.deparis@epfl.ch>
36 */
37 
38 
39 #ifndef FSICOUPLINGCE_H
40 #define FSICOUPLINGCE_H
41 
42 #include <lifev/core/LifeV.hpp>
43 
44 // datafile
45 #include <lifev/core/filter/GetPot.hpp>
46 
47 // includes for matrices and vector
48 #include <lifev/core/array/MatrixEpetra.hpp>
49 #include <lifev/core/array/VectorEpetra.hpp>
50 
51 #include <lifev/core/mesh/RegionMesh.hpp>
52 #include <lifev/core/fem/FESpace.hpp>
53 
54 namespace LifeV
55 {
56 
57 //! FSIcouplingCE - File handling the coupling blocks when conforming discretizations are used.
58 /*!
59 * @author Davide Forti
60 */
61 
63 {
64 public:
65 
66  // Public typedefs
67 
70 
73 
76 
79 
81 
82  typedef FESpace< mesh_Type, map_Type > FESpace_Type;
84 
85  //! Constructor
86  FSIcouplingCE(const commPtr_Type& communicator);
87 
88  //! Destructor
89  ~FSIcouplingCE();
90 
91  //! @name Methods
92  //@{
93 
94  //! Builds the coupling blocks
95  /*!
96  \param locDofMap map with dofs at the fluid-structure interface
97  \param lambda_num_structure if true the DOFs at the interface are numbered wrt the solid mesh
98  \param useBDF if true supposes that for the structure a BDF scheme is used
99  */
100  void buildBlocks ( std::map<ID, ID> const& locDofMap, const bool& lambda_num_structure, bool useBDF = false );
101 
102  //! Set parameters. To be used when Newmark is used on the structure.
103  /*!
104  \param timeStep value of the timestep used
105  \param interfaceDofs number of interface dofs
106  \param beta beta coefficient Newmark scheme
107  \param gamma gamma coefficient Newmark scheme
108  \param interfaceMap map interface dofs
109  \param fluidVelocityFESpace FE space fluid velocity
110  \param structureDisplacementFESpace FE space solid displacement
111  \param numerationInterface vector with global numeration of dofs at the interface
112  */
113  void setUp ( const Real& timeStep, const Real& interfaceDofs, const Real& beta, const Real& gamma,
114  const mapPtr_Type& interfaceMap, const FESpacePtr_Type& fluidVelocityFESpace,
115  const FESpacePtr_Type& structureDisplacementFESpace, const vectorPtr_Type& numerationInterface );
116 
117  //! Set parameters. To be used when Newmark is used on the structure.
118  /*!
119  \param timeStep value of the timestep used
120  \param interfaceDofs number of interface dofs
121  \param coefficientBDF coefficient BDF scheme for first derivative structure
122  \param interfaceMap map interface dofs
123  \param fluidVelocityFESpace FE space fluid velocity
124  \param structureDisplacementFESpace FE space solid displacement
125  \param numerationInterface vector with global numeration of dofs at the interface
126  */
127  void setUp ( const Real& timeStep, const Real& interfaceDofs, const Real& coefficientBDF,
128  const mapPtr_Type& interfaceMap, const FESpacePtr_Type& fluidVelocityFESpace,
129  const FESpacePtr_Type& structureDisplacementFESpace, const vectorPtr_Type& numerationInterface );
130 
131  //@}
132 
133  //! @name Get Methods
134  //@{
135 
137  {
139  }
140 
142  {
144  }
145 
147  {
149  }
150 
152  {
154  }
155 
157  {
159  }
160 
161  //@}
162 
163 private:
164 
165  //! communicator
167 
173 
176 
178 
180 
186 };
187 
188 } // end namespace LifeV
189 
190 #endif // end FSICOUPLINGCE_H
matrixPtr_Type M_lambdaToFluidMomentum
matrixPtr_Type M_lambdaToStructureMomentum
void buildBlocks(std::map< ID, ID > const &locDofMap, const bool &lambda_num_structure, bool useBDF=false)
Builds the coupling blocks.
matrixPtr_Type lambdaToStructureMomentum() const
void importFromHDF5(std::string const &fileName, std::string const &matrixName="matrix")
Read a matrix from a HDF5 (.h5) file.
matrixPtr_Type M_structureDisplacementToFluidDisplacement
std::shared_ptr< mesh_Type > meshPtr_Type
void updateInverseJacobian(const UInt &iQuadPt)
matrixPtr_Type structureDisplacementToLambda() const
commPtr_Type M_comm
communicator
Epetra_Import const & importer()
Getter for the Epetra_Import.
Definition: MapEpetra.cpp:394
FESpacePtr_Type M_structureDisplacementFESpace
std::shared_ptr< VectorEpetra > vectorPtr_Type
~FSIcouplingCE()
Destructor.
void setUp(const Real &timeStep, const Real &interfaceDofs, const Real &coefficientBDF, const mapPtr_Type &interfaceMap, const FESpacePtr_Type &fluidVelocityFESpace, const FESpacePtr_Type &structureDisplacementFESpace, const vectorPtr_Type &numerationInterface)
Set parameters. To be used when Newmark is used on the structure.
matrixPtr_Type structureDisplacementToFluidDisplacement() const
matrixPtr_Type fluidVelocityToLambda() const
FESpacePtr_Type M_fluidVelocityFESpace
std::shared_ptr< map_Type > mapPtr_Type
double Real
Generic real data.
Definition: LifeV.hpp:175
FESpace< mesh_Type, map_Type > FESpace_Type
RegionMesh< LinearTetra > mesh_Type
vectorPtr_Type M_numerationInterface
MatrixEpetra< Real > matrix_Type
FSIcouplingCE - File handling the coupling blocks when conforming discretizations are used...
std::shared_ptr< matrix_Type > matrixPtr_Type
void setUp(const Real &timeStep, const Real &interfaceDofs, const Real &beta, const Real &gamma, const mapPtr_Type &interfaceMap, const FESpacePtr_Type &fluidVelocityFESpace, const FESpacePtr_Type &structureDisplacementFESpace, const vectorPtr_Type &numerationInterface)
Set parameters. To be used when Newmark is used on the structure.
std::shared_ptr< comm_Type > commPtr_Type
FSIcouplingCE(const commPtr_Type &communicator)
Constructor.
matrixPtr_Type M_structureDisplacementToLambda
matrixPtr_Type M_fluidVelocityToLambda
matrixPtr_Type lambdaToFluidMomentum() const
mapPtr_Type M_interfaceMap
std::shared_ptr< FESpace_Type > FESpacePtr_Type