44#include <unordered_map>
55 if constexpr (std::is_same_v<T, FluxBoundaryType>
or
56 std::is_same_v<T, DensityBoundaryType>) {
57 std::vector<Variant>
vec;
67 }
else if constexpr (std::is_same_v<T, int>
or std::is_same_v<T, double>) {
77 if constexpr (std::is_same_v<T, FluxBoundaryType>) {
81 values.emplace_back(std::nullopt);
86 }
else if constexpr (std::is_same_v<T, DensityBoundaryType>) {
90 values.emplace_back(std::nullopt);
95 }
else if constexpr (std::is_same_v<T, double>) {
100 values.emplace_back(
static_cast<double>(
val));
114 std::shared_ptr<LatticeModel> m_ek_species;
115 std::shared_ptr<EKSpecies> m_ek_sip;
118 std::unordered_map<std::string, std::vector<int>> m_shape_val;
123 m_ek_species = m_ek_sip->get_ekinstance();
125 m_conv_dens = m_ek_sip->get_conversion_factor_density();
126 m_conv_flux = m_ek_sip->get_conversion_factor_flux();
132 m_shape_val[
"density"] = {1};
133 m_shape_val[
"flux_at_boundary"] = {1};
134 m_shape_val[
"density_at_boundary"] = {1};
135 m_shape_val[
"is_boundary"] = {1};
142 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.
boost::string_ref 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
This file contains the defaults for ESPResSo.
std::optional< Utils::Vector3d > FluxBoundaryType
std::optional< double > DensityBoundaryType
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)