LifeV
ZeroDimensionalBCHandler.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 zero dimensional BCHandler
30  *
31  * @date 30-03-2011
32  * @author Cristiano Malossi <cristiano.malossi@epfl.ch>
33  *
34  * @maintainer Cristiano Malossi <cristiano.malossi@epfl.ch>
35  */
36 
37 #ifndef ZeroDimensionalBCHandler_H
38 #define ZeroDimensionalBCHandler_H 1
39 
40 #include <lifev/zero_dimensional/fem/ZeroDimensionalBC.hpp>
41 
42 namespace LifeV
43 {
44 
45 //! ZeroDimensionalBCHandler - A boundary conditions handler for zero-dimensional models.
46 /*!
47  * @author Cristiano Malossi
48  *
49  * This simple class handles the boundary conditions for zero-dimensional models.
50  */
52 {
53 public:
54 
55  //! @name Type definitions
56  //@{
57 
59  typedef bc_Type::bcType_Type bcType_Type;
60  typedef bc_Type::bcFunction_Type bcFunction_Type;
61 
64 
65  //@}
66 
67 
68  //! @name Constructors & Destructor
69  //@{
70 
71  //! Constructor
72  explicit ZeroDimensionalBCHandler() : M_bc() {}
73 
74  explicit ZeroDimensionalBCHandler ( const ZeroDimensionalBCHandler& handler ) : M_bc ( handler.M_bc ) {}
75 
76  //! Destructor
78 
79  //@}
80 
81 
82  //! @name Set Methods
83  //@{
84 
85  //! Set the type
86  /*!
87  @param flag the bc flag
88  @param bcType the bc type
89  @param bcFunction the bc function
90  */
91  void setBC ( const bcFlag_Type& flag, const bcType_Type& bcType, const bcFunction_Type& bcFunction )
92  {
93  M_bc[flag].setBC ( bcType, bcFunction );
94  }
95 
96  //@}
97 
98 
99  //! @name Get Methods
100  //@{
101 
102  //! Get the boundary condition
103  /*!
104  * @param side the boundary condition side
105  * @return boundary condition
106  */
107  const bc_Type& bc ( const bcFlag_Type& flag ) const
108  {
109  return M_bc.find ( flag )->second;
110  }
111 
112  //@}
113 
114 private:
115 
117 };
118 
119 } // Namespace LifeV
120 
121 #endif /* ZeroDimensionalBCHandler_H */
const bc_Type & bc(const bcFlag_Type &flag) const
Get the boundary condition.
ZeroDimensionalFunction bcFunction_Type
ZeroDimensionalBCHandler - A boundary conditions handler for zero-dimensional models.
ZeroDimensionalBC - A boundary condition for zero-dimensional models.
ID markerID_Type
markerID_Type is the type used to store the geometric entity marker IDs
Definition: Marker.hpp:81
void updateInverseJacobian(const UInt &iQuadPt)
std::map< bcFlag_Type, bc_Type > bcContainer_Type
ZeroDimensionalBCHandler(const ZeroDimensionalBCHandler &handler)
void setBC(const bcFlag_Type &flag, const bcType_Type &bcType, const bcFunction_Type &bcFunction)
Set the type.
ZeroDimensionalBCType bcType_Type