mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
GeometricField: Renamed internalField() -> primitiveField() and dimensionedInternalField() -> internalField()
These new names are more consistent and logical because:
primitiveField():
primitiveFieldRef():
Provides low-level access to the Field<Type> (primitive field)
without dimension or mesh-consistency checking. This should only be
used in the low-level functions where dimensional consistency is
ensured by careful programming and computational efficiency is
paramount.
internalField():
internalFieldRef():
Provides access to the DimensionedField<Type, GeoMesh> of values on
the internal mesh-type for which the GeometricField is defined and
supports dimension and checking and mesh-consistency checking.
This commit is contained in:
@ -153,12 +153,12 @@ Foam::rigidBodyMeshMotion::rigidBodyMeshMotion
|
||||
pointScalarField& scale = bodyMeshes_[bi].weight_;
|
||||
|
||||
// Scaling: 1 up to di then linear down to 0 at do away from patches
|
||||
scale.internalFieldRef() =
|
||||
scale.primitiveFieldRef() =
|
||||
min
|
||||
(
|
||||
max
|
||||
(
|
||||
(bodyMeshes_[bi].do_ - pDist.internalField())
|
||||
(bodyMeshes_[bi].do_ - pDist.primitiveField())
|
||||
/(bodyMeshes_[bi].do_ - bodyMeshes_[bi].di_),
|
||||
scalar(0)
|
||||
),
|
||||
@ -166,14 +166,14 @@ Foam::rigidBodyMeshMotion::rigidBodyMeshMotion
|
||||
);
|
||||
|
||||
// Convert the scale function to a cosine
|
||||
scale.internalFieldRef() =
|
||||
scale.primitiveFieldRef() =
|
||||
min
|
||||
(
|
||||
max
|
||||
(
|
||||
0.5
|
||||
- 0.5
|
||||
*cos(scale.internalField()
|
||||
*cos(scale.primitiveField()
|
||||
*Foam::constant::mathematical::pi),
|
||||
scalar(0)
|
||||
),
|
||||
@ -197,7 +197,7 @@ Foam::rigidBodyMeshMotion::~rigidBodyMeshMotion()
|
||||
Foam::tmp<Foam::pointField>
|
||||
Foam::rigidBodyMeshMotion::curPoints() const
|
||||
{
|
||||
return points0() + pointDisplacement_.internalField();
|
||||
return points0() + pointDisplacement_.primitiveField();
|
||||
}
|
||||
|
||||
|
||||
@ -281,7 +281,7 @@ void Foam::rigidBodyMeshMotion::solve()
|
||||
// Update the displacements
|
||||
if (bodyMeshes_.size() == 1)
|
||||
{
|
||||
pointDisplacement_.internalFieldRef() = model_.transformPoints
|
||||
pointDisplacement_.primitiveFieldRef() = model_.transformPoints
|
||||
(
|
||||
bodyMeshes_[0].bodyID_,
|
||||
bodyMeshes_[0].weight_,
|
||||
@ -298,7 +298,7 @@ void Foam::rigidBodyMeshMotion::solve()
|
||||
weights[bi] = &bodyMeshes_[bi].weight_;
|
||||
}
|
||||
|
||||
pointDisplacement_.internalFieldRef() =
|
||||
pointDisplacement_.primitiveFieldRef() =
|
||||
model_.transformPoints(bodyIDs, weights, points0()) - points0();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user