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 stokes sphere test case update #2366

Merged
merged 10 commits into from
Nov 6, 2018
9 changes: 6 additions & 3 deletions src/core/grid_based_algorithms/lbboundaries.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,14 @@ int lbboundary_get_force(void *lbb, double *f) {
mpi_gather_stats(8, forces.data(), nullptr, nullptr, nullptr);

f[0] = forces[3 * no + 0] * lbpar.agrid /
lbpar.tau; // lbpar.tau; TODO this makes the units wrong and
(lbpar.tau * lbpar.tau *
lbpar.rho); // lbpar.tau; TODO this makes the units wrong and
f[1] = forces[3 * no + 1] * lbpar.agrid /
lbpar.tau; // lbpar.tau; the result correct. But it's 3.13AM
(lbpar.tau * lbpar.tau *
lbpar.rho); // lbpar.tau; the result correct. But it's 3.13AM
f[2] = forces[3 * no + 2] * lbpar.agrid /
lbpar.tau; // lbpar.tau; on a Saturday at the ICP. Someone fix.
(lbpar.tau * lbpar.tau *
lbpar.rho); // lbpar.tau; on a Saturday at the ICP. Someone fix.
#else
return ES_ERROR;
#endif
Expand Down
7 changes: 6 additions & 1 deletion src/script_interface/lbboundaries/LBBoundary.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#include "ScriptInterface.hpp"
#include "auto_parameters/AutoParameters.hpp"
#include "core/communication.hpp"
#include "core/grid_based_algorithms/lbboundaries/LBBoundary.hpp"
#include "shapes/Shape.hpp"

Expand Down Expand Up @@ -65,7 +66,11 @@ class LBBoundary : public AutoParameters<LBBoundary> {

Variant call_method(const std::string &name, const VariantMap &) override {
if (name == "get_force") {
return m_lbboundary->get_force();
// The get force method uses mpi callbacks on lb cpu
if (this_node == 0)
return m_lbboundary->get_force();
else
return none;
}
return none;
}
Expand Down
2 changes: 1 addition & 1 deletion testsuite/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ python_test(FILE reaction_ensemble.py MAX_NUM_PROC 4)
python_test(FILE constant_pH.py MAX_NUM_PROC 4)
python_test(FILE swimmer_reaction.py MAX_NUM_PROC 1)
python_test(FILE writevtf.py MAX_NUM_PROC 4)
python_test(FILE lb_stokes_sphere_gpu.py MAX_NUM_PROC 1)
python_test(FILE lb_stokes_sphere.py MAX_NUM_PROC 1)
python_test(FILE ek_eof_one_species_x.py MAX_NUM_PROC 1)
python_test(FILE ek_eof_one_species_y.py MAX_NUM_PROC 1)
python_test(FILE ek_eof_one_species_z.py MAX_NUM_PROC 1)
Expand Down