57 { 
"LR", 
"SR", 
"LI", 
"SI", 
"LM", 
"SM" };
 
   93     m_equ[0]->PrintSummary(out);
 
   96     out << 
"\tArnoldi solver type    : Arpack" << endl;
 
   98     out << 
"\tArpack problem type    : ";
 
  115     int nq     = 
m_equ[0]->UpdateFields()[0]->GetNcoeffs(); 
 
  138     if(
m_session->DefinesFunction(
"InitialConditions"))
 
  140         out << 
"\tInital vector       : input file  " << endl;
 
  146         out << 
"\tInital vector       : random  " << endl;
 
  190     std::string name = 
m_session->GetSessionName() + 
".evl";
 
  191     ofstream    pFile(name.c_str());
 
  201                         &v[0], n, iparam, ipntr, &workd[0],
 
  202                         &workl[0], lworkl, info);
 
  206         out << 
"\rIteration " << cycle << 
", output: " << info << 
", ido=" << ido << 
" " << std::flush;
 
  208         if(!((cycle-1)%m_kdim)&&(cycle> m_kdim)&&(ido!=2))
 
  210             pFile << 
"Krylov spectrum at iteration: " <<  cycle << endl;
 
  214                 pFile << 
"EV  Magnitude   Angle       Growth      Frequency   Residual"    << endl;
 
  218                 pFile << 
"EV  Real        Imaginary   inverse real  inverse imag  Residual"   << endl;
 
  222             for(
int k = 0; k < 
m_kdim; ++k)
 
  225                 WriteEvs(pFile,k, workl[ipntr[5]-1+k],workl[ipntr[6]-1+k]);
 
  229         if (ido == 99) 
break;
 
  240                 m_equ[0]->TransCoeffToPhys();
 
  248                     m_equ[1]->TransCoeffToPhys();
 
  268                 m_equ[0]->TransCoeffToPhys();
 
  271                 for (
int i = 0; i < fields.num_elements(); ++i)
 
  273                     fields[i]->IProductWRTBase(fields[i]->GetPhys(),
 
  274                                                fields[i]->UpdateCoeffs());
 
  282                 ASSERTL0(
false, 
"Unexpected reverse communication request.");
 
  287     out<< endl << 
"Converged in " << iparam[8] << 
" iterations" << endl;
 
  289     ASSERTL0(info >= 0,
" Error with Dnaupd");
 
  313                    z.get(), n, sigmar, sigmai, workev.get(), &B,
 
  315                    v.get(), n, iparam, ipntr, workd.get(),
 
  316                    workl.get(),lworkl,info);
 
  318     ASSERTL0(info == 0, 
" Error with Dneupd");
 
  333               "Need to implement Ritz re-evaluation of" 
  334               "eigenvalue. Only one half of complex " 
  335               "value will be correct");
 
  340     out   << 
"Converged Eigenvalues: " << nconv << endl;
 
  341     pFile << 
"Converged Eigenvalues: " << nconv << endl;
 
  345         out   << 
"         Magnitude   Angle       Growth      Frequency" << endl;
 
  346         pFile << 
"         Magnitude   Angle       Growth      Frequency" << endl;
 
  347         for(
int i= 0; i< nconv; ++i)
 
  352             std::string file = 
m_session->GetSessionName() + 
"_eig_" 
  353                 + boost::lexical_cast<std::string>(i)
 
  360         out   << 
"         Real        Imaginary " << endl;
 
  361         pFile << 
"         Real        Imaginary " << endl;
 
  362         for(
int i= 0; i< nconv; ++i)
 
  369             std::string file = 
m_session->GetSessionName() + 
"_eig_" 
  370                 + boost::lexical_cast<std::string>(i)
 
  381     for(
int j = 0; j < 
m_equ[0]->GetNvariables(); ++j)
 
  385         if (
m_comm->GetRank() == 0)
 
  387             out << 
"L 2 error (variable " << 
m_equ[0]->GetVariable(j) << 
") : " << vL2Error << endl;
 
  388             out << 
"L inf error (variable " << 
m_equ[0]->GetVariable(j) << 
") : " << vLinfError << endl;
 
Array< OneD, NekDouble > m_imag_evl
static void Dneupd(const int &rvec, const char *howmny, const int *select, double *dr, double *di, double *z, const int &ldz, const double &sigmar, const double &sigmai, double *workev, const char *bmat, const int &n, const char *which, const int &nev, const double &tol, double *resid, const int &ncv, double *v, const int &ldv, int *iparam, int *ipntr, double *workd, double *workl, const int &lworkl, int &info)
Post-processing routine to computed eigenvector of computed eigenvalues in Dnaupd. 
virtual ~DriverArpack()
Destructor. 
#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. 
static std::string RegisterEnumValue(std::string pEnum, std::string pString, int pEnumValue)
Registers an enumeration value. 
void CopyArnoldiArrayToField(Array< OneD, NekDouble > &array)
Copy Arnoldi storage to fields. 
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. 
static std::string arpackProblemTypeLookupIds[]
DriverArpack(const LibUtilities::SessionReaderSharedPtr pSession)
Constructor. 
static const NekDouble kNekZeroTol
int m_nvec
Dimension of Krylov subspace. 
Array< OneD, NekDouble > m_real_evl
Operator in solve call is negated. 
#define WARNINGL0(condition, msg)
static void Dnaupd(int &ido, const char *bmat, const int &n, const char *which, const int &nev, const double &tol, double *resid, const int &ncv, double *v, const int &ldv, int *iparam, int *ipntr, double *workd, double *workl, const int &lworkl, int &info)
Top level reverse communication interface to solve real double-precision non-symmetric problems...
enum EvolutionOperatorType m_EvolutionOperator
Evolution Operator. 
static const NekDouble kNekUnsetDouble
void Sadd(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Add vector y = alpha + x. 
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)
static std::string ArpackProblemTypeTrans[]
static std::string driverLookupId
static std::string arpackProblemTypeDefault
Array< OneD, EquationSystemSharedPtr > m_equ
Equation system to solve. 
int m_infosteps
underlying operator is time stepping 
DriverFactory & GetDriverFactory()
LibUtilities::CommSharedPtr m_comm
Communication object. 
static std::string RegisterDefaultSolverInfo(const std::string &pName, const std::string &pValue)
Registers the default string value of a solver info property. 
static DriverSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession)
Creates an instance of this class. 
virtual void v_Execute(ostream &out=cout)
Virtual function for solve implementation. 
virtual void v_InitObject(ostream &out=cout)
Virtual function for initialisation implementation. 
Base class for the development of solvers. 
virtual void v_InitObject(ostream &out=cout)
static std::string className
Name of the class. 
LibUtilities::SessionReaderSharedPtr m_session
Session reader object. 
int m_nequ
number of equations 
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory. 
int m_nits
Number of vectors to test.