22#ifdef ESPRESSO_WALBERLA
38 if (
name ==
"get_slice_size") {
41 if (
name ==
"get_slice_ranges") {
44 if (
name ==
"get_ek_sip") {
47 if (
name ==
"get_value_shape") {
49 if (
not m_shape_val.contains(
name)) {
51 throw std::runtime_error(
"Unknown EK property '" +
name +
"'");
54 return m_shape_val.at(
name);
61 auto &
obj = *m_ek_species;
72 if (
name ==
"get_density") {
75 if (
name ==
"set_density") {
78 if (
name ==
"get_flux") {
81 if (
name ==
"get_is_boundary") {
84 if (
name ==
"get_flux_at_boundary") {
88 if (
name ==
"set_flux_at_boundary") {
91 if (
context()->get_comm().size() > 1) {
92 throw std::runtime_error(
"The number of ghostlayers should be > 1 "
93 "when using flux boundaries and mpi.");
96 "using flux boundaries and mpi.";
101 if (
name ==
"get_density_at_boundary") {
105 if (
name ==
"set_density_at_boundary") {
Interface of a lattice-based electrokinetic model.
virtual std::vector< std::optional< double > > get_slice_density_at_boundary(Utils::Vector3i const &lower_corner, Utils::Vector3i const &upper_corner) const =0
Get slice density boundary conditions.
virtual std::vector< bool > get_slice_is_boundary(Utils::Vector3i const &lower_corner, Utils::Vector3i const &upper_corner) const =0
Check if slice has any boundary conditions.
virtual void set_slice_density_boundary(Utils::Vector3i const &lower_corner, Utils::Vector3i const &upper_corner, std::vector< std::optional< double > > const &density)=0
Set slice density boundary conditions.
virtual void set_slice_flux_boundary(Utils::Vector3i const &lower_corner, Utils::Vector3i const &upper_corner, std::vector< std::optional< Utils::Vector3d > > const &flux)=0
Set slice flux boundary conditions.
virtual std::vector< double > get_slice_flux_vector(Utils::Vector3i const &lower_corner, Utils::Vector3i const &upper_corner) const =0
Get slice density.
virtual std::vector< std::optional< Utils::Vector3d > > get_slice_flux_at_boundary(Utils::Vector3i const &lower_corner, Utils::Vector3i const &upper_corner) const =0
Get slice flux boundary conditions.
virtual std::vector< double > get_slice_density(Utils::Vector3i const &lower_corner, Utils::Vector3i const &upper_corner) const =0
Get slice density.
virtual void set_slice_density(Utils::Vector3i const &lower_corner, Utils::Vector3i const &upper_corner, std::vector< double > const &density)=0
Set slice density.
virtual void parallel_try_catch(std::function< void()> const &cb) const =0
Context * context() const
Responsible context.
std::string_view name() const
Variant do_call_method(std::string const &name, VariantMap const ¶ms) override
::LatticeWalberla const & get_lattice() const override
Variant gather_3d(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
void scatter_3d(Variant const &grid_values, 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.)
Utils::Vector3i m_slice_lower_corner
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
This file contains the errorhandling code for severe errors, like a broken bond or illegal parameter ...
#define runtimeWarningMsg()
std::unordered_map< std::string, Variant > VariantMap
static SteepestDescentParameters params
Currently active steepest descent instance.
Recursive variant implementation.