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;
95 renumberDict.optionalSubDict
98 ).lookupOrDefault<
Switch>(
"reverse", false)
119 if (pbm[
patchi].coupled() && !isA<processorPolyPatch>(pbm[
patchi]))
126 ) = pbm[patchi].faceCells();
145 && !isA<processorPolyPatch>(pbm[
patchi])
146 && refCast<const coupledPolyPatch>(pbm[patchi]).owner()
153 label nbrCelli = nbr[bFacei];
155 if (faceCells[i] < nbrCelli)
157 add_edge(faceCells[i], nbrCelli,
G);
161 add_edge(nbrCelli, faceCells[i],
G);
169 graph_traits<Graph>::vertex_iterator ui, ui_end;
173 for (boost::tie(ui, ui_end) =
vertices(
G); ui != ui_end; ++ui)
174 deg[*ui] = degree(*ui,
G);
180 std::vector<Vertex> sloan_order(num_vertices(
G));
186 get(vertex_color,
G),
188 get(vertex_priority,
G)
191 labelList orderedToOld(sloan_order.size());
194 orderedToOld[
c] = index_map[sloan_order[
c]];
216 const labelList& nbrs = cellCells[celli];
221 add_edge(celli, nbrs[i],
G);
227 graph_traits<Graph>::vertex_iterator ui, ui_end;
231 for (boost::tie(ui, ui_end) =
vertices(
G); ui != ui_end; ++ui)
232 deg[*ui] = degree(*ui,
G);
238 std::vector<Vertex> sloan_order(num_vertices(
G));
244 get(vertex_color,
G),
246 get(vertex_priority,
G)
249 labelList orderedToOld(sloan_order.size());
252 orderedToOld[
c] = index_map[sloan_order[
c]];
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
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.
virtual labelList renumber(const pointField &) const
Return the order in which cells need to be visited, i.e.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to hash-table of functions with typename as the key.
label nInternalFaces() const
virtual const labelList & faceNeighbour() const
Return face neighbour.
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/any.
const dimensionedScalar G
Newtonian constant of gravitation.
const dimensionedScalar c
Speed of light in a vacuum.
Macros for easy insertion into run-time selection tables.
pointField vertices(const blockVertexList &bvl)
Abstract base class for renumbering.
A List obtained as a section of another List.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
SloanRenumber(const dictionary &renumberDict)
Construct given the renumber dictionary.
virtual const labelList & faceOwner() const
Return face owner.
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...
void reverse(UList< T > &, const label n)
label size() const
Return the number of elements in the UPtrList.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Mesh consisting of general polyhedral cells.