MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_BoostGraphviz.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // MueLu: A package for multigrid based preconditioning
4 //
5 // Copyright 2012 NTESS and the MueLu contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef MUELU_BOOSTGRAPHVIZ_HPP
11 #define MUELU_BOOSTGRAPHVIZ_HPP
12 
13 // This header file can be used in place of <boost/graph/graphviz.hpp>. It disable the warnings present in boost.
14 
15 // Note: pragma warnings available since gcc 4.2
16 // pragma push/pop available since gcc 4.6
17 // We no longer check for gcc version as Trilinos requires a minimum 4.7.2.
18 
19 #include "MueLu_ConfigDefs.hpp"
20 #if defined(HAVE_MUELU_BOOST) && defined(HAVE_MUELU_BOOST_FOR_REAL)
21 
22 #ifdef __GNUC__
23 #pragma GCC diagnostic push
24 #pragma GCC diagnostic ignored "-Wshadow"
25 #endif // __GNUC__
26 
27 #include <boost/graph/graphviz.hpp>
28 
29 #ifdef __GNUC__
30 #pragma GCC diagnostic pop
31 #endif // __GNUC__
32 
33 // define boost graph types
34 typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS,
35  boost::property<boost::vertex_name_t, std::string,
36  boost::property<boost::vertex_color_t, std::string,
37  boost::property<boost::vertex_index_t, std::string> > >,
38  boost::property<boost::edge_name_t, std::string,
39  boost::property<boost::edge_color_t, std::string> > >
40  BoostGraph;
41 typedef boost::dynamic_properties BoostProperties;
42 typedef boost::graph_traits<BoostGraph>::vertex_descriptor BoostVertex;
43 typedef boost::graph_traits<BoostGraph>::edge_descriptor BoostEdge;
44 
45 #endif // HAVE_MUELU_BOOST && HAVE_MUELU_BOOST_FOR_REAL
46 
47 #endif // MUELU_BOOSTGRAPHVIZ_HPP