Attach/detach boundary mesh modifier. This modifier takes a set of internal faces and converts them into boundary faces and vice versa based on the given activation switch. More...
Public Member Functions | |
TypeName ("attachDetach") | |
Runtime type information. More... | |
attachDetach (const word &name, const label index, const polyTopoChanger &mme, const word &faceZoneName, const word &masterPatchName, const word &slavePatchName, const scalarField &triggerTimes, const bool manualTrigger=false) | |
Construct from components. More... | |
attachDetach (const word &name, const dictionary &dict, const label index, const polyTopoChanger &mesh) | |
Construct from dictionary. More... | |
virtual | ~attachDetach () |
Destructor. More... | |
const polyPatchID & | masterPatchID () const |
Return master patch ID. More... | |
const polyPatchID & | slavePatchID () const |
Return slave patch ID. More... | |
bool | attached () const |
Is the interface attached? More... | |
const Switch & | manualTrigger () const |
bool | setAttach () const |
bool | setDetach () const |
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... | |
const scalarField & | triggerTimes () const |
Get reference to trigger times. More... | |
virtual void | write (Ostream &) const |
Write. More... | |
virtual void | writeDict (Ostream &) const |
Write dictionary. More... | |
![]() | |
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 word & | name () const |
Return name of this modifier. More... | |
label | index () const |
Return the index of this modifier. More... | |
const polyTopoChanger & | topoChanger () const |
Return reference to morph engine. More... | |
const Switch & | active () const |
void | enable () const |
Activate mesh modifier. More... | |
void | disable () const |
Activate mesh modifier. More... | |
Private Types | |
enum | modifierState { UNKNOWN, ATTACHED, DETACHED } |
State of the modifier. More... | |
Private Member Functions | |
attachDetach (const attachDetach &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const attachDetach &) |
Disallow default bitwise assignment. More... | |
void | checkDefinition () |
Check validity of construction data. More... | |
void | attachInterface (polyTopoChange &) const |
Attach interface. More... | |
void | detachInterface (polyTopoChange &) const |
Detach interface. More... | |
void | calcPointMatchMap () const |
Calculate point match addressing. More... | |
const Map< label > & | pointMatchMap () const |
Return point match map. More... | |
void | clearAddressing () const |
Clear addressing. More... | |
Private Attributes | |
faceZoneID | faceZoneID_ |
Master face zone ID. More... | |
polyPatchID | masterPatchID_ |
Master patch ID. Holds faces with original orientation. More... | |
polyPatchID | slavePatchID_ |
Slave patch ID. Holds mirrored faces. More... | |
scalarField | triggerTimes_ |
List of trigger times. More... | |
Switch | manualTrigger_ |
Use manual trigger. More... | |
label | triggerIndex_ |
Trigger time index. More... | |
modifierState | state_ |
State of the modifier. More... | |
bool | trigger_ |
Attach/detach trigger. More... | |
Map< label > * | pointMatchMapPtr_ |
Map of matching points. More... | |
Static Private Attributes | |
static const scalar | positionDifference_ = 1e-8 |
Relative vertex position tolerance. More... | |
Additional Inherited Members | |
![]() | |
static autoPtr< polyMeshModifier > | New (const word &name, const dictionary &dict, const label index, const polyTopoChanger &mme) |
Select constructed from dictionary. More... | |
Attach/detach boundary mesh modifier. This modifier takes a set of internal faces and converts them into boundary faces and vice versa based on the given activation switch.
The patch is oriented using the flip map in the face zone. The oriented faces are put into the master patch and their mirror images into the slave.
Definition at line 59 of file attachDetach.H.
|
private |
State of the modifier.
Enumerator | |
---|---|
UNKNOWN | |
ATTACHED | |
DETACHED |
Definition at line 66 of file attachDetach.H.
|
private |
Disallow default bitwise copy construct.
attachDetach | ( | const word & | name, |
const label | index, | ||
const polyTopoChanger & | mme, | ||
const word & | faceZoneName, | ||
const word & | masterPatchName, | ||
const word & | slavePatchName, | ||
const scalarField & | triggerTimes, | ||
const bool | manualTrigger = false |
||
) |
Construct from components.
Definition at line 234 of file attachDetach.C.
attachDetach | ( | const word & | name, |
const dictionary & | dict, | ||
const label | index, | ||
const polyTopoChanger & | mesh | ||
) |
Construct from dictionary.
Definition at line 262 of file attachDetach.C.
|
virtual |
Destructor.
Definition at line 298 of file attachDetach.C.
|
private |
Disallow default bitwise assignment.
|
private |
Check validity of construction data.
Definition at line 55 of file attachDetach.C.
References Foam::abort(), DynamicID::active(), DynamicList::append(), attachDetach::ATTACHED, attachDetach::DETACHED, Foam::endl(), attachDetach::faceZoneID_, Foam::FatalError, FatalErrorInFunction, forAll, DynamicID::index(), attachDetach::manualTrigger(), attachDetach::masterPatchID_, mesh, polyTopoChanger::mesh(), polyMeshModifier::name(), Foam::nl, Foam::Pout, List::size(), attachDetach::slavePatchID_, attachDetach::state_, polyMeshModifier::topoChanger(), and attachDetach::triggerTimes_.
|
private |
Attach interface.
Definition at line 42 of file attachInterface.C.
References Foam::endl(), polyPatch::faceCells(), polyTopoChange::faceRemoved(), forAll, HashSet< Key, Hash >::insert(), mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), Foam::name(), Foam::Pout, Foam::help::reverseFace(), polyTopoChange::setAction(), List::size(), polyPatch::start(), and HashTable::toc().
|
private |
Detach interface.
Definition at line 38 of file detachInterface.C.
References cells, Foam::constant::electromagnetic::e, PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, HashTable::found(), HashSet< Key, Hash >::insert(), PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), Foam::constant::atomic::mp, Foam::name(), PrimitivePatch< Face, FaceList, PointField, PointType >::nInternalEdges(), points, Foam::Pout, Foam::help::reverseFace(), polyTopoChange::setAction(), List::size(), HashTable::toc(), and ZoneMesh::whichZone().
|
private |
Calculate point match addressing.
Definition at line 46 of file attachDetachPointMatchMap.C.
References Foam::abort(), polyMesh::boundaryMesh(), Foam::endl(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), Foam::name(), polyMesh::points(), Foam::Pout, List::size(), and polyPatch::start().
Referenced by attachDetach::pointMatchMap().
|
private |
Return point match map.
Definition at line 35 of file attachDetachPointMatchMap.C.
References attachDetach::calcPointMatchMap(), and attachDetach::pointMatchMapPtr_.
|
private |
Clear addressing.
Definition at line 224 of file attachDetach.C.
References Foam::deleteDemandDrivenData().
TypeName | ( | "attachDetach" | ) |
Runtime type information.
|
inline |
Return master patch ID.
Definition at line 180 of file attachDetach.H.
References attachDetach::masterPatchID_.
|
inline |
Return slave patch ID.
Definition at line 186 of file attachDetach.H.
References attachDetach::slavePatchID_.
|
inline |
Is the interface attached?
Definition at line 192 of file attachDetach.H.
References attachDetach::ATTACHED, and attachDetach::state_.
|
inline |
Definition at line 197 of file attachDetach.H.
References attachDetach::manualTrigger_.
Referenced by attachDetach::checkDefinition().
bool setAttach | ( | ) | const |
Definition at line 306 of file attachDetach.C.
bool setDetach | ( | ) | const |
Definition at line 321 of file attachDetach.C.
|
virtual |
Check for topology change.
Implements polyMeshModifier.
Definition at line 336 of file attachDetach.C.
References Foam::endl(), mesh, Foam::name(), Foam::nl, and Foam::Pout.
|
virtual |
Insert the layer addition/removal instructions.
into the topological change
Implements polyMeshModifier.
Definition at line 404 of file attachDetach.C.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
|
virtual |
Modify motion points to comply with the topological change.
Implements polyMeshModifier.
Definition at line 267 of file attachInterface.C.
References Foam::endl(), forAll, Foam::mag(), Foam::name(), Foam::Pout, and List::size().
|
virtual |
Force recalculation of locally stored data on topological change.
Implements polyMeshModifier.
Definition at line 440 of file attachDetach.C.
References polyMesh::boundaryMesh(), polyMesh::faceZones(), mesh, and dynamicFvMesh::update().
|
inline |
Get reference to trigger times.
Definition at line 222 of file attachDetach.H.
References attachDetach::triggerTimes_.
|
virtual |
Write.
Implements polyMeshModifier.
Definition at line 453 of file attachDetach.C.
References Foam::endl(), Foam::name(), Foam::nl, and Foam::type().
|
virtual |
Write dictionary.
Implements polyMeshModifier.
Definition at line 464 of file attachDetach.C.
References token::BEGIN_BLOCK, token::END_BLOCK, token::END_STATEMENT, Foam::endl(), Foam::name(), Foam::nl, and Foam::type().
|
private |
Master face zone ID.
Definition at line 77 of file attachDetach.H.
Referenced by attachDetach::checkDefinition().
|
private |
Master patch ID. Holds faces with original orientation.
Definition at line 80 of file attachDetach.H.
Referenced by attachDetach::checkDefinition(), and attachDetach::masterPatchID().
|
private |
Slave patch ID. Holds mirrored faces.
Definition at line 83 of file attachDetach.H.
Referenced by attachDetach::checkDefinition(), and attachDetach::slavePatchID().
|
private |
List of trigger times.
Definition at line 86 of file attachDetach.H.
Referenced by attachDetach::checkDefinition(), and attachDetach::triggerTimes().
|
private |
Use manual trigger.
Definition at line 89 of file attachDetach.H.
Referenced by attachDetach::manualTrigger().
|
mutableprivate |
Trigger time index.
Definition at line 92 of file attachDetach.H.
|
mutableprivate |
State of the modifier.
Definition at line 95 of file attachDetach.H.
Referenced by attachDetach::attached(), and attachDetach::checkDefinition().
|
mutableprivate |
Attach/detach trigger.
Definition at line 98 of file attachDetach.H.
Map of matching points.
Definition at line 104 of file attachDetach.H.
Referenced by attachDetach::pointMatchMap().
|
staticprivate |
Relative vertex position tolerance.
Definition at line 139 of file attachDetach.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.