BUG: DMD: write snapshot0 at start times (fixes #2122)
This commit is contained in:
parent
f687a21761
commit
f482f74277
@ -879,17 +879,15 @@ bool Foam::DMDModels::STDMD::initialise(const RMatrix& z)
|
|||||||
// algorithms at the final output computations (K:p. 43)
|
// algorithms at the final output computations (K:p. 43)
|
||||||
{
|
{
|
||||||
const label nSnap = z.m()/2;
|
const label nSnap = z.m()/2;
|
||||||
|
timeName0_ =
|
||||||
|
mesh_.time().timeName(mesh_.time().startTime().value());
|
||||||
|
|
||||||
if (nSnap == 0)
|
if (nSnap == 0)
|
||||||
{
|
{
|
||||||
empty_ = true;
|
empty_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
scalarField snapshot0(nSnap);
|
IOField<scalar> snapshot0
|
||||||
std::copy(z.cbegin(), z.cbegin() + nSnap, snapshot0.begin());
|
|
||||||
timeName0_ = mesh_.time().timeName();
|
|
||||||
|
|
||||||
IOField<scalar>
|
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
@ -897,10 +895,21 @@ bool Foam::DMDModels::STDMD::initialise(const RMatrix& z)
|
|||||||
timeName0_,
|
timeName0_,
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
),
|
),
|
||||||
snapshot0
|
nSnap
|
||||||
).write();
|
);
|
||||||
|
|
||||||
|
std::copy(z.cbegin(), z.cbegin() + nSnap, snapshot0.begin());
|
||||||
|
|
||||||
|
const IOstreamOption streamOpt
|
||||||
|
(
|
||||||
|
mesh_.time().writeFormat(),
|
||||||
|
mesh_.time().writeCompression()
|
||||||
|
);
|
||||||
|
|
||||||
|
fileHandler().writeObject(snapshot0, streamOpt, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_ = z/norm;
|
Q_ = z/norm;
|
||||||
|
Loading…
Reference in New Issue
Block a user