Fixed now in master (printing removed). -- Anders
On Tue, Jun 03, 2014 at 02:52:52PM +0200, Jan Blechta wrote: > On Tue, 3 Jun 2014 14:49:49 +0200 > Jan Blechta <[email protected]> wrote: > > > On Tue, 3 Jun 2014 14:34:19 +0200 > > Anders Logg <[email protected]> wrote: > > > > > On Tue, Jun 03, 2014 at 02:25:02PM +0200, Jan Blechta wrote: > > > > On Tue, 3 Jun 2014 13:50:04 +0300 > > > > Päivo Simson <[email protected]> wrote: > > > > > > > > > Hi! > > > > > > > > > > Is there a way to disable console output for > > > > > interpolate_nonmatching_mesh? This happens when the point is > > > > > outside the original mesh. The output looks like this: > > > > > ... > > > > > <Point x = -7 y = 17.5 z = 0> > > > > > <Point x = -7 y = 10.5 z = 0> > > > > > <Point x = 7 y = 17.5 z = 0> > > > > > <Point x = -7 y = 3.5 z = 0> > > > > > <Point x = 21 y = 17.5 z = 0> > > > > > ... > > > > > I could not find anywhere in the source code where these > > > > > messages could be disabled. Im using fenicstools-1.3.0 > > > > > > > > This is probably because of > > > > > > > > 384 id = > > > > mesh.bounding_box_tree()->compute_closest_entity(point).first; > > > > 385 cout << "Extrapolating function value at x = " << point > > > > 386 << " (not inside domain)." << endl; > > > > > > > > in dolfin/function/Function.cpp which happens when extrapolating. > > > > This is really annoying and flooding stdout and should be fixed. > > > > AFAIK this > > > > > > Agree, I can fix this. > > > > > > Suggestions for how? Possibilities: > > > > > > 1. Send it through the log system at a lower log level (like > > > PROGRESS). Then it can be seen if someone wants to see it and turned > > > off otherwise, but sending those messages through the log system may > > > take a long time for many points... > > > > If you would log less than PROGRESS you would get rid of many > > important information, like convergence of Newton. > > Ok, making it TRACE would not be a bad idea. Still no printing is > faster. > > Jan > > > > > > > > > 2. Print the points only when some parameter is set. > > > > The most flexible but floods the codebase. > > > > > > > > 3. Just not print anything. > > > > Possibly. Does anybody need this information? The information printed > > is sometimes useful for debugging when extrapolation is undesirable > > but this debugging can be definitely done using more clever ways, > > like mesh entity iterators and methods from bounding box tree. So the > > printing should be avoided in intentionally extrapolating production > > code. So I pick this option. > > > > Jan > > > > > > > > > _______________________________________________ > > fenics-support mailing list > > [email protected] > > http://fenicsproject.org/mailman/listinfo/fenics-support > _______________________________________________ fenics-support mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics-support
