Building Medical Digital Twins with Pulse: Open Source Simulation Tools for Developers and Researchers
×
BlackBoxManager.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
5 #include "cdm/blackbox/SEBlackBoxManager.h"
6 
7 #define COMPATIBLE_BLACK_BOX_TEMPLATE typename CompartmentType
8 
9 #define CREATE_BLACK_BOX_COMPONENTS_TEMPLATE typename BlackBoxType, \
10  typename CircuitType, typename NodeType, typename PathType, \
11  typename GraphType, typename CompartmentType, typename LinkType, \
12  typename PotentialUnit, typename QuantityUnit, typename FluxUnit
13 
14 namespace pulse
15 {
16  class Controller;
20  class PULSE_DECL BlackBoxManager : public SEBlackBoxManager
21  {
22  friend class PulseEngineTest;
23  public:
24  BlackBoxManager(Controller& data);
25  virtual ~BlackBoxManager() = default;
26 
27  protected:
28  template<COMPATIBLE_BLACK_BOX_TEMPLATE> bool IsValidBlackBoxRequest(CompartmentType* srcCmpt, CompartmentType* tgtCmpt);
29 
30  SEGasBlackBox* CreateGasBlackBox(const std::string& srcCmptName, const std::string& tgtCmptName, const std::string& name) override;
31  SELiquidBlackBox* CreateLiquidBlackBox(const std::string& srcCmptName, const std::string& tgtCmptName, const std::string& name) override;
32  SEThermalBlackBox* CreateThermalBlackBox(const std::string& srcCmptName, const std::string& tgtCmptName, const std::string& name) override;
33 
34  template<CREATE_BLACK_BOX_COMPONENTS_TEMPLATE> bool CreateComponents(BlackBoxType& bb,
35  NodeType& srcNode, NodeType& tgtNode,
36  CompartmentType& srcCmpt, CompartmentType& tgtCmpt, LinkType& replaceLink,
37  CircuitType& circuit, GraphType& graph,
38  const PotentialUnit& pUnit, const QuantityUnit& qUnit, const FluxUnit& fUnit);
39 
40  Controller& m_data;
41  };
42 END_NAMESPACE
Definition: SEBlackBoxManager.h:11
Definition: SEGasBlackBox.h:11
Definition: SELiquidBlackBox.h:11
Definition: SEThermalBlackBox.h:11
Definition: Logger.h:14

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.