| 1 |
/* |
| 2 |
* SPDX-FileCopyrightText: 2026 Oak Ridge National Laboratory and Contributors |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: Apache-2.0 |
| 5 |
*/ |
| 6 |
|
| 7 |
#ifndef InlineIO_H_ |
| 8 |
#define InlineIO_H_ |
| 9 |
|
| 10 |
#include "../write/HeatTransfer.h" |
| 11 |
#include "../write/Settings.h" |
| 12 |
|
| 13 |
#include <mpi.h> |
| 14 |
|
| 15 |
#include "adios2.h" |
| 16 |
|
| 17 |
class InlineIO |
| 18 |
{ |
| 19 |
public: |
| 20 |
InlineIO(const Settings &s, MPI_Comm comm); |
| 21 |
~InlineIO(); |
| 22 |
void write(const HeatTransfer &ht); |
| 23 |
const double *read(bool firstStep); |
| 24 |
|
| 25 |
private: |
| 26 |
adios2::ADIOS ad; |
| 27 |
adios2::IO inlineIO; |
| 28 |
adios2::Engine inlineWriter; |
| 29 |
adios2::Engine inlineReader; |
| 30 |
|
| 31 |
adios2::Variable<double> varT; |
| 32 |
|
| 33 |
// need this so data on the write side doesn't go out |
| 34 |
// of scope before the reader can use it |
| 35 |
std::vector<double> v; |
| 36 |
}; |
| 37 |
|
| 38 |
#endif /* InlineIO_H_ */ |