44#include <unordered_map>
53 if constexpr (std::is_same_v<T, VelocityBounceBackType>) {
54 std::vector<Variant>
vec;
64 }
else if constexpr (std::is_same_v<T, int>
or std::is_same_v<T, double>) {
74 if constexpr (std::is_same_v<T, VelocityBounceBackType>) {
78 values.emplace_back(std::nullopt);
83 }
else if constexpr (std::is_same_v<T, double>) {
88 values.emplace_back(
static_cast<double>(
val));
102 std::shared_ptr<LatticeModel> m_lb_fluid;
103 std::shared_ptr<LBFluid> m_lb_sip;
107 double m_conv_velocity;
108 std::unordered_map<std::string, std::vector<int>> m_shape_val;
113 m_lb_fluid = m_lb_sip->get_lb_fluid();
114 auto const lb_params = m_lb_sip->get_lb_params();
115 auto const tau = lb_params->get_tau();
116 auto const agrid = lb_params->get_agrid();
117 m_conv_dens = Utils::int_pow<3>(
agrid);
118 m_conv_press = Utils::int_pow<1>(
agrid) * Utils::int_pow<2>(tau);
119 m_conv_force = Utils::int_pow<2>(tau) / Utils::int_pow<1>(
agrid);
120 m_conv_velocity = Utils::int_pow<1>(tau) / Utils::int_pow<1>(
agrid);
126 m_shape_val[
"density"] = {1};
127 m_shape_val[
"population"] = {
static_cast<int>(m_lb_fluid->stencil_size())};
128 m_shape_val[
"velocity"] = {3};
129 m_shape_val[
"velocity_at_boundary"] = {1};
130 m_shape_val[
"is_boundary"] = {1};
131 m_shape_val[
"last_applied_force"] = {3};
132 m_shape_val[
"pressure_tensor"] = {3, 3};
133 m_shape_val[
"pressure_tensor_neq"] = {3, 3};
140 return m_lb_fluid->get_lattice();
LBWalberlaBase provides the public interface of the LB waLBerla bridge.
Vector implementation and trait types for boost qvm interoperability.
Interface of a lattice-based fluid model.
Class that runs and controls the BlockForest in waLBerla.
Type to indicate no value in Variant.
boost::string_ref name() const
::LatticeWalberla const & get_lattice() const override
Variant do_call_method(std::string const &name, VariantMap const ¶ms) override
void do_construct(VariantMap const ¶ms) override
Utils::Vector3i m_slice_upper_corner
Utils::Vector3i m_slice_lower_corner
std::vector< int > m_shape
This file contains the defaults for ESPResSo.
std::optional< Utils::Vector3d > VelocityBounceBackType
bool is_type(Variant const &v)
Check is a Variant holds a specific type.
T get_value(Variant const &v)
Extract value of specific type T from a Variant.
std::unordered_map< std::string, Variant > VariantMap
auto make_vector_of_variants(std::vector< T > const &v)
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.
bool is_none(Variant const &v)
static SteepestDescentParameters params
Currently active steepest descent instance.
static Variant serialize(std::vector< T > const &values)
static std::vector< T > deserialize(Variant const &variant)