本文整理汇总了C++中Treelog::touch方法的典型用法代码示例。如果您正苦于以下问题:C++ Treelog::touch方法的具体用法?C++ Treelog::touch怎么用?C++ Treelog::touch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Treelog
的用法示例。
在下文中一共展示了Treelog::touch方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: propagate_debug
static void propagate_debug (Treelog& msg, int nest, const std::string& text)
{
switch (nest)
{
case is_unknown:
case is_debug:
case is_plain:
case is_warning:
case is_error:
case is_bug:
msg.debug (text);
break;
case is_close:
msg.close ();
break;
case is_touch:
msg.touch ();
break;
case is_flush:
msg.flush ();
break;
default:
msg.open (text);
}
}
示例2: initialize
bool initialize (const Units& units, const Scope& scope, Treelog& msg)
{
TREELOG_MODEL (msg);
msg.touch ();
daisy_assert (state == uninitialized);
daisy_assert (source.get ());
if (!source->load (msg))
state = error;
else
initialize_derived (msg);
return state != error;
}
示例3: nest
bool
GnuplotMulti::initialize (const Units& units, Treelog& msg)
{
bool ok = true;
for (size_t i = 0; i < graph.size(); i++)
{
Treelog::Open nest (msg, objid, i, graph[i]->objid);
msg.touch ();
if (!graph[i]->initialize (units, msg))
ok = false;
}
return ok;
}
示例4: nest
//.........这里部分代码省略.........
T (cell) = forced_T;
else
T (cell) = soil_heat.T (cell);
h_lysimeter (cell) = geo.zplus (cell) - geo.cell_z (cell);
}
// Remember old value.
Theta_error = Theta;
// Start time loop
double time_left = dt; // How much of the large time step left.
double ddt = dt; // We start with small == large time step.
int number_of_time_step_reductions = 0;
int iterations_with_this_time_step = 0;
int n_small_time_steps = 0;
while (time_left > 0.0)
{
if (ddt > time_left)
ddt = time_left;
std::ostringstream tmp_ddt;
tmp_ddt << "Time t = " << (dt - time_left)
<< "; ddt = " << ddt
<< "; steps " << n_small_time_steps
<< "; time left = " << time_left;
Treelog::Open nest (msg, tmp_ddt.str ());
if (n_small_time_steps > 0
&& (n_small_time_steps%msg_number_of_small_time_steps) == 0)
{
msg.touch ();
msg.flush ();
}
n_small_time_steps++;
if (n_small_time_steps > max_number_of_small_time_steps)
{
msg.debug ("Too many small timesteps");
throw "Too many small timesteps";
}
// Initialization for each small time step.
if (debug > 0)
{
std::ostringstream tmp;
tmp << "h = " << h << "\n";
tmp << "Theta = " << Theta;
msg.message (tmp.str ());
}
int iterations_used = 0;
h_previous = h;
Theta_previous = Theta;
if (debug == 5)
{
std::ostringstream tmp;
tmp << "Remaining water at start: " << remaining_water;
msg.message (tmp.str ());
}
ublas::vector<double> h_conv;
示例5: doIt
void doIt (Daisy&, const Scope&, Treelog& msg)
{
msg.touch ();
throw message;
}