3 #ifndef _PROTO_MB_GRAPH_ 4 #define _PROTO_MB_GRAPH_ 37 std::string
str()
const 39 std::ostringstream oss;
48 inline void print(std::ostream& stream = std::cout)
const { stream <<
str() << std::endl; }
66 inline void addArc(BlockIndex block,
Point toDst,
Point fromDst);
75 return (index == rhs.
index)
76 && (arcs == rhs.
arcs);
81 inline void print(std::ostream& stream = std::cout)
const;
84 mutable std::map<Point, std::vector<MBGraphArc>>
arcs;
112 inline MBGraph(BlockIndex numBlocks);
136 inline void defineBoundary(
156 inline unsigned int numBlocks()
const {
return m_blocks.size(); }
181 inline std::vector<Point> fullConnectivity(
194 inline Point connectivity(
196 BlockIndex dstBlock)
const;
223 inline Point mirrorDirAcrossBoundary(
237 BlockIndex dstBlock)
const;
245 inline BlockIndex adjacentBlock(
255 inline BlockIndex adjacentBlock(
257 Point codim1Dir)
const;
264 inline std::set<BlockIndex> adjacentBlocks(
278 inline bool isBlockBoundary(BlockIndex srcBlock,
Point dir)
const;
293 inline bool isTriplePoint(
313 std::vector<std::pair<Point, Point>>
314 getTriplePointCircuits(
323 inline bool isDomainBoundary(
339 inline void fixRotations();
348 BlockIndex dstBlock)
const;
368 inline std::vector<Point> codim2TriplePointBoundaries(
374 std::vector<std::shared_ptr<MBGraphNode>>
m_blocks;
376 #include "implem/Proto_MBGraphImplem.H" 378 #endif // end include guard std::map< Point, std::vector< MBGraphArc > > arcs
Definition: Proto_MBGraph.H:84
bool operator==(const MBGraphNode &rhs) const
Equality established by value.
Definition: Proto_MBGraph.H:73
LoHiSide
Side Enum.
Definition: Proto_Face.H:23
Graph of a mapped multiblock domain. Nodes represent blocks and arcs represent boundaries between blo...
Definition: Proto_MBGraph.H:105
int BlockIndex
Defines what type is used for indexing block entities.
Definition: Proto_MBGraph.H:9
void print(std::ostream &stream=std::cout) const
Definition: Proto_MBGraph.H:48
MBGraphArc(BlockIndex srcBlock, BlockIndex dstBlock, Point srcToDst, Point dstToSrc)
Definition: Proto_MBGraph.H:14
std::vector< std::shared_ptr< MBGraphNode > > m_blocks
The nodes of this graph.
Definition: Proto_MBGraph.H:374
BlockIndex index
The block associated with this node.
Definition: Proto_MBGraph.H:83
Defines discrete rotations in logically rectangular coordinate systems.
Definition: Proto_CoordPermutation.H:13
Point srcToDst
Direction of dstBlock relative to srcBlock in src coords.
Definition: Proto_MBGraph.H:52
BlockIndex dstBlock
The block index at the arc's end.
Definition: Proto_MBGraph.H:51
CoordPermutation R
Coordinate transformation from src to dst coords.
Definition: Proto_MBGraph.H:54
std::string str() const
Definition: Proto_MBGraph.H:37
Mapped Multi-Block Problem Domain.
Definition: Proto_MBProblemDomain.H:76
BlockIndex srcBlock
The block index at the arc's origin.
Definition: Proto_MBGraph.H:50
unsigned int numBlocks() const
Number of blocks in the graph.
Definition: Proto_MBGraph.H:156
CoordPermutation & rotation(BlockIndex srcBlock, Point dir, BlockIndex dstBlock) const
obtain a reference to the coordinate permuation object stored in the graph. Used by "close" to fix in...
Definition: Proto_MBGraph.H:330
Definition: Proto_Array.H:17
uint64_t index
Definition: Proto_MBBoxPartition.H:15
An internal structure defining an arc in the MBGraph.
Definition: Proto_MBGraph.H:12
Integer Valued Vector.
Definition: Proto_Point.H:24
~MBGraphArc()
Definition: Proto_MBGraph.H:26
Point dstToSrc
Direction of srcBlock relative to dstBlock in dst coords.
Definition: Proto_MBGraph.H:53
std::map< Point, MBPatchBoundInfo > boundaries
Definition: Proto_MBBoxPartition.H:88
bool m_closed
Has "close" been called on this.
Definition: Proto_MBGraph.H:373
bool operator==(const MBGraphArc &rhs) const
Definition: Proto_MBGraph.H:28
Point dir
Definition: Proto_MBBoxPartition.H:16
An internal structure defining a node in the MBGraph.
Definition: Proto_MBGraph.H:58
void defineBoundary(BlockIndex srcBlock, BlockIndex dstBlock, Point dir, CoordPermutation &rotation)
Define Boundary.
Definition: Proto_MBGraph.H:127