LifeV
GraphCutterBase.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, 2011, 2012 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  @file
28  @brief Graph cutter base class (abstract)
29 
30  @date 06-02-2013
31  @author Radu Popescu <radu.popescu@epfl.ch>
32  */
33 
34 #ifndef GRAPH_CUTTER_BASE_H
35 #define GRAPH_CUTTER_BASE_H 1
36 
37 #include <boost/shared_ptr.hpp>
38 #include <Epetra_Comm.h>
39 #include <Teuchos_ParameterList.hpp>
40 
41 #include <lifev/core/LifeV.hpp>
42 #include <lifev/core/mesh/GraphUtil.hpp>
43 
44 namespace LifeV
45 {
46 
47 using namespace GraphUtil;
48 
49 //! Graph cutter base class (abstract)
50 /*!
51  @author Radu Popescu <radu.popescu@epfl.ch>
52  */
53 template<typename MeshType>
55 {
56 public:
57  //! @name Public Types
58  //@{
60  //@}
61 
62  //! @name Constructor & Destructor
63  //@{
64  //! Default constructor
66  {
67  }
68 
69  //! Destructor
70  virtual ~GraphCutterBase()
71  {
72  }
73  //@}
74 
75  //! @name Public methods
76  //@{
77  //! Performs the graph partitioning
78  virtual Int run() = 0;
79  //@}
80 
81  //! @name Get Methods
82  //@{
83  //! Get a pointer to one of the partitions
84  virtual const idListPtr_Type& getPart (const UInt i) const = 0;
85  virtual idListPtr_Type& getPart (const UInt i) = 0;
86 
87  //! Get the entire partitioned graph, wrapped in a smart pointer
88  virtual const idTablePtr_Type getGraph() const = 0;
89 
90  //! Return the number of parts
91  virtual const UInt numParts() const = 0;
92  //@}
93 
94 private:
95  //! @name Private methods
96  //@{
97  //! Set values for all the parameters, with default values where needed
98  virtual void setParameters (pList_Type& parameters) = 0;
99 
100  //@}
101 };
102 
103 } // Namespace LifeV
104 
105 #endif // GRAPH_CUTTER_BASE_H
virtual const idTablePtr_Type getGraph() const =0
Get the entire partitioned graph, wrapped in a smart pointer.
virtual Int run()=0
Performs the graph partitioning.
Graph cutter base class (abstract)
int32_type Int
Generic integer data.
Definition: LifeV.hpp:188
void updateInverseJacobian(const UInt &iQuadPt)
virtual void setParameters(pList_Type &parameters)=0
Set values for all the parameters, with default values where needed.
Teuchos::ParameterList pList_Type
virtual ~GraphCutterBase()
Destructor.
std::shared_ptr< idTable_Type > idTablePtr_Type
Definition: GraphUtil.hpp:63
virtual const UInt numParts() const =0
Return the number of parts.
virtual idListPtr_Type & getPart(const UInt i)=0
GraphCutterBase()
Default constructor.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191
std::shared_ptr< idList_Type > idListPtr_Type
Definition: GraphUtil.hpp:61
virtual const idListPtr_Type & getPart(const UInt i) const =0
Get a pointer to one of the partitions.