FEniCS Course - FEniCS Project
FEniCS Course - FEniCS Project
FEniCS Course - FEniCS Project
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Step by step: defining expressionsNext, we define an expression for the boundary value:u0 = Expression ("1 + x[0]*x[0] + 2*x[1]*x[1]")The formula must be written in C++ syntaxOptionally, a polynomial degree may be specifiedu0 = Expression ("1 + x[0]*x[0] + 2*x[1]*x[1]",degree =2)The Expression class is very flexible and can be used to createcomplex user-defined expressions. For more information, tryhelp ( Expression )in Python or, in the shell:pydocdolfin . Expression14 / 22