35 namespace pointMeshMovers
50 void Foam::pointMeshMovers::solidBody::updateZonePointIndices()
70 pointInZone[
f[fpi]] =
true;
80 forAll(pointInZone, pointi)
82 if (pointInZone[pointi])
84 zonePoints_[zonePointi ++] = pointi;
102 transform_(SBMFPtr_().transformation())
106 Info<<
"Applying solid body motion to entire mesh" <<
endl;
109 updateZonePointIndices();
123 transform_ = SBMFPtr_().transformation();
140 return ttransformedPts;
147 zone_.topoChange(map);
148 updateZonePointIndices();
156 const label nZonePoints =
157 zone_.all() ? poly().nPoints() : zonePoints_.size();
159 for (
label zonePointi = 0; zonePointi < nZonePoints; ++ zonePointi)
162 zone_.all() ? zonePointi : zonePoints_[zonePointi];
169 <<
"Cannot determine co-ordinates of introduced points."
170 <<
" New point " << pointi <<
" at " <<
points[pointi]
176 newPoints0[pointi] = points0_[oldPointi];
181 transform_.invTransformPoint(
points[pointi]);
185 twoDCorrectPoints(newPoints0);
188 points0_.transfer(newPoints0);
190 points0_.instance() = poly().time().name();
201 zone_.distribute(map);
202 updateZonePointIndices();
211 updateZonePointIndices();
215 const label nZonePoints =
216 zone_.all() ? poly().nPoints() : zonePoints_.size();
218 for (
label zonePointi = 0; zonePointi < nZonePoints; ++ zonePointi)
221 zone_.all() ? zonePointi : zonePoints_[zonePointi];
223 points0[pointi] = transform_.invTransformPoint(points0[pointi]);
226 twoDCorrectPoints(points0);
229 points0_.instance() = poly().time().name();
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
void resize(const label)
Alias for setSize(const label)
void clear()
Clear the list, i.e. set size to zero.
A List with indirect addressing.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
const cellZone & zone() const
Return const access to the cell set.
bool all() const
Return true if the set comprises all the cells.
bool regenerate()
Regenerate the cellZone if the regenerate switch is set true.
Abstract base class for pointMesh movers.
const polyMesh & poly() const
Return reference to mesh.
virtual void distribute(const polyDistributionMap &)
Update corresponding to the given distribution map.
virtual void mapMesh(const polyMeshMap &)=0
Update from another mesh using the given map.
Solid-body motion of the mesh specified by a run-time selectable motion function.
solidBody(const polyMesh &, const dictionary &)
Construct from mesh and dictionary.
virtual void topoChange(const polyTopoChangeMap &)
Update local data for topology changes.
virtual void distribute(const polyDistributionMap &)
Update corresponding to the given distribution map.
virtual tmp< pointField > newPoints()
Return point location obtained from the current motion field.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Mesh consisting of general polyhedral cells.
virtual const faceList & faces() const
Return raw faces.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const labelList & reversePointMap() const
Reverse point map.
const labelList & pointMap() const
Old point map.
const cellList & cells() const
Base class for defining solid-body motions.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const dimensionedScalar c
Speed of light in a vacuum.
addToRunTimeSelectionTable(pointMeshMover, externalDisplacement, dictionary)
defineTypeNameAndDebug(externalDisplacement, 0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
void transformPoints(vectorField &, const spatialTransform &, const vectorField &)
Transform given vectorField of coordinates with the given spatialTransform.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
vectorField pointField
pointField is a vectorField.
List< bool > boolList
Bool container classes.
label count(const ListType &l, typename ListType::const_reference x)
Count the number of occurrences of a value in a list.
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)