34 #include <boost/config.hpp> 37 #include <boost/graph/adjacency_list.hpp> 38 #include <boost/graph/sloan_ordering.hpp> 39 #include <boost/graph/properties.hpp> 40 #include <boost/graph/bandwidth.hpp> 41 #include <boost/graph/profile.hpp> 42 #include <boost/graph/wavefront.hpp> 46 using namespace boost;
50 typedef adjacency_list
72 typedef graph_traits<Graph>::vertex_descriptor
Vertex;
73 typedef graph_traits<Graph>::vertices_size_type
size_type;
90 Foam::SloanRenumber::SloanRenumber(
const dictionary& renumberDict)
95 renumberDict.
found(typeName +
"Coeffs")
96 ?
Switch(renumberDict.subDict(typeName +
"Coeffs").
lookup(
"reverse"))
118 if (pbm[
patchi].coupled() && !isA<processorPolyPatch>(pbm[
patchi]))
125 ) = pbm[patchi].faceCells();
144 && !isA<processorPolyPatch>(pbm[
patchi])
145 && refCast<const coupledPolyPatch>(pbm[patchi]).owner()
152 label nbrCelli = nbr[bFacei];
154 if (faceCells[i] < nbrCelli)
156 add_edge(faceCells[i], nbrCelli,
G);
160 add_edge(nbrCelli, faceCells[i],
G);
168 graph_traits<Graph>::vertex_iterator ui, ui_end;
172 for (boost::tie(ui, ui_end) = vertices(
G); ui != ui_end; ++ui)
173 deg[*ui] = degree(*ui,
G);
179 std::vector<Vertex> sloan_order(num_vertices(
G));
185 get(vertex_color,
G),
187 get(vertex_priority,
G)
190 labelList orderedToOld(sloan_order.size());
193 orderedToOld[
c] = index_map[sloan_order[
c]];
215 const labelList& nbrs = cellCells[celli];
220 add_edge(celli, nbrs[i],
G);
226 graph_traits<Graph>::vertex_iterator ui, ui_end;
230 for (boost::tie(ui, ui_end) = vertices(
G); ui != ui_end; ++ui)
231 deg[*ui] = degree(*ui,
G);
237 std::vector<Vertex> sloan_order(num_vertices(
G));
243 get(vertex_color,
G),
245 get(vertex_priority,
G)
248 labelList orderedToOld(sloan_order.size());
251 orderedToOld[
c] = index_map[sloan_order[
c]];
graph_traits< Graph >::vertex_descriptor Vertex
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
const dimensionedScalar G
Newtonian constant of gravitation.
void size(const label)
Override size to be inconsistent with allocated storage.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Macros for easy insertion into run-time selection tables.
Abstract base class for renumbering.
A List obtained as a section of another List.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
stressControl lookup("compactNormalStress") >> compactNormalStress
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
graph_traits< Graph >::vertices_size_type size_type
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
virtual labelList renumber(const pointField &) const
Return the order in which cells need to be visited, i.e.
void reverse(UList< T > &, const label n)
virtual const labelList & faceNeighbour() const
Return face neighbour.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
const dimensionedScalar c
Speed of light in a vacuum.
Mesh consisting of general polyhedral cells.
virtual const labelList & faceOwner() const
Return face owner.
label nInternalFaces() const
label size() const
Return the number of elements in the UPtrList.