@@ -48,7 +48,7 @@ std::string ReactorNet::toYAML() const
48
48
std::map<std::string, ReactorBase* > reactors;
49
49
std::map<std::string, WallBase* > walls;
50
50
std::map<std::string, FlowDevice*> devices;
51
- std::map<std::string, ReactorSurface*> surfaces;
51
+ // std::map<std::string, ReactorSurface*> surfaces;
52
52
53
53
// construct complete maps
54
54
for (auto r=m_reactors.begin (); r!=m_reactors.end (); r++) {
@@ -93,21 +93,21 @@ std::string ReactorNet::toYAML() const
93
93
reactors.emplace (uniqueName ((void const *)(&out)), &out);
94
94
}
95
95
96
- // surfaces
97
- for (size_t i=0 ; i<rb->nSurfaces (); i++) {
96
+ // // surfaces
97
+ // for (size_t i=0; i<rb->nSurfaces(); i++) {
98
98
99
- ReactorSurface* surface = rb->surface (i);
100
- surfaces.emplace (uniqueName ((void const *)surface), surface);
101
- }
99
+ // ReactorSurface* surface = rb->surface(i);
100
+ // surfaces.emplace(uniqueName((void const *)surface), surface);
101
+ // }
102
102
}
103
103
104
104
// header
105
105
yml << YAML::BeginMap;
106
- yml << YAML::Key << " ReactorNet " ;
106
+ yml << YAML::Key << " reactor-network " ;
107
107
yml << YAML::BeginMap;
108
108
109
109
// emit list of reactors
110
- yml << YAML::Key << " ReactorBase " ;
110
+ yml << YAML::Key << " reactors " ;
111
111
yml << YAML::Value << YAML::BeginSeq;
112
112
for (const auto & r : reactors) {
113
113
names.emplace (r.second ->name (), r.first );
@@ -122,7 +122,7 @@ std::string ReactorNet::toYAML() const
122
122
// emit list of walls
123
123
names.clear ();
124
124
if (walls.size ()) {
125
- yml << YAML::Key << " WallBase " ;
125
+ yml << YAML::Key << " walls " ;
126
126
yml << YAML::Value << YAML::BeginSeq;
127
127
for (const auto & w : walls) {
128
128
names.emplace (w.second ->name (), w.first );
@@ -138,7 +138,7 @@ std::string ReactorNet::toYAML() const
138
138
// emit list of flow devices
139
139
names.clear ();
140
140
if (devices.size ()) {
141
- yml << YAML::Key << " FlowDevice " ;
141
+ yml << YAML::Key << " flow-devices " ;
142
142
yml << YAML::Value << YAML::BeginSeq;
143
143
for (const auto & d : devices) {
144
144
names.emplace (d.second ->name (), d.first );
@@ -151,21 +151,21 @@ std::string ReactorNet::toYAML() const
151
151
throw CanteraError (" ReactorNet::toYAML" , " FlowDevice names are not unique." );
152
152
}
153
153
154
- // emit list of reactor surfaces
155
- names.clear ();
156
- if (surfaces.size ()) {
157
- yml << YAML::Key << " ReactorSurface" ;
158
- yml << YAML::Value << YAML::BeginSeq;
159
- for (const auto & s : surfaces) {
160
- names.emplace (s.second ->name (), s.first );
161
- yml << YAML::Load (s.second ->toYAML ());
162
- }
163
- yml << YAML::EndSeq;
164
- }
165
- if (names.size ()!=surfaces.size ()) {
166
- // this should raise a warning, but an applicable warning system is not in place
167
- throw CanteraError (" ReactorNet::toYAML" , " ReactorSurface names are not unique." );
168
- }
154
+ // // emit list of reactor surfaces
155
+ // names.clear();
156
+ // if (surfaces.size()) {
157
+ // yml << YAML::Key << "ReactorSurface";
158
+ // yml << YAML::Value << YAML::BeginSeq;
159
+ // for (const auto& s : surfaces) {
160
+ // names.emplace(s.second->name(), s.first);
161
+ // yml << YAML::Load(s.second->toYAML());
162
+ // }
163
+ // yml << YAML::EndSeq;
164
+ // }
165
+ // if (names.size()!=surfaces.size()) {
166
+ // // this should raise a warning, but an applicable warning system is not in place
167
+ // throw CanteraError("ReactorNet::toYAML", "ReactorSurface names are not unique.");
168
+ // }
169
169
170
170
// close out
171
171
yml << YAML::EndMap;
0 commit comments