52 int i, argc = py::len(ns), bufSize = 0;
53 char **argv =
new char *[argc+1], *
p;
58 for (i = 0; i < argc; ++i)
60 std::string tmp = py::extract<std::string>(ns[i]);
61 bufSize += tmp.size() + 1;
64 std::vector<char> buf(bufSize);
65 for (i = 0,
p = &buf[0]; i < argc; ++i)
67 std::string tmp = py::extract<std::string>(ns[i]);
98 std::shared_ptr<SessionReader>,
100 "SessionReader", py::no_init)
103 .staticmethod(
"CreateInstance")
106 py::return_value_policy<py::copy_const_reference>())
112 py::return_value_policy<py::return_by_value>())
115 py::return_value_policy<py::copy_const_reference>())
SessionReaderSharedPtr SessionReader_CreateInstance(py::list &ns)
Thin wrapper around SessionReader to provide a nicer Pythonic interface.
void export_SessionReader()
SessionReader exports.
Reads and parses information from a Nektar++ XML session file.
const std::string & GetSessionName() const
Returns the session name of the loaded XML document.
void Finalise()
Finalises the session.
static SessionReaderSharedPtr CreateInstance(int argc, char *argv[])
Creates an instance of the SessionReader class.
CommSharedPtr GetComm()
Returns the communication object.
const NekDouble & GetParameter(const std::string &pName) const
Returns the value of the specified parameter.
const std::string & GetVariable(const unsigned int &idx) const
Returns the name of the variable specified by the given index.
bool DefinesParameter(const std::string &name) const
Checks if a parameter is specified in the XML document.
std::shared_ptr< SessionReader > SessionReaderSharedPtr