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

LB function signature #3541

Merged
merged 3 commits into from
Mar 2, 2020
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
2 changes: 1 addition & 1 deletion doc/sphinx/lb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Checkpointing LB
lb.load_checkpoint(path, binary)

The first command saves all of the LB fluid nodes' populations to an ascii
(``binary=0``) or binary (``binary=1``) format respectively. The load command
(``binary=False``) or binary (``binary=True``) format respectively. The load command
loads the populations from a checkpoint file written with
``lb.save_checkpoint``. In both cases ``path`` specifies the location of the
checkpoint file. This is useful for restarting a simulation either on the same
Expand Down
4 changes: 2 additions & 2 deletions src/core/grid_based_algorithms/lb_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ void lb_lbfluid_print_velocity(const std::string &filename) {
fclose(fp);
}

void lb_lbfluid_save_checkpoint(const std::string &filename, int binary) {
void lb_lbfluid_save_checkpoint(const std::string &filename, bool binary) {
if (lattice_switch == ActiveLB::GPU) {
#ifdef CUDA
std::vector<float> host_checkpoint_vd(19 * lbpar_gpu.number_of_nodes);
Expand Down Expand Up @@ -788,7 +788,7 @@ void lb_lbfluid_save_checkpoint(const std::string &filename, int binary) {
}
}

void lb_lbfluid_load_checkpoint(const std::string &filename, int binary) {
void lb_lbfluid_load_checkpoint(const std::string &filename, bool binary) {
int res;
std::string err_msg = "Error while reading LB checkpoint: ";
if (lattice_switch == ActiveLB::GPU) {
Expand Down
4 changes: 2 additions & 2 deletions src/core/grid_based_algorithms/lb_interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ void lb_lbfluid_print_vtk_velocity(const std::string &filename,
void lb_lbfluid_print_boundary(const std::string &filename);
void lb_lbfluid_print_velocity(const std::string &filename);

void lb_lbfluid_save_checkpoint(const std::string &filename, int binary);
void lb_lbfluid_load_checkpoint(const std::string &filename, int binary);
void lb_lbfluid_save_checkpoint(const std::string &filename, bool binary);
void lb_lbfluid_load_checkpoint(const std::string &filename, bool binary);

/**
* @brief Checks whether the given node index is within the LB lattice.
Expand Down
4 changes: 2 additions & 2 deletions src/python/espressomd/lb.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ cdef extern from "grid_based_algorithms/lb_interface.hpp":
void lb_lbfluid_print_vtk_boundary(string filename) except +
void lb_lbfluid_print_velocity(string filename) except +
void lb_lbfluid_print_boundary(string filename) except +
void lb_lbfluid_save_checkpoint(string filename, int binary) except +
void lb_lbfluid_load_checkpoint(string filename, int binary) except +
void lb_lbfluid_save_checkpoint(string filename, bool binary) except +
void lb_lbfluid_load_checkpoint(string filename, bool binary) except +
void lb_lbfluid_set_lattice_switch(ActiveLB local_lattice_switch) except +
Vector6d lb_lbfluid_get_stress() except +
bool lb_lbnode_is_index_valid(const Vector3i & ind) except +
Expand Down