Data Structures | Public Member Functions | Private Types | Private Member Functions | Private Attributes
extrudeLayer Class Reference
Collaboration diagram for extrudeLayer:
Collaboration graph
[legend]

Data Structures

class  addressingCalculator
 

Public Member Functions

 extrudeLayer (polyMeshGen &mesh, const LongList< labelPair > &extrusionFront, const scalar thickness=-1.0)
 Construct from mesh, extrusion faces, thickness and number of layers. More...
 
 ~extrudeLayer ()
 

Private Types

enum  extrudeLayerTypes_ { NONE = 0, FRONTVERTEX = 1, FRONTVERTEXPROCBND = 2 }
 

Private Member Functions

void createDuplicateFrontFaces (const LongList< labelPair > &)
 duplicate faces which will be extruded More...
 
void createNewVertices ()
 create new vertices and open the mesh More...
 
void movePoints ()
 move points to make space for the new cells More...
 
void createLayerCells ()
 create layer cells More...
 
void createNewFacesParallel ()
 create new faces at parallel boundaries More...
 
void updateBoundary ()
 update boundary patches More...
 
 extrudeLayer (const extrudeLayer &)
 Disallow bitwise copy construct. More...
 
void operator= (const extrudeLayer &)
 Disallow bitwise assignment. More...
 

Private Attributes

polyMeshGenmesh_
 Reference to the mesh. More...
 
const scalar thickness_
 thickness More...
 
const label nOrigPoints_
 number of points in the original mesh More...
 
const label nOrigFaces_
 number of faces in the original mesh More...
 
const label nOrigCells_
 number of cells in the original mesh More...
 
LongList< labelPairextrudedFaces_
 pairs of faces making the extruded front More...
 
LongList< bool > pairOrientation_
 
labelLongList origPointLabel_
 original point label More...
 

Detailed Description

Definition at line 51 of file extrudeLayer.H.

Member Enumeration Documentation

◆ extrudeLayerTypes_

enum extrudeLayerTypes_
private
Enumerator
NONE 
FRONTVERTEX 
FRONTVERTEXPROCBND 

Definition at line 173 of file extrudeLayer.H.

Constructor & Destructor Documentation

◆ extrudeLayer() [1/2]

extrudeLayer ( const extrudeLayer )
private

Disallow bitwise copy construct.

◆ extrudeLayer() [2/2]

extrudeLayer ( polyMeshGen mesh,
const LongList< labelPair > &  extrusionFront,
const scalar  thickness = -1.0 
)

◆ ~extrudeLayer()

Definition at line 1389 of file extrudeLayer.C.

References polyMeshGenCells::clearAddressingData(), and extrudeLayer::mesh_.

Here is the call graph for this function:

Member Function Documentation

◆ createDuplicateFrontFaces()

void createDuplicateFrontFaces ( const LongList< labelPair > &  front)
private

duplicate faces which will be extruded

create a copy of the faces in the extrusion front to create space for the layer

boundary faces

internal face

renumber the cells

Definition at line 70 of file extrudeLayer.C.

References LongList< T, Offset >::append(), Foam::constant::universal::c, cells, polyMeshGenModifier::cellsAccess(), polyMeshGenModifier::clearAll(), extrudeLayer::extrudedFaces_, polyMeshGenModifier::facesAccess(), Pair::first(), forAll, extrudeLayer::mesh_, polyMeshGenFaces::neighbour(), extrudeLayer::nOrigFaces_, polyMeshGenFaces::owner(), extrudeLayer::pairOrientation_, Pair::second(), faceListPMG::setSize(), LongList< T, Offset >::setSize(), faceListPMG::size(), LongList< T, Offset >::size(), and faceListPMG::transfer().

Referenced by extrudeLayer::extrudeLayer().

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

◆ createNewVertices()

void createNewVertices ( )
private

create new vertices and open the mesh

find the points in the marked front

propagate this information to other processors in case of a parallel run

allocate the map

collect the information about markes points at processor boundaries

mark points at processor boundaries

create a new vertex for each group of faces faces are grouped such that the faces belonging to the same group can be visited over cells without crossing any front faces

create new vertices at processor boundaries

create the information which faces are attached to points at parallel boundaries in dual form where each edge represents global labels of cells sharing a face

fill in local data

do not store faces at processor boundaries and newly created faces

