1#ifndef DUNE_COPASI_MODEL_DIFFUSION_REACTION_MULTI_COMPARTMENT_HH
2#define DUNE_COPASI_MODEL_DIFFUSION_REACTION_MULTI_COMPARTMENT_HH
12#include <dune/pdelab/basis/merging_strategy.hh>
13#include <dune/pdelab/basis/prebasis/composite.hh>
14#include <dune/pdelab/basis/prebasis/leaf.hh>
15#include <dune/pdelab/finiteelementmap/pkfem.hh>
17#include <dune/grid/concepts/grid.hh>
18#include <dune/grid/concepts/gridview.hh>
24 :
public Model<typename Traits::Grid,
25 typename Traits::CompartmentEntitySet,
26 typename Traits::RangeQuatinty,
27 typename Traits::TimeQuantity>
30 typename Traits::CompartmentEntitySet,
31 typename Traits::RangeQuatinty,
32 typename Traits::TimeQuantity>;
36 using Grid =
typename Traits::Grid;
49 PDELab::PreBasis<ScalarMergingStrategy, ScalarFiniteElementMap, Constraints<CompartmentEntitySet>>;
52 PDELab::PreBasisVector<MultiCompartmentMergingStrategy, CompartmentPreBasis>;
67 std::unique_ptr<State>
make_state(
const std::shared_ptr<const Grid>&,
70 void interpolate(
State&,
const std::unordered_map<std::string, GridFunction>&)
const override;
76 std::string_view)
const override;
81 void write_vtk(
const State&,
const std::filesystem::path&,
bool)
const override;
90 static void setup_coefficient_vector(
State&);
93 mutable std::unordered_map<std::string, std::vector<double>> _writer_timesteps;
94 std::shared_ptr<const FunctorFactory<Grid::dimensionworld>> _functor_factory;
95 std::shared_ptr<const CellData<typename Grid::LeafGridView, ScalarQuantity>> _cell_data;
100#ifndef DUNE_COPASI_PRECOMPILED_MODE
Container for cell data of a grid view.
Definition cell_data.hh:25
Definition model_multi_compartment.hh:28
PDELab::PreBasisVector< CompartmentMergingStrategy, ScalarPreBasis > CompartmentPreBasis
Definition model_multi_compartment.hh:50
void write_vtk(const State &, const std::filesystem::path &, bool) const override
Definition model_multi_compartment.impl.hh:220
ModelMultiCompartment(std::shared_ptr< const FunctorFactory< Grid::dimensionworld > > functor_factory, std::shared_ptr< const CellData< typename Grid::LeafGridView, ScalarQuantity > > cell_data=nullptr)
Definition model_multi_compartment.hh:58
GridFunction make_compartment_function(const std::shared_ptr< const State > &, std::string_view) const override
Definition model_multi_compartment.impl.hh:126
ScalarQuantity ResidualQuantity
Definition model_multi_compartment.hh:54
typename Base::State State
Definition model_multi_compartment.hh:35
void interpolate(State &, const std::unordered_map< std::string, GridFunction > &) const override
Definition model_multi_compartment.impl.hh:33
typename Traits::ScalarFiniteElementMap ScalarFiniteElementMap
Definition model_multi_compartment.hh:42
typename Traits::CompartmentMergingStrategy CompartmentMergingStrategy
Definition model_multi_compartment.hh:45
typename Traits::RangeQuatinty ScalarQuantity
Definition model_multi_compartment.hh:38
PDELab::PreBasisVector< MultiCompartmentMergingStrategy, CompartmentPreBasis > MultiCompartmentPreBasis
Definition model_multi_compartment.hh:51
std::unordered_map< std::string, GridFunction > make_initial(const Grid &, const ParameterTree &) const override
Definition model_multi_compartment.impl.hh:155
typename Traits::MultiCompartmentEntitySet MultiCompartmentEntitySet
Definition model_multi_compartment.hh:40
typename Traits::Grid Grid
Definition model_multi_compartment.hh:36
typename Traits::CompartmentEntitySet CompartmentEntitySet
Definition model_multi_compartment.hh:39
typename Traits::ScalarMergingStrategy ScalarMergingStrategy
Definition model_multi_compartment.hh:44
typename Base::GridFunction GridFunction
Definition model_multi_compartment.hh:56
typename Traits::TimeQuantity TimeQuantity
Definition model_multi_compartment.hh:37
std::unique_ptr< State > make_state(const std::shared_ptr< const Grid > &, const ParameterTree &) const override
Definition model_multi_compartment.impl.hh:111
std::unique_ptr< PDELab::OneStep< State > > make_step_operator(const State &, const ParameterTree &) const override
Definition model_multi_compartment.impl.hh:181
PDELab::PreBasis< ScalarMergingStrategy, ScalarFiniteElementMap, Constraints< CompartmentEntitySet > > ScalarPreBasis
Definition model_multi_compartment.hh:48
std::map< std::string, double > reduce(const State &, const ParameterTree &) const override
Definition model_multi_compartment.impl.hh:164
typename Traits::MultiCompartmentMergingStrategy MultiCompartmentMergingStrategy
Definition model_multi_compartment.hh:46
Definition functor_factory.hh:24
constexpr bool is_bitflags_v
Alias for Bitflag indicator.
Definition bit_flags.hh:24
Dune::Functions::GridViewFunction< RangeQuatinty(typename GridView::template Codim< 0 >::Geometry::GlobalCoordinate), GridView > GridFunction
Definition model.hh:44