nullborderlistmanager.hh
Go to the documentation of this file.
1 // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 // vi: set et ts=4 sw=4 sts=4:
3 /*
4  Copyright (C) 2011-2013 by Andreas Lauser
5  Copyright (C) 2012 by Bernd Flemisch
6 
7  This file is part of the Open Porous Media project (OPM).
8 
9  OPM is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 2 of the License, or
12  (at your option) any later version.
13 
14  OPM is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with OPM. If not, see <http://www.gnu.org/licenses/>.
21 */
26 #ifndef EWOMS_NULL_BORDER_LIST_MANAGER_HH
27 #define EWOMS_NULL_BORDER_LIST_MANAGER_HH
28 
29 #include "overlaptypes.hh"
30 
31 #include <opm/common/ErrorMacros.hpp>
32 
33 #include <dune/grid/common/datahandleif.hh>
34 #include <dune/grid/common/gridenums.hh>
35 #include <dune/istl/bcrsmatrix.hh>
36 #include <dune/istl/scalarproducts.hh>
37 #include <dune/istl/operators.hh>
38 
39 #include <algorithm>
40 
41 namespace Ewoms {
42 namespace Linear {
49 template <class GridView, class DofMapper>
51 {
52 public:
53  NullBorderListCreator(const GridView &gridView,
54  const DofMapper &map)
55  {
56  if (gridView.comm().size() > 1)
57  OPM_THROW(std::runtime_error,
58  "The used model is not usable for parallel computations");
59  }
60 
61  // Access to the border list.
62  const BorderList &borderList() const
63  { return borderList_; }
64 
65 private:
66  BorderList borderList_;
67 };
68 
69 } // namespace Linear
70 } // namespace Ewoms
71 
72 #endif
This is a grid manager which does not create any border list.
Definition: nullborderlistmanager.hh:50
This files provides several data structures for storing tuples of indices of remote and/or local proc...
NullBorderListCreator(const GridView &gridView, const DofMapper &map)
Definition: nullborderlistmanager.hh:53
const BorderList & borderList() const
Definition: nullborderlistmanager.hh:62
std::list< BorderIndex > BorderList
This class managages a list of indices which are on the border of a process' partition of the grid...
Definition: overlaptypes.hh:119
Definition: baseauxiliarymodule.hh:35