129 DynamicList<label> patchLst(bf.size());
135 patchLst.append(patchi);
149 const objectRegistry& obr = this->patch().boundaryMesh().mesh().db();
159 points0Ptr_.reset(
nullptr);
161 return solver->points0();
163 else if (!points0Ptr_)
184 const objectRegistry& obr = this->patch().boundaryMesh().mesh().db();
186 lumpedPointIOMovement* ptr =
230 dict.readIfPresent(
"controllers", controllers_);
232 dict.readIfPresent(
"dataWritten", dataWritten_);
234 if (controllers_.
empty())
237 <<
"No controllers specified, using all lumped points for patch: "
238 << this->patch().name() << nl << nl;
255 controllers_(
rhs.controllers_),
256 dataWritten_(
rhs.dataWritten_),
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())
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 "
364 Info<<
"output forces to file: called from patch "
366 <<
"# " << forces.size() <<
" force entries" <<
nl
367 <<
"# fx fy fz" <<
nl
368 <<
"output forces to file: "
369 << forces <<
" called from patch "
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())
440 os.writeEntry(
"controllers", controllers_);
444 if (movement().ownerId() == this->
patch().index())
449 this->writeValueEntry(
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 noexcept
Return const reference to mesh.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void append(const T &val)
Copy append an element to the end of this list.
GeometricBoundaryField< vector, pointPatchField, pointMesh > Boundary
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const Mesh & mesh() const noexcept
Reference to the mesh.
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.
stopAtControls
Stop-run control options, which are primarily used when altering the stopAt condition.
@ saUnknown
Dummy no-op. Do not change current value.
T & first()
Access first element of the list, position [0].
bool empty() const noexcept
True if List is empty (ie, size() is zero).
void size(const label n)
Older name for setAddressableSize.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
label size() const noexcept
The number of entries in the list.
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,...
Virtual base class for displacement motion solver.
A FixedValue boundary condition for pointField.
fixedValuePointPatchField(const pointPatch &, const DimensionedField< vector, pointMesh > &)
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 write(Ostream &os) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
static labelList patchIds(const pointVectorField &pvf)
The ids for all patches of this type.
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.
lumpedPointDisplacementPointPatchVectorField(const pointPatch &p, const DimensionedField< vector, pointMesh > &iF)
Construct from patch and internal field.
IO-registered version of lumpedPointMovement.
static autoPtr< lumpedPointIOMovement > New(const objectRegistry &obr, label ownerId=-1)
Create a movement object in the registry by reading system dictionary.
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 setInterpolator(const pointPatch &fpatch, const pointField &points0)
Check if patch control exists for specified patch.
void setPatchControl(const polyPatch &pp, const wordList &ctrlNames, const pointField &points0)
Define pressure-zones mapping for faces in the specified patches.
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.
const pointPatch & patch() const noexcept
Return the patch.
const objectRegistry & db() const
The associated objectRegistry.
bool updated() const noexcept
True if the boundary condition has already been updated.
Foam::pointPatchFieldMapper.
virtual void write(Ostream &os) const
Write.
const DimensionedField< vector, pointMesh > & internalField() const noexcept
Basic pointPatch represents a set of points from the mesh.
static IOobject points0IO(const polyMesh &mesh)
Return IO object for points0.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
bool store()
Register object with its registry and transfer ownership to the registry.
bool checkOut()
Remove object from registry, and remove all file watches.
A class for managing temporary objects.
void writeValueEntry(Ostream &os) const
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
const polyBoundaryMesh & patches
OBJstream os(runTime.globalPath()/outputName)
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
const std::string patch
OpenFOAM patch number as a std::string.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere).
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
vectorIOField pointIOField
pointIOField is a vectorIOField.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
pointPatchField< vector > pointPatchVectorField
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
vectorField pointField
pointField is a vectorField.
constexpr char nl
The newline '\n' character (0x0a).
#define makePointPatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete pointPatchField type and add to run-time tables Example, (pointPatchScalarField,...
#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, IOobject::NO_REGISTER)))