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)
120 if (pp.coupled() && !isA<processorPolyPatch>(pp))
141 && !isA<processorPolyPatch>(pp)
142 && refCast<const coupledPolyPatch>(pp).owner()
145 label bFacei = pp.offset();
147 for (
const label ownCelli : pp.faceCells())
149 const label nbrCelli = nbr[bFacei];
152 if (ownCelli < nbrCelli)
154 add_edge(ownCelli, nbrCelli,
G);
158 add_edge(nbrCelli, ownCelli,
G);
166 graph_traits<Graph>::vertex_iterator ui, ui_end;
170 for (boost::tie(ui, ui_end) =
vertices(
G); ui != ui_end; ++ui)
171 deg[*ui] = degree(*ui,
G);
177 std::vector<Vertex> sloan_order(num_vertices(
G));
183 get(vertex_color,
G),
185 get(vertex_priority,
G)
188 labelList orderedToOld(sloan_order.size());
191 orderedToOld[
c] = index_map[sloan_order[
c]];
209 Graph G(cellCells.size());
213 const labelList& nbrs = cellCells[celli];
218 add_edge(celli, nbrs[i],
G);
224 graph_traits<Graph>::vertex_iterator ui, ui_end;
228 for (boost::tie(ui, ui_end) =
vertices(
G); ui != ui_end; ++ui)
229 deg[*ui] = degree(*ui,
G);
235 std::vector<Vertex> sloan_order(num_vertices(
G));
241 get(vertex_color,
G),
243 get(vertex_priority,
G)
246 labelList orderedToOld(sloan_order.size());
249 orderedToOld[
c] = index_map[sloan_order[
c]];
List< label > labelList
A List of labels.
vectorField pointField
pointField is a vectorField.
void reverse(UList< T > &list, const label n)
const dimensionedScalar G
A List obtained as a section of another List.
graph_traits< Graph >::vertex_descriptor Vertex
const polyBoundaryMesh & boundaryMesh() const
virtual labelList renumber(const pointField &) const
Mesh consisting of general polyhedral cells.
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 noexcept
Generic templated field type.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
A patch is a list of labels that address the faces in the global face list.
virtual const labelList & faceOwner() const
label nBoundaryFaces() const noexcept
graph_traits< Graph >::vertices_size_type size_type
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
pointField vertices(const blockVertexList &bvl)
Macros for easy insertion into run-time selection tables.
Abstract base class for renumbering.
List< labelList > labelListList
A List of labelList.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
#define defineTypeNameAndDebug(Type, DebugSwitch)
const dimensionedScalar c
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
virtual const labelList & faceNeighbour() const