CpGridDataTraits.hpp
Go to the documentation of this file.
1//===========================================================================
2//
3// File: CpGridDataTraits.hpp
4//
5// Created: Fri Mar 08 2023
6//
7// Author(s): Markus Blatt <markus@dr-blatt.de>
8//
9// $Date$
10//
11// $Revision$
12//
13//===========================================================================
14
15/*
16 Copyright 2014-2015 Dr. Blatt - HPC-Simulartion-Software & Services
17 Copyright 2009-2023 Equinor ASA.
18
19 This file is part of The Open Porous Media project (OPM).
20
21 OPM is free software: you can redistribute it and/or modify
22 it under the terms of the GNU General Public License as published by
23 the Free Software Foundation, either version 3 of the License, or
24 (at your option) any later version.
25
26 OPM is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 GNU General Public License for more details.
30
31 You should have received a copy of the GNU General Public License
32 along with OPM. If not, see <http://www.gnu.org/licenses/>.
33*/
34
35#ifndef OPM_CPGRIDDATATRAITS_HEADER
36#define OPM_CPGRIDDATATRAITS_HEADER
37
38#include <dune/common/parallel/mpihelper.hh>
39#ifdef HAVE_DUNE_ISTL
40#include <dune/istl/owneroverlapcopy.hh>
41#endif
42
43#include <dune/common/parallel/communication.hh>
44#include <dune/common/parallel/variablesizecommunicator.hh>
45
46#include <list>
47#include <map>
48
49namespace Dune {
50namespace cpgrid {
51
53{
55 using MPICommunicator = MPIHelper::MPICommunicator;
56
57 using Communication = Dune::Communication<MPICommunicator>;
58 using CollectiveCommunication = Dune::Communication<MPICommunicator>;
59
60#ifdef HAVE_DUNE_ISTL
62 using AttributeSet = Dune::OwnerOverlapCopyAttributeSet::AttributeSet;
63#else
66#endif
67
68#if HAVE_MPI
70 using Communicator = Dune::VariableSizeCommunicator<>;
71
73 using InterfaceMap = Communicator::InterfaceMap;
74
76 using CommunicationType = Dune::OwnerOverlapCopyCommunication<int,int>;
77
79 using ParallelIndexSet = typename CommunicationType::ParallelIndexSet;
80
82 using RemoteIndices = Dune::RemoteIndices<ParallelIndexSet>;
83#else
84 using InterfaceMap = std::map<int, std::list<int> >;
85#endif // HAVE_MPI
86};
87
88} // end namespace cpgrid
89} // end space Opm
90
91#endif // OPM_CPGRIDDATATRAITS_HEADER
The namespace Dune is the main namespace for all Dune code.
Definition: common/CartesianIndexMapper.hpp:10
Definition: CpGridDataTraits.hpp:53
MPIHelper::MPICommunicator MPICommunicator
The type of the collective communication.
Definition: CpGridDataTraits.hpp:55
Dune::VariableSizeCommunicator<> Communicator
The type of the Communicator.
Definition: CpGridDataTraits.hpp:70
Dune::RemoteIndices< ParallelIndexSet > RemoteIndices
The type of the remote indices information.
Definition: CpGridDataTraits.hpp:82
typename CommunicationType::ParallelIndexSet ParallelIndexSet
The type of the parallel index set.
Definition: CpGridDataTraits.hpp:79
Dune::Communication< MPICommunicator > CollectiveCommunication
Definition: CpGridDataTraits.hpp:58
Dune::OwnerOverlapCopyCommunication< int, int > CommunicationType
type of OwnerOverlap communication for cells
Definition: CpGridDataTraits.hpp:76
Dune::Communication< MPICommunicator > Communication
Definition: CpGridDataTraits.hpp:57
AttributeSet
The type of the set of the attributes.
Definition: CpGridDataTraits.hpp:65
@ owner
Definition: CpGridDataTraits.hpp:65
@ overlap
Definition: CpGridDataTraits.hpp:65
@ copy
Definition: CpGridDataTraits.hpp:65
Communicator::InterfaceMap InterfaceMap
The type of the map describing communication interfaces.
Definition: CpGridDataTraits.hpp:73