12.07.2015 Views

DOLFIN User Manual - FEniCS Project

DOLFIN User Manual - FEniCS Project

DOLFIN User Manual - FEniCS Project

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>DOLFIN</strong> <strong>User</strong> <strong>Manual</strong>Hoffman, Jansson, Logg, Wellsvoid dolfin_begin(const char* message, ...);void dolfin_end(const char* message, ...);These functions enable the <strong>DOLFIN</strong> log system to display messages, warningsand errors hierarchically, by automatically indenting the output producedbetween calls to dolfin begin() and dolfin end(). A program maycontain an arbitrary number of nested tasks.10.5 Progress barsThe <strong>DOLFIN</strong> log system provides the class Progress for simple creation ofprogress sessions. A progress session automatically displays the progress ofa computation using a progress bar.If the number of steps of a computation is known, a progress session shouldbe defined in terms of the number of steps and updated in each step of thecomputation as illustrated by the following example:Progress p(‘‘Assembling’’, mesh.noCells());for (CellIterator c(mesh); !c.end(); ++c){...p++;}It is also possible to specify the step number explicitly by assigning an integerto the progress session:Progress p(‘‘Iterating over vector’’, x.size())for (uint i = 0; i < x.size(); i++){...69

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

Saved successfully!

Ooh no, something went wrong!