54 auto get_slices_bounding_boxes()
const {
58 assert(slice_upper_corner <= lattice.get_grid_dimensions());
60 auto const sentinel = get_sentinel_index(lattice);
61 auto [local_lower_corner, local_upper_corner] =
62 lattice.get_local_grid_range();
63 for (
auto const i : {0, 1, 2}) {
64 if (local_lower_corner[i] >= slice_upper_corner[i] or
65 slice_lower_corner[i] >= local_upper_corner[i]) {
66 local_lower_corner[i] = sentinel;
67 local_upper_corner[i] = sentinel;
69 if (slice_lower_corner[i] > local_lower_corner[i]) {
70 local_lower_corner[i] = slice_lower_corner[i];
72 if (slice_upper_corner[i] < local_upper_corner[i]) {
73 local_upper_corner[i] = slice_upper_corner[i];
77 return std::make_tuple(slice_lower_corner, slice_upper_corner,
78 local_lower_corner, local_upper_corner);
82 template <
class LatticeModel,
typename T>
87 double units_conversion = 1.) const;
89 template <
class LatticeModel,
typename T>
95 double units_conversion = 1.);
Vector implementation and trait types for boost qvm interoperability.
Abstract representation of a lattice-based model.
Class that runs and controls the BlockForest in waLBerla.
auto get_ghost_layers() const
Interface to carry out simple operations on lattice indices.
Variant gather_3d(VariantMap const ¶ms, std::vector< int > const &data_dims, LatticeModel const &lattice_model, std::vector< T >(LatticeModel::*getter)(Utils::Vector3i const &, Utils::Vector3i const &) const, double units_conversion=1.) const
Utils::Vector3i m_slice_upper_corner
Utils::Vector3i m_slice_lower_corner
void scatter_3d(VariantMap const ¶ms, std::vector< int > const &data_dims, LatticeModel &lattice_model, void(LatticeModel::*setter)(Utils::Vector3i const &, Utils::Vector3i const &, std::vector< T > const &), double units_conversion=1.)
virtual ::LatticeWalberla const & get_lattice() const =0
std::vector< int > m_shape
static DEVICE_QUALIFIER constexpr Vector< T, N > broadcast(typename Base::value_type const &value)
Create a vector that has all entries set to the same value.
This file contains the defaults for ESPResSo.
std::unordered_map< std::string, Variant > VariantMap
boost::make_recursive_variant< None, bool, int, std::size_t, double, std::string, ObjectRef, Utils::Vector3b, Utils::Vector3i, Utils::Vector2d, Utils::Vector3d, Utils::Vector4d, std::vector< int >, std::vector< double >, std::vector< boost::recursive_variant_ >, std::unordered_map< int, boost::recursive_variant_ >, std::unordered_map< std::string, boost::recursive_variant_ > >::type Variant
Possible types for parameters.
std::vector< T, allocator< T > > vector
static SteepestDescentParameters params
Currently active steepest descent instance.