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

Public Member Functions

 laplaceSmoother (polyMeshGen &, const List< direction > &)
 Construct from mesh and vertex locations. More...
 
 ~laplaceSmoother ()
 
void optimizeLaplacian (const label nIterations=1)
 new position is the average of the neighbouring vertices More...
 
void optimizeLaplacian (const labelHashSet &badFaces, const label nIterations=1)
 
void optimizeSurfaceLaplacian (const labelHashSet &badFaces, const label nIterations=1)
 
void optimizeLaplacianPC (const label nIterations=1)
 
void optimizeLaplacianPC (const labelHashSet &badFaces, const label nIterations=1)
 
void optimizeLaplacianWPC (const label nIterations=1)
 
void optimizeLaplacianWPC (const labelHashSet &badFaces, const label nIterations=1)
 

Private Member Functions

void laplacian (const labelLongList &, const label)
 
void laplacianSurface (const labelLongList &, const label)
 
void laplacianParallel (const labelLongList &procPoints, const bool smoothOnlySurfaceNodes=false)
 
void laplacianPC (const labelLongList &, const label)
 
void laplacianPCParallel (const labelLongList &procPoints)
 
void laplacianWPC (const labelLongList &, const label)
 
void laplacianWPCParallel (const labelLongList &procPoints)
 
void updateMeshGeometry (const labelLongList &smoothPoints)
 update geometry after smoothing More...
 
 laplaceSmoother (const laplaceSmoother &)
 Disallow default bitwise copy construct. More...
 
void operator= (const laplaceSmoother &)
 Disallow default bitwise assignment. More...
 

Private Attributes

polyMeshGenmesh_
 reference to the mesh More...
 
const List< direction > & vertexLocation_
 location of vertex (internal, boundary, edge, corner) More...
 

Detailed Description

Definition at line 95 of file meshOptimizer.H.

Constructor & Destructor Documentation

◆ laplaceSmoother() [1/2]

laplaceSmoother ( const laplaceSmoother )
private

Disallow default bitwise copy construct.

◆ laplaceSmoother() [2/2]

laplaceSmoother ( polyMeshGen mesh,
const List< direction > &  vertexLocation 
)

Construct from mesh and vertex locations.

Definition at line 339 of file meshOptimizerOptimizePoint.C.

◆ ~laplaceSmoother()

Definition at line 350 of file meshOptimizerOptimizePoint.C.

Member Function Documentation

◆ laplacian()

void laplacian ( const labelLongList smoothPoints,
const label  nIterations 
)
private

smooth the node using the laplacian smoother new position is the average of the neighbouring vertices

Definition at line 47 of file meshOptimizerOptimizePoint.C.

References LongList< T, Offset >::append(), forAll, points, VRWGraph::sizeOfRow(), and Vector< scalar >::zero.

Here is the call graph for this function:

◆ laplacianSurface()

void laplacianSurface ( const labelLongList smoothPoints,
const label  nIterations 
)
private

Definition at line 94 of file meshOptimizerOptimizePoint.C.

References LongList< T, Offset >::append(), forAll, forAllRow, points, and Vector< scalar >::zero.

Here is the call graph for this function:

◆ laplacianParallel()

void laplacianParallel ( const labelLongList procPoints,
const bool  smoothOnlySurfaceNodes = false 
)
private

◆ laplacianPC()

void laplacianPC ( const labelLongList smoothPoints,
const label  nIterations 
)
private

smooth the node using the laplacian smoother new position is the average of the centres of faces attached to the vertex

Definition at line 147 of file meshOptimizerOptimizePoint.C.

References LongList< T, Offset >::append(), forAll, forAllRow, points, VRWGraph::sizeOfRow(), and Vector< scalar >::zero.

Here is the call graph for this function:

◆ laplacianPCParallel()

void laplacianPCParallel ( const labelLongList procPoints)
private

exchange data between processors

create storage for the data

create data which shall be exchanged with other processors

add data to the list which will be sent to other processor

exchange data with other processors

create new positions of nodes

Definition at line 192 of file meshOptimizerOptimizePointParallel.C.

References LongList< T, Offset >::append(), coordinates(), labelledPoint::coordinates(), Foam::endl(), Foam::help::exchangeMap(), forAll, forAllRow, polyMeshGenAddressing::globalPointLabel(), polyMeshGenAddressing::globalToLocalPointAddressing(), refLabelledPoint::lPoint(), Foam::mag(), UPstream::myProcNo(), refLabelledPoint::objectLabel(), UPstream::parRun(), polyMeshGenAddressing::pointAtProcs(), labelledPoint::pointLabel(), points, Foam::Pout, Foam::returnReduce(), LongList< T, Offset >::size(), and Vector< scalar >::zero.

Here is the call graph for this function:

◆ laplacianWPC()

void laplacianWPC ( const labelLongList smoothPoints,
const label  nIterations 
)
private

