|
@@ -77,10 +77,10 @@ public:
|
|
#ifdef WITH_TRACE
|
|
#ifdef WITH_TRACE
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
<< utils::TraceElement < utils::DoubleTime >(
|
|
<< utils::TraceElement < utils::DoubleTime >(
|
|
- true,
|
|
|
|
- boost::core::demangle(typeid(T).name()), // .erase(0,6),
|
|
|
|
- utils::DoubleTime::null,
|
|
|
|
- utils::CONSTRUCT);
|
|
|
|
|
|
+ true,
|
|
|
|
+ boost::core::demangle(typeid(T).name()),
|
|
|
|
+ utils::DoubleTime::null,
|
|
|
|
+ utils::CONSTRUCT);
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
@@ -294,10 +294,10 @@ public:
|
|
"/[" + std::to_string(i) + "]" +
|
|
"/[" + std::to_string(i) + "]" +
|
|
boost::core::demangle(typeid(*this).name());
|
|
boost::core::demangle(typeid(*this).name());
|
|
} else {
|
|
} else {
|
|
- return p + "/" + boost::core::demangle(typeid(*this).name()); // .erase(0,6);
|
|
|
|
|
|
+ return p + "/" + boost::core::demangle(typeid(*this).name());
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- return boost::core::demangle(typeid(*this).name()); // .erase(0,6);
|
|
|
|
|
|
+ return boost::core::demangle(typeid(*this).name());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -345,101 +345,94 @@ public:
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- virtual void trace_element(typename U::type t, utils::TraceType type = utils::NONE, std::string comment = "") const
|
|
|
|
- {trace_element(false, t, type, comment);}
|
|
|
|
|
|
+ virtual void trace_element(typename U::type t,
|
|
|
|
+ utils::TraceType type = utils::NONE,
|
|
|
|
+ std::string comment = "") const
|
|
|
|
+ { trace_element(false, t, type, comment); }
|
|
|
|
|
|
- virtual void trace_internals(typename U::type t, utils::TraceType type) const
|
|
|
|
- {trace_internals(false, t, type);}
|
|
|
|
|
|
+ virtual void trace_internals(typename U::type t,
|
|
|
|
+ utils::TraceType type) const
|
|
|
|
+ { trace_internals(false, t, type); }
|
|
|
|
|
|
- virtual void trace_externals(typename U::type t, utils::TraceType type = utils::NONE) const
|
|
|
|
- {trace_externals(false, t, type);}
|
|
|
|
|
|
+ virtual void trace_externals(typename U::type t,
|
|
|
|
+ utils::TraceType type = utils::NONE) const
|
|
|
|
+ { trace_externals(false, t, type); }
|
|
|
|
|
|
- virtual void trace_model(typename U::type t, utils::TraceType type = utils::NONE) const
|
|
|
|
- {trace_model(false, t, type);}
|
|
|
|
|
|
+ virtual void trace_model(typename U::type t,
|
|
|
|
+ utils::TraceType type = utils::NONE) const
|
|
|
|
+ { trace_model(false, t, type); }
|
|
|
|
|
|
private:
|
|
private:
|
|
- void trace_element(bool from_kernel, typename U::type t, utils::TraceType type = utils::NONE, std::string comment = "") const
|
|
|
|
|
|
+ void trace_element(bool from_kernel, typename U::type t,
|
|
|
|
+ utils::TraceType type = utils::NONE,
|
|
|
|
+ std::string comment = "") const
|
|
{
|
|
{
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
<< utils::TraceElement < utils::DoubleTime >(
|
|
<< utils::TraceElement < utils::DoubleTime >(
|
|
- from_kernel,
|
|
|
|
- AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
|
- t, type)
|
|
|
|
|
|
+ from_kernel,
|
|
|
|
+ AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
|
+ t, type)
|
|
<< comment;
|
|
<< comment;
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
}
|
|
}
|
|
|
|
|
|
- void trace_internals(bool from_kernel, typename U::type t, utils::TraceType type) const
|
|
|
|
|
|
+ void trace_internals(bool from_kernel, typename U::type t,
|
|
|
|
+ utils::TraceType type) const
|
|
{
|
|
{
|
|
for (size_t i = 0; i < Internals < T, U, V >::size(); ++i) {
|
|
for (size_t i = 0; i < Internals < T, U, V >::size(); ++i) {
|
|
if (not Internals < T, U, V >::get(i).is_null()) {
|
|
if (not Internals < T, U, V >::get(i).is_null()) {
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
- << utils::TraceElement < utils::DoubleTime >(
|
|
|
|
- from_kernel,
|
|
|
|
- AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
|
- t, type)
|
|
|
|
- << utils::KernelInfo(
|
|
|
|
- Internals < T, U, V >::name(i), true,
|
|
|
|
- Internals < T, U, V >::get(i).to_string(
|
|
|
|
- dynamic_cast < const T* >(this))
|
|
|
|
- );
|
|
|
|
|
|
+ << utils::TraceElement < utils::DoubleTime >(
|
|
|
|
+ from_kernel,
|
|
|
|
+ AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
|
+ t, type)
|
|
|
|
+ << utils::KernelInfo(
|
|
|
|
+ Internals < T, U, V >::name(i), true,
|
|
|
|
+ Internals < T, U, V >::get(i).to_string(
|
|
|
|
+ dynamic_cast < const T* >(this))
|
|
|
|
+ );
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- void trace_externals(bool from_kernel, typename U::type t, utils::TraceType type = utils::NONE) const
|
|
|
|
|
|
+ void trace_externals(bool from_kernel, typename U::type t,
|
|
|
|
+ utils::TraceType type = utils::NONE) const
|
|
{
|
|
{
|
|
for (size_t i = 0; i < Externals < T, U, V >::size(); ++i) {
|
|
for (size_t i = 0; i < Externals < T, U, V >::size(); ++i) {
|
|
if (not Externals < T, U, V >::get(i).is_null()) {
|
|
if (not Externals < T, U, V >::get(i).is_null()) {
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
- << utils::TraceElement < utils::DoubleTime >(
|
|
|
|
- from_kernel,
|
|
|
|
- AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
|
- t, type)
|
|
|
|
- << utils::KernelInfo(
|
|
|
|
- Externals < T, U, V >::name(i), false,
|
|
|
|
- Externals < T, U, V >::get(i).to_string(
|
|
|
|
- dynamic_cast < const T* >(this))
|
|
|
|
- );
|
|
|
|
|
|
+ << utils::TraceElement < utils::DoubleTime >(
|
|
|
|
+ from_kernel,
|
|
|
|
+ AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
|
+ t, type)
|
|
|
|
+ << utils::KernelInfo(
|
|
|
|
+ Externals < T, U, V >::name(i), false,
|
|
|
|
+ Externals < T, U, V >::get(i).to_string(
|
|
|
|
+ dynamic_cast < const T* >(this))
|
|
|
|
+ );
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- void trace_model(bool from_kernel, typename U::type t, utils::TraceType type = utils::NONE) const
|
|
|
|
|
|
+ void trace_model(bool from_kernel, typename U::type t,
|
|
|
|
+ utils::TraceType type = utils::NONE) const
|
|
{
|
|
{
|
|
trace_element(from_kernel, t, type);
|
|
trace_element(from_kernel, t, type);
|
|
trace_internals(from_kernel, t, type);
|
|
trace_internals(from_kernel, t, type);
|
|
trace_externals(from_kernel, t, type);
|
|
trace_externals(from_kernel, t, type);
|
|
- typename AbstractCoupledModel::Submodels::const_iterator it =
|
|
|
|
- submodels.begin();
|
|
|
|
|
|
|
|
-// while (it != submodels.end()) {
|
|
|
|
-// it->second->trace_model(from_kernel, t, type);
|
|
|
|
-// ++it;
|
|
|
|
-// }
|
|
|
|
|
|
+ // typename AbstractCoupledModel::Submodels::const_iterator it =
|
|
|
|
+ // submodels.begin();
|
|
|
|
+
|
|
|
|
+ // while (it != submodels.end()) {
|
|
|
|
+ // it->second->trace_model(from_kernel, t, type);
|
|
|
|
+ // ++it;
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
|
|
|
|
protected:
|
|
protected:
|
|
-// void change_internal(unsigned int index, double T::* var)
|
|
|
|
-// {
|
|
|
|
-// submodel_internals.erase(index);
|
|
|
|
-// Internals < T, U, V >::internal(index, var);
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-// void change_internal(unsigned int index, int T::* var)
|
|
|
|
-// {
|
|
|
|
-// submodel_internals.erase(index);
|
|
|
|
-// Internals < T, U, V >::internalI(index, var);
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-// void change_internal(unsigned int index, bool T::* var)
|
|
|
|
-// {
|
|
|
|
-// submodel_internals.erase(index);
|
|
|
|
-// Internals < T, U, V >::internalB(index, var);
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
void link_internal_(unsigned int index, std::string var_name,
|
|
void link_internal_(unsigned int index, std::string var_name,
|
|
type* model, int sub_index, std::string sub_var_name)
|
|
type* model, int sub_index, std::string sub_var_name)
|
|
{
|
|
{
|
|
@@ -447,15 +440,15 @@ protected:
|
|
std::pair < type*, int >(model, sub_index);
|
|
std::pair < type*, int >(model, sub_index);
|
|
#ifdef WITH_TRACE
|
|
#ifdef WITH_TRACE
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
- << utils::TraceElement < utils::DoubleTime >(
|
|
|
|
- true,
|
|
|
|
- AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
|
- utils::DoubleTime::null,
|
|
|
|
- utils::INTERNAL_LINK)
|
|
|
|
- << utils::KernelInfo(
|
|
|
|
- var_name,
|
|
|
|
- AbstractCoupledModel < T, U, V, W >::path(model),
|
|
|
|
- sub_var_name);
|
|
|
|
|
|
+ << utils::TraceElement < utils::DoubleTime >(
|
|
|
|
+ true,
|
|
|
|
+ AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
|
+ utils::DoubleTime::null,
|
|
|
|
+ utils::INTERNAL_LINK)
|
|
|
|
+ << utils::KernelInfo(
|
|
|
|
+ var_name,
|
|
|
|
+ AbstractCoupledModel < T, U, V, W >::path(model),
|
|
|
|
+ sub_var_name);
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
|
|
|
|
#endif
|
|
#endif
|
|
@@ -471,15 +464,15 @@ protected:
|
|
|
|
|
|
#ifdef WITH_TRACE
|
|
#ifdef WITH_TRACE
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
- << utils::TraceElement < utils::DoubleTime >(
|
|
|
|
- true,
|
|
|
|
- AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
|
- utils::DoubleTime::null,
|
|
|
|
- utils::INTERNAL_LINK)
|
|
|
|
- << utils::KernelInfo(
|
|
|
|
- it->var_name,
|
|
|
|
- AbstractCoupledModel < T, U, V, W >::path(it->model),
|
|
|
|
- it->sub_var_name);
|
|
|
|
|
|
+ << utils::TraceElement < utils::DoubleTime >(
|
|
|
|
+ true,
|
|
|
|
+ AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
|
+ utils::DoubleTime::null,
|
|
|
|
+ utils::INTERNAL_LINK)
|
|
|
|
+ << utils::KernelInfo(
|
|
|
|
+ it->var_name,
|
|
|
|
+ AbstractCoupledModel < T, U, V, W >::path(it->model),
|
|
|
|
+ it->sub_var_name);
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
@@ -495,15 +488,15 @@ protected:
|
|
it->second->set_parent(this);
|
|
it->second->set_parent(this);
|
|
|
|
|
|
#ifdef WITH_TRACE
|
|
#ifdef WITH_TRACE
|
|
- utils::Trace < utils::DoubleTime >::trace()
|
|
|
|
|
|
+ utils::Trace < utils::DoubleTime >::trace()
|
|
<< utils::TraceElement < utils::DoubleTime >(
|
|
<< utils::TraceElement < utils::DoubleTime >(
|
|
- true,
|
|
|
|
- AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
|
- utils::DoubleTime::null,
|
|
|
|
- utils::SUBMODEL_ADD)
|
|
|
|
|
|
+ true,
|
|
|
|
+ AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
|
+ utils::DoubleTime::null,
|
|
|
|
+ utils::SUBMODEL_ADD)
|
|
<< utils::KernelInfo(
|
|
<< utils::KernelInfo(
|
|
- AbstractCoupledModel < T, U, V, W >::path(it->second));
|
|
|
|
- utils::Trace < utils::DoubleTime >::trace().flush();
|
|
|
|
|
|
+ AbstractCoupledModel < T, U, V, W >::path(it->second));
|
|
|
|
+ utils::Trace < utils::DoubleTime >::trace().flush();
|
|
#endif
|
|
#endif
|
|
|
|
|
|
}
|
|
}
|
|
@@ -519,13 +512,13 @@ protected:
|
|
|
|
|
|
#ifdef WITH_TRACE
|
|
#ifdef WITH_TRACE
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
utils::Trace < utils::DoubleTime >::trace()
|
|
- << utils::TraceElement < utils::DoubleTime >(
|
|
|
|
- true,
|
|
|
|
- AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
|
- utils::DoubleTime::null,
|
|
|
|
- utils::SUBMODEL_ADD)
|
|
|
|
- << utils::KernelInfo(
|
|
|
|
- AbstractCoupledModel < T, U, V, W >::path(model));
|
|
|
|
|
|
+ << utils::TraceElement < utils::DoubleTime >(
|
|
|
|
+ true,
|
|
|
|
+ AbstractCoupledModel < T, U, V, W >::path(this),
|
|
|
|
+ utils::DoubleTime::null,
|
|
|
|
+ utils::SUBMODEL_ADD)
|
|
|
|
+ << utils::KernelInfo(
|
|
|
|
+ AbstractCoupledModel < T, U, V, W >::path(model));
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
utils::Trace < utils::DoubleTime >::trace().flush();
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|