Skip to content

Commit

Permalink
centralize initialization of thread params from config
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Jul 3, 2019
1 parent c5764b4 commit a837a14
Show file tree
Hide file tree
Showing 2 changed files with 315 additions and 295 deletions.
31 changes: 24 additions & 7 deletions include/picongpu/plugins/openPMD/openPMDWriter.def
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ namespace openPMD
ADIOS,
HDF5
};


/**
* Writes simulation data to openPMD series.
* Implements the ILightweightPlugin interface.
*/

class openPMDWriter;
class Help;
// passes through to openPMDWriter constructor
// used to avoid forward declaring the constructor
template< typename ... Args >
openPMDWriter makeOpenPMDWriter( Args && ... );

struct ThreadParams
{
Expand All @@ -74,6 +87,10 @@ namespace openPMD
std::string
fileName; /* Name of the openPMDSeries, excluding the extension */
std::string fileExtension; /* Extension of the file name */
std::string fileInfix;

std::string jsonConfig;

WriteSpeciesStrategy strategy = WriteSpeciesStrategy::ADIOS;

pmacc::math::UInt64< simDim > fieldsSizeDims;
Expand All @@ -97,6 +114,13 @@ namespace openPMD

void
closeSeries();

void
initFromConfig(
Help &,
size_t id,
std::string const & file,
std::string const & dir );

inline bool
isADIOS1();
Expand All @@ -121,12 +145,5 @@ namespace openPMD
bool compression,
std::string const & compressionMethod );
};

/**
* Writes simulation data to openPMD series.
* Implements the ILightweightPlugin interface.
*/

class openPMDWriter;
} // namespace openPMD
} // namespace picongpu
Loading

0 comments on commit a837a14

Please sign in to comment.