LifeV
RequestLoopVolumeID.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 class to loop over a certain set of volumes
30 
31  @author Paolo Tricerri<paolo.tricerri@epfl.ch>
32 
33  @date 07-2011
34  */
35 
36 
37 #ifndef REQUEST_LOOP_VOLUME_ID_HPP
38 #define REQUEST_LOOP_VOLUME_ID_HPP
39 
40 #include <lifev/core/LifeV.hpp>
41 #include <lifev/core/mesh/RegionMesh.hpp>
42 
43 #include <boost/shared_ptr.hpp>
44 
45 
46 namespace LifeV
47 {
48 
49 namespace ExpressionAssembly
50 {
51 
52 template< typename MeshType>
54 {
55 public:
56 
57 
58  //! @name Public Types
59  //@{
60  typedef typename MeshType::element_Type element_Type;
61 
64  //@}
65 
66 
67 
68  //! @name Constructors & Destructor
69  //@{
70 
71  //! Simple constructor with a shared_ptr on the mesh
72  RequestLoopVolumeID (const vectorVolumesPtr_Type& volumeListExtracted, const vectorIndexesPtr_Type& indexListExtracted)
73  : M_volumeList ( volumeListExtracted ), M_indexList ( indexListExtracted )
74  {}
75 
76  //! Copy constructor
78  : M_volumeList (loop.M_volumeList), M_indexList (loop.M_indexList)
79  {}
80 
81  //@}
82 
83 
84  //! @name Get Methods
85  //@{
86 
87  //! Getter for the mesh pointer
89  {
90  return M_volumeList;
91  }
92 
93  //! Getter for the mesh pointer
95  {
96  return M_indexList;
97  }
98 
99  //@}
100 
101 private:
102 
103 
104  //! @name Private Methods
105  //@{
106 
107  //! No empty constructor
109 
110  //@}
111 
112  // Pointer on the mesh
115 
116 };
117 
118 
119 //! elements - A helper method to trigger the loop on the elements of a mesh
120 /*!
121  @author Paolo Tricerri
122 
123  This method simply returns a RequestLoopElement type, so that one does not
124  need to explicitly call this type and the type of the mesh used.
125 
126  <b> Template parameters </b>
127 
128  <i>MeshType</i>: The type of the mesh.
129 
130  <b> Template requirements </b>
131 
132  <i>MeshType</i>: See in LifeV::RequestLoopElement
133 
134  */
135 template<typename MeshType>
137 integrationOverSelectedVolumes (std::shared_ptr<std::vector<typename MeshType::element_Type*> >& volumeListExtracted, std::shared_ptr<std::vector<UInt> >& indexListExtracted )
138 {
139  return RequestLoopVolumeID<MeshType> ( volumeListExtracted, indexListExtracted );
140 }
141 
142 
143 } // Namespace ExpressionAssembly
144 
145 } // Namespace LifeV
146 
147 #endif
RequestLoopVolumeID< MeshType > integrationOverSelectedVolumes(std::shared_ptr< std::vector< typename MeshType::element_Type *> > &volumeListExtracted, std::shared_ptr< std::vector< UInt > > &indexListExtracted)
elements - A helper method to trigger the loop on the elements of a mesh
void updateInverseJacobian(const UInt &iQuadPt)
std::shared_ptr< std::vector< element_Type * > > vectorVolumesPtr_Type
std::shared_ptr< std::vector< UInt > > vectorIndexesPtr_Type
RequestLoopVolumeID(const RequestLoopVolumeID &loop)
Copy constructor.
const vectorIndexesPtr_Type indexList() const
Getter for the mesh pointer.
const vectorVolumesPtr_Type volumeList() const
Getter for the mesh pointer.
RequestLoopVolumeID(const vectorVolumesPtr_Type &volumeListExtracted, const vectorIndexesPtr_Type &indexListExtracted)
Simple constructor with a shared_ptr on the mesh.