12.07.2015 Views

DOLFIN User Manual - FEniCS Project

DOLFIN User Manual - FEniCS Project

DOLFIN User Manual - FEniCS Project

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 10The log system<strong>DOLFIN</strong> provides provides a simple interface for uniform handling of logmessages, including warnings and errors. All messages are collected to asingle stream, which allows the destination and formatting of the outputfrom an entire program, including the <strong>DOLFIN</strong> library, to be controlled bythe user.10.1 Generating log messagesLog messages can be generated using the function dolfin info() availablein the dolfin namespace:void dolfin_info(const char *message, ...);which works similarly to the standard C library function printf. The followingexamples illustrate the usage of dolfin info():dolfin_info(‘‘Solving linear system.’’);dolfin_info(‘‘Size of vector: %d.’’, x.size());dolfin_info(‘‘R = %.3e (TOL = %.3e)’’, R, TOL);65

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!