Skip to content

Commit

Permalink
Merge pull request #660 from Xiangyu-Hu/bug_fix/iteration_step_neglected
Browse files Browse the repository at this point in the history
done
  • Loading branch information
Xiangyu-Hu authored Sep 18, 2024
2 parents 5536ad7 + b5acb98 commit 84ecff1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
13 changes: 11 additions & 2 deletions src/shared/io_system/io_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ class BodyStatesRecording : public BaseIO
/** write with filename indicated by physical time */
void writeToFile();

template <class ExecutionPolicy>
void writeToFile(const ExecutionPolicy &ex_policy)
void writeToFile(const ParallelDevicePolicy &ex_policy)
{
for (size_t i = 0; i < bodies_.size(); ++i)
{
Expand All @@ -118,6 +117,16 @@ class BodyStatesRecording : public BaseIO
writeToFile();
};

void writeToFile(const ParallelPolicy &ex_policy)
{
writeToFile();
};

void writeToFile(const SequencedPolicy &ex_policy)
{
writeToFile();
};

virtual void writeToFile(size_t iteration_step) override;

template <typename DataType>
Expand Down
4 changes: 2 additions & 2 deletions tests/2d_examples/test_2d_airfoil/airfoil_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ int main(int ac, char *av[])
//----------------------------------------------------------------------
// First output before the simulation.
//----------------------------------------------------------------------
airfoil_recording_to_vtp.writeToFile(0);
cell_linked_list_recording.writeToFile(0);
airfoil_recording_to_vtp.writeToFile();
cell_linked_list_recording.writeToFile();
//----------------------------------------------------------------------
// Particle relaxation time stepping start here.
//----------------------------------------------------------------------
Expand Down

0 comments on commit 84ecff1

Please sign in to comment.