|
This email from yongwang.ttu@gmail.com originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list to disable email stamping for this address. |
// main.cpp
#include <LibUtilities/BasicUtils/SessionReader.h>
#include <iostream>
using namespace Nektar;
int main(int argc, char* argv[])
{
LibUtilities::SessionReaderSharedPtr session
= LibUtilities::SessionReader::CreateInstance(argc, argv);
std::cout << "Session Name: " << session->GetSessionName() << std::endl;
std::cout << "Parameter TimeStep: " << session->GetParameter("TimeStep") << std::endl;
return 0;
}
The main.cpp code can be compiled successfully, but when I run the executive with a session file (eg., ./main ChanFlow_3DH1D_FFT.xml),the method GetParameter produce an error saying the parameter "TimeStep" cannot be found, which actually exists in the session XML file.
Could you give me some suggestions about what went wrong here? The required files (main.cpp, CMakeLists.txt, ChanFlow_3DH1D_FFT.xml) are attached in attachments.
Thanks,
Yong Wang