Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
layerAdditionRemoval Class Reference

Cell layer addition mesh modifier. More...

Inheritance diagram for layerAdditionRemoval:
Inheritance graph
[legend]
Collaboration diagram for layerAdditionRemoval:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("layerAdditionRemoval")
 Runtime type information. More...
 
 layerAdditionRemoval (const word &name, const label index, const polyTopoChanger &ptc, const word &zoneName, const scalar minThickness, const scalar maxThickness, const Switch thicknessFromVolume=true)
 Construct from components. More...
 
 layerAdditionRemoval (const word &name, const dictionary &dict, const label index, const polyTopoChanger &ptc)
 Construct from dictionary. More...
 
virtual ~layerAdditionRemoval ()
 Destructor. More...
 
virtual bool changeTopology () const
 Check for topology change. More...
 
virtual void setRefinement (polyTopoChange &) const
 Insert the layer addition/removal instructions. More...
 
virtual void modifyMotionPoints (pointField &motionPoints) const
 Modify motion points to comply with the topological change. More...
 
virtual void updateMesh (const mapPolyMesh &)
 Force recalculation of locally stored data on topological change. More...
 
scalar minLayerThickness () const
 Return min layer thickness which triggers removal. More...
 
void setMinLayerThickness (const scalar t) const
 Set min layer thickness which triggers removal. More...
 
scalar maxLayerThickness () const
 Return max layer thickness which triggers removal. More...
 
void setMaxLayerThickness (const scalar t) const
 Set max layer thickness which triggers removal. More...
 
virtual void write (Ostream &) const
 Write. More...
 
virtual void writeDict (Ostream &) const
 Write dictionary. More...
 
- Public Member Functions inherited from polyMeshModifier
 TypeName ("meshModifier")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, polyMeshModifier, dictionary,(const word &name, const dictionary &dict, const label index, const polyTopoChanger &mme),(name, dict, index, mme))
 
 polyMeshModifier (const word &name, const label index, const polyTopoChanger &mme, const bool act)
 Construct from components. More...
 
virtual ~polyMeshModifier ()
 Destructor. More...
 
const wordname () const
 Return name of this modifier. More...
 
label index () const
 Return the index of this modifier. More...
 
const polyTopoChangertopoChanger () const
 Return reference to morph engine. More...
 
const Switchactive () const
 
void enable () const
 Activate mesh modifier. More...
 
void disable () const
 Activate mesh modifier. More...
 

Private Member Functions

 layerAdditionRemoval (const layerAdditionRemoval &)
 Disallow default bitwise copy construct. More...
 
void operator= (const layerAdditionRemoval &)
 Disallow default bitwise assignment. More...
 
void checkDefinition ()
 Check validity of construction data. More...
 
bool validCollapse () const
 Check for valid layer. More...
 
bool setLayerPairing () const
 Set layer pairing. Return true if a valid layer exists. More...
 
const labelListpointsPairing () const
 Return points pairing in a layer (not automatic!) More...
 
const labelListfacesPairing () const
 Return faces pairing in a layer (not automatic!) More...
 
tmp< vectorFieldextrusionDir () const
 Calculate the offset to the next layer. More...
 
void addCellLayer (polyTopoChange &) const
 Add a layer of cells. More...
 
void removeCellLayer (polyTopoChange &) const
 Remove a layer of cells. More...
 
void clearAddressing () const
 Clear addressing. More...
 

Static Private Member Functions

static scalar readOldThickness (const dictionary &)
 Optionally read old thickness. More...
 

Private Attributes

faceZoneID faceZoneID_
 Master face zone ID. More...
 
scalar minLayerThickness_
 Min thickness of extrusion layer. Triggers layer removal. More...
 
scalar maxLayerThickness_
 Max thickness of extrusion layer. Triggers layer addition. More...
 
const bool thicknessFromVolume_
 Switch to calculate thickness as volume/area. More...
 
scalar oldLayerThickness_
 Layer thickness from previous step. More...
 
labelListpointsPairingPtr_
 Point pairing. More...
 
labelListfacesPairingPtr_
 Face pairing. More...
 
