|
@@ -99,17 +99,7 @@ public:
|
|
<< "AFTER - "
|
|
<< "AFTER - "
|
|
<< AbstractCoupledModel < T, U, V, W >::path(this);
|
|
<< AbstractCoupledModel < T, U, V, W >::path(this);
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
- for (size_t i = 0; i < Internals < T, U, V >::size(); ++i) {
|
|
|
|
- if (not Internals < T, U, V >::get(i).is_null()) {
|
|
|
|
- utils::Trace < utils::DoubleTime >::trace()
|
|
|
|
- << utils::TraceElement < utils::DoubleTime >("KERNEL", t,
|
|
|
|
- utils::KERNEL)
|
|
|
|
- << Internals < T, U, V >::name(i) << " = "
|
|
|
|
- << Internals < T, U, V >::get(i).to_string(
|
|
|
|
- dynamic_cast < const T* >(this));
|
|
|
|
- utils::Trace < utils::DoubleTime >::trace().flush();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ trace_model(t, false);
|
|
#else
|
|
#else
|
|
(void) t;
|
|
(void) t;
|
|
#endif
|
|
#endif
|
|
@@ -138,29 +128,7 @@ public:
|
|
<< "BEFORE - "
|
|
<< "BEFORE - "
|
|
<< AbstractCoupledModel < T, U, V, W >::path(this);
|
|
<< AbstractCoupledModel < T, U, V, W >::path(this);
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
- for (size_t i = 0; i < Internals < T, U, V >::size(); ++i) {
|
|
|
|
- if (not Internals < T, U, V >::get(i).is_null()) {
|
|
|
|
- utils::Trace < utils::DoubleTime >::trace()
|
|
|
|
- << utils::TraceElement < utils::DoubleTime >("KERNEL", t,
|
|
|
|
- utils::KERNEL)
|
|
|
|
- << Internals < T, U, V >::name(i) << " = "
|
|
|
|
- << Internals < T, U, V >::get(i).to_string(
|
|
|
|
- dynamic_cast < const T* >(this));
|
|
|
|
- utils::Trace < utils::DoubleTime >::trace().flush();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- for (size_t i = 0; i < Externals < T, U, V >::size(); ++i) {
|
|
|
|
- if (not Externals < T, U, V >::get(i).is_null()) {
|
|
|
|
- utils::Trace < utils::DoubleTime >::trace()
|
|
|
|
- << utils::TraceElement < utils::DoubleTime >("KERNEL", t,
|
|
|
|
- utils::KERNEL)
|
|
|
|
- << "*" << Externals < T, U, V >::name(i) << " = "
|
|
|
|
- << Externals < T, U, V >::get(i).to_string(
|
|
|
|
- dynamic_cast < const T* >(this));
|
|
|
|
- utils::Trace < utils::DoubleTime >::trace().flush();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ trace_model(t, false);
|
|
#else
|
|
#else
|
|
(void) t;
|
|
(void) t;
|
|
#endif
|
|
#endif
|
|
@@ -369,6 +337,52 @@ public:
|
|
Externals < T, U, V >::save(this, state);
|
|
Externals < T, U, V >::save(this, state);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifdef WITH_TRACE
|
|
|
|
+ virtual void trace_model(typename U::type t) const {
|
|
|
|
+ trace_model(t, true);
|
|
|
|
+ }
|
|
|
|
+ void trace_model(typename U::type t, bool in_depth) const
|
|
|
|
+ {
|
|
|
|
+ for (size_t i = 0; i < Internals < T, U, V >::size(); ++i) {
|
|
|
|
+ if (not Internals < T, U, V >::get(i).is_null()) {
|
|
|
|
+ utils::Trace < utils::DoubleTime >::trace()
|
|
|
|
+ << utils::TraceElement < utils::DoubleTime >("KERNEL", t,
|
|
|
|
+ utils::KERNEL)
|
|
|
|
+ << AbstractCoupledModel < T, U, V, W >::path(this) << ":"
|
|
|
|
+ << Internals < T, U, V >::name(i) << " = "
|
|
|
|
+ << Internals < T, U, V >::get(i).to_string(
|
|
|
|
+ dynamic_cast < const T* >(this));
|
|
|
|
+ utils::Trace < utils::DoubleTime >::trace().flush();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (size_t i = 0; i < Externals < T, U, V >::size(); ++i) {
|
|
|
|
+ if (not Externals < T, U, V >::get(i).is_null()) {
|
|
|
|
+ utils::Trace < utils::DoubleTime >::trace()
|
|
|
|
+ << utils::TraceElement < utils::DoubleTime >("KERNEL", t,
|
|
|
|
+ utils::KERNEL)
|
|
|
|
+ << AbstractCoupledModel < T, U, V, W >::path(this) << ":"
|
|
|
|
+ << "*" << Externals < T, U, V >::name(i) << " = "
|
|
|
|
+ << Externals < T, U, V >::get(i).to_string(
|
|
|
|
+ dynamic_cast < const T* >(this));
|
|
|
|
+ utils::Trace < utils::DoubleTime >::trace().flush();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(in_depth) {
|
|
|
|
+ typename AbstractCoupledModel::Submodels::const_iterator it =
|
|
|
|
+ submodels.begin();
|
|
|
|
+
|
|
|
|
+ while (it != submodels.end()) {
|
|
|
|
+ it->second->trace_model(t);
|
|
|
|
+ ++it;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+
|
|
virtual void stable()
|
|
virtual void stable()
|
|
{ Externals < T, U, V >::updated = false; }
|
|
{ Externals < T, U, V >::updated = false; }
|
|
|
|
|