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.

<strong>DOLFIN</strong> <strong>User</strong> <strong>Manual</strong>Hoffman, Jansson, Logg, WellsThe following example illustrates how to create such as Function by overloadingthe eval() function:class MeshSize : public Function{real eval(const Point& p, unsigned int i){return cell().diameter();}}MeshSize h;Note that the current Cell is only available during assembly and has nomeaning otherwise. It is thus not possible to write the Function h to file,since the current Cell is not available when evaluating a Function at anygiven Vertex. Furthermore, note that the current Cell is not available whencreating a Function from a function pointer.5.4 Time-dependent functions◮ Developer’s note: Write about time-dependent and pseudo time-dependentfunctions.42

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

Saved successfully!

Ooh no, something went wrong!