label triggerRemoval_
 Layer removal trigger time index. More...
 
label triggerAddition_
 Layer addition trigger time index. More...
 

Static Private Attributes

static const scalar addDelta_ = 0.3
 Thickness insertion fraction for the pre-motion. More...
 
static const scalar removeDelta_ = 0.1
 Thickness removal fraction for the cell collapse. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from polyMeshModifier
static autoPtr< polyMeshModifierNew (const word &name, const dictionary &dict, const label index, const polyTopoChanger &mme)
 Select constructed from dictionary. More...
 

Detailed Description

Cell layer addition mesh modifier.

Source files

Definition at line 52 of file layerAdditionRemoval.H.

Constructor & Destructor Documentation

◆ layerAdditionRemoval() [1/3]

Disallow default bitwise copy construct.

◆ layerAdditionRemoval() [2/3]

layerAdditionRemoval ( const word name,
const label  index,
const polyTopoChanger ptc,
const word zoneName,
const scalar  minThickness,
const scalar  maxThickness,
const Switch  thicknessFromVolume = true 
)

Construct from components.

Definition at line 136 of file layerAdditionRemoval.C.

◆ layerAdditionRemoval() [3/3]

layerAdditionRemoval ( const word name,
const dictionary dict,
const label  index,
const polyTopoChanger ptc 
)

Construct from dictionary.

Definition at line 162 of file layerAdditionRemoval.C.

◆ ~layerAdditionRemoval()

~layerAdditionRemoval ( )
virtual

Destructor.

Definition at line 189 of file layerAdditionRemoval.C.

Member Function Documentation

◆ operator=()

void operator= ( const layerAdditionRemoval )
private

Disallow default bitwise assignment.

◆ checkDefinition()

void checkDefinition ( )
private

◆ validCollapse()

bool validCollapse ( ) const
private

◆ setLayerPairing()

bool setLayerPairing ( ) const
private

◆ pointsPairing()

const Foam::labelList & pointsPairing ( ) const
private

Return points pairing in a layer (not automatic!)

Definition at line 186 of file setLayerPairing.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::name().

Referenced by layerAdditionRemoval::extrusionDir().

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

◆ facesPairing()

const Foam::labelList & facesPairing ( ) const
private

Return faces pairing in a layer (not automatic!)

Definition at line 198 of file setLayerPairing.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::name().

Referenced by layerAdditionRemoval::validCollapse().

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

◆ extrusionDir()

Foam::tmp< Foam::vectorField > extrusionDir ( ) const
private

◆ addCellLayer()

void addCellLayer ( polyTopoChange ref) const
private

◆ removeCellLayer()

void removeCellLayer ( polyTopoChange ref) const
private

◆ clearAddressing()

void clearAddressing ( ) const
private

Clear addressing.

Definition at line 107 of file layerAdditionRemoval.C.

References Foam::deleteDemandDrivenData(), Foam::endl(), Foam::nl, and Foam::Pout.

Referenced by layerAdditionRemoval::setLayerPairing().

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

◆ readOldThickness()

Foam::scalar readOldThickness ( const dictionary dict)
staticprivate

Optionally read old thickness.

Definition at line 99 of file layerAdditionRemoval.C.

References dict, and dictionary::lookupOrDefault().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "layerAdditionRemoval"  )

Runtime type information.

◆ changeTopology()

bool changeTopology ( ) const
virtual

◆ setRefinement()

void setRefinement ( polyTopoChange ref) const
virtual

Insert the layer addition/removal instructions.

into the topological change

Implements polyMeshModifier.

Definition at line 395 of file layerAdditionRemoval.C.

References Foam::endl(), mesh, Foam::name(), Foam::Pout, and timeIndex.

Here is the call graph for this function:

◆ modifyMotionPoints()

void modifyMotionPoints ( pointField motionPoints) const
virtual

Modify motion points to comply with the topological change.

Implements polyMeshModifier.

Definition at line 214 of file setLayerPairing.C.

References Foam::endl(), Foam::name(), and Foam::Pout.

Here is the call graph for this function:

◆ updateMesh()

void updateMesh ( const mapPolyMesh )
virtual

