37 namespace pointMeshMovers
53 void Foam::pointMeshMovers::layeredDisplacement::walkLayers
55 const polyPatch& startPatch,
61 const labelList& startMeshPoints = startPatch.meshPoints();
74 startInfo[i] = pointEdgeStructuredWalk
85 forAll(allPointInfo, pointi)
87 allPointInfo[pointi] = pointEdgeStructuredWalk
100 allEdgeInfo[edgei] = pointEdgeStructuredWalk
110 PointEdgeWave<pointEdgeStructuredWalk> walk
117 poly().globalData().nTotalPoints()
121 forAll(allPointInfo, pointi)
123 distance[pointi] = allPointInfo[pointi].dist();
138 oppositePatchNames_(
dict.
lookup(
"oppositePatches")),
159 movePoints(poly().
points());
162 pointDisplacement_.boundaryFieldRef().updateCoeffs();
165 const polyPatch& patch0 = poly().boundary()[oppositePatches_.first()];
168 walkLayers(patch0, patchDist0, patchDisp0);
171 const polyPatch& patch1 = poly().boundary()[oppositePatches_.second()];
174 walkLayers(patch1, patchDist1, patchDisp1);
178 const scalarField w(patchDist0/(patchDist0 + patchDist1 + small));
181 pointDisplacement_.primitiveFieldRef() = (1 - w)*patchDisp0 + w*patchDisp1;
194 <<
"Mesh-to-mesh mapping in not implemented for displacement solvers"
196 <<
" velocity based motion solvers are preferable for cases in which"
197 " the mesh is reset periodically avoiding accumulation of error."
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
static pointConstraints & New(const word &name, const pointMesh &mesh)
Construct and return the named DemandDrivenMeshObject.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
void constrainDisplacement(pointVectorField &displacement, const bool overrideValue=false) const
Apply boundary conditions (single-patch constraints),.
Abstract base class for pointMesh movers.
const polyMesh & poly() const
Return reference to mesh.
Motion of the mesh specified as a list of pointMeshMovers.
pointField & points0()
Return reference to the reference field.
Abstract base class for displacement pointMesh movers.
pointVectorField pointDisplacement_
Point motion field.
displacement(const polyMesh &, const dictionary &, const word &type)
Construct from mesh and dictionary.
Interpolating motion solver for extruded/layered meshes.
layeredDisplacement(const polyMesh &, const dictionary &)
Construct from polyMesh and dictionary.
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 (not implemented)
~layeredDisplacement()
Destructor.
Class containing mesh-to-mesh mapping information.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
A class for managing temporary objects.
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.
volScalarField scalarField(fieldObject, mesh)
volVectorField vectorField(fieldObject, mesh)
addToRunTimeSelectionTable(pointMeshMover, externalDisplacement, dictionary)
defineTypeNameAndDebug(externalDisplacement, 0)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< label > labelList
A List of labels.
labelList second(const UList< labelPair > &p)
labelList first(const UList< labelPair > &p)
Field< vector > vectorField
Specialisation of Field<T> for vector.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
faceListList boundary(nPatches)