dynamicInterpolatedFvMesh: New dynamic mesh which interpolates a given set of point position or displacement files
Class
Foam::dynamicInterpolatedFvMesh
Description
Interpolates pre-specified motion specified as a set of pointVectorFields.
The motion can be provided either as a set of displacement or position
fields and the entry \c displacement specified accordingly.
Usage
Example:
\verbatim
dynamicFvMesh dynamicInterpolatedFvMesh;
displacementLaplacianCoeffs
{
field wantedDisplacement;
displacement yes;
interpolationScheme linear;
}
\endverbatim
This will scan the case for \c wantedDisplacement \c pointVectorFields in
the time directories and interpolate those in time (using \c linear
interpolation) to obtain the current displacement. The advantage of
specifying displacement in this way is that it automatically works in
parallel using \c decomposePar to decompose the set of \c pointVectorFields
provided.
This commit is contained in:
@ -33,77 +33,6 @@ namespace Foam
|
||||
defineTypeNameAndDebug(points0MotionSolver, 0);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Protected Data Members * * * * * * * * * * * * * //
|
||||
|
||||
Foam::IOobject Foam::points0MotionSolver::points0IO
|
||||
(
|
||||
const polyMesh& mesh
|
||||
) const
|
||||
{
|
||||
const word instance =
|
||||
time().findInstance
|
||||
(
|
||||
mesh.meshDir(),
|
||||
"points0",
|
||||
IOobject::READ_IF_PRESENT
|
||||
);
|
||||
|
||||
if (instance != time().constant())
|
||||
{
|
||||
// points0 written to a time folder
|
||||
|
||||
return
|
||||
IOobject
|
||||
(
|
||||
"points0",
|
||||
instance,
|
||||
polyMesh::meshSubDir,
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
// check that points0 are actually in constant directory
|
||||
|
||||
IOobject io
|
||||
(
|
||||
"points0",
|
||||
instance,
|
||||
polyMesh::meshSubDir,
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
);
|
||||
|
||||
if (io.typeHeaderOk<pointIOField>())
|
||||
{
|
||||
return io;
|
||||
}
|
||||
else
|
||||
{
|
||||
// copy of original mesh points
|
||||
|
||||
return
|
||||
IOobject
|
||||
(
|
||||
"points",
|
||||
instance,
|
||||
polyMesh::meshSubDir,
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::points0MotionSolver::points0MotionSolver
|
||||
@ -114,7 +43,7 @@ Foam::points0MotionSolver::points0MotionSolver
|
||||
)
|
||||
:
|
||||
motionSolver(mesh, dict, type),
|
||||
points0_(pointIOField(points0IO(mesh)))
|
||||
points0_(pointIOField(polyMesh::points0IO(mesh)))
|
||||
{
|
||||
if (points0_.size() != mesh.nPoints())
|
||||
{
|
||||
|
||||
@ -61,10 +61,6 @@ protected:
|
||||
//- Starting points
|
||||
pointIOField points0_;
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Return IO object for points0
|
||||
IOobject points0IO(const polyMesh& mesh) const;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user