dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #22946
[Question #155668]: matrix valued function
New question #155668 on DOLFIN:
https://answers.launchpad.net/dolfin/+question/155668
Hi @all,
i try to solve a non-linear stokes problem with a matrix valued factor similiar to
(inner( mu( inner(gamma, gamma) )*nabla u, v) - inner( p, div(v) ))*dx + .... = ....
and gamma is given with a formula similar to:
gamma = gamma + dt * (gamma - nabla u)
How should I implement this problem with DOLFIN in Python? C++ is an option too :)
The simple way
(u, p) = TrialFunctions(...)
gamma =grad(u)
a= (inner( mu( inner(gamma, gamma) )*nabla u, v) - inner( p, div(v) ))*dx
gamma = gamma + dt * (gamma - nabla u)
will not work.
something like
a.gamma = gamma + dt * (gamma - nabla u)
does not work too, because the form does not have an attribute gamma.
swap = gamma + dt * (gamma - nabla u)
gamma.assign(swap)
does not work, because the gradient (type?, expression?) does not have the attribute (member function?) assign.
Is there any way to solve such a problem with Dolfin? If yes.. how does it look like?
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.