Skip to content

Commit

Permalink
Formatting codes
Browse files Browse the repository at this point in the history
  • Loading branch information
hidekb committed Jan 17, 2025
1 parent a91eaf5 commit a509615
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/script_interface/walberla/LBFluid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ void LBFluidGPU::make_instance(VariantMap const &params) {
auto const visc = get_value<double>(params, "kinematic_viscosity");
auto const dens = get_value<double>(params, "density");
auto const precision = get_value<bool>(params, "single_precision");
auto const blocks_per_mpi_rank = get_value<Utils::Vector3i>(m_lattice->get_parameter("blocks_per_mpi_rank"));
auto const blocks_per_mpi_rank = get_value<Utils::Vector3i>(
m_lattice->get_parameter("blocks_per_mpi_rank"));
if (blocks_per_mpi_rank != Utils::Vector3i{{1, 1, 1}}) {
throw std::runtime_error(
"Using more than one block per MPI rank is not supported for GPU LB");
Expand Down
5 changes: 3 additions & 2 deletions src/script_interface/walberla/LatticeWalberla.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ class LatticeWalberla : public AutoParameters<LatticeWalberla> {
auto const &box_geo = *::System::get_system().box_geo;
m_agrid = get_value<double>(args, "agrid");
m_box_l = get_value_or<Utils::Vector3d>(args, "_box_l", box_geo.length());
m_blocks_per_mpi_rank = get_value<Utils::Vector3i>(args, "blocks_per_mpi_rank");
m_blocks_per_mpi_rank =
get_value<Utils::Vector3i>(args, "blocks_per_mpi_rank");
auto const n_ghost_layers = get_value<int>(args, "n_ghost_layers");
auto const block_grid = Utils::hadamard_product(::communicator.node_grid,
m_blocks_per_mpi_rank);
m_blocks_per_mpi_rank);
context()->parallel_try_catch([&]() {
if (m_agrid <= 0.) {
throw std::domain_error("Parameter 'agrid' must be > 0");
Expand Down

0 comments on commit a509615

Please sign in to comment.