71 "VelocityCorrectionScheme",
87 if(
m_session->DefinesSolverInfo(
"ModeType") &&
88 (boost::iequals(
m_session->GetSolverInfo(
"ModeType"),
90 boost::iequals(
m_session->GetSolverInfo(
"ModeType"),
95 m_equ[0]->UpdateFields()[i]->SetWaveSpace(
true);
116 if (
m_comm->GetRank() == 0)
118 if(
m_session->DefinesSolverInfo(
"ModeType") &&
119 boost::iequals(
m_session->GetSolverInfo(
"ModeType"),
122 out <<
"\tSingle Fourier mode : true " << endl;
124 "Expected a homogeneous expansion to be defined "
129 out <<
"\tSingle Fourier mode : false " << endl;
131 if(
m_session->DefinesSolverInfo(
"BetaZero"))
133 out <<
"\tBeta set to Zero : true (overrides LHom)"
138 out <<
"\tBeta set to Zero : false " << endl;
143 out <<
"\tEvolution operator : "
144 <<
m_session->GetSolverInfo(
"EvolutionOperator")
152 out <<
"\tKrylov-space dimension : " <<
m_kdim << endl;
153 out <<
"\tNumber of vectors : " <<
m_nvec << endl;
154 out <<
"\tMax iterations : " <<
m_nits << endl;
155 out <<
"\tEigenvalue tolerance : " <<
m_evtol << endl;
156 out <<
"======================================================"
169 int nq = fields[0]->GetNcoeffs();
173 Vmath::Vcopy(nq, &array[k*nq], 1, &fields[k]->UpdateCoeffs()[0], 1);
174 fields[k]->SetPhysState(
false);
192 fields =
m_equ[0]->UpdateFields();
201 int nq = fields[0]->GetNcoeffs();
202 Vmath::Vcopy(nq, &fields[k]->GetCoeffs()[0], 1, &array[k*nq], 1);
203 fields[k]->SetPhysState(
false);
218 fields =
m_equ[0]->UpdateFields();
219 int nq = fields[0]->GetNcoeffs();
224 &fields[k]->GetCoeffs()[0], 1,
225 &
m_equ[1]->UpdateFields()[k]->UpdateCoeffs()[0], 1);
231 ASSERTL0(
false,
"Transient Growth non available for Coupled Solver");
239 std::vector<std::string> variables(
m_nfields);
244 variables[i] =
m_equ[0]->GetVariable(i);
247 m_equ[0]->WriteFld(file,
m_equ[0]->UpdateFields()[0], coeffs, variables);
254 std::vector<std::string> variables(
m_nfields);
255 std::vector<Array<OneD, NekDouble> > fieldcoeffs(
m_nfields);
257 int ncoeffs =
m_equ[0]->UpdateFields()[0]->GetNcoeffs();
258 ASSERTL1(coeffs.num_elements() >= ncoeffs*
m_nfields,
"coeffs is not of sufficient size");
262 variables[i] =
m_equ[0]->GetVariable(i);
263 fieldcoeffs[i] = coeffs + i*ncoeffs;
266 m_equ[0]->WriteFld(file,
m_equ[0]->UpdateFields()[0], fieldcoeffs, variables);
282 evlout <<
"EV: " << setw(2) << i
283 << setw(12) << abs_ev
284 << setw(12) << ang_ev
285 << setw(12) << log (abs_ev) /
m_period
290 evlout << setw(12) << resid;
296 NekDouble invmag = 1.0/(re_ev*re_ev + im_ev*im_ev);
307 evlout <<
"EV: " << setw(2) << i
308 << setw(14) << sign*re_ev
309 << setw(14) << sign*im_ev;
313 evlout << setw(14) << sign*re_ev*invmag +
m_realShift
319 evlout << setw(12) << resid;
#define ASSERTL0(condition, msg)
void CopyFwdToAdj()
Copy the forward field to the adjoint system in transient growth calculations.
NekDouble m_evtol
Maxmum number of iterations.
void CopyArnoldiArrayToField(Array< OneD, NekDouble > &array)
Copy Arnoldi storage to fields.
#define sign(a, b)
return the sign(b)*a
SOLVER_UTILS_EXPORT void ArnoldiSummary(std::ostream &out)
void CopyFieldToArnoldiArray(Array< OneD, NekDouble > &array)
Copy fields to Arnoldi storage.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
void WriteFld(std::string file, std::vector< Array< OneD, NekDouble > > coeffs)
Write coefficients to file.
virtual SOLVER_UTILS_EXPORT void v_InitObject(std::ostream &out=std::cout)
virtual ~DriverArnoldi()
Destructor.
int m_nvec
Dimension of Krylov subspace.
void WriteEvs(std::ostream &evlout, const int k, const NekDouble real, const NekDouble imag, NekDouble resid=NekConstants::kNekUnsetDouble, bool DumpInverse=true)
virtual void v_InitObject(std::ostream &out=std::cout)
enum EvolutionOperatorType m_EvolutionOperator
Evolution Operator.
static const NekDouble kNekUnsetDouble
int m_nfields
interval to dump information if required.
bool m_timeSteppingAlgorithm
Period of time stepping algorithm.
Array< OneD, EquationSystemSharedPtr > m_equ
Equation system to solve.
NekDouble m_period
Tolerance of iteratiosn.
int m_infosteps
underlying operator is time stepping
LibUtilities::CommSharedPtr m_comm
Communication object.
Base class for the development of solvers.
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
LibUtilities::SessionReaderSharedPtr m_session
Session reader object.
int m_nequ
number of equations
int m_nits
Number of vectors to test.