smooth the node using the laplacian smoother new position is the average of the centres of faces attached to the vertex

Definition at line 199 of file meshOptimizerOptimizePoint.C.

References LongList< T, Offset >::append(), forAll, forAllRow, Foam::max(), points, VRWGraph::sizeOfRow(), w(), and Vector< scalar >::zero.

Here is the call graph for this function:

◆ laplacianWPCParallel()

void laplacianWPCParallel ( const labelLongList procPoints)
private

exchange data between processors

create storage for the data

create data which shall be exchanged with other processors

add data to the list which will be sent to other processor

exchange data with other processors

create new positions of nodes

Definition at line 322 of file meshOptimizerOptimizePointParallel.C.

References LongList< T, Offset >::append(), coordinates(), labelledPointScalar::coordinates(), Foam::endl(), Foam::help::exchangeMap(), forAll, forAllRow, polyMeshGenAddressing::globalPointLabel(), polyMeshGenAddressing::globalToLocalPointAddressing(), Foam::mag(), Foam::max(), UPstream::myProcNo(), UPstream::parRun(), polyMeshGenAddressing::pointAtProcs(), labelledPointScalar::pointLabel(), points, Foam::Pout, Foam::returnReduce(), labelledPointScalar::scalarValue(), LongList< T, Offset >::size(), w(), and Vector< scalar >::zero.

Here is the call graph for this function:

◆ updateMeshGeometry()

void updateMeshGeometry ( const labelLongList smoothPoints)
private

update geometry after smoothing

make sure that neighbouring processors get the same information

update geometry information

Definition at line 258 of file meshOptimizerOptimizePoint.C.

References LongList< T, Offset >::append(), UPstream::blocking, LongList< T, Offset >::byteSize(), Foam::constant::universal::c, cells, forAll, and forAllRow.

Here is the call graph for this function:

◆ operator=()

void operator= ( const laplaceSmoother )
private

Disallow default bitwise assignment.

◆ optimizeLaplacian() [1/2]

void optimizeLaplacian ( const label  nIterations = 1)

new position is the average of the neighbouring vertices

Definition at line 356 of file meshOptimizerOptimizePoint.C.

References LongList< T, Offset >::append(), forAll, meshOptimizer::INSIDE, Foam::fvc::laplacian(), and meshOptimizer::vertexLocation_.

Here is the call graph for this function:

◆ optimizeLaplacian() [2/2]

void optimizeLaplacian ( const labelHashSet badFaces,
const label  nIterations = 1 
)

Definition at line 370 of file meshOptimizerOptimizePoint.C.

References Foam::exit(), and Foam::FatalError.

Here is the call graph for this function:

◆ optimizeSurfaceLaplacian()

void optimizeSurfaceLaplacian ( const labelHashSet badFaces,
const label  nIterations = 1 
)

new position of surface point is the average of the neighbouring surface vertices

Definition at line 379 of file meshOptimizerOptimizePoint.C.

References Foam::exit(), and Foam::FatalError.

Here is the call graph for this function:

◆ optimizeLaplacianPC() [1/2]

void optimizeLaplacianPC ( const label  nIterations = 1)

new positions are the average of the centres of the cells adjacent to the vertex

Definition at line 388 of file meshOptimizerOptimizePoint.C.

References LongList< T, Offset >::append(), forAll, meshOptimizer::INSIDE, and meshOptimizer::vertexLocation_.

Referenced by meshOptimizer::optimizeMeshFV().

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

◆ optimizeLaplacianPC() [2/2]

void optimizeLaplacianPC ( const labelHashSet badFaces,
const label  nIterations = 1 
)

Definition at line 404 of file meshOptimizerOptimizePoint.C.

References Foam::exit(), and Foam::FatalError.

Here is the call graph for this function:

◆ optimizeLaplacianWPC() [1/2]

void optimizeLaplacianWPC ( const label  nIterations = 1)

new positions are the average of the centres of the cells adjacent to the vertex weighted by cell volumes

Definition at line 413 of file meshOptimizerOptimizePoint.C.

References LongList< T, Offset >::append(), forAll, meshOptimizer::INSIDE, and meshOptimizer::vertexLocation_.

Here is the call graph for this function:

◆ optimizeLaplacianWPC() [2/2]

void optimizeLaplacianWPC ( const labelHashSet badFaces,
const label  nIterations = 1 
)

Definition at line 429 of file meshOptimizerOptimizePoint.C.

References Foam::exit(), and Foam::FatalError.

Here is the call graph for this function:

Field Documentation

◆ mesh_

polyMeshGen& mesh_
private

reference to the mesh

Definition at line 99 of file meshOptimizer.H.

◆ vertexLocation_

const List<direction>& vertexLocation_
private

location of vertex (internal, boundary, edge, corner)

Definition at line 102 of file meshOptimizer.H.


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