34 template<
class GeoType>
35 bool 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_)
46 if (!modeRePtr)
return false;
50 if (!modeImPtr)
return false;
61 const scalar
k = (
times_[timei].value() - startTime_)/deltaT_;
63 GeoType reconstructedFld
81 const label j = modes_[i];
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();
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
Time & runTime_
Reference to the Time.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label k
Boltzmann constant.
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
const Type * cfindObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
#define forAll(list, i)
Loop across all elements in list.
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
fvMesh & mesh_
Reference to the fvMesh.
virtual void setTime(const Time &t)
Reset the time and time-index to those of the given time.
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
List< word > wordList
List of word.
messageStream Info
Information stream (stdout output on master, null elsewhere)
const instantList & times_
Const reference to field times.
Do not request registration (bool: false)
static constexpr const zero Zero
Global zero (0)