|
@@ -82,7 +82,7 @@ public:
|
|
|
#ifdef WITH_TRACE
|
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
|
<< utils::TraceElement < utils::DoubleTime >(
|
|
|
- boost::core::demangle(typeid(T).name()).erase(0,6),
|
|
|
+ AbstractCoupledModel < T, U, V, W >::path(this).erase(0,6),
|
|
|
utils::DoubleTime::null,
|
|
|
utils::DESTRUCT);
|
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
@@ -94,10 +94,9 @@ public:
|
|
|
|
|
|
#ifdef WITH_TRACE
|
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
|
- << utils::TraceElement < utils::DoubleTime >("KERNEL", t,
|
|
|
- utils::AFTER_COMPUTE)
|
|
|
- << "AFTER - "
|
|
|
- << AbstractCoupledModel < T, U, V, W >::path(this);
|
|
|
+ << utils::TraceElement < utils::DoubleTime >(
|
|
|
+ AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
+ t, utils::AFTER_COMPUTE);
|
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
|
trace_model(t, false);
|
|
|
#else
|
|
@@ -123,10 +122,9 @@ public:
|
|
|
|
|
|
#ifdef WITH_TRACE
|
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
|
- << utils::TraceElement < utils::DoubleTime >("KERNEL", t,
|
|
|
- utils::BEFORE_COMPUTE)
|
|
|
- << "BEFORE - "
|
|
|
- << AbstractCoupledModel < T, U, V, W >::path(this);
|
|
|
+ << utils::TraceElement < utils::DoubleTime >(
|
|
|
+ AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
+ t, utils::BEFORE_COMPUTE);
|
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
|
trace_model(t, false);
|
|
|
#else
|
|
@@ -339,45 +337,48 @@ public:
|
|
|
|
|
|
#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();
|
|
|
+ << utils::KernelInfo({
|
|
|
+ Internals < T, U, V >::name(i), true,
|
|
|
+ Internals < T, U, V >::get(i).to_string(
|
|
|
+ dynamic_cast < const T* >(this))
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
|
|
|
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();
|
|
|
+ << utils::KernelInfo(
|
|
|
+ Externals < T, U, V >::name(i), false,
|
|
|
+ Externals < T, U, V >::get(i).to_string(
|
|
|
+ dynamic_cast < const T* >(this))
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ virtual utils::TraceElement < utils::DoubleTime > trace_element(){
|
|
|
+ utils::Trace < utils::DoubleTime >::trace()
|
|
|
+ << utils::TraceElement < utils::DoubleTime >(
|
|
|
+ AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
+ t, trace_type);
|
|
|
+ }
|
|
|
|
|
|
+ void trace_indepth_model(typename U::type t, utils::Trace::TraceType trace_type) const
|
|
|
+ {
|
|
|
|
|
|
- if(in_depth) {
|
|
|
- typename AbstractCoupledModel::Submodels::const_iterator it =
|
|
|
- submodels.begin();
|
|
|
|
|
|
- while (it != submodels.end()) {
|
|
|
- it->second->trace_model(t);
|
|
|
- ++it;
|
|
|
- }
|
|
|
+ utils::Trace < utils::DoubleTime >::trace().flush();
|
|
|
+ typename AbstractCoupledModel::Submodels::const_iterator it =
|
|
|
+ submodels.begin();
|
|
|
+
|
|
|
+ while (it != submodels.end()) {
|
|
|
+ if(it->)
|
|
|
+ it->second->trace_indepth_model(t);
|
|
|
+ ++it;
|
|
|
}
|
|
|
}
|
|
|
#endif
|