fill-in with data at processor boundaries. Store edges on the processor with the lower label not to duplicate the data

exchange this information with neighbouring processors

fill in the exchangeData map

exchange data with other processors

update local data

Finally, find groups of faces and create new vertices

check edge connections and store all edges which can be reached over other edges into the same group

find face groups from the groups assigned to dual edges

stop in case there is only one group of faces attached to this point

create new vertices

renumber faces

treat local points

assign groups to faces and cells

stop in case there is only one group of faces attached to this point

create new vertices

renumber faces

Definition at line 209 of file extrudeLayer.C.

References polyMeshGenPoints::addPointSubset(), polyMeshGenPoints::addPointToSubset(), polyMeshGenCells::addressingData(), LongList< T, Offset >::append(), DynList< T, staticSize >::append(), UPstream::blocking, polyMeshGenModifier::clearAll(), polyMeshGenModifier::clearOut(), Foam::e, edge::end(), Foam::endl(), Foam::help::exchangeMap(), Foam::exit(), extrudeLayer::extrudedFaces_, f(), polyMeshGenModifier::facesAccess(), Foam::FatalError, FatalErrorIn, forAll, forAllConstIter(), forAllRow, extrudeLayer::FRONTVERTEX, extrudeLayer::FRONTVERTEXPROCBND, polyMeshGenAddressing::globalCellLabel(), polyMeshGenAddressing::globalPointLabel(), polyMeshGenAddressing::globalToLocalPointAddressing(), Foam::constant::atomic::group, Foam::Info, extrudeLayer::mesh_, UPstream::myProcNo(), polyMeshGenFaces::neighbour(), extrudeLayer::NONE, extrudeLayer::nOrigFaces_, UPstream::nProcs(), extrudeLayer::origPointLabel_, polyMeshGenFaces::owner(), p, UPstream::parRun(), polyMeshGenAddressing::pointAtProcs(), polyMeshGenAddressing::pointNeiProcs(), points, polyMeshGenModifier::pointsAccess(), Foam::pos(), Foam::Pout, polyMeshGenFaces::procBoundaries(), DynList< T, staticSize >::removeLastElement(), Foam::returnReduce(), VRWGraph::reverseAddressing(), DynList< T, staticSize >::setSize(), LongList< T, Offset >::size(), DynList< T, staticSize >::size(), VRWGraph::sizeOfRow(), and edge::start().

Referenced by extrudeLayer::extrudeLayer().

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

◆ movePoints()

void movePoints ( )
private

move points to make space for the new cells

create a map for exchanging data

create displacements from local data

create local part of the displacement vector

store data in the exchangeData map

calculate displacements of vertices at processor boundaries

find displacement vectors

Definition at line 730 of file extrudeLayer.C.

References polyMeshGenCells::addressingData(), Foam::constant::universal::c, labelledPointScalar::coordinates(), Foam::help::exchangeMap(), f(), polyMeshGenFaces::faces(), forAll, forAllConstIter(), forAllRow, polyMeshGenAddressing::globalToLocalPointAddressing(), Foam::mag(), extrudeLayer::mesh_, Foam::min(), UPstream::myProcNo(), n, extrudeLayer::nOrigFaces_, extrudeLayer::nOrigPoints_, UPstream::parRun(), polyMeshGenAddressing::pointAtProcs(), labelledPointScalar::pointLabel(), polyMeshGenAddressing::pointNeiProcs(), points, polyMeshGenPoints::points(), Foam::returnReduce(), VRWGraph::reverseAddressing(), labelledPointScalar::scalarValue(), extrudeLayer::thickness_, polyMeshGen::write(), and Vector< scalar >::zero.

Referenced by extrudeLayer::extrudeLayer().

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

◆ createLayerCells()

void createLayerCells ( )
private

create layer cells

create cells from corners and edges

create new cells extruded from the faces in the selected front

create new cell from the front pair

create a new cell. Faces are of the same orientation

create a new cell. Faces are of the opposite orientation

create cells created as a consequence of self-intersection over edges. And edge is transformed into a hex cell

find point labels of the edge which is the origin of the edge (pointI, nextI) with respect to face extrudedI

points of the current edge and of the original edge must have the same point as their origin

Finally, start creating a cell from this edge find the other extruded face which shares this edge

find point labels of the edge which is the origin of the edge (pointI, nextI) with respect to face otherExtrudedFace

