53 initialPoints_(
p.localPoints()),
70 if (!
dict.found(
"value"))
75 if (
dict.found(
"initialPoints"))
77 initialPoints_ = vectorField(
"initialPoints", dict , p.size());
81 initialPoints_ = p.localPoints();
97 initialPoints_(ptf.initialPoints_, mapper),
110 motion_(ptf.motion_),
111 initialPoints_(ptf.initialPoints_),
125 initialPoints_.autoMap(m);
143 initialPoints_.rmap(uSDoFptf.initialPoints_, addr);
155 const Time& t =
mesh.time();
158 bool firstIter =
false;
159 if (curTimeIndex_ != t.timeIndex())
162 curTimeIndex_ = t.timeIndex();
168 if (
db().time().foundObject<uniformDimensionedVectorField>(
"g"))
180 gravity*motion_.mass(),
188 motion_.transform(initialPoints_) - initialPoints_
212 uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField
Macros for easy insertion into run-time selection tables.
const uniformDimensionedVectorField & g
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.
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
void autoMap(const FieldMapper &map, const bool applyFlip=true)
Map from self.
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
constexpr Field() noexcept
void rmap(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 reverse-map from the given field
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
label timeIndex() const noexcept
Return the current time index.
scalar deltaTValue() const noexcept
Return time step value.
scalar deltaT0Value() const noexcept
Return old time step value.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A FixedValue boundary condition for pointField.
fixedValuePointPatchField(const pointPatch &, const DimensionedField< vector, pointMesh > &)
const Time & time() const noexcept
Return time registry.
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
const objectRegistry & db() const
The associated objectRegistry.
bool updated() const noexcept
True if the boundary condition has already been updated.
Foam::pointPatchFieldMapper.
Abstract base class for point-mesh patch fields.
virtual void write(Ostream &os) const
Write.
const DimensionedField< vector, pointMesh > & internalField() const noexcept
Basic pointPatch represents a set of points from the mesh.
Mesh consisting of general polyhedral cells.
void newTime()
Store the motion state at the beginning of the time-step.
void write(Ostream &) const
Write.
Foam::uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.
virtual void write(Ostream &) const
Write.
virtual void autoMap(const pointPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void rmap(const pointPatchField< vector > &, const labelList &)
Reverse map the given pointPatchField onto this pointPatchField.
uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField(const pointPatch &, const DimensionedField< vector, pointMesh > &)
Construct from patch and internal field.
void writeValueEntry(Ostream &os) const
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
OBJstream os(runTime.globalPath()/outputName)
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
List< label > labelList
A List of labels.
UniformDimensionedField< vector > uniformDimensionedVectorField
pointPatchField< vector > pointPatchVectorField
static constexpr const zero Zero
Global zero (0).
#define makePointPatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete pointPatchField type and add to run-time tables Example, (pointPatchScalarField,...