Skip to content

Commit 0bd7607

Browse files
author
Martin D. Weinberg
committed
Added more explanation for setMPI()
1 parent 40ee042 commit 0bd7607

3 files changed

Lines changed: 15 additions & 10 deletions

File tree

exputil/ParticleReader.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace PR {
3535
{ {"Gas", 0}, {"Halo", 1}, {"Disk", 2}, {"Bulge", 3}, {"Stars", 4}, {"Bndry", 5}};
3636

3737

38-
GadgetNative::GadgetNative(const std::vector<std::string>& files, bool verbose)
38+
GadgetNative::GadgetNative(const std::vector<std::string>& files, bool verbose) : ParticleReader()
3939
{
4040
_files = files; // Copy file list (bunch)
4141
_verbose = verbose;
@@ -317,7 +317,7 @@ namespace PR {
317317
{ {"Gas", 0}, {"Halo", 1}, {"Disk", 2}, {"Bulge", 3}, {"Stars", 4}, {"Bndry", 5}};
318318

319319

320-
GadgetHDF5::GadgetHDF5(const std::vector<std::string>& files, bool verbose)
320+
GadgetHDF5::GadgetHDF5(const std::vector<std::string>& files, bool verbose) : ParticleReader()
321321
{
322322
_files = files;
323323
_verbose = verbose;
@@ -705,7 +705,7 @@ namespace PR {
705705
}
706706

707707

708-
PSPhdf5::PSPhdf5(const std::vector<std::string>& files, bool verbose)
708+
PSPhdf5::PSPhdf5(const std::vector<std::string>& files, bool verbose) : ParticleReader()
709709
{
710710
_files = files;
711711
_verbose = verbose;
@@ -2125,7 +2125,7 @@ namespace PR {
21252125
}
21262126

21272127
Tipsy::Tipsy(const std::string& file, TipsyType Type,
2128-
bool verbose)
2128+
bool verbose) : ParticleReader()
21292129
{
21302130
ttype = Type;
21312131
files.push_back(file);
@@ -2137,7 +2137,7 @@ namespace PR {
21372137
}
21382138

21392139
Tipsy::Tipsy(const std::vector<std::string>& filelist, TipsyType Type,
2140-
bool verbose)
2140+
bool verbose) : ParticleReader()
21412141
{
21422142
files = filelist;
21432143

include/ParticleReader.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ namespace PR
456456
public:
457457

458458
//! Default constructor
459-
PSP(bool verbose) : VERBOSE(verbose) { init(); }
459+
PSP(bool verbose) : VERBOSE(verbose), ParticleReader() { init(); }
460460

461461
//! Destructor
462462
virtual ~PSP() { if (in.is_open()) in.close(); }

pyEXP/UtilWrappers.cc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,19 @@ void UtilityClasses(py::module &m) {
224224
}
225225
},
226226
R"(
227-
Initialize EXP for MPI from Python.
227+
Initialize EXP's C++ MPI communicators and variables from pyEXP
228228
229-
Sets internal MPI-specific library values necessary to MPI from Python scripts.
230-
229+
Sets all of the internal MPI-specific library values necessary
230+
to use the full complement of the EXP C++ classes from Python
231+
scripts. For example, this is needed for ParticleReader, which
232+
does not provide its own MPI initialization. The BasisFactory,
233+
Basis, ParticleReader, and FieldGenerator classes can do this
234+
automatically.
235+
231236
Parameters
232237
----------
233238
verbose : bool
234-
If true, print the node and process assignments
239+
Print the node and process assignments. Default: false.
235240
236241
Returns
237242
-------

0 commit comments

Comments
 (0)