find points of the edge opposite to the edge (pointI, nextI) these points make the original edge which is blown into a hex cell

find an extruded face attached to edge (origFacePointI, origFaceNextI). The must exist only one such face

create new cell and add it to the list

face 0

face 1

face 2

face 3

face 4

face 5

create cells at points where three or more self-intersecting layers meet

find labels of points

cell shall be created only if all points are different

start creating faces attached to the pointI this is performed by finding original points with respect to the face extI and the face which shares edge eI of the face extI this is needed to ensure correct normal orientation

find original labels of points making a forward circular edge with respect to pointI

find another face attached to the edge eI

find an extrusion face attached to the edge consisting of points origFacePointI and origFaceNextI

create a face attached to pointI

close the cell by creating new faces from the existing faces which obey pre-determined order. If a face contains a point in the origFacePoints list at the second position, then the point after shall be the previous point of the face. If a face contains such point at the last position then the point before it shall be the next point in the face. The last point of the face is the original points from which all these points were generated.

find previous and next point

create new faces at parallel boundaries

add cells into the mesh

Definition at line 933 of file extrudeLayer.C.

References Foam::abort(), polyMeshGenModifier::addCells(), VRWGraphList::appendGraph(), VRWGraph::containsAtPosition(), extrudeLayer::createNewFacesParallel(), extrudeLayer::extrudedFaces_, f(), polyMeshGenFaces::faces(), extrudeLayer::addressingCalculator::faceSharingEdge(), extrudeLayer::addressingCalculator::facesSharingEdge(), Foam::FatalError, FatalErrorIn, forAll, forAllRow, extrudeLayer::mesh_, extrudeLayer::nOrigFaces_, extrudeLayer::nOrigPoints_, extrudeLayer::addressingCalculator::origPoint(), extrudeLayer::addressingCalculator::origPointLabel(), extrudeLayer::origPointLabel_, extrudeLayer::pairOrientation_, polyMeshGenPoints::points(), Foam::pos(), VRWGraph::reverseAddressing(), DynList< T, staticSize >::setSize(), faceListPMG::size(), pointFieldPMG::size(), DynList< T, staticSize >::size(), and VRWGraph::sizeOfRow().

Referenced by extrudeLayer::extrudeLayer().

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

◆ createNewFacesParallel()

void createNewFacesParallel ( )
private

create new faces at parallel boundaries

add faces into the mesh

Definition at line 921 of file extrudeLayer.C.

References polyMeshGenModifier::addProcessorFaces(), extrudeLayer::mesh_, and UPstream::parRun().

Referenced by extrudeLayer::createLayerCells().

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

◆ updateBoundary()

void updateBoundary ( )
private

◆ operator=()

void operator= ( const extrudeLayer )
private

Disallow bitwise assignment.

Field Documentation

◆ mesh_

polyMeshGen& mesh_
private

◆ thickness_

const scalar thickness_
private

thickness

Definition at line 59 of file extrudeLayer.H.

Referenced by extrudeLayer::movePoints().

◆ nOrigPoints_

const label nOrigPoints_
private

number of points in the original mesh

Definition at line 62 of file extrudeLayer.H.

Referenced by extrudeLayer::createLayerCells(), and extrudeLayer::movePoints().

◆ nOrigFaces_

const label nOrigFaces_
private

◆ nOrigCells_

const label nOrigCells_
private

number of cells in the original mesh

Definition at line 68 of file extrudeLayer.H.

◆ extrudedFaces_

LongList<labelPair> extrudedFaces_
private

pairs of faces making the extruded front

Definition at line 71 of file extrudeLayer.H.

Referenced by extrudeLayer::createDuplicateFrontFaces(), extrudeLayer::createLayerCells(), and extrudeLayer::createNewVertices().

◆ pairOrientation_

LongList<bool> pairOrientation_
private

store the orientation of the extruded front true if the pair has the same orientation and false otherwise

Definition at line 75 of file extrudeLayer.H.

Referenced by extrudeLayer::createDuplicateFrontFaces(), and extrudeLayer::createLayerCells().

◆ origPointLabel_

labelLongList origPointLabel_
private

original point label

Definition at line 78 of file extrudeLayer.H.

Referenced by extrudeLayer::createLayerCells(), extrudeLayer::createNewVertices(), and extrudeLayer::updateBoundary().


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