Commit 373ad6df authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: additional feedback about controlled mesh motion update type

- ensure that the updateControl is "non-sticky" on re-read,
  even if we do not support runtime-modifiable here

STYLE: add syntax example (wingMotion), but with updateInterval 1
parent e90de78c
......@@ -41,20 +41,33 @@ namespace Foam
void Foam::dynamicFvMesh::readDict()
{
IOdictionary dict
IOobject dictHeader
(
IOobject
(
"dynamicMeshDict",
thisDb().time().constant(),
thisDb(),
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false // Do not register
)
"dynamicMeshDict",
thisDb().time().constant(),
thisDb(),
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false // Do not register
);
timeControl_.read(dict);
if (dictHeader.typeHeaderOk<IOdictionary>(false, false))
{
IOdictionary dict(dictHeader);
timeControl_.read(dict);
if (!timeControl_.always())
{
// Feedback about the trigger mechanism
Info<< "Controlled mesh update triggered on "
<< timeControl_.type() << nl;
}
}
else
{
// Ensure it is pass-through
timeControl_.clear();
}
}
......@@ -138,7 +151,8 @@ bool Foam::dynamicFvMesh::controlledUpdate()
if (!timeControl_.always())
{
// Feedback that update has been triggered
Info<< "Mesh update triggered based on " << timeControl_.name() << nl;
Info<< "Mesh update triggered based on "
<< timeControl_.type() << nl;
}
return this->update();
......
......@@ -20,6 +20,11 @@ motionSolverLibs (sixDoFRigidBodyMotion);
motionSolver sixDoFRigidBodyMotion;
// Not necessarily useful here, but can have different motion updates types
updateControl timeStep;
updateInterval 1;
patches (wing);
innerDistance 0.3;
outerDistance 1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment