ConditionExtensiveUpdater.hpp
1 #ifndef CONDITION_EXTENSIVE_UPDATER_HPP
2 #define CONDITION_EXTENSIVE_UPDATER_HPP 1
3 
4 #include "extensive_updater.hpp"
6 
9 {
10 public:
11 
13  class Condition
14  {
15  public:
16 
25  virtual bool operator()
26  (size_t index,
27  const Tessellation& tess,
28  const vector<ComputationalCell>& cells,
29  double time,
30  TracerStickerNames const& tracerstickernames) const = 0;
31 
32  virtual ~Condition(void);
33  };
34 
36  class Action
37  {
38  public:
51  virtual void operator()
52  (const vector<Extensive>& fluxes,
53  const PhysicalGeometry& pg,
54  const Tessellation& tess,
55  const double dt,
56  const CacheData& cd,
57  const vector<ComputationalCell>& cells,
58  Extensive& extensive,
59  size_t index,
60  double time,
61  TracerStickerNames const& tracerstickernames) const = 0;
62 
63  virtual ~Action(void);
64  };
65 
70  (const vector<pair<const Condition*, const Action*> >& sequence);
71 
73 
74  void operator()(const vector<Extensive>& fluxes,
75  const PhysicalGeometry& pg,
76  const Tessellation& tess,
77  const double dt,
78  const CacheData& cd,
79  const vector<ComputationalCell>& cells,
80  vector<Extensive>& extensives,
81  double time,
82  TracerStickerNames const& tracerstickernames) const;
83 
84 private:
85  const vector<pair<const Condition*, const Action*> > sequence_;
86 };
87 
88 #endif // CONDITION_EXTENSIVE_UPDATER_HPP
Extensive variables.
Definition: extensive.hpp:18
Base class for extensive update scheme.
Abstract class for tessellation.
Action taken to update extensive.
Base class for extensive updater scheme.
Updates the extensives based on a series of conditions and actions.
Container for cache data.
Definition: cache_data.hpp:14
Class for keeping the names of the tracers and stickers.
virtual bool operator()(size_t index, const Tessellation &tess, const vector< ComputationalCell > &cells, double time, TracerStickerNames const &tracerstickernames) const =0
Checks if an interface satisfies a condition.
Linear interpolation that guarantees compliance with the equation of state and calcualtes the GG grad...
Base class for physical geometry.
ConditionExtensiveUpdater(const vector< pair< const Condition *, const Action *> > &sequence)
Class constructor.