Force recalculation of locally stored data on topological change.

Implements polyMeshModifier.

Definition at line 434 of file layerAdditionRemoval.C.

References Foam::endl(), mesh, Foam::name(), and Foam::Pout.

Here is the call graph for this function:

◆ minLayerThickness()

scalar minLayerThickness ( ) const
inline

Return min layer thickness which triggers removal.

Definition at line 196 of file layerAdditionRemoval.H.

References layerAdditionRemoval::minLayerThickness_.

◆ setMinLayerThickness()

void setMinLayerThickness ( const scalar  t) const

Set min layer thickness which triggers removal.

Definition at line 459 of file layerAdditionRemoval.C.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ maxLayerThickness()

scalar maxLayerThickness ( ) const
inline

Return max layer thickness which triggers removal.

Definition at line 205 of file layerAdditionRemoval.H.

References layerAdditionRemoval::maxLayerThickness_.

◆ setMaxLayerThickness()

void setMaxLayerThickness ( const scalar  t) const

Set max layer thickness which triggers removal.

Definition at line 472 of file layerAdditionRemoval.C.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Implements polyMeshModifier.

Definition at line 485 of file layerAdditionRemoval.C.

References Foam::endl(), Foam::name(), Foam::nl, and Foam::type().

Here is the call graph for this function:

◆ writeDict()

void writeDict ( Ostream os) const
virtual

Write dictionary.

Implements polyMeshModifier.

Definition at line 497 of file layerAdditionRemoval.C.

References token::BEGIN_BLOCK, token::END_BLOCK, token::END_STATEMENT, Foam::endl(), Foam::name(), Foam::nl, and Foam::type().

Here is the call graph for this function:

Field Documentation

◆ faceZoneID_

faceZoneID faceZoneID_
private

◆ minLayerThickness_

scalar minLayerThickness_
mutableprivate

Min thickness of extrusion layer. Triggers layer removal.

Definition at line 62 of file layerAdditionRemoval.H.

Referenced by layerAdditionRemoval::checkDefinition(), layerAdditionRemoval::extrusionDir(), and layerAdditionRemoval::minLayerThickness().

◆ maxLayerThickness_

scalar maxLayerThickness_
mutableprivate

Max thickness of extrusion layer. Triggers layer addition.

Definition at line 65 of file layerAdditionRemoval.H.

Referenced by layerAdditionRemoval::checkDefinition(), and layerAdditionRemoval::maxLayerThickness().

◆ thicknessFromVolume_

const bool thicknessFromVolume_
private

Switch to calculate thickness as volume/area.

If false, thickness calculated from edges

Definition at line 69 of file layerAdditionRemoval.H.

◆ oldLayerThickness_

scalar oldLayerThickness_
mutableprivate

Layer thickness from previous step.

Used to decide whether to add or remove layers

Definition at line 73 of file layerAdditionRemoval.H.

◆ pointsPairingPtr_

labelList* pointsPairingPtr_
mutableprivate

Point pairing.

Definition at line 76 of file layerAdditionRemoval.H.

Referenced by layerAdditionRemoval::setLayerPairing().

◆ facesPairingPtr_

labelList* facesPairingPtr_
mutableprivate

Face pairing.

Definition at line 79 of file layerAdditionRemoval.H.

Referenced by layerAdditionRemoval::setLayerPairing().

◆ triggerRemoval_

label triggerRemoval_
mutableprivate

Layer removal trigger time index.

Definition at line 82 of file layerAdditionRemoval.H.

◆ triggerAddition_

label triggerAddition_
mutableprivate

Layer addition trigger time index.

Definition at line 85 of file layerAdditionRemoval.H.

◆ addDelta_

const Foam::scalar addDelta_ = 0.3
staticprivate

Thickness insertion fraction for the pre-motion.

Definition at line 136 of file layerAdditionRemoval.H.

◆ removeDelta_

const Foam::scalar removeDelta_ = 0.1
staticprivate

Thickness removal fraction for the cell collapse.

Note: the cell will be collapsed to this relative thickness before the layer is removed.

Definition at line 141 of file layerAdditionRemoval.H.


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