dolfin.fem.projection¶
Projections of a
Function
or an
Expression
onto a
finite element space.
Functions
|
Return projection of given expression v onto the finite element space V. |
-
dolfin.fem.projection.
project
(v, V=None, bcs=[], mesh=None, funct=None)[source]¶ Return projection of given expression v onto the finite element space V.
- Arguments
- v
a
Function
or anExpression
- bcs
Optional argument
list of DirichletBC
- V
Optional argument
FunctionSpace
- mesh
Optional argument
mesh
.- funct
Target function where result is stored.
Example of usage
v = Expression("sin(pi*x[0])") V = FunctionSpace(mesh, "Lagrange", 1) Pv = project(v, V)
This is useful for post-processing functions or expressions which are not readily handled by visualization tools (such as for example discontinuous functions).