<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Hi Tobias,</div>

<div> </div>

<div>maybe we should add your comment to the documentation? I can somehow remember that I ran into the same issue when I started using dune-fem some years ago.</div>

<div> </div>

<div>Best regards</div>

<div>Stefan.</div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Mittwoch, 15. April 2015 um 17:28 Uhr<br/>
<b>Von:</b> "Tobias Malkmus" <tomalk@mathematik.uni-freiburg.de><br/>
<b>An:</b> "Agnese, Marco" <m.agnese13@imperial.ac.uk>, dune-fem@dune-project.org<br/>
<b>Betreff:</b> Re: [dune-fem] Fem timer</div>

<div name="quoted-content">-----BEGIN PGP SIGNED MESSAGE-----<br/>
Hash: SHA1<br/>
<br/>
Hi Marco<br/>
<br/>
Your code should look like:<br/>
<br/>
/* Begin */<br/>
#define FEMTIMER<br/>
#include <config><br/>
<br/>
#include <dune/fem/misc/femtimer.hh><br/>
<br/>
int main ()<br/>
{<br/>
unsigned int id =<br/>
FemTimer::addTo( "Compute timer",1);<br/>
FemTimer::start(id);<br/>
<br/>
// do something<br/>
<br/>
FemTimer::stop(id);<br/>
FemTimer::print(std::cout);<br/>
<br/>
/* End */<br/>
}<br/>
<br/>
The femtimer is itself is a singleton.<br/>
You can also set the macro FEMTIMER within the makefiles, this ensures<br/>
that it is defined within each included header, which seems not to be<br/>
the case, otherwise the complier should complain about the private<br/>
default constructor FemTimer femtimer();<br/>
<br/>
Best Tobias<br/>
<br/>
On 04/15/2015 05:16 PM, Andreas Dedner wrote:<br/>
> Hi Perhaps you could provide a small demo cc file? Andreas<br/>
><br/>
><br/>
> On 15/04/15 16:05, Agnese, Marco wrote:<br/>
>> Hi Tobias,<br/>
>><br/>
>> I have<br/>
>><br/>
>> #define FEMTIMER 1<br/>
>><br/>
>> at the beginning of my code.<br/>
>><br/>
>> I don't understand why the print() doesn't output anything.<br/>
>><br/>
>> Cheers, Marco. ________________________________________ From:<br/>
>> Tobias Malkmus [tomalk@mathematik.uni-freiburg.de] Sent:<br/>
>> Wednesday, April 15, 2015 3:46 PM To: Agnese, Marco;<br/>
>> dune-fem@dune-project.org Subject: Re: [dune-fem] Fem timer<br/>
>><br/>
> Hi Marco<br/>
><br/>
> The FemTimer is deactivated by default, you can enable it by<br/>
> defining the macro FEMTIMER.<br/>
><br/>
> Best Tobias<br/>
><br/>
> On 04/15/2015 03:42 PM, Agnese, Marco wrote:<br/>
>>>> Hi, I am trying to use the FemTimer without success.<br/>
>>>><br/>
>>>> My code is something like<br/>
>>>><br/>
>>>> FemTimer femTimer; const unsigned int<br/>
>>>> timerID(femTimer.addTo("Compute timer",1));<br/>
>>>> femTimer.start(timerID);<br/>
>>>><br/>
>>>> femTimer.start(timerID,1); // do something<br/>
>>>> femTimer.stop(timerID,1);<br/>
>>>><br/>
>>>> femTimer.stop(timerID); femTimer.print(std::cout);<br/>
>>>> femTimer.reset(timerID);<br/>
>>>><br/>
>>>> It compiles correctly but, when I run the code, I don't see<br/>
>>>> any FemTimer output on my terminal. What am I doing wrong?<br/>
>>>><br/>
>>>> Thank you very much, regards, Marco.<br/>
>>>> _______________________________________________ dune-fem<br/>
>>>> mailing list dune-fem@dune-project.org<br/>
>>>> <a href="http://lists.dune-project.org/mailman/listinfo/dune-fem" target="_blank">http://lists.dune-project.org/mailman/listinfo/dune-fem</a><br/>
>>>><br/>
><br/>
>><br/>
>> _______________________________________________ dune-fem mailing<br/>
>> list dune-fem@dune-project.org<br/>
>> <a href="http://lists.dune-project.org/mailman/listinfo/dune-fem" target="_blank">http://lists.dune-project.org/mailman/listinfo/dune-fem</a><br/>
><br/>
><br/>
> _______________________________________________ dune-fem mailing<br/>
> list dune-fem@dune-project.org<br/>
> <a href="http://lists.dune-project.org/mailman/listinfo/dune-fem" target="_blank">http://lists.dune-project.org/mailman/listinfo/dune-fem</a><br/>
><br/>
><br/>
<br/>
- --<br/>
Tobias Malkmus <tomalk at mathematik.uni-freiburg.de><br/>
<br/>
Mathematisches Institut Tel: +49 761 203 5627<br/>
Abt. für Angewandte Mathematik Universität Freiburg<br/>
Hermann-Herder-Str. 10<br/>
79104 Freiburg<br/>
<br/>
-----BEGIN PGP SIGNATURE-----<br/>
Version: GnuPG v2<br/>
<br/>
iQEcBAEBAgAGBQJVLoOLAAoJEBMY7DHvcWNgExcH/19ZJ7JJHnSgndlJ9H2Vvo9c<br/>
uRIyXtCfhalvuzgkw7JhYgiaWBIwFpOl571LJojrMPpmgH7c1KPDbHQZfkQMporz<br/>
4co4JWS6ZYDDvqX4fyaoX/oJF7YrLajfG9ulSJzsBhU0m9WwYtfaPEs42mQqXs5l<br/>
pDXAcYY8I6LIqC46QQjTCT/zHMg7pdPUO0Iwu133GNQ9ED1DJIkpmeqCjsQsrOKh<br/>
wiNuklSdneM1llbymLepOnKYdDbxTcgp6KYWyXmdWkohDsZKyRAjNoXLlXmFmsJ3<br/>
x9oW/r6mhZ1EZsq9nHNyftVX+V7Wzb50hWkGlx/aHeRAxs/KDwz0apU15K41ajA=<br/>
=VgVU<br/>
-----END PGP SIGNATURE-----<br/>
<br/>
_______________________________________________<br/>
dune-fem mailing list<br/>
dune-fem@dune-project.org<br/>
<a href="http://lists.dune-project.org/mailman/listinfo/dune-fem" target="_blank">http://lists.dune-project.org/mailman/listinfo/dune-fem</a></div>
</div>
</div>
</div></div></body></html>