SEGasSubstanceQuantity.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5#include "cdm/compartment/substances/SESubstanceQuantity.h"
6#include "cdm/substance/SESubstanceTransport.h"
8
10{
11 friend class PBSubstanceQuantity;//friend the serialization class
12 friend class SEGasCompartment;
13protected:
15public:
17
18 void Clear() override;
19
20 virtual std::string GetCompartmentName() override;
21
22 void SetToZero() override;
23 const SEScalar* GetScalar(const std::string& name) override;
24
25 virtual bool HasPartialPressure() const;
26 virtual SEScalarPressure& GetPartialPressure();
27 virtual double GetPartialPressure(const PressureUnit& unit) const;
28
29 virtual bool HasVolume() const;
30 virtual SEScalarVolume& GetVolume();
31 virtual double GetVolume(const VolumeUnit& unit) const;
32
33 virtual bool HasVolumeFraction() const;
34 virtual SEScalar0To1& GetVolumeFraction();
35 virtual double GetVolumeFraction() const;
36
37protected:
38 virtual void AddChild(SEGasSubstanceQuantity& subQ);
39
40 bool HasExtensive() const override { return HasVolume(); }
41 SEScalarVolume& GetExtensive() override { return GetVolume(); }
42
43 bool HasIntensive() const override { return HasVolumeFraction(); }
44 SEScalar0To1& GetIntensive() override { return GetVolumeFraction(); }
45
49
51 std::vector<SEGasSubstanceQuantity*> m_Children;
52};
Definition: PBSubstanceQuantity.h:11
Definition: SEScalarPressure.h:8
Definition: SEGasCompartment.h:14
virtual void AddChild(SEGasCompartment &child)
Definition: SEGasCompartment.cpp:224
Definition: SEGasSubstanceQuantity.h:10
bool HasIntensive() const override
Definition: SEGasSubstanceQuantity.h:43
SEScalarPressure * m_PartialPressure
Definition: SEGasSubstanceQuantity.h:46
SEScalar0To1 * m_VolumeFraction
Definition: SEGasSubstanceQuantity.h:48
bool HasExtensive() const override
Definition: SEGasSubstanceQuantity.h:40
SEGasCompartment & m_Compartment
Definition: SEGasSubstanceQuantity.h:50
SEScalarVolume * m_Volume
Definition: SEGasSubstanceQuantity.h:47
SEScalar0To1 & GetIntensive() override
Definition: SEGasSubstanceQuantity.h:44
SEScalarVolume & GetExtensive() override
Definition: SEGasSubstanceQuantity.h:41
std::vector< SEGasSubstanceQuantity * > m_Children
Definition: SEGasSubstanceQuantity.h:51
Definition: SEScalar0To1.h:8
Definition: SEScalar.h:19
Definition: SEScalarPressure.h:29
Definition: SEScalarVolume.h:28
Definition: SESubstance.h:15
Definition: SESubstanceQuantity.h:8
virtual const SEScalar * GetScalar(const std::string &name)=0
virtual void Clear()=0
virtual void SetToZero()=0
virtual std::string GetCompartmentName()=0
Definition: SESubstanceTransport.h:14
Definition: SEScalarVolume.h:8

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.