36#ifndef MULTIREGIONS_SUBSTRUCTUREDGRAPH_H
37#define MULTIREGIONS_SUBSTRUCTUREDGRAPH_H
44#include <boost/config.hpp>
45#include <boost/graph/adjacency_list.hpp>
46#include <boost/graph/bandwidth.hpp>
47#include <boost/graph/cuthill_mckee_ordering.hpp>
48#include <boost/graph/properties.hpp>
54class BottomUpSubStructuredGraph;
56class MultiLevelBisectedGraph;
59typedef std::shared_ptr<BottomUpSubStructuredGraph>
62typedef std::shared_ptr<MultiLevelBisectedGraph>
74 const unsigned int bndPatch,
165 std::vector<SubGraphSharedPtr> &leaves)
const;
193 bool globaloffset =
false);
209 const int whichlevel)
const;
215 const int patch = 0)
const;
218 const int whichlevel)
const;
245typedef boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS>
250 Array<OneD, int> &perm,
251 Array<OneD, int> &iperm);
254 const BoostGraph &graph, Array<OneD, int> &perm, Array<OneD, int> &iperm,
256 std::set<int> partVerts = std::set<int>(),
int mdswitch = 1);
269 Array<OneD, int> &perm,
270 Array<OneD, int> &iperm);
#define MULTI_REGIONS_EXPORT
#define sign(a, b)
return the sign(b)*a
void GetNintDofsPerPatch(const int whichlevel, Array< OneD, unsigned int > &outarray) const
void ExpandGraphWithVertexWeights(const Array< OneD, const int > &wgts)
int GetNumGlobalDofs(const int whichlevel) const
std::vector< SubGraphSharedPtr > GetInteriorBlocks() const
BottomUpSubStructuredGraphSharedPtr GetDaughterGraph() const
std::vector< SubGraphSharedPtr > m_IntBlocks
void SetBottomUpReordering(Array< OneD, int > &iperm) const
int GetInteriorOffset(const int whichlevel, const int patch=0) const
BottomUpSubStructuredGraph(MultiLevelBisectedGraphSharedPtr graph, int nPartition=0, bool globaloffset=false)
void UpdateBottomUpReordering(Array< OneD, int > &perm, Array< OneD, int > &iperm) const
BottomUpSubStructuredGraphSharedPtr m_daughterGraph
~BottomUpSubStructuredGraph(void)
void MaskPatches(const int leveltomask, Array< OneD, NekDouble > &maskarray) const
int GetNpatchesWithInterior(const int whichlevel) const
MultiLevelBisectedGraph(MultiLevelBisectedGraphSharedPtr oldLevel, const int nPartition)
void DumpNBndDofs(void) const
void SetGlobalNumberingOffset()
std::vector< MultiLevelBisectedGraphSharedPtr > & GetDaughterGraphs()
void CollectLeaves(std::vector< SubGraphSharedPtr > &leaves) const
int GetNdaughterGraphs() const
SubGraphSharedPtr m_BndDofs
const SubGraphSharedPtr GetBndDofsGraph() const
~MultiLevelBisectedGraph(void)
std::vector< MultiLevelBisectedGraphSharedPtr > m_daughterGraphs
Array< OneD, const unsigned int > IsBndDof() const
Array< OneD, unsigned int > m_bndPatch
void SetPatchMap(const int n, const int patchId, const int dofId, const unsigned int bndPatch, const NekDouble sign)
void SetNewLevelMap(Array< OneD, const unsigned int > numLocalBndCondPerPatch, Array< OneD, const unsigned int > numLocalIntCondPerPatch)
Array< OneD, const int > GetNewLevelMap() const
Array< OneD, NekDouble > m_sign
Array< OneD, const int > GetDofId() const
Array< OneD, const int > GetPatchId() const
Array< OneD, int > m_patchId
Array< OneD, const NekDouble > GetSign() const
Array< OneD, int > m_dofId
Array< OneD, int > m_newLevelMap
void SetIdOffset(const int i)
void SetNverts(const int i)
SubGraph(const int nVerts, const int idOffset=0)
int GetNverts(void) const
int GetIdOffset(void) const
void NoReordering(const BoostGraph &graph, Array< OneD, int > &perm, Array< OneD, int > &iperm)
void CuthillMckeeReordering(const BoostGraph &graph, Array< OneD, int > &perm, Array< OneD, int > &iperm)
void MultiLevelBisectionReordering(const BoostGraph &graph, Array< OneD, int > &perm, Array< OneD, int > &iperm, BottomUpSubStructuredGraphSharedPtr &substructgraph, std::set< int > partVerts, int mdswitch)
std::shared_ptr< BottomUpSubStructuredGraph > BottomUpSubStructuredGraphSharedPtr
bool SubGraphWithoutVerts(const SubGraphSharedPtr g)
std::shared_ptr< MultiLevelBisectedGraph > MultiLevelBisectedGraphSharedPtr
std::shared_ptr< SubGraph > SubGraphSharedPtr
std::shared_ptr< PatchMap > PatchMapSharedPtr