LifeV
RequestLoopFaceID.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 classes to determine the kind of loops to be performed
30 
31  @author Samuel Quinodoz <samuel.quinodoz@epfl.ch>
32 
33  @date 07-2011
34  */
35 
36 
37 #ifndef REQUEST_LOOP_FACE_ID_HPP
38 #define REQUEST_LOOP_FACE_ID_HPP
39 
40 #include <lifev/core/LifeV.hpp>
41 
42 #include <boost/shared_ptr.hpp>
43 
44 
45 namespace LifeV
46 {
47 
48 namespace ExpressionAssembly
49 {
50 
51 /*!
52  This class should be better named RequestLoopBoundaryFaceID
53 
54  @author Samuel Quinodoz
55  */
56 template <typename MeshType>
58 {
59 public:
60 
61  //! @name Constructors & Destructor
62  //@{
63 
64  //! Simple constructor with a shared_ptr on the mesh
65  RequestLoopFaceID (const std::shared_ptr<MeshType>& mesh, const UInt boundaryID)
66  : M_mesh (mesh), M_boundaryIdentifier (boundaryID)
67  {}
68 
69  //! Copy constructor
71  : M_mesh (loop.M_mesh), M_boundaryIdentifier (loop.M_boundaryIdentifier)
72  {}
73 
74  //@}
75 
76 
77  //! @name Get Methods
78  //@{
79 
80  //! Getter for the mesh pointer
81  const std::shared_ptr<MeshType>& mesh() const
82  {
83  return M_mesh;
84  }
85 
86  //! Getter for the identifier
87  const UInt& id() const
88  {
89  return M_boundaryIdentifier;
90  }
91 
92  //@}
93 
94 private:
95 
96 
97  //! @name Private Methods
98  //@{
99 
100  //! No empty constructor
102 
103  //@}
104 
105  // Pointer on the mesh
107 
109 };
110 
111 
112 //! elements - A helper method to trigger the loop on the elements of a mesh
113 /*!
114  @author Samuel Quinodoz
115 
116  This method simply returns a RequestLoopElement type, so that one does not
117  need to explicitly call this type and the type of the mesh used.
118 
119  <b> Template parameters </b>
120 
121  <i>MeshType</i>: The type of the mesh.
122 
123  <b> Template requirements </b>
124 
125  <i>MeshType</i>: See in LifeV::RequestLoopElement
126 
127  */
128 template< typename MeshType >
129 RequestLoopFaceID<MeshType>
130 boundary (const std::shared_ptr<MeshType>& mesh, const UInt id)
131 {
132  return RequestLoopFaceID<MeshType> (mesh, id);
133 }
134 
135 
136 } // Namespace ExpressionAssembly
137 
138 } // Namespace LifeV
139 
140 #endif
const UInt & id() const
Getter for the identifier.
const std::shared_ptr< MeshType > & mesh() const
Getter for the mesh pointer.
RequestLoopFaceID< MeshType > boundary(const std::shared_ptr< MeshType > &mesh, const UInt id)
elements - A helper method to trigger the loop on the elements of a mesh
void updateInverseJacobian(const UInt &iQuadPt)
RequestLoopFaceID(const std::shared_ptr< MeshType > &mesh, const UInt boundaryID)
Simple constructor with a shared_ptr on the mesh.
RequestLoopFaceID(const RequestLoopFaceID &loop)
Copy constructor.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191