project¶
-
dolfin.fem.projection.project(v, V=None, bcs=None, mesh=None, function=None, solver_type='cg', preconditioner_type='default', form_compiler_parameters=None)¶ Return projection of given expression v onto the finite element space V.
- Arguments
- v
- a
Functionor anExpression - bcs
- Optional argument
list of DirichletBC - V
- Optional argument
FunctionSpace - mesh
- Optional argument
mesh. - solver_type
- see
solvefor options. - preconditioner_type
- see
solvefor options. - form_compiler_parameters
- see
Parametersfor more information.
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).