74 if(
m_session->DefinesSolverInfo(
"ModeType") &&
75 (
m_session->GetSolverInfo(
"ModeType")==
"SingleMode"||
m_session->GetSolverInfo(
"ModeType")==
"HalfMode") )
79 m_equ[0]->UpdateFields()[i]->SetWaveSpace(
true);
87 ASSERTL0(
m_session->DefinesFunction(
"BodyForce"),
"A BodyForce section needs to be defined for this solver type");
104 if (
m_comm->GetRank() == 0)
106 if(
m_session->DefinesSolverInfo(
"SingleMode"))
108 out <<
"\tSingle Fourier mode : true " << endl;
110 "Expected a homogeneous expansion to be defined "
115 out <<
"\tSingle Fourier mode : false " << endl;
117 if(
m_session->DefinesSolverInfo(
"BetaZero"))
119 out <<
"\tBeta set to Zero : true (overrides LHom)"
124 out <<
"\tBeta set to Zero : false " << endl;
129 out <<
"\tEvolution operator : "
130 <<
m_session->GetSolverInfo(
"EvolutionOperator")
138 out <<
"\tKrylov-space dimension : " <<
m_kdim << endl;
139 out <<
"\tNumber of vectors : " <<
m_nvec << endl;
140 out <<
"\tMax iterations : " <<
m_nits << endl;
141 out <<
"\tEigenvalue tolerance : " <<
m_evtol << endl;
142 out <<
"======================================================"
154 Array<OneD, MultiRegions::ExpListSharedPtr>& fields =
m_equ[0]->UpdateFields();
155 int nq = fields[0]->GetNcoeffs();
159 Vmath::Vcopy(nq, &array[k*nq], 1, &fields[k]->UpdateCoeffs()[0], 1);
160 fields[k]->SetPhysState(
false);
171 Array<OneD, MultiRegions::ExpListSharedPtr> fields;
177 fields =
m_equ[0]->UpdateFields();
186 int nq = fields[0]->GetNcoeffs();
187 Vmath::Vcopy(nq, &fields[k]->GetCoeffs()[0], 1, &array[k*nq], 1);
188 fields[k]->SetPhysState(
false);
199 Array<OneD, MultiRegions::ExpListSharedPtr> fields;
203 fields =
m_equ[0]->UpdateFields();
204 int nq = fields[0]->GetNcoeffs();
209 Vmath::Vcopy(nq, &fields[k]->GetCoeffs()[0], 1,&
m_equ[1]->UpdateFields()[k]->UpdateCoeffs()[0], 1);
215 ASSERTL0(
false,
"Transient Growth non available for Coupled Solver");
223 std::vector<std::string> variables(
m_nfields);
228 variables[i] =
m_equ[0]->GetVariable(i);
231 m_equ[0]->WriteFld(file,
m_equ[0]->UpdateFields()[0], coeffs, variables);
238 std::vector<std::string> variables(
m_nfields);
239 std::vector<Array<OneD, NekDouble> > fieldcoeffs(
m_nfields);
241 int ncoeffs =
m_equ[0]->UpdateFields()[0]->GetNcoeffs();
242 ASSERTL1(coeffs.num_elements() >= ncoeffs*
m_nfields,
"coeffs is not of sufficient size");
246 variables[i] =
m_equ[0]->GetVariable(i);
247 fieldcoeffs[i] = coeffs + i*ncoeffs;
250 m_equ[0]->WriteFld(file,
m_equ[0]->UpdateFields()[0], fieldcoeffs, variables);
260 evlout << setw(2) << i
261 << setw(12) << abs_ev
262 << setw(12) << ang_ev
263 << setw(12) << log (abs_ev) /
m_period
268 evlout << setw(12) << resid;
274 NekDouble invmag = 1.0/(re_ev*re_ev + im_ev*im_ev);
276 evlout << setw(2) << i
280 << setw(14) << im_ev*invmag;
284 evlout << setw(12) << resid;