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");
105 if(
m_session->DefinesSolverInfo(
"SingleMode"))
107 out <<
"\tSingle Fourier mode : true " << endl;
108 ASSERTL0(
m_session->DefinesSolverInfo(
"Homogeneous"),
"Expected a homogeneous expansion to be defined with single mode");
112 out <<
"\tSingle Fourier mode : false " << endl;
114 if(
m_session->DefinesSolverInfo(
"BetaZero"))
116 out <<
"\tBeta set to Zero : true (overrides LHom)" << endl;
120 out <<
"\tBeta set to Zero : false " << endl;
125 out <<
"\tEvolution operator : " <<
m_session->GetSolverInfo(
"EvolutionOperator") << endl;
131 out <<
"\tKrylov-space dimension : " <<
m_kdim << endl;
132 out <<
"\tNumber of vectors : " <<
m_nvec << endl;
133 out <<
"\tMax iterations : " <<
m_nits << endl;
134 out <<
"\tEigenvalue tolerance : " <<
m_evtol << endl;
135 out <<
"=======================================================================" << endl;
145 Array<OneD, MultiRegions::ExpListSharedPtr>& fields =
m_equ[0]->UpdateFields();
146 int nq = fields[0]->GetNcoeffs();
150 Vmath::Vcopy(nq, &array[k*nq], 1, &fields[k]->UpdateCoeffs()[0], 1);
151 fields[k]->SetPhysState(
false);
162 Array<OneD, MultiRegions::ExpListSharedPtr> fields;
166 int nq = fields[0]->GetNcoeffs();
167 Vmath::Vcopy(nq, &fields[k]->GetCoeffs()[0], 1, &array[k*nq], 1);
168 fields[k]->SetPhysState(
false);
179 Array<OneD, MultiRegions::ExpListSharedPtr> fields;
183 fields =
m_equ[0]->UpdateFields();
184 int nq = fields[0]->GetNcoeffs();
189 Vmath::Vcopy(nq, &fields[k]->GetCoeffs()[0], 1,&
m_equ[1]->UpdateFields()[k]->UpdateCoeffs()[0], 1);
195 ASSERTL0(
false,
"Transient Growth non available for Coupled Solver");
203 std::vector<std::string> variables(
m_nfields);
208 variables[i] =
m_equ[0]->GetVariable(i);
211 m_equ[0]->WriteFld(file,
m_equ[0]->UpdateFields()[0], coeffs, variables);
218 std::vector<std::string> variables(
m_nfields);
219 std::vector<Array<OneD, NekDouble> > fieldcoeffs(
m_nfields);
221 int ncoeffs =
m_equ[0]->UpdateFields()[0]->GetNcoeffs();
222 ASSERTL1(coeffs.num_elements() >= ncoeffs*
m_nfields,
"coeffs is not of sufficient size");
226 variables[i] =
m_equ[0]->GetVariable(i);
227 fieldcoeffs[i] = coeffs + i*ncoeffs;
230 m_equ[0]->WriteFld(file,
m_equ[0]->UpdateFields()[0], fieldcoeffs, variables);
240 evlout << setw(2) << i
241 << setw(12) << abs_ev
242 << setw(12) << ang_ev
243 << setw(12) << log (abs_ev) /
m_period
248 evlout << setw(12) << resid;
254 NekDouble invmag = 1.0/(re_ev*re_ev + im_ev*im_ev);
256 evlout << setw(2) << i
260 << setw(14) << im_ev*invmag;
264 evlout << setw(12) << resid;