Go to the documentation of this file.
46 lumpedPointDisplacementPointPatchVectorField
67 const auto*
p = isA<patchType>(bf[patchi]);
101 const auto*
p = isA<patchType>(bf[patchi]);
133 if (isA<patchType>(bf[patchi]))
135 patchLst.append(patchi);
140 return patchLst.shrink();
159 points0Ptr_.reset(
nullptr);
163 else if (!points0Ptr_)
228 if (controllers_.empty())
231 <<
"No controllers specified, using all lumped points for patch: "
249 controllers_(pf.controllers_)
261 controllers_(pf.controllers_)
279 movement().coupler().shutdown();
295 const label
timeIndex = this->db().time().timeIndex();
299 if (movement().ownerId() == this->
patch().index())
313 if (!movement().hasMapping())
320 this->internalField()
330 movement().coupler().slaveFirst()
331 && !movement().coupler().initialized()
337 else if (movement().couplingPending(
timeIndex))
347 movement().forcesAndMoments(
mesh, forces, moments);
351 Pout<<
"gatherForces: " << forces <<
" called from patch "
356 Pout<<
"output forces to file: called from patch "
358 <<
"# " << forces.size() <<
" force entries" <<
nl
360 <<
"output forces to file: "
361 << forces <<
" called from patch "
368 movement().writeData(forces, moments, &(this->db().time()));
371 movement().coupler().useSlave();
379 action = movement().coupler().waitForSlave();
387 if (!movement().hasInterpolator(this->
patch()))
397 movement().pointsDisplacement
411 action != this->db().time().stopAt()
412 && action != Time::stopAtControls::saUnknown
415 this->db().time().stopAt(action);
425 if (controllers_.size())
430 writeEntry(
"value", os);
static label setInterpolators(const pointVectorField &pvf, const pointField &points0)
Set all patch controls for patches of this type.
A primitive field of type <T> with automated input and output.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
IO-registered version of lumpedPointMovement.
A class for managing temporary objects.
static label setPatchControls(const pointVectorField &pvf, const pointField &points0)
Set all patch controls for patches of this type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Basic pointPatch represents a set of points from the mesh.
prefixOSstream Pout
An Ostream wrapper for parallel output to std::cout.
label ownerId() const
An owner Id, if needed for bookkeeping purposes.
static labelList patchIds(const pointVectorField &pvf)
The ids for all patches of this type.
This is the point-patch responsible for managing the force integration on a 'lumped-point' basis,...
Mesh consisting of general polyhedral cells.
const pointPatch & patch() const
Return patch.
Foam::pointPatchFieldMapper.
#define forAll(list, i)
Loop across all elements in list.
static IOobject points0IO(const polyMesh &mesh)
Return IO object for points0.
const objectRegistry & db() const
Return the local objectRegistry.
Registry of regIOobjects.
makePointPatchTypeField(pointPatchVectorField, solidBodyMotionDisplacementPointPatchVectorField)
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Base class for solution control classes.
static int debug
Debug switch.
virtual void write(Ostream &) const
Write.
const pointMesh & mesh() const
Return the mesh reference.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Virtual base class for displacement motion solver.
Macros for easy insertion into run-time selection tables.
virtual ~lumpedPointDisplacementPointPatchVectorField()
Destructor. De-register movement if in use and managed by this patch.
static lumpedPointIOMovement * getMovementObject(const objectRegistry &obr)
Find the movement object or nullptr if not found.
static bool master(const label communicator=0)
Am I the master process.
lumpedPointDisplacementPointPatchVectorField(const pointPatch &p, const DimensionedField< vector, pointMesh > &iF)
Construct from patch and internal field.
pointField points0(pointIOField(IOobject("points", mesh.time().constant(), polyMesh::meshSubDir, mesh, IOobject::MUST_READ, IOobject::NO_WRITE, false)))
bool checkOut()
Remove all file watches and remove object from registry.
const Type * cfindObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
const std::string patch
OpenFOAM patch number as a std::string.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
virtual void write(Ostream &os) const
Write.
The movement driver that describes initial point locations, the current state of the points/rotations...
const pointBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
const polyBoundaryMesh & patches
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
const pointField & points0() const
The starting locations (obtained from the motionSolver).
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
pointPatchField< vector > pointPatchVectorField
const lumpedPointMovement & movement() const
The auto-vivifying singleton for movement.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void couplingCompleted(const label timeIndex) const
Register that coupling is completed at this calcFrequency.
#define WarningInFunction
Report a warning using Foam::Warning.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
static autoPtr< lumpedPointIOMovement > New(const objectRegistry &obr, label ownerId=-1)
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...