LifeV
BCInterfaceFunctionParserFileSolver.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 BCInterfaceFunctionParserFileSolver class
30  *
31  * @date 26-08-2009
32  * @author Cristiano Malossi <cristiano.malossi@epfl.ch>
33  *
34  * @maintainer Cristiano Malossi <cristiano.malossi@epfl.ch>
35  */
36 
37 #ifndef BCInterfaceFunctionParserFileSolver_H
38 #define BCInterfaceFunctionParserFileSolver_H 1
39 
40 #include <lifev/bc_interface/core/function/BCInterfaceFunctionParserFile.hpp>
41 #include <lifev/bc_interface/core/function/BCInterfaceFunctionParserSolver.hpp>
42 
43 namespace LifeV
44 {
45 
46 //! BCInterfaceFunctionParserFileSolver - LifeV boundary condition function file wrapper for \c BCInterface
47 /*!
48  * @author Cristiano Malossi
49  *
50  * This class is an interface between the \c BCInterface, the \c Parser, and and a general
51  * LifeV physical solver (such as \c OseenSolver or \c FSISolver). It allows to construct LifeV
52  * functions type for boundary conditions, using a \c GetPot file containing a function string and a
53  * table of discrete data (for example a discrete Flux or Pressure depending on time).
54  * The function string can contain physical solver parameters.
55  *
56  * See \c BCInterfaceFunctionParser, \c BCInterfaceFunctionParserFile, and \c BCInterfaceFunctionParserSolver classes for more details.
57  */
58 template< typename BcHandlerType, typename PhysicalSolverType >
59 class BCInterfaceFunctionParserFileSolver: public virtual BCInterfaceFunctionParserFile< BcHandlerType, PhysicalSolverType > ,
60  public virtual BCInterfaceFunctionParserSolver< BcHandlerType, PhysicalSolverType >
61 {
62 public:
63 
64  //! @name Type definitions
65  //@{
66 
67  typedef BcHandlerType bcHandler_Type;
68  typedef PhysicalSolverType physicalSolver_Type;
69 
74 
75  typedef typename function_Type::data_Type data_Type;
77 
78  //@}
79 
80 
81  //! @name Constructors & Destructor
82  //@{
83 
84  //! Constructor
86 
87  //! Destructor
89 
90  //@}
91 
92 
93  //! @name Set Methods
94  //@{
95 
96  //! Set data for boundary conditions
97  /*!
98  * @param data boundary condition data loaded from \c GetPot file
99  */
100  virtual void setData ( const dataPtr_Type& data );
101 
102  //@}
103 
104 private:
105 
106  //! @name Unimplemented Methods
107  //@{
108 
110 
112 
113  //@}
114 
115 };
116 
117 // ===================================================
118 // Factory
119 // ===================================================
120 //! Factory create function
121 template< typename BcHandlerType, typename PhysicalSolverType >
122 inline BCInterfaceFunctionParser< BcHandlerType, PhysicalSolverType >* createBCInterfaceFunctionParserFileSolver()
123 {
124  return new BCInterfaceFunctionParserFileSolver< BcHandlerType, PhysicalSolverType > ();
125 }
126 
127 // ===================================================
128 // Constructors
129 // ===================================================
130 template< typename BcHandlerType, typename PhysicalSolverType >
132  function_Type (),
136 {
137 
138 #ifdef HAVE_LIFEV_DEBUG
139  debugStream ( 5024 ) << "BCInterfaceFunctionFileSolver::BCInterfaceFunctionFileSolver()" << "\n";
140 #endif
141 
142 }
143 
144 template< typename BcHandlerType, typename PhysicalSolverType >
145 void
146 BCInterfaceFunctionParserFileSolver< BcHandlerType, PhysicalSolverType >::setData ( const dataPtr_Type& data )
147 {
148 
149 #ifdef HAVE_LIFEV_DEBUG
150  debugStream ( 5024 ) << "BCInterfaceFunctionFileSolver::setData" << "\n";
151 #endif
152 
153  functionParserFile_Type::setData ( data );
154 
155  functionParserSolver_Type::M_boundaryID = data->boundaryID();
156 
157  functionParserSolver_Type::createAccessList ( data );
158 }
159 
160 } // Namespace LifeV
161 
162 #endif /* BCInterfaceFunctionParserFileSolver_H */
BCInterfaceFunction< bcHandler_Type, physicalSolver_Type > function_Type
BCInterfaceFunctionParserSolver - LifeV boundary condition function file wrapper for BCInterface...
BCInterfaceFunctionParser< BcHandlerType, PhysicalSolverType > * createBCInterfaceFunctionParserFileSolver()
Factory create function.
void updateInverseJacobian(const UInt &iQuadPt)
BCInterfaceFunctionParserFileSolver - LifeV boundary condition function file wrapper for BCInterface...
BCInterfaceFunctionParserFileSolver(const BCInterfaceFunctionParserFileSolver &function)
BCInterfaceFunctionParser - LifeV boundary condition function wrapper for BCInterface.
BCInterfaceFunctionParserFile - LifeV boundary condition function file wrapper for BCInterface...
BCInterfaceFunctionParserFile< bcHandler_Type, physicalSolver_Type > functionParserFile_Type
BCInterfaceFunctionParser< bcHandler_Type, physicalSolver_Type > functionParser_Type
BCInterfaceFunction - Base class for BCInterface boundary functions.
virtual void setData(const dataPtr_Type &data)
Set data for boundary conditions.
BCInterfaceFunctionParserSolver< bcHandler_Type, physicalSolver_Type > functionParserSolver_Type
BCInterfaceFunctionParserFileSolver & operator=(const BCInterfaceFunctionParserFileSolver &function)