difference between *.split() and split(*)
Hi, I am curious why results of *.split() and split(*) differ. Thanks!
#------
from dolfin import *
def strain(v):
return 0.5*(grad(v) + grad(v).T)
def momentum(W, eta, g, H):
(u, p) = TrialFunctions(W)
(v, q) = TestFunctions(W)
F = (2.0*eta*
+ div(v)*p*dx
+ div(u)*q*dx
+ H*inner(g, v)*dx)
return (lhs(F), rhs(F))
def compute_
#eta = exp(1.0 - triangle.x[1])
eta = 1.0
Ra = Constant(1.0e+6)
g = Constant((0.0, -1.0))
(a, L) = momentum(W, eta, g, Ra*T_)
w = Function(W)
(A, b) = assemble_system(a, L, bcs)
solve(a == L, w, bcs)
return w
mesh = Rectangle(0, 0, 1.0, 1.0, 60, 80)
V2 = VectorFunctionS
V1 = FunctionSpace(mesh, "CG", 1)
W = V2 * V1
Q = FunctionSpace(mesh, "DG", 2)
top = DirichletBC(
bottom = DirichletBC(
left = DirichletBC(
right = DirichletBC(
bcs = [bottom, top, left, right]
T0=Expression("(1.0 - x[1]*x[1]) + 0.01*cos(
Tic = interpolate(T0, Q)
w_ = compute_
(u, p) = split(w_)
(u_,p_) =w_.split()
plot(u_)
plot(u)
interactive()
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Marie Rognes
- Solved:
- Last query:
- Last reply: