Skip to content
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
3 changes: 3 additions & 0 deletions .github/workflows/push_pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
build_procs: 3
check_procs: 3
with_ccache: 'true'
with_walberla: 'true'
with_walberla_fft: 'false'
with_walberla_avx: 'false'

debian:
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion maintainer/CI/build_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ set_default_value with_fftw true
set_default_value with_gsl true
set_default_value with_scafacos false
set_default_value with_walberla false
set_default_value with_walberla_fft true
set_default_value with_walberla_avx false
set_default_value with_stokesian_dynamics false
set_default_value test_timeout 500
Expand Down Expand Up @@ -168,7 +169,9 @@ cmake_params="${cmake_params} -D ESPRESSO_BUILD_WITH_STOKESIAN_DYNAMICS=${with_s
cmake_params="${cmake_params} -D ESPRESSO_BUILD_WITH_WALBERLA=${with_walberla}"

if [ "${with_walberla}" = true ]; then
cmake_params="${cmake_params} -D ESPRESSO_BUILD_WITH_WALBERLA_FFT=ON"
if [ "${with_walberla_fft}" = true ]; then
cmake_params="${cmake_params} -D ESPRESSO_BUILD_WITH_WALBERLA_FFT=ON"
fi
if [ "${with_walberla_avx}" = true ]; then
cmake_params="${cmake_params} -D ESPRESSO_BUILD_WITH_WALBERLA_AVX=ON"
fi
Expand Down
5 changes: 3 additions & 2 deletions src/core/observables/RDF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <boost/mpi/communicator.hpp>
#include <boost/range/combine.hpp>

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <numbers>
Expand Down Expand Up @@ -71,8 +72,8 @@ RDF::evaluate(boost::mpi::communicator const &comm,
auto const &pos2) {
auto const dist = box_geo.get_mi_vector(pos1, pos2).norm();
if (dist > min_r && dist < max_r) {
auto const ind =
static_cast<int>(std::floor((dist - min_r) * inv_bin_width));
auto ind = static_cast<long>(std::floor((dist - min_r) * inv_bin_width));
ind = std::clamp(ind, 0l, static_cast<long>(n_r_bins) - 1l);
res[ind]++;
}
cnt++;
Expand Down
128 changes: 64 additions & 64 deletions src/python/espressomd/observables.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ class CylindricalProfileObservable(ProfileObservable):
Base class for observables that work with cylinder coordinates
"""

def __init__(
self, transform_params=CylindricalTransformationParameters(), **kwargs):
def __init__(self, transform_params=CylindricalTransformationParameters(),
**kwargs):
# Provide default transformation parameters if not user-provided
kwargs['transform_params'] = transform_params
super().__init__(**kwargs)
Expand Down Expand Up @@ -152,17 +152,17 @@ class DensityProfile(ProfileObservable):
n_z_bins : :obj:`int`
Number of bins in ``z`` direction.
min_x : :obj:`float`
Minimum ``x`` to consider.
Minimum ``x`` to consider (inclusive).
min_y : :obj:`float`
Minimum ``y`` to consider.
Minimum ``y`` to consider (inclusive).
min_z : :obj:`float`
Minimum ``z`` to consider.
Minimum ``z`` to consider (inclusive).
max_x : :obj:`float`
Maximum ``x`` to consider.
Maximum ``x`` to consider (exclusive).
max_y : :obj:`float`
Maximum ``y`` to consider.
Maximum ``y`` to consider (exclusive).
max_z : :obj:`float`
Maximum ``z`` to consider.
Maximum ``z`` to consider (exclusive).

Methods
-------
Expand Down Expand Up @@ -218,17 +218,17 @@ class FluxDensityProfile(ProfileObservable):
n_z_bins : :obj:`int`
Number of bins in ``z`` direction.
min_x : :obj:`float`
Minimum ``x`` to consider.
Minimum ``x`` to consider (inclusive).
min_y : :obj:`float`
Minimum ``y`` to consider.
Minimum ``y`` to consider (inclusive).
min_z : :obj:`float`
Minimum ``z`` to consider.
Minimum ``z`` to consider (inclusive).
max_x : :obj:`float`
Maximum ``x`` to consider.
Maximum ``x`` to consider (exclusive).
max_y : :obj:`float`
Maximum ``y`` to consider.
Maximum ``y`` to consider (exclusive).
max_z : :obj:`float`
Maximum ``z`` to consider.
Maximum ``z`` to consider (exclusive).

Methods
-------
Expand Down Expand Up @@ -261,17 +261,17 @@ class ForceDensityProfile(ProfileObservable):
n_z_bins : :obj:`int`
Number of bins in ``z`` direction.
min_x : :obj:`float`
Minimum ``x`` to consider.
Minimum ``x`` to consider (inclusive).
min_y : :obj:`float`
Minimum ``y`` to consider.
Minimum ``y`` to consider (inclusive).
min_z : :obj:`float`
Minimum ``z`` to consider.
Minimum ``z`` to consider (inclusive).
max_x : :obj:`float`
Maximum ``x`` to consider.
Maximum ``x`` to consider (exclusive).
max_y : :obj:`float`
Maximum ``y`` to consider.
Maximum ``y`` to consider (exclusive).
max_z : :obj:`float`
Maximum ``z`` to consider.
Maximum ``z`` to consider (exclusive).

Methods
-------
Expand Down Expand Up @@ -306,17 +306,17 @@ class LBVelocityProfile(ProfileObservable):
n_z_bins : :obj:`int`
Number of bins in ``z`` direction.
min_x : :obj:`float`
Minimum ``x`` to consider.
Minimum ``x`` to consider (inclusive).
min_y : :obj:`float`
Minimum ``y`` to consider.
Minimum ``y`` to consider (inclusive).
min_z : :obj:`float`
Minimum ``z`` to consider.
Minimum ``z`` to consider (inclusive).
max_x : :obj:`float`
Maximum ``x`` to consider.
Maximum ``x`` to consider (exclusive).
max_y : :obj:`float`
Maximum ``y`` to consider.
Maximum ``y`` to consider (exclusive).
max_z : :obj:`float`
Maximum ``z`` to consider.
Maximum ``z`` to consider (exclusive).
sampling_delta_x : :obj:`float`, default=1.0
Spacing for the sampling grid in ``x``-direction.
sampling_delta_y : :obj:`float`, default=1.0
Expand Down Expand Up @@ -866,17 +866,17 @@ class CylindricalDensityProfile(CylindricalProfileObservable):
n_z_bins : :obj:`int`, default = 1
Number of bins in ``z`` direction.
min_r : :obj:`float`, default = 0
Minimum ``r`` to consider.
Minimum ``r`` to consider (inclusive).
min_phi : :obj:`float`, default = :math:`-\\pi`
Minimum ``phi`` to consider. Must be in :math:`[-\\pi,\\pi)`.
Minimum ``phi`` to consider (inclusive). Must be in :math:`[-\\pi,\\pi)`.
min_z : :obj:`float`
Minimum ``z`` to consider.
Minimum ``z`` to consider (inclusive).
max_r : :obj:`float`
Maximum ``r`` to consider.
Maximum ``r`` to consider (exclusive).
max_phi : :obj:`float`, default = :math:`\\pi`
Maximum ``phi`` to consider. Must be in :math:`(-\\pi,\\pi]`.
Maximum ``phi`` to consider (exclusive). Must be in :math:`(-\\pi,\\pi]`.
max_z : :obj:`float`
Maximum ``z`` to consider.
Maximum ``z`` to consider (exclusive).

Methods
-------
Expand Down Expand Up @@ -909,17 +909,17 @@ class CylindricalFluxDensityProfile(CylindricalProfileObservable):
n_z_bins : :obj:`int`, default = 1
Number of bins in ``z`` direction.
min_r : :obj:`float`, default = 0
Minimum ``r`` to consider.
Minimum ``r`` to consider (inclusive).
min_phi : :obj:`float`, default = :math:`-\\pi`
Minimum ``phi`` to consider. Must be in :math:`[-\\pi,\\pi)`.
Minimum ``phi`` to consider (inclusive). Must be in :math:`[-\\pi,\\pi)`.
min_z : :obj:`float`
Minimum ``z`` to consider.
Minimum ``z`` to consider (inclusive).
max_r : :obj:`float`
Maximum ``r`` to consider.
Maximum ``r`` to consider (exclusive).
max_phi : :obj:`float`, default = :math:`\\pi`
Maximum ``phi`` to consider. Must be in :math:`(-\\pi,\\pi]`.
Maximum ``phi`` to consider (exclusive). Must be in :math:`(-\\pi,\\pi]`.
max_z : :obj:`float`
Maximum ``z`` to consider.
Maximum ``z`` to consider (exclusive).

Methods
-------
Expand Down Expand Up @@ -957,17 +957,17 @@ class CylindricalLBFluxDensityProfileAtParticlePositions(
n_z_bins : :obj:`int`, default = 1
Number of bins in ``z`` direction.
min_r : :obj:`float`, default = 0
Minimum ``r`` to consider.
Minimum ``r`` to consider (inclusive).
min_phi : :obj:`float`, default = :math:`-\\pi`
Minimum ``phi`` to consider. Must be in :math:`[-\\pi,\\pi)`.
Minimum ``phi`` to consider (inclusive). Must be in :math:`[-\\pi,\\pi)`.
min_z : :obj:`float`
Minimum ``z`` to consider.
Minimum ``z`` to consider (inclusive).
max_r : :obj:`float`
Maximum ``r`` to consider.
Maximum ``r`` to consider (exclusive).
max_phi : :obj:`float`, default = :math:`\\pi`
Maximum ``phi`` to consider. Must be in :math:`(-\\pi,\\pi]`.
Maximum ``phi`` to consider (exclusive). Must be in :math:`(-\\pi,\\pi]`.
max_z : :obj:`float`
Maximum ``z`` to consider.
Maximum ``z`` to consider (exclusive).

Methods
-------
Expand Down Expand Up @@ -1005,17 +1005,17 @@ class CylindricalLBVelocityProfileAtParticlePositions(
n_z_bins : :obj:`int`, default = 1
Number of bins in ``z`` direction.
min_r : :obj:`float`, default = 0
Minimum ``r`` to consider.
Minimum ``r`` to consider (inclusive).
min_phi : :obj:`float`, default = :math:`-\\pi`
Minimum ``phi`` to consider. Must be in :math:`[-\\pi,\\pi)`.
Minimum ``phi`` to consider (inclusive). Must be in :math:`[-\\pi,\\pi)`.
min_z : :obj:`float`
Minimum ``z`` to consider.
Minimum ``z`` to consider (inclusive).
max_r : :obj:`float`
Maximum ``r`` to consider.
Maximum ``r`` to consider (exclusive).
max_phi : :obj:`float`, default = :math:`\\pi`
Maximum ``phi`` to consider. Must be in :math:`(-\\pi,\\pi]`.
Maximum ``phi`` to consider (exclusive). Must be in :math:`(-\\pi,\\pi]`.
max_z : :obj:`float`
Maximum ``z`` to consider.
Maximum ``z`` to consider (exclusive).

Methods
-------
Expand Down Expand Up @@ -1051,17 +1051,17 @@ class CylindricalVelocityProfile(CylindricalProfileObservable):
n_z_bins : :obj:`int`, default = 1
Number of bins in ``z`` direction.
min_r : :obj:`float`, default = 0
Minimum ``r`` to consider.
Minimum ``r`` to consider (inclusive).
min_phi : :obj:`float`, default = :math:`-\\pi`
Minimum ``phi`` to consider. Must be in :math:`[-\\pi,\\pi)`.
Minimum ``phi`` to consider (inclusive). Must be in :math:`[-\\pi,\\pi)`.
min_z : :obj:`float`
Minimum ``z`` to consider.
Minimum ``z`` to consider (inclusive).
max_r : :obj:`float`
Maximum ``r`` to consider.
Maximum ``r`` to consider (exclusive).
max_phi : :obj:`float`, default = :math:`\\pi`
Maximum ``phi`` to consider. Must be in :math:`(-\\pi,\\pi]`.
Maximum ``phi`` to consider (exclusive). Must be in :math:`(-\\pi,\\pi]`.
max_z : :obj:`float`
Maximum ``z`` to consider.
Maximum ``z`` to consider (exclusive).

Methods
-------
Expand Down Expand Up @@ -1099,17 +1099,17 @@ class CylindricalLBVelocityProfile(CylindricalProfileObservable):
n_z_bins : :obj:`int`, default = 1
Number of bins in ``z`` direction.
min_r : :obj:`float`, default = 0
Minimum ``r`` to consider.
Minimum ``r`` to consider (inclusive).
min_phi : :obj:`float`, default = :math:`-\\pi`
Minimum ``phi`` to consider. Must be in :math:`[-\\pi,\\pi)`.
Minimum ``phi`` to consider (inclusive). Must be in :math:`[-\\pi,\\pi)`.
min_z : :obj:`float`
Minimum ``z`` to consider.
Minimum ``z`` to consider (inclusive).
max_r : :obj:`float`
Maximum ``r`` to consider.
Maximum ``r`` to consider (exclusive).
max_phi : :obj:`float`, default = :math:`\\pi`
Maximum ``phi`` to consider. Must be in :math:`(-\\pi,\\pi]`.
Maximum ``phi`` to consider (exclusive). Must be in :math:`(-\\pi,\\pi]`.
max_z : :obj:`float`
Maximum ``z`` to consider.
Maximum ``z`` to consider (exclusive).
sampling_density : :obj:`float`
Samples per unit volume for the LB velocity interpolation.

Expand Down Expand Up @@ -1145,9 +1145,9 @@ class RDF(Observable):
n_r_bins : :obj:`int`
Number of bins in radial direction.
min_r : :obj:`float`
Minimum ``r`` to consider.
Minimum ``r`` to consider (exclusive).
max_r : :obj:`float`
Maximum ``r`` to consider.
Maximum ``r`` to consider (exclusive).

Methods
-------
Expand Down
Loading