LifeV
BCInterfaceFunctionSolverDefined1D.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 BCInterfaceFunctionSolverDefined class and specializations
30  *
31  * @date 23-04-2009
32  * @author Cristiano Malossi <cristiano.malossi@epfl.ch>
33  *
34  * @maintainer Cristiano Malossi <cristiano.malossi@epfl.ch>
35  */
36 
37 #ifndef BCInterfaceFunctionSolverDefined1D_H
38 #define BCInterfaceFunctionSolverDefined1D_H 1
39 
40 // OneDFSI includes
41 #include <lifev/one_d_fsi/solver/OneDFSISolver.hpp>
42 
43 // BCInterface includes
44 #include <lifev/bc_interface/1D/bc/BCInterfaceData1D.hpp>
45 #include <lifev/bc_interface/core/function/BCInterfaceFunctionSolverDefined.hpp>
46 
47 namespace LifeV
48 {
49 
50 //! BCInterfaceFunctionSolverDefined - Template specialization of \c BCInterfaceFunctionSolverDefined for 1D problems
51 /*!
52  * @author Cristiano Malossi
53  *
54  * The BCInterfaceFunctionSolverDefined class provides a general interface between the
55  * \c BCInterface1D and the solver defined boundary conditions of the \c OneDFSISolver.
56  *
57  * <b>DETAILS:</b> <BR>
58  * The list of available conditions is described by the \c solverDefinedFunctions enum type.
59  *
60  * They are:
61  * <ol>
62  * <li> Riemann;
63  * <li> Compatibility;
64  * <li> Absorbing;
65  * <li> Resistance.
66  * </ol>
67  */
68 template< >
69 class BCInterfaceFunctionSolverDefined< OneDFSIBCHandler, OneDFSISolver >
70 {
71 public:
72 
73  //! @name Type definitions
74  //@{
75 
79 
80  typedef bcHandler_Type::bc_Type bc_Type;
81  typedef bc_Type::bcFunctionSolverDefinedPtr_Type bcFunctionSolverDefinedPtr_Type;
82 
83  typedef bc_Type::vectorPtrContainer_Type vectorPtrContainer_Type;
84 
87 
88  typedef bc_Type::fluxPtr_Type fluxPtr_Type;
89  typedef bc_Type::sourcePtr_Type sourcePtr_Type;
90  typedef bc_Type::solutionPtr_Type solutionPtr_Type;
91 
92  //@}
93 
94 
95  //! @name Constructors & Destructor
96  //@{
97 
98  //! Constructor
100 
101  //! Destructor
103 
104  //@}
105 
106 
107  //! @name Methods
108  //@{
109 
110  //! Assign the function to the base
111  /*!
112  * @param base base of the bc
113  */
114  void assignFunction ( OneDFSIFunction& base );
115 
116  //! Update the solver variables
118 
119  //@}
120 
121 
122  //! @name Set Methods
123  //@{
124 
125  //! Set data
126  /*!
127  * @param data BC data loaded from GetPot file
128  */
129  void setData ( const dataPtr_Type& data );
130 
131  //! Set flux and source
132  /*!
133  * @param flux flux object of the 1D model
134  * @param source source object of the 1D model
135  */
136  void setFluxSource ( const fluxPtr_Type& flux, const sourcePtr_Type& source )
137  {
138  M_function->setFluxSource ( flux, source );
139  }
140 
141  //! Set solution
142  /*!
143  * @param solution solution container of the 1D model
144  */
145  void setSolution ( const solutionPtr_Type& solution )
146  {
147  M_function->setSolution ( solution );
148  }
149 
150  //! Set the physical solver
151  /*!
152  * @param physicalSolver physical solver
153  */
154  void setPhysicalSolver ( const physicalSolverPtr_Type& /*physicalSolver*/ ) {}
155 
156  //@}
157 
158 
159  //! @name Get methods
160  //@{
161 
162  //! Detect the correct base type
163  /*!
164  * @param bcBaseType the type of the base
165  */
167  {
168  return BASEFunction1D;
169  }
170 
171  //@}
172 
173 private:
174 
175  //! @name Unimplemented Methods
176  //@{
177 
178  BCInterfaceFunctionSolverDefined ( const BCInterfaceFunctionSolverDefined& function );
179 
180  BCInterfaceFunctionSolverDefined& operator= ( const BCInterfaceFunctionSolverDefined& function );
181 
182  //@}
183 
185  {
190  };
191 
193  bcFunctionSolverDefinedPtr_Type M_function;
194 };
195 
196 } // Namespace LifeV
197 
198 #endif /* BCInterfaceFunctionSolverDefined1D_H */
void setFluxSource(const fluxPtr_Type &flux, const sourcePtr_Type &source)
Set flux and source.
BCInterfaceFunctionSolverDefined & operator=(const BCInterfaceFunctionSolverDefined &function)
void updateInverseJacobian(const UInt &iQuadPt)
OneDFSIFunction - Base class for 1D BC Functions.
OneDFSIBCHandler - Class featuring methods to handle boundary conditions.
void setPhysicalSolver(const physicalSolverPtr_Type &)
Set the physical solver.
BCInterfaceData1D - The BCInterface1D data container.
std::shared_ptr< bcFunctionSolverDefined_Type > bcFunctionSolverDefinedPtr_Type
Definition: OneDFSIBC.hpp:72
OneDFSISolver - Solver class for the 1D model.
BCInterfaceFunctionSolverDefined(const BCInterfaceFunctionSolverDefined &function)