-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix VTK output to put plot files under output path #1343
Conversation
if( m_previousCycle == -1 ) | ||
{ | ||
makeDirsForPath( joinPath( m_outputDir, m_outputName ) ); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The VTK output folder is now created on first write as opposed to writer object creation time, because the name of the directory is set after reading the XML input.
@@ -25,12 +25,12 @@ namespace geosx | |||
{ | |||
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||
void getAbsolutePath( std::string const & path, std::string & absolutePath ) | |||
std::string getAbsolutePath( std::string const & path ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want to use geosx::string
and not std::string
(even though it's the same right now).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes... but there's a circular inclusion problem that I didn't want to touch in this PR. Namely, DataTypes.hpp
needs to include Path.hpp
in order to provide some related typedefs and lambda dispatch for Path
type. On the other hand, Path.hpp
would need to include DataTypes.hpp
in order to gain access to geosx::string
.
One solution is to split a small portion of DataTypes.hpp
into a separate header, BasicTypes.hpp
, that will provide aliases like localIndex
, globalIndex
, real64
, string
. It can then be independently included in Path.hpp
and DataTypes.hpp
. I didn't do it here as it would create merge conflicts for the BoomerAMG PR that is about to be merged, but we can address this subsequently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is intentional that we kept std::string
here. Path
is its own type derived exclusively from std::string
.
59d322c
to
aef2148
Compare
aef2148
to
fd98a25
Compare
@@ -25,12 +25,12 @@ namespace geosx | |||
{ | |||
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |||
void getAbsolutePath( std::string const & path, std::string & absolutePath ) | |||
std::string getAbsolutePath( std::string const & path ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is intentional that we kept std::string
here. Path
is its own type derived exclusively from std::string
.
*/ | ||
void getAbsolutePath( std::string const & path, std::string & absolutePath ); | ||
std::string getAbsolutePath( std::string const & path ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re: string
vs std::string
. Here we would be passing string
as the argument, so it should have a UDC to std::string
, or be an alias for std::string
.
VTKPVDWriter::VTKPVDWriter( string const & fileName ): | ||
m_fileName( fileName ) | ||
VTKPVDWriter::VTKPVDWriter( string fileName ): | ||
m_fileName( std::move( fileName ) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the move?
@@ -35,7 +35,7 @@ | |||
|
|||
namespace geosx | |||
{ | |||
using namespace dataRepository; | |||
//using namespace dataRepository; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//using namespace dataRepository; |
nice catch.
Resolves #1342
Collateral "damage" is mostly due to some code cleanup related to path handling.
Rebaseline PR: https://github.com/GEOSX/integratedTests/pull/121
(only for tests using VTK output)