Public Member Functions | |
VRWGraphSMPModifier (VRWGraph &) | |
Construct from reference to VRWGraph. More... | |
~VRWGraphSMPModifier () | |
template<class ListType > | |
void | setSizeAndRowSize (const ListType &) |
set the size and row sizes More... | |
void | mergeGraphs (const List< VRWGraph > &graphParts) |
template<class GraphType > | |
void | reverseAddressing (const GraphType &origGraph) |
void | reverseAddressing (const VRWGraph &origGraph) |
template<class ListType , class GraphType > | |
void | reverseAddressing (const ListType &, const GraphType &) |
template<class ListType > | |
void | reverseAddressing (const ListType &, const VRWGraph &) |
void | optimizeMemoryUsage () |
optimize memory usage More... | |
void | operator= (const VRWGraph &) |
Assignment operator. More... | |
Private Member Functions | |
VRWGraphSMPModifier () | |
Disallow default construct. More... | |
VRWGraphSMPModifier (const VRWGraphSMPModifier &) | |
Disallow bitwise copy construct. More... | |
void | operator= (const VRWGraphSMPModifier &) |
Disallow bitwise assignment. More... | |
Private Attributes | |
VRWGraph & | graph_ |
list containing the data More... | |
Definition at line 50 of file VRWGraphSMPModifier.H.
|
private |
Disallow default construct.
|
private |
Disallow bitwise copy construct.
VRWGraphSMPModifier | ( | VRWGraph & | graph | ) |
Construct from reference to VRWGraph.
Definition at line 40 of file VRWGraphSMPModifier.C.
~VRWGraphSMPModifier | ( | ) |
Definition at line 45 of file VRWGraphSMPModifier.C.
|
private |
Disallow bitwise assignment.
void setSizeAndRowSize | ( | const ListType & | s | ) |
set the size and row sizes
Definition at line 41 of file VRWGraphSMPModifierTemplates.C.
References VRWGraph::data_, forAll, VRWGraphSMPModifier::graph_, VRWGraph::rows_, s(), LongList< T, Offset >::setSize(), and DynList< T, staticSize >::setSize().
Referenced by polyMeshGenAddressing::calcCellCells(), polyMeshGenAddressing::calcCellEdges(), polyMeshGenAddressing::calcCellPoints(), polyMeshGenAddressing::calcEdgeFaces(), polyMeshGenAddressing::calcFaceEdges(), polyMeshGenAddressing::calcPointPoints(), meshSurfaceEngine::calculateEdgeFacesAddressing(), meshSurfaceEngine::calculateFaceEdgesAddressing(), meshSurfaceEngine::calculatePointFaces(), meshSurfaceEngine::calculatePointPatches(), meshSurfaceEngine::calculatePointPoints(), meshOctreeAddressing::createOctreeFaces(), VRWGraphSMPModifier::mergeGraphs(), and VRWGraphSMPModifier::reverseAddressing().
merge graphs with the identical number of rows into a single one. Use for SMP parallelisation
find the number of elements in each row
set the size of graph
Finally, assemble the merged graph
Definition at line 50 of file VRWGraphSMPModifier.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, forAll, VRWGraphSMPModifier::graph_, VRWGraphSMPModifier::setSizeAndRowSize(), List::size(), VRWGraph::sizeOfRow(), and Foam::sum().
void reverseAddressing | ( | const GraphType & | origGraph | ) |
set the graph to the reverse of the original graph. the rows of such graph store the rows which contain the elements of the original graph
find min and max entry in the graph they are used for assigning ranges of values local for each process
find the number of appearances of each element in the original graph
count the appearances which are not local to the processor
start filling reverse addressing graph update data from processors with smaller labels
update data local to the processor
update data from the processors with higher labels
Definition at line 111 of file VRWGraphSMPModifierTemplates.C.
References Foam::dot(), forAll, VRWGraphSMPModifier::graph_, Foam::max(), Foam::min(), range, LongList< T, Offset >::setSize(), VRWGraph::setSize(), and VRWGraphSMPModifier::setSizeAndRowSize().
Referenced by polyMeshGenAddressing::calcEdgeCells(), polyMeshGenAddressing::calcPointCells(), polyMeshGenAddressing::calcPointEdges(), polyMeshGenAddressing::calcPointFaces(), meshOctreeAddressing::calculateEdgeFaces(), triSurfAddressing::calculateEdgeFacets(), meshSurfaceEngine::calculateEdgesAndAddressing(), meshOctreeAddressing::calculateLeafEdges(), meshOctreeAddressing::calculateNodeFaces(), and triSurfAddressing::calculatePointFacets().
void reverseAddressing | ( | const VRWGraph & | origGraph | ) |
find min and max entry in the graph they are used for assigning ranges of values local for each process
initialise appearances
find the number of appearances of each element in the original graph
count the appearances which are not local to the processor
allocate graph
start filling reverse addressing graph update data from processors with smaller labels
update data local to the processor
update data from the processors with higher labels
Definition at line 96 of file VRWGraphSMPModifier.C.
References Foam::dot(), forAll, forAllRow, VRWGraphSMPModifier::graph_, Foam::max(), Foam::min(), range, LongList< T, Offset >::setSize(), VRWGraph::setSize(), VRWGraphSMPModifier::setSizeAndRowSize(), and VRWGraph::size().
void reverseAddressing | ( | const ListType & | mapper, |
const GraphType & | origGraph | ||
) |
set the graph to the reverse of the original graph and mapped to another space.
find min and max entry in the graph they are used for assigning ranges of values local for each process
find the number of appearances of each element in the original graph
count the appearances which are not local to the processor
start filling reverse addressing graph update data from processors with smaller labels
update data local to the processor
update data from the processors with higher labels
Definition at line 285 of file VRWGraphSMPModifierTemplates.C.
References Foam::dot(), forAll, Foam::max(), Foam::min(), and range.
void reverseAddressing | ( | const ListType & | mapper, |
const VRWGraph & | origGraph | ||
) |
find min and max entry in the graph they are used for assigning ranges of values local for each process
find the number of appearances of each element in the original graph
count the appearances which are not local to the processor
start filling reverse addressing graph update data from processors with smaller labels
update data local to the processor
update data from the processors with higher labels
Definition at line 462 of file VRWGraphSMPModifierTemplates.C.
References Foam::dot(), forAll, forAllRow, Foam::max(), Foam::min(), range, and VRWGraph::size().
void optimizeMemoryUsage | ( | ) |
optimize memory usage
this should be used once the graph will not be resized any more
find the number of rows
find the number of data entries
find the starting position for each thread
copy the data into the location
replace the original data with the compressed data
Definition at line 272 of file VRWGraphSMPModifier.C.
References VRWGraph::data_, forAll, forAllRow, VRWGraphSMPModifier::graph_, VRWGraph::INVALIDROW, VRWGraph::rows_, LongList< T, Offset >::setSize(), DynList< T, staticSize >::setSize(), rowElement::size(), VRWGraph::size(), VRWGraph::sizeOfRow(), rowElement::start(), and LongList< T, Offset >::transfer().
void operator= | ( | const VRWGraph & | og | ) |
Assignment operator.
Definition at line 370 of file VRWGraphSMPModifier.C.
References VRWGraph::data_, forAll, VRWGraphSMPModifier::graph_, VRWGraph::rows_, LongList< T, Offset >::setSize(), and LongList< T, Offset >::size().
|
private |
list containing the data
Definition at line 54 of file VRWGraphSMPModifier.H.
Referenced by VRWGraphSMPModifier::mergeGraphs(), VRWGraphSMPModifier::operator=(), VRWGraphSMPModifier::optimizeMemoryUsage(), VRWGraphSMPModifier::reverseAddressing(), and VRWGraphSMPModifier::setSizeAndRowSize().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.