1#ifndef DUNE_COPASI_MODEL_MAKE_INITIAL_HH
2#define DUNE_COPASI_MODEL_MAKE_INITIAL_HH
8#include <dune/pdelab/common/trace.hh>
10#include <dune/functions/gridfunctions/analyticgridviewfunction.hh>
12#include <dune/grid/concepts/grid.hh>
14#include <dune/common/exceptions.hh>
16#include <spdlog/spdlog.h>
20#include <unordered_map>
24template<
class Gr
idFunction, Dune::Concept::Gr
id Gr
id>
25[[
nodiscard]]
inline static std::unordered_map<std::string, GridFunction>
26make_initial(
const Grid& grid,
32 std::unordered_map<std::string, GridFunction>
functions;
34 auto time =
config.get(
"time_step_operator.time_begin",
double{ 0. });
43 if constexpr (Concept::MultiDomainGrid<Grid>) {
46 return grid.subDomain(
domain_id).leafGridView();
52 return grid.leafGridView();
62 auto local_domain = std::make_shared<LocalDomain<Grid::dimensionworld>>();
63 local_domain->time = time;
68 auto shared_fnc = std::make_shared<decltype(fcn)>(std::move(
fcn));
75 return std::invoke(*
_fnc);
Definition axis_names.hh:7
auto format_exception(Exception &&e, fmt::format_string< Args... > format, Args &&... args)
Definition exceptions.hh:23
constexpr bool is_bitflags_v
Alias for Bitflag indicator.
Definition bit_flags.hh:24