Go to the documentation of this file.
35 #include "primitiveMesh.H"
65 <<
"Not all zones and patches needed in the definition "
66 <<
"have been found. Please check your mesh definition."
74 Pout<<
"Attach/detach object " <<
name() <<
" :" <<
nl
90 Pout<<
" Attached on construction" <<
endl;
112 if (!
mesh.isInternalFace(addr[faceI]))
114 bouFacesInZone.
append(addr[faceI]);
118 if (bouFacesInZone.size())
121 <<
"Found boundary faces in the zone defining "
122 <<
"attach/detach boundary "
123 <<
" for object " <<
name()
124 <<
" : . This is not allowed." <<
nl
125 <<
"Boundary faces: " << bouFacesInZone
135 Pout<<
" Detached on construction" <<
endl;
155 <<
"Problem with sizes in mesh modifier. The face zone,"
156 <<
" master and slave patch should have the same size"
157 <<
" for object " <<
name() <<
". " <<
nl
160 <<
" Master patch size: "
162 <<
" Slave patch size: "
177 mesh.boundaryMesh().whichPatch(addr[faceI]);
185 zoneProblemFaces.
append(addr[faceI]);
189 if (zoneProblemFaces.size())
192 <<
"Found faces in the zone defining "
193 <<
"attach/detach boundary which do not belong to "
194 <<
"either master or slave patch. "
195 <<
"This is not allowed." <<
nl
196 <<
"Problem faces: " << zoneProblemFaces
203 bool triggersOK =
true;
217 <<
"Problem with definition of trigger times: "
238 const word& faceZoneName,
239 const word& masterPatchName,
240 const word& slavePatchName,
242 const bool manualTrigger
249 triggerTimes_(triggerTimes),
250 manualTrigger_(manualTrigger),
254 pointMatchMapPtr_(NULL)
290 pointMatchMapPtr_(NULL)
342 Pout<<
"bool attachDetach::changeTopology() const "
343 <<
" for object " <<
name() <<
" : "
344 <<
"Manual trigger" <<
endl;
356 Pout<<
"bool attachDetach::changeTopology() const "
357 <<
" for object " <<
name() <<
" : "
358 <<
"Already triggered for current time step" <<
endl;
366 if (triggerIndex_ >= triggerTimes_.size())
370 Pout<<
"bool attachDetach::changeTopology() const "
371 <<
" for object " <<
name() <<
" : "
372 <<
"Reached end of trigger list" <<
endl;
379 Pout<<
"bool attachDetach::changeTopology() const "
380 <<
" for object " <<
name() <<
" : "
381 <<
"Triggering attach/detach topology change." <<
nl
382 <<
"Current time: " << topoChanger().mesh().time().value()
383 <<
" current trigger time: " << triggerTimes_[triggerIndex_]
384 <<
" trigger index: " << triggerIndex_ <<
endl;
389 if (topoChanger().
mesh().time().value() >= triggerTimes_[triggerIndex_])
413 if (state_ == ATTACHED)
415 detachInterface(ref);
420 else if (state_ == DETACHED)
422 attachInterface(ref);
430 <<
"Requested attach/detach event and currect state "
457 << faceZoneID_.name() <<
nl
458 << masterPatchID_.name() <<
nl
459 << slavePatchID_.name() <<
nl
460 << triggerTimes_ <<
endl;
467 <<
" type " <<
type()
469 <<
" faceZoneName " << faceZoneID_.name()
471 <<
" masterPatchName " << masterPatchID_.name()
473 <<
" slavePatchName " << slavePatchID_.name()
475 <<
" triggerTimes " << triggerTimes_
477 <<
" manualTrigger " << manualTrigger()
479 <<
" active " << active()
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
faceZoneID faceZoneID_
Master face zone ID.
A class for handling words, derived from string.
virtual bool changeTopology() const
Check for topology change.
virtual void updateMesh(const mapPolyMesh &)
Force recalculation of locally stored data on topological change.
polyPatchID masterPatchID_
Master patch ID. Holds faces with original orientation.
virtual bool update()=0
Update the mesh for both mesh motion and topology change.
#define forAll(list, i)
Loop across all elements in list.
const polyTopoChanger & topoChanger() const
Return reference to morph engine.
attachDetach(const attachDetach &)
Disallow default bitwise copy construct.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
virtual void writeDict(Ostream &) const
Write dictionary.
List of mesh modifiers defining the mesh dynamics.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Direct mesh changes based on v1.3 polyTopoChange syntax.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void write(Ostream &) const
Write.
Mesh consisting of general polyhedral cells.
const faceZoneMesh & faceZones() const
Return face zone mesh.
void deleteDemandDrivenData(DataPtr &dataPtr)
polyPatchID slavePatchID_
Slave patch ID. Holds mirrored faces.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
scalarField triggerTimes_
List of trigger times.
void clearAddressing() const
Clear addressing.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
errorManip< error > abort(error &err)
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
Virtual base class for mesh modifiers.
const word & name() const
Return name of this modifier.
modifierState state_
State of the modifier.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
prefixOSstream Pout(cout, "Pout")
const polyMesh & mesh() const
Return the mesh reference.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
virtual ~attachDetach()
Destructor.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void checkDefinition()
Check validity of construction data.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
defineTypeNameAndDebug(combustionModel, 0)
virtual void setRefinement(polyTopoChange &) const
Insert the layer addition/removal instructions.
bool active() const
Has the zone been found.
word name(const complex &)
Return a string representation of a complex.
label index() const
Return index of first matching zone.
const Switch & manualTrigger() const