34template<
class GeoType>
35bool Foam::ROMmodels::DMD::createAndWriteImpl()
const
37 typedef typename GeoType::value_type Type;
39 const wordList modeReNames(modeNames(word(
"Re")));
40 const wordList modeImNames(modeNames(word(
"Im")));
42 for (
const label i : modes_)
44 const auto* modeRePtr =
mesh_.cfindObject<GeoType>(modeReNames[i]);
46 if (!modeRePtr)
return false;
48 const auto* modeImPtr =
mesh_.cfindObject<GeoType>(modeImNames[i]);
50 if (!modeImPtr)
return false;
61 const scalar
k = (
times_[timei].value() - startTime_)/deltaT_;
63 GeoType reconstructedFld
81 const label j = modes_[i];
82 const auto& modeRe =
mesh_.lookupObject<GeoType>(modeReNames[j]);
83 const auto& modeIm =
mesh_.lookupObject<GeoType>(modeImNames[j]);
90 (modeRe*amps_[i].Re() - modeIm*amps_[i].
Im())*evalk.Re()
91 - (modeRe*amps_[i].Im() + modeIm*amps_[i].Re())*evalk.Im()
95 reconstructedFld.correctBoundaryConditions();
97 reconstructedFld.dimensions().reset(dims_);
99 reconstructedFld.write();
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
const instantList & times_
Const reference to field times.
Time & runTime_
Reference to the Time.
fvMesh & mesh_
Reference to the fvMesh.
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
List< word > wordList
List of word.
const dimensionSet dimless
Dimensionless.
scalarField Im(const UList< complex > &cmplx)
Extract imag component.
messageStream Info
Information stream (stdout output on master, null elsewhere).
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0).
#define forAll(list, i)
Loop across all elements in list.