53 initialPoints_(
p.localPoints()),
70 if (!
dict.found(
"value"))
75 if (
dict.found(
"initialPoints"))
81 initialPoints_ =
p.localPoints();
89 const uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField& ptf,
91 const DimensionedField<vector, pointMesh>& iF,
92 const pointPatchFieldMapper& mapper
95 fixedValuePointPatchField<
vector>(ptf,
p, iF, mapper),
97 initialPoints_(ptf.initialPoints_, mapper),
110 motion_(ptf.motion_),
111 initialPoints_(ptf.initialPoints_),
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
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...
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
void write(Ostream &) const
Write.
UniformDimensionedField< vector > uniformDimensionedVectorField
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
Foam::pointPatchFieldMapper.
virtual void write(Ostream &os) const
Write.
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
point transform(const point &initialPoints) const
Transform the given initial state point by the current motion.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Macros for easy insertion into run-time selection tables.
friend Ostream & operator(Ostream &, const Field< vector > &)
Foam::uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.
const Time & time() const noexcept
Return time registry.
bool updated() const noexcept
True if the boundary condition has already been updated.
virtual void autoMap(const pointPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
const objectRegistry & db() const
The associated objectRegistry.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const uniformDimensionedVectorField & g
virtual void write(Ostream &) const
Write.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
void newTime()
Store the motion state at the beginning of the time-step.
pointPatchField< vector > pointPatchVectorField
void autoMap(const FieldMapper &map, const bool applyFlip=true)
Map from self.
void rmap(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 reverse-map from the given field
Basic pointPatch represents a set of points from the mesh.
virtual void autoMap(const pointPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
scalar mass() const
Return the mass.
makePointPatchTypeField(pointPatchVectorField, solidBodyMotionDisplacementPointPatchVectorField)
virtual void rmap(const pointPatchField< vector > &, const labelList &)
Reverse map the given pointPatchField onto this pointPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Field< vector > vectorField
Specialisation of Field<T> for vector.
uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField(const pointPatch &, const DimensionedField< vector, pointMesh > &)
Construct from patch and internal field.
virtual void rmap(const pointPatchField< Type > &, const labelList &)
Reverse map the given PointPatchField onto.
void update(bool firstIter, const vector &fGlobal, const vector &tauGlobal, scalar deltaT, scalar deltaT0)
Symplectic integration of velocities, orientation and position.
const DimensionedField< vector, pointMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
static constexpr const zero Zero
Global zero (0)