24#ifdef ESPRESSO_WALBERLA
45#include <unordered_map>
56 if constexpr (std::is_same_v<T, FluxBoundaryType>
or
57 std::is_same_v<T, DensityBoundaryType>) {
58 std::vector<Variant>
vec;
68 }
else if constexpr (std::is_same_v<T, int>
or std::is_same_v<T, double>) {
78 if constexpr (std::is_same_v<T, FluxBoundaryType>) {
82 values.emplace_back(std::nullopt);
87 }
else if constexpr (std::is_same_v<T, DensityBoundaryType>) {
91 values.emplace_back(std::nullopt);
96 }
else if constexpr (std::is_same_v<T, double>) {
101 values.emplace_back(
static_cast<double>(
val));
115 std::shared_ptr<LatticeModel> m_ek_species;
116 std::shared_ptr<EKSpecies> m_ek_sip;
117 std::optional<ResourceObserver> m_mpi_cart_comm_observer;
120 std::unordered_map<std::string, std::vector<int>> m_shape_val;
125 m_ek_species = m_ek_sip->get_ekinstance();
126 m_mpi_cart_comm_observer = m_ek_sip->get_mpi_cart_comm_observer();
128 m_conv_dens = m_ek_sip->get_conversion_factor_density();
129 m_conv_flux = m_ek_sip->get_conversion_factor_flux();
135 m_shape_val[
"density"] = {1};
136 m_shape_val[
"flux"] = {3};
137 m_shape_val[
"flux_at_boundary"] = {1};
138 m_shape_val[
"density_at_boundary"] = {1};
139 m_shape_val[
"is_boundary"] = {1};
146 return m_ek_species->get_lattice();
Vector implementation and trait types for boost qvm interoperability.
Interface of a lattice-based electrokinetic model.
Class that runs and controls the BlockForest in waLBerla.
Type to indicate no value in Variant.
std::string_view name() const
Variant do_call_method(std::string const &name, VariantMap const ¶ms) override
::LatticeWalberla const & get_lattice() const 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
std::optional< Utils::Vector3d > FluxBoundaryType
std::optional< double > DensityBoundaryType
constexpr bool is_none(Variant const &v)
constexpr 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)
Recursive variant implementation.
static Variant serialize(std::vector< T > const &values)
static std::vector< T > deserialize(Variant const &variant)