Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cfd dem restart files #1338

Merged
merged 5 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to the Lethe project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/).

## [Master] - 2024-11-02

### Fix

- MINOR The checkpoint files generated from the lethe-particles solver were now incompatible with the CFD-DEM solvers (lethe-fluid-particles and lethe-fluid-vans) since the prefix are now ending with a "_0" or "_1". The "read_dem" function now reads the ".checkpoint_controller" file at first.

## [Master] - 2024-10-31

### Changed
Expand Down
119 changes: 63 additions & 56 deletions applications_tests/lethe-fluid-particles/CMakeLists.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
135 changes: 72 additions & 63 deletions applications_tests/lethe-fluid-vans/CMakeLists.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
14 changes: 14 additions & 0 deletions source/fem-dem/cfd_dem_coupling.cc
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,20 @@ CFDDEMSolver<dim>::read_dem()
std::string prefix =
this->cfd_dem_simulation_parameters.void_fraction->dem_file_name;

// Load checkpoint controller
std::string checkpoint_controller_object_filename =
prefix + ".checkpoint_controller";
std::ifstream iss_checkpoint_controller_obj(
checkpoint_controller_object_filename);
boost::archive::text_iarchive ia_checkpoint_controller_obj(
iss_checkpoint_controller_obj, boost::archive::no_header);

unsigned int checkpoint_id;
ia_checkpoint_controller_obj >> checkpoint_id;

// New prefix for the remaining files
prefix = prefix + "_" + Utilities::int_to_string(checkpoint_id);

// Gather particle serialization information
std::string particle_filename = prefix + ".particles";
std::ifstream input(particle_filename.c_str());
Expand Down
14 changes: 14 additions & 0 deletions source/fem-dem/fluid_dynamics_vans.cc
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,20 @@ FluidDynamicsVANS<dim>::read_dem()
std::string prefix =
this->cfd_dem_simulation_parameters.void_fraction->dem_file_name;

// Load checkpoint controller
std::string checkpoint_controller_object_filename =
prefix + ".checkpoint_controller";
std::ifstream iss_checkpoint_controller_obj(
checkpoint_controller_object_filename);
boost::archive::text_iarchive ia_checkpoint_controller_obj(
iss_checkpoint_controller_obj, boost::archive::no_header);

unsigned int checkpoint_id;
ia_checkpoint_controller_obj >> checkpoint_id;

// New prefix for the remaining files
prefix = prefix + "_" + Utilities::int_to_string(checkpoint_id);

// Gather particle serialization information
std::string particle_filename = prefix + ".particles";
std::ifstream input(particle_filename.c_str());
Expand Down
Loading