Commit 4ecabccd authored by Chris Cantwell's avatar Chris Cantwell

Removed m_filename from SessionReader.

This no longer makes sense when we can have multiple session files.
Also removed other unused references in the code.
Removed unused GEOMINFO reading in SessionReader.
Made some of the error messages more consistent and informative.
parent e7b8363a
......@@ -16,8 +16,6 @@ int main(int argc, char *argv[])
LibUtilities::CommSharedPtr vComm = vSession->GetComm();
string meshfile(vSession->GetFilename());
MultiRegions::ContField3DHomogeneous1DSharedPtr Exp_u, Exp_v, Exp_w;
StdRegions::ConstFactorMap factors;
......
......@@ -15,8 +15,6 @@ int main(int argc, char *argv[])
LibUtilities::CommSharedPtr vComm = vSession->GetComm();
string meshfile(vSession->GetFilename());
MultiRegions::ContField3DHomogeneous1DSharedPtr Exp_u, Exp_v, Exp_w;
StdRegions::ConstFactorMap factors;
......
......@@ -16,8 +16,6 @@ int main(int argc, char *argv[])
LibUtilities::CommSharedPtr vComm = vSession->GetComm();
string meshfile(vSession->GetFilename());
MultiRegions::ContField3DHomogeneous2DSharedPtr Exp_u, Exp_v, Exp_w;
StdRegions::ConstFactorMap factors;
......
......@@ -25,7 +25,6 @@ int main(int argc, char *argv[])
int coordim;
Array<OneD,NekDouble> sol;
Array<OneD,NekDouble> xc0,xc1,xc2;
std::string meshfile(vSession->GetFilename());
if(argc != 2)
{
......
......@@ -20,7 +20,6 @@ int main(int argc, char *argv[])
int i, j, nq, coordim;
Array<OneD,NekDouble> fce;
Array<OneD,NekDouble> xc0,xc1,xc2;
std::string meshfile(vSession->GetFilename());
if(argc != 2)
{
......
......@@ -21,7 +21,6 @@ int main(int argc, char *argv[])
int i, j, nq, coordim;
Array<OneD,NekDouble> fce;
Array<OneD,NekDouble> xc0,xc1,xc2;
std::string meshfile(vSession->GetFilename());
if(argc != 2)
{
......
......@@ -22,7 +22,6 @@ int main(int argc, char *argv[])
int nq, coordim;
Array<OneD,NekDouble> fce;
Array<OneD,NekDouble> xc0,xc1,xc2;
std::string meshfile(vSession->GetFilename());
if(argc != 3)
{
......
......@@ -15,7 +15,6 @@ int main(int argc, char *argv[])
{
LibUtilities::SessionReaderSharedPtr vSession
= LibUtilities::SessionReader::CreateInstance(argc, argv);
string meshfile(vSession->GetFilename());
MultiRegions::ExpList1DSharedPtr Exp,Sol;
int i,j;
......
......@@ -16,7 +16,6 @@ int main(int argc, char *argv[])
{
LibUtilities::SessionReaderSharedPtr vSession
= LibUtilities::SessionReader::CreateInstance(argc, argv);
string meshfile(vSession->GetFilename());
MultiRegions::ExpList2DSharedPtr Exp,Fce;
int i, j, nq, coordim;
......
......@@ -17,8 +17,6 @@ int main(int argc, char *argv[])
LibUtilities::SessionReaderSharedPtr vSession
= LibUtilities::SessionReader::CreateInstance(argc, argv);
string meshfile(vSession->GetFilename());
MultiRegions::ExpList3DSharedPtr Exp,Fce;
int i, j, nq, coordim;
Array<OneD,NekDouble> fce, tmp, tmp2;
......
......@@ -25,8 +25,6 @@ int main(int argc, char *argv[])
LibUtilities::SessionReaderSharedPtr vSession
= LibUtilities::SessionReader::CreateInstance(argc, argv);
string meshfile(vSession->GetFilename());
MultiRegions::ContField2DSharedPtr Exp,Fce;
int nq, coordim;
Array<OneD,NekDouble> fce;
......
......@@ -15,7 +15,6 @@ int main(int argc, char *argv[])
= LibUtilities::SessionReader::CreateInstance(argc, argv);
LibUtilities::CommSharedPtr vComm = vSession->GetComm();
string meshfile(vSession->GetFilename());
MultiRegions::DisContField1DSharedPtr Exp,Fce;
int i, nq, coordim;
......
......@@ -23,7 +23,6 @@ int main(int argc, char *argv[])
Array<OneD,NekDouble> fce;
Array<OneD,NekDouble> xc0,xc1,xc2;
StdRegions::ConstFactorMap factors;
string meshfile(vSession->GetFilename());
if( (argc != 2) && (argc != 3) && (argc != 4))
{
......
......@@ -17,7 +17,6 @@ int main(int argc, char *argv[])
= LibUtilities::SessionReader::CreateInstance(argc, argv);
LibUtilities::CommSharedPtr vComm = vSession->GetComm();
string meshfile(vSession->GetFilename());
MultiRegions::ContField3DHomogeneous2DSharedPtr Exp, Fce;
int nq;
......
......@@ -26,7 +26,6 @@ int main(int argc, char *argv[])
= LibUtilities::SessionReader::CreateInstance(argc, argv);
LibUtilities::CommSharedPtr vComm = vSession->GetComm();
string meshfile(vSession->GetFilename());
MultiRegions::ContField2DSharedPtr Exp,Fce;
int i, nq, coordim;
......
......@@ -186,7 +186,8 @@ namespace Nektar
LIB_UTILITIES_EXPORT bool DefinesElement(
const std::string& pPath) const;
/// Returns the filename of the loaded XML document.
LIB_UTILITIES_EXPORT const std::string &GetFilename() const;
LIB_UTILITIES_EXPORT const std::vector<std::string>
&GetFilenames() const;
/// Returns the session name of the loaded XML document.
LIB_UTILITIES_EXPORT const std::string &GetSessionName() const;
/// Returns the session name with process rank
......@@ -424,9 +425,8 @@ namespace Nektar
/// Communication object.
CommSharedPtr m_comm;
/// Filenames
std::string m_filename;
std::vector<std::string> m_filenames;
/// Filename of the loaded XML document.
std::string m_filename;
/// Session name of the loaded XML document (filename minus ext).
std::string m_sessionName;
/// Pointer to the loaded XML document.
......@@ -509,8 +509,6 @@ namespace Nektar
/// Reads the GLOBALSYSSOLNINFO section of the XML document.
LIB_UTILITIES_EXPORT void ReadGlobalSysSolnInfo(
TiXmlElement *conditions);
/// Reads the GEOMETRICINFO section of the XML document.
LIB_UTILITIES_EXPORT void ReadGeometricInfo(TiXmlElement *geometry);
/// Reads the EXPRESSIONS section of the XML document.
LIB_UTILITIES_EXPORT void ReadExpressions(TiXmlElement *conditions);
/// Reads the VARIABLES section of the XML document.
......
......@@ -172,8 +172,8 @@ namespace Nektar
int cycle = 0;
const char* problem = ArpackProblemTypeTrans[m_session->GetSolverInfoAsEnum<int>("ArpackProblemType")].c_str();
std::string name = m_session->GetFilename().substr(0,m_session->GetFilename().find_last_of('.'))+".evl";
std::string name = m_session->GetSessionName() + ".evl";
ofstream pFile(name.c_str());
ido = 0; //At the first call must be initialisedat 0
......@@ -286,9 +286,9 @@ namespace Nektar
{
WriteEvs(out,i,dr[i],di[i]);
WriteEvs(pFile,i,dr[i],di[i]);
std::string file = m_session->GetFilename().substr(0,m_session->GetFilename().find_last_of('.')) + "_eig_" + boost::lexical_cast<std::string>(i);
std::string file = m_session->GetSessionName() + "_eig_"
+ boost::lexical_cast<std::string>(i);
WriteFld(file,z + i*nq);
}
......
......@@ -106,9 +106,6 @@ namespace Nektar
*/
void EquationSystem::v_InitObject()
{
// Filename of the session file
m_filename = m_session->GetFilename();
// Save the basename of input file name for output details
m_sessionName = m_session->GetSessionName();
......
......@@ -419,8 +419,6 @@ namespace Nektar
SpatialDomains::BoundaryConditionsSharedPtr m_boundaryConditions;
/// Pointer to graph defining mesh.
SpatialDomains::MeshGraphSharedPtr m_graph;
/// Filename.
std::string m_filename;
/// Name of the session.
std::string m_sessionName;
/// Current time of simulation.
......
......@@ -59,7 +59,6 @@ int main(int argc, char *argv[])
AllocateSharedPtr(session->GetComm());
// Get some information about the session
string fileName = session->GetFilename();
string sessionName = session->GetSessionName();
string outFile = sessionName + ".fld";
unsigned int nSteps = session->GetParameter("NumSteps");
......
......@@ -61,7 +61,6 @@ class Diffusion
LibUtilities::SessionReaderSharedPtr session;
LibUtilities::FieldIOSharedPtr fld;
string sessionName;
string fileName;
SpatialDomains::MeshGraphSharedPtr graph;
MultiRegions::ContField2DSharedPtr field;
......@@ -91,7 +90,6 @@ Diffusion::Diffusion(int argc, char* argv[])
AllocateSharedPtr(session->GetComm());
// Get some information from the session
fileName = session->GetFilename();
sessionName = session->GetSessionName();
scheme = session->GetSolverInfo("TimeIntegrationMethod");
nSteps = session->GetParameter("NumSteps");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment