Skip to content

Commit 57c4a69

Browse files
authored
Merge pull request #400 from JamesMcClung/pr/adios2-particles
Support writing particles with ADIOS2
2 parents 07ea71a + 1dff293 commit 57c4a69

15 files changed

Lines changed: 411 additions & 46 deletions

‎src/include/fields3d.inl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include "io_common.h"
55
#include "kg/io.h"
6+
#include "fields3d.hxx"
67

78
// ======================================================================
89
// Variable<Mfields>

‎src/include/output_fields.hxx‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,8 @@ public:
184184
prof_stop(pr_eval);
185185

186186
if (do_pfield) {
187-
if (!opened_io_pfd_) {
187+
if (!io_pfd_) {
188188
io_pfd_.open("pfd" + GetItem::suffix(), pfield.data_dir);
189-
opened_io_pfd_ = true;
190189
}
191190

192191
prof_start(pr_pfd);
@@ -209,9 +208,8 @@ public:
209208
}
210209

211210
if (do_tfield) {
212-
if (!opened_io_tfd_) {
211+
if (!io_tfd_) {
213212
io_tfd_.open("tfd" + GetItem::suffix(), tfield.data_dir);
214-
opened_io_tfd_ = true;
215213
}
216214

217215
prof_start(pr_tfd);
@@ -236,8 +234,6 @@ public:
236234
private:
237235
Writer io_pfd_;
238236
Writer io_tfd_;
239-
bool opened_io_pfd_ = false;
240-
bool opened_io_tfd_ = false;
241237
std::unique_ptr<Mfields> tfd_;
242238
int naccum_ = 0;
243239
};

‎src/include/output_particles.hxx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55

66
struct OutputParticlesParams
77
{
8-
const char* data_dir;
9-
const char* basename;
8+
const char* data_dir = ".";
9+
const char* basename = "prt";
1010
int every_step;
1111
Int3 lo;
1212
Int3 hi;
1313
bool use_independent_io;
14-
const char* romio_cb_write;
15-
const char* romio_ds_write;
14+
const char* romio_cb_write = nullptr;
15+
const char* romio_ds_write = nullptr;
1616
};
1717

1818
// ======================================================================

0 commit comments

Comments
 (0)