Public Member Functions | Private Member Functions | Private Attributes
VRWGraphSMPModifier Class Reference
Collaboration diagram for VRWGraphSMPModifier:
Collaboration graph
[legend]

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

VRWGraphgraph_
 list containing the data More...
 

Detailed Description

Definition at line 50 of file VRWGraphSMPModifier.H.

Constructor & Destructor Documentation

◆ VRWGraphSMPModifier() [1/3]

VRWGraphSMPModifier ( )
private

Disallow default construct.

◆ VRWGraphSMPModifier() [2/3]

Disallow bitwise copy construct.

◆ VRWGraphSMPModifier() [3/3]

Construct from reference to VRWGraph.

Definition at line 40 of file VRWGraphSMPModifier.C.

◆ ~VRWGraphSMPModifier()

Definition at line 45 of file VRWGraphSMPModifier.C.

Member Function Documentation

◆ operator=() [1/2]

void operator= ( const VRWGraphSMPModifier )
private

Disallow bitwise assignment.

◆ setSizeAndRowSize()

void setSizeAndRowSize ( const ListType &  s)

◆ mergeGraphs()

void mergeGraphs ( const List< VRWGraph > &  graphParts)

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().

Here is the call graph for this function:

◆ reverseAddressing() [1/4]

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reverseAddressing() [2/4]

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().

Here is the call graph for this function:

◆ reverseAddressing() [3/4]

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.

Here is the call graph for this function:

◆ reverseAddressing() [4/4]

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().

Here is the call graph for this function:

◆ optimizeMemoryUsage()

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().

Here is the call graph for this function:

◆ operator=() [2/2]

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().

Here is the call graph for this function:

Field Documentation

◆ graph_

VRWGraph& graph_
private

The documentation for this class was generated from the following files: