69 "VelocityCorrectionScheme",
85 if(
m_session->DefinesSolverInfo(
"ModeType") &&
86 (boost::iequals(
m_session->GetSolverInfo(
"ModeType"),
88 boost::iequals(
m_session->GetSolverInfo(
"ModeType"),
93 m_equ[0]->UpdateFields()[i]->SetWaveSpace(
true);
112 if (
m_comm->GetRank() == 0)
114 if(
m_session->DefinesSolverInfo(
"ModeType") &&
115 boost::iequals(
m_session->GetSolverInfo(
"ModeType"),
118 out <<
"\tSingle Fourier mode : true " << endl;
120 "Expected a homogeneous expansion to be defined "
125 out <<
"\tSingle Fourier mode : false " << endl;
127 if(
m_session->DefinesSolverInfo(
"BetaZero"))
129 out <<
"\tBeta set to Zero : true (overrides LHom)"
134 out <<
"\tBeta set to Zero : false " << endl;
139 out <<
"\tEvolution operator : "
140 <<
m_session->GetSolverInfo(
"EvolutionOperator")
148 out <<
"\tKrylov-space dimension : " <<
m_kdim << endl;
149 out <<
"\tNumber of vectors : " <<
m_nvec << endl;
150 out <<
"\tMax iterations : " <<
m_nits << endl;
151 out <<
"\tEigenvalue tolerance : " <<
m_evtol << endl;
152 out <<
"======================================================"
165 int nq = fields[0]->GetNcoeffs();
169 Vmath::Vcopy(nq, &array[k*nq], 1, &fields[k]->UpdateCoeffs()[0], 1);
170 fields[k]->SetPhysState(
false);
188 fields =
m_equ[0]->UpdateFields();
197 int nq = fields[0]->GetNcoeffs();
198 Vmath::Vcopy(nq, &fields[k]->GetCoeffs()[0], 1, &array[k*nq], 1);
199 fields[k]->SetPhysState(
false);
214 fields =
m_equ[0]->UpdateFields();
215 int nq = fields[0]->GetNcoeffs();
220 &fields[k]->GetCoeffs()[0], 1,
221 &
m_equ[1]->UpdateFields()[k]->UpdateCoeffs()[0], 1);
227 ASSERTL0(
false,
"Transient Growth non available for Coupled Solver");
235 std::vector<std::string> variables(
m_nfields);
240 variables[i] =
m_equ[0]->GetVariable(i);
243 m_equ[0]->WriteFld(file,
m_equ[0]->UpdateFields()[0], coeffs, variables);
250 std::vector<std::string> variables(
m_nfields);
251 std::vector<Array<OneD, NekDouble> > fieldcoeffs(
m_nfields);
253 int ncoeffs =
m_equ[0]->UpdateFields()[0]->GetNcoeffs();
254 ASSERTL1(coeffs.num_elements() >= ncoeffs*
m_nfields,
"coeffs is not of sufficient size");
258 variables[i] =
m_equ[0]->GetVariable(i);
259 fieldcoeffs[i] = coeffs + i*ncoeffs;
262 m_equ[0]->WriteFld(file,
m_equ[0]->UpdateFields()[0], fieldcoeffs, variables);
278 evlout <<
"EV: " << setw(2) << i
279 << setw(12) << abs_ev
280 << setw(12) << ang_ev
281 << setw(12) << log (abs_ev) /
m_period
286 evlout << setw(12) << resid;
292 NekDouble invmag = 1.0/(re_ev*re_ev + im_ev*im_ev);
303 evlout <<
"EV: " << setw(2) << i
304 << setw(14) << sign*re_ev
305 << setw(14) << sign*im_ev;
309 evlout << setw(14) << sign*re_ev*invmag +
m_realShift
315 evlout << setw(12) << resid;
#define ASSERTL0(condition, msg)
DriverArnoldi(const LibUtilities::SessionReaderSharedPtr pSession)
Constructor.
void CopyFwdToAdj()
Copy the forward field to the adjoint system in transient growth calculations.
NekDouble m_evtol
Maxmum number of iterations.
virtual SOLVER_UTILS_EXPORT void v_InitObject(ostream &out=cout)
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 ~DriverArnoldi()
Destructor.
int m_nvec
Dimension of Krylov subspace.
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.
void WriteEvs(ostream &evlout, const int k, const NekDouble real, const NekDouble imag, NekDouble resid=NekConstants::kNekUnsetDouble, bool DumpInverse=true)
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)
virtual void v_InitObject(ostream &out=cout)
LibUtilities::SessionReaderSharedPtr m_session
Session reader object.
int m_nequ
number of equations
int m_nits
Number of vectors to test.