24#ifdef ESPRESSO_WALBERLA
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"] = {3};
134 m_shape_val[
"flux_at_boundary"] = {1};
135 m_shape_val[
"density_at_boundary"] = {1};
136 m_shape_val[
"is_boundary"] = {1};
143 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
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
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.
std::unordered_map< std::string, Variant > VariantMap
auto make_vector_of_variants(std::vector< T > const &v)
static SteepestDescentParameters params
Currently active steepest descent instance.
Recursive variant implementation.
static Variant serialize(std::vector< T > const &values)
static std::vector< T > deserialize(Variant const &variant)