Projection of Constant onto the Lagrange FunctionSpace for quads and hexes is working now.
from dolfin import *
mesh = UnitHexMesh.create(2, 2, 2) # or UnitQuadMesh.create(2, 2)
V = FunctionSpace(mesh, "Lagrange", 1)
u = project(Constant(0.4), V)
u.compute_vertex_values() # Returns an array of 0.4
It is possible to solve for example Stokes (Taylor-Hood) or Hyperelasticity problem on quad or hex mesh with f = Constant(value) now.
Projection of Constant onto the Lagrange FunctionSpace for quads and hexes is working now.
from dolfin import * mesh = UnitHexMesh.create(2, 2, 2) # or UnitQuadMesh.create(2, 2) V = FunctionSpace(mesh, "Lagrange", 1) u = project(Constant(0.4), V) u.compute_vertex_values() # Returns an array of 0.4
It is possible to solve for example Stokes (Taylor-Hood) or Hyperelasticity problem on quad or hex mesh with
f = Constant(value)
now.