1 #ifndef WALL_ATTRIBUTES_H_INCLUDED
2 #define WALL_ATTRIBUTES_H_INCLUDED
27 #include <boost/property_tree/ptree.hpp>
43 WallAttributes(
double rest_length,
double rest_length_init,
double strength,
44 const std::vector<double>& transporters1,
const std::vector<double>& transporters2,
51 double GetRestLength()
const
56 double GetRestLengthInit()
const
58 return m_rest_length_init;
61 double GetStrength()
const
66 std::vector<double> GetTransporters1()
const
68 return m_transporters1;
71 double GetTransporters1(
unsigned int ch)
const
73 return m_transporters1[ch];
76 std::vector<double> GetTransporters2()
const
78 return m_transporters2;
81 double GetTransporters2(
unsigned int ch)
const
83 return m_transporters2[ch];
91 bool IsAuxinSource()
const
93 return m_wall_type == WallType::Type::AuxinSource;
96 bool IsAuxinSink()
const {
return m_wall_type == WallType::Type::AuxinSink; }
98 virtual void ReadPtree(boost::property_tree::ptree
const& wall_pt);
100 void SetRestLength(
double l) { m_rest_length = l; }
102 void SetRestLengthInit(
double l) { m_rest_length_init = l; }
104 void SetStrength(
double strength) { m_strength = strength; }
106 void SetTransporters1(
unsigned int ch,
double val)
108 assert( ch < m_transporters1.size() &&
"Index out of bounds!");
109 m_transporters1[ch] = val;
112 void SetTransporters1(
const std::vector<double>& transporter) { m_transporters1 = transporter; }
114 void SetTransporters2(
unsigned int ch,
double val)
116 assert( m_transporters2.size() &&
"Index out of bounds!");
117 m_transporters2[ch] = val;
120 void SetTransporters2(
const std::vector<double>& transporter)
122 m_transporters2 = transporter;
146 virtual boost::property_tree::ptree
ToPtree()
const;
149 double m_rest_length;
150 double m_rest_length_init;
152 std::vector<double> m_transporters1;
153 std::vector<double> m_transporters2;
162 #endif // end_of_include_guard
Type
Enumerates the wall types.
Namespace for the core simulator.
Attributes associated with a wall.
virtual boost::property_tree::ptree ToPtree() const
Convert the wall attributes to a ptree.