67 const auto*
p = isA<patchType>(bf[patchi]);
101 const auto*
p = isA<patchType>(bf[patchi]);
133 if (isA<patchType>(bf[patchi]))
149 const objectRegistry& obr = this->patch().boundaryMesh().mesh().db();
159 points0Ptr_.reset(
nullptr);
163 else if (!points0Ptr_)
184 const objectRegistry& obr = this->patch().boundaryMesh().mesh().db();
203Foam::lumpedPointDisplacementPointPatchVectorField::
204lumpedPointDisplacementPointPatchVectorField
217Foam::lumpedPointDisplacementPointPatchVectorField::
218lumpedPointDisplacementPointPatchVectorField
234 if (controllers_.
empty())
237 <<
"No controllers specified, using all lumped points for patch: "
245Foam::lumpedPointDisplacementPointPatchVectorField::
246lumpedPointDisplacementPointPatchVectorField
255 controllers_(rhs.controllers_),
256 dataWritten_(rhs.dataWritten_),
261Foam::lumpedPointDisplacementPointPatchVectorField::
262lumpedPointDisplacementPointPatchVectorField
269 controllers_(rhs.controllers_),
270 dataWritten_(rhs.dataWritten_),
287 if (ptr && ptr->
ownerId() == this->patch().index())
289 movement().coupler().shutdown();
305 const label
timeIndex = this->db().time().timeIndex();
309 if (movement().ownerId() == this->patch().index())
316 Pout<<
"masterPatch: " << this->patch().index() <<
endl;
319 const polyMesh&
mesh = this->patch().boundaryMesh().mesh().mesh();
323 if (!movement().hasMapping())
330 this->internalField()
340 movement().coupler().slaveFirst()
341 && !movement().coupler().initialized()
347 else if (movement().couplingPending(
timeIndex))
357 movement().forcesAndMoments(
mesh, forces, moments);
361 Pout<<
"gatherForces: " << forces <<
" called from patch "
362 << this->patch().index() <<
endl;
364 Info<<
"output forces to file: called from patch "
365 << this->patch().index() <<
nl
366 <<
"# " << forces.
size() <<
" force entries" <<
nl
367 <<
"# fx fy fz" <<
nl
368 <<
"output forces to file: "
369 << forces <<
" called from patch "
370 << this->patch().index() <<
endl;
376 dataWritten_.second() = dataWritten_.first();
377 dataWritten_.first() = this->db().time().timeOutputValue();
381 movement().writeData(forces, moments, &dataWritten_);
384 movement().coupler().useSlave();
392 action = movement().coupler().waitForSlave();
400 if (!movement().hasInterpolator(this->patch()))
410 movement().pointsDisplacement
424 action != this->db().time().stopAt()
428 this->db().time().stopAt(action);
438 if (controllers_.size())
444 if (movement().ownerId() == this->patch().index())
449 writeEntry(
"value",
os);
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const Mesh & mesh() const
Return mesh.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
DynamicList< T, SizeMin > & shrink()
Shrink the allocated space to the number of elements used.
void append(const T &val)
Copy append an element to the end of this list.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
A primitive field of type <T> with automated input and output.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
@ saUnknown
Dummy no-op. Do not change current value.
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
void size(const label n)
Older name for setAddressableSize.
label size() const noexcept
The number of elements in the list.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Virtual base class for displacement motion solver.
const polyMesh & mesh() const
Return access to polyMesh.
A FixedValue boundary condition for pointField.
virtual bool write()
Write the output fields.
This is the point-patch responsible for managing the force integration on a 'lumped-point' basis,...
static label setPatchControls(const pointVectorField &pvf, const pointField &points0)
Set all patch controls for patches of this type.
virtual ~lumpedPointDisplacementPointPatchVectorField()
Destructor. De-register movement if in use and managed by this patch.
const pointField & points0() const
The starting locations (obtained from the motionSolver).
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
static label setInterpolators(const pointVectorField &pvf, const pointField &points0)
Set all patch controls for patches of this type.
const lumpedPointMovement & movement() const
The auto-vivifying singleton for movement.
IO-registered version of lumpedPointMovement.
static lumpedPointIOMovement * getMovementObject(const objectRegistry &obr)
Find the movement object or nullptr if not found.
The movement driver that describes initial point locations, the current state of the points/rotations...
void couplingCompleted(const label timeIndex) const
Register that coupling is completed at this calcFrequency.
label ownerId() const
An owner Id, if needed for bookkeeping purposes.
static int debug
Debug switch.
Registry of regIOobjects.
const Type * cfindObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
Foam::pointPatchFieldMapper.
const pointPatch & patch() const
Return patch.
Basic pointPatch represents a set of points from the mesh.
virtual const word & name() const =0
Return name.
static IOobject points0IO(const polyMesh &mesh)
Return IO object for points0.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
int count() const noexcept
Return the current reference count.
bool checkOut()
Remove all file watches and remove object from registry.
Base class for solution control classes.
splitCell * master() const
A class for managing temporary objects.
const polyBoundaryMesh & patches
OBJstream os(runTime.globalPath()/outputName)
#define WarningInFunction
Report a warning using Foam::Warning.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
constexpr char nl
The newline '\n' character (0x0a)
#define makePointPatchTypeField(PatchTypeField, typePatchTypeField)
#define forAll(list, i)
Loop across all elements in list.
pointField points0(pointIOField(IOobject("points", mesh.time().constant(), polyMesh::meshSubDir, mesh, IOobject::MUST_READ, IOobject::NO_WRITE, false)))