|
@@ -62,10 +62,28 @@ public:
|
|
|
};
|
|
|
|
|
|
AbstractCoupledModel(const type* parent = 0) : type(parent)
|
|
|
- { }
|
|
|
+ {
|
|
|
+#ifdef WITH_TRACE
|
|
|
+ utils::Trace < utils::DoubleTime >::trace()
|
|
|
+ << utils::TraceElement < utils::DoubleTime >("KERNEL", -1,
|
|
|
+ utils::KERNEL)
|
|
|
+ << "NEW COUPLED MODEL - "
|
|
|
+ << typeid(T).name();
|
|
|
+ utils::Trace < utils::DoubleTime >::trace().flush();
|
|
|
+#endif
|
|
|
+ }
|
|
|
|
|
|
virtual ~AbstractCoupledModel()
|
|
|
- { }
|
|
|
+ {
|
|
|
+#ifdef WITH_TRACE
|
|
|
+ utils::Trace < utils::DoubleTime >::trace()
|
|
|
+ << utils::TraceElement < utils::DoubleTime >("KERNEL", 0,
|
|
|
+ utils::KERNEL)
|
|
|
+ << "DESTRUCTION - "
|
|
|
+ << AbstractCoupledModel < T, U, V, W >::path(this);
|
|
|
+ utils::Trace < utils::DoubleTime >::trace().flush();
|
|
|
+#endif
|
|
|
+ }
|
|
|
|
|
|
virtual void after(typename U::type t)
|
|
|
{
|
|
@@ -378,6 +396,7 @@ protected:
|
|
|
{
|
|
|
for (typename std::initializer_list < Var >::iterator it =
|
|
|
internals.begin(); it != internals.end(); ++it) {
|
|
|
+
|
|
|
submodel_internals[it->index] =
|
|
|
std::pair < type*, int >(it->model, it->sub_index);
|
|
|
}
|
|
@@ -391,6 +410,18 @@ protected:
|
|
|
models.begin(); it != models.end(); ++it) {
|
|
|
submodels[it->first] = it->second;
|
|
|
it->second->set_parent(this);
|
|
|
+
|
|
|
+#ifdef WITH_TRACE
|
|
|
+ utils::Trace < utils::DoubleTime >::trace()
|
|
|
+ << utils::TraceElement < utils::DoubleTime >("KERNEL", -1,
|
|
|
+ utils::KERNEL)
|
|
|
+ << "ADD SUBMODEL - "
|
|
|
+ << AbstractCoupledModel < T, U, V, W >::path(it->second)
|
|
|
+ << " to "
|
|
|
+ << AbstractCoupledModel < T, U, V, W >::path(this);
|
|
|
+ utils::Trace < utils::DoubleTime >::trace().flush();
|
|
|
+#endif
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -401,6 +432,17 @@ protected:
|
|
|
}
|
|
|
setsubmodels[index].push_back(model);
|
|
|
model->set_parent(this);
|
|
|
+
|
|
|
+#ifdef WITH_TRACE
|
|
|
+ utils::Trace < utils::DoubleTime >::trace()
|
|
|
+ << utils::TraceElement < utils::DoubleTime >("KERNEL", -1,
|
|
|
+ utils::KERNEL)
|
|
|
+ << "ADD SUBMODEL - "
|
|
|
+ << AbstractCoupledModel < T, U, V, W >::path(model)
|
|
|
+ << " to "
|
|
|
+ << AbstractCoupledModel < T, U, V, W >::path(this);
|
|
|
+ utils::Trace < utils::DoubleTime >::trace().flush();
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
private:
|