Go to the documentation of this file.
37 #include <boost/config.hpp>
40 #include <boost/graph/adjacency_list.hpp>
41 #include <boost/graph/sloan_ordering.hpp>
42 #include <boost/graph/properties.hpp>
43 #include <boost/graph/bandwidth.hpp>
44 #include <boost/graph/profile.hpp>
45 #include <boost/graph/wavefront.hpp>
49 using namespace boost;
53 typedef adjacency_list
75 typedef graph_traits<Graph>::vertex_descriptor
Vertex;
76 typedef graph_traits<Graph>::vertices_size_type
size_type;
93 Foam::SloanRenumber::SloanRenumber(
const dictionary& renumberDict)
98 renumberDict.optionalSubDict
101 ).getOrDefault(
"reverse", false)
122 if (pbm[patchi].coupled() && !isA<processorPolyPatch>(pbm[patchi]))
147 pbm[patchi].coupled()
148 && !isA<processorPolyPatch>(pbm[patchi])
149 && refCast<const coupledPolyPatch>(pbm[patchi]).owner()
156 label nbrCelli = nbr[bFacei];
172 graph_traits<Graph>::vertex_iterator ui, ui_end;
176 for (boost::tie(ui, ui_end) =
vertices(
G); ui != ui_end; ++ui)
177 deg[*ui] = degree(*ui,
G);
183 std::vector<Vertex> sloan_order(num_vertices(
G));
189 get(vertex_color,
G),
191 get(vertex_priority,
G)
194 labelList orderedToOld(sloan_order.size());
197 orderedToOld[
c] = index_map[sloan_order[
c]];
215 Graph G(cellCells.size());
219 const labelList& nbrs = cellCells[celli];
224 add_edge(celli, nbrs[i],
G);
230 graph_traits<Graph>::vertex_iterator ui, ui_end;
234 for (boost::tie(ui, ui_end) =
vertices(
G); ui != ui_end; ++ui)
235 deg[*ui] = degree(*ui,
G);
241 std::vector<Vertex> sloan_order(num_vertices(
G));
247 get(vertex_color,
G),
249 get(vertex_priority,
G)
252 labelList orderedToOld(sloan_order.size());
255 orderedToOld[
c] = index_map[sloan_order[
c]];
void reverse(UList< T > &list, const label n)
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
const dimensionedScalar G
Newtonian constant of gravitation.
label nInternalFaces() const
Number of internal faces.
A List obtained as a section of another List.
graph_traits< Graph >::vertex_descriptor Vertex
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
label start() const
The start label of the boundary faces in the polyMesh face list.
virtual labelList renumber(const pointField &) const
Return the order in which cells need to be visited, i.e.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
adjacency_list< setS, vecS, undirectedS, property< vertex_color_t, default_color_type, property< vertex_degree_t, Foam::label, property< vertex_priority_t, Foam::scalar > > >> Graph
label nCells() const
Number of mesh cells.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to hash-table of functions with typename as the key.
virtual const labelList & faceOwner() const
Return face owner.
graph_traits< Graph >::vertices_size_type size_type
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
label nBoundaryFaces() const
Number of boundary faces (== nFaces - nInternalFaces)
pointField vertices(const blockVertexList &bvl)
Macros for easy insertion into run-time selection tables.
Abstract base class for renumbering.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const dimensionedScalar c
Speed of light in a vacuum.
Smooth ATC in cells next to a set of patches supplied by type.
virtual const labelList & faceNeighbour() const
Return face neighbour.