LifeV
BCInterfaceFunctionSolverDefined.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 BCInterfaceFunctionSolverDefined_H
38 #define BCInterfaceFunctionSolverDefined_H 1
39 
40 // BCInterface includes
41 #include <lifev/bc_interface/core/bc/BCInterfaceData.hpp>
42 
43 #include <lifev/bc_interface/core/function/BCInterfaceFactory.hpp>
44 
45 namespace LifeV
46 {
47 
48 //! BCInterfaceFunctionSolverDefined - Empty class for solver defined specializations.
49 /*!
50  * @author Cristiano Malossi
51  *
52  * This class provides the base interfaces for the implementation of solver defined boundary functions
53  * through template specializations.
54  */
55 template< typename BcHandlerType, typename PhysicalSolverType >
56 class BCInterfaceFunctionSolverDefined
57 {
58 public:
59 
60  //! @name Type definitions
61  //@{
62 
63  typedef BcHandlerType bcHandler_Type;
64  typedef PhysicalSolverType physicalSolver_Type;
65 
67 
70 
71  //@}
72 
73 
74  //! @name Constructors & Destructor
75  //@{
76 
77  //! Constructor
79 
80  //! Destructor
82 
83  //@}
84 
85 
86  //! @name Methods
87  //@{
88 
89  //! Copy the stored parameters in the data container
90  /*!
91  * @param data boundary condition data loaded from \c GetPot file
92  */
93  template< typename DataPtrType >
94  void exportData ( DataPtrType& /*data*/ ) {}
95 
96  //! Assign a boundary function to the boundary condition vector base
97  /*!
98  * @param physicalSolver FSI physical solver,
99  * @param base boundary condition base
100  */
101  template< typename BCBaseType >
102  void assignFunction ( BCBaseType& /*base*/ ) {}
103 
104  //! Update the solver variables
106 
107  //@}
108 
109 
110  //! @name Set methods
111  //@{
112 
113  //! Set data
114  /*!
115  * @param data boundary condition data loaded from \c GetPot file
116  */
117  void setData ( const dataPtr_Type& /*data*/ ) {}
118 
119  //! Set the physical solver
120  /*!
121  * @param physicalSolver physical solver
122  */
123  void setPhysicalSolver ( const physicalSolverPtr_Type& /*physicalSolver*/ ) {}
124 
125  //@}
126 
127 
128  //! @name Get methods
129  //@{
130 
131  //! Detect the correct base type
132  /*!
133  * @param bcBaseType the type of the base
134  */
136  {
137  return BASEDefault;
138  }
139 
140  //@}
141 
142 private:
143 
144  //! @name Unimplemented Methods
145  //@{
146 
147  BCInterfaceFunctionSolverDefined ( const BCInterfaceFunctionSolverDefined& function );
148 
149  BCInterfaceFunctionSolverDefined& operator= ( const BCInterfaceFunctionSolverDefined& function );
150 
151  //@}
152 
153 };
154 
155 // ===================================================
156 // Factory
157 // ===================================================
158 //! Factory create function
159 template< typename BcHandlerType, typename PhysicalSolverType >
160 inline BCInterfaceFunctionSolverDefined< BcHandlerType, PhysicalSolverType >* createBCInterfaceFunctionSolverDefined()
161 {
162  return new BCInterfaceFunctionSolverDefined< BcHandlerType, PhysicalSolverType > ();
163 }
164 
165 } // Namespace LifeV
166 
167 #endif /* BCInterfaceFunctionSolverDefined_H */
BCInterfaceFunctionSolverDefined(const BCInterfaceFunctionSolverDefined &function)
BCInterfaceFunctionSolverDefined & operator=(const BCInterfaceFunctionSolverDefined &function)
BCInterfaceData - The BCInterface data container.
baseContainer_Type baseType() const
Detect the correct base type.
void updateInverseJacobian(const UInt &iQuadPt)
std::shared_ptr< physicalSolver_Type > physicalSolverPtr_Type
void updatePhysicalSolverVariables()
Update the solver variables.
void setPhysicalSolver(const physicalSolverPtr_Type &)
Set the physical solver.
void assignFunction(BCBaseType &)
Assign a boundary function to the boundary condition vector base.
BCInterfaceFunctionSolverDefined< BcHandlerType, PhysicalSolverType > * createBCInterfaceFunctionSolverDefined()
Factory create function.
void exportData(DataPtrType &)
Copy the stored parameters in the data container.