LifeV
PreconditionerBlock.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 PreconditionerBlock.cpp
29  @brief PreconditionerBlock
30 
31  @author Gwenol Grandperrin <gwenol.grandperrin@epfl.ch>
32  @maintainer Gwenol Grandperrin <gwenol.grandperrin@epfl.ch>
33 
34  @date 08-10-2010
35  */
36 
37 #ifndef PRECONDITIONERBLOCK_HPP
38 #define PRECONDITIONERBLOCK_HPP 1
39 
40 #include <vector>
41 #include <boost/shared_ptr.hpp>
42 #include <lifev/core/algorithm/Preconditioner.hpp>
43 #include <lifev/core/array/MapEpetra.hpp>
44 
45 namespace LifeV
46 {
47 
48 //! PreconditionerBlock
49 /*!
50  * @author Gwenol Grandperrin
51  *
52  * The PreconditionerBlock class is an abstract class which
53  * defines the interfaces for a typical block preconditioner
54  */
56  public Preconditioner
57 {
58 public:
59 
60  /** @name Constructors, destructor
61  */
62  //@{
63  //! default constructor.
64  PreconditionerBlock ( const std::shared_ptr<Epetra_Comm>& comm = std::shared_ptr<Epetra_Comm>() );
65 
66  /** Copy constructor*/
67  PreconditionerBlock ( PreconditionerBlock& P, const std::shared_ptr<Epetra_Comm>& comm = std::shared_ptr<Epetra_Comm>() );
68 
69  //! default virtual destructor
70  virtual ~PreconditionerBlock();
71 
72  //@}
73 
74 
75  /** @name Methods
76  */
77  virtual int numBlocksRows() const = 0;
78  virtual int numBlocksCols() const = 0;
79 
80 protected:
81 
82 };
83 
84 void buildBlockGIDs ( std::vector<std::vector<int> >& gids, const MapEpetra& map, const std::vector<int>& blockSizes );
85 
86 } // namespace LifeV
87 
88 #endif /* PRECONDITIONERBLOCK_HPP */
PreconditionerBlock(const std::shared_ptr< Epetra_Comm > &comm=std::shared_ptr< Epetra_Comm >())
default constructor.
PreconditionerBlock(PreconditionerBlock &P, const std::shared_ptr< Epetra_Comm > &comm=std::shared_ptr< Epetra_Comm >())
Copy constructor.
virtual int numBlocksCols() const =0
void updateInverseJacobian(const UInt &iQuadPt)
void buildBlockGIDs(std::vector< std::vector< int > > &gids, const MapEpetra &map, const std::vector< int > &blockSizes)
Epetra_Import const & importer()
Getter for the Epetra_Import.
Definition: MapEpetra.cpp:394
virtual int numBlocksRows() const =0
Preconditioner - Abstract preconditioner class.
virtual ~PreconditionerBlock()
default virtual destructor