Question #123984 on DOLFIN changed: https://answers.launchpad.net/dolfin/+question/123984
Garth Wells proposed the following answer: On 04/09/10 15:20, Kristian Ølgaard wrote: > On 4 September 2010 15:32, Dominique > <question123...@answers.launchpad.net> wrote: >> Question #123984 on DOLFIN changed: >> https://answers.launchpad.net/dolfin/+question/123984 >> >> Status: Answered => Open >> >> Dominique is still having a problem: >> Johan, >> >> Thanks for the pointer. I had looked at the hyperelasticity demo. I >> should have called my post "Second derivatives of a weak form". In the >> hyperelasticity demo, the weak form is L(v,u)=0 and that is only >> differentiated once. What I'd like to do is differentiate the result >> once more. If I try >> >> d2u = TrialFunction(V) > > Test- and TrialFunction are just helper functions for pretty syntax. > They will both return an instance of the class ufl.Argument, the > TestFunction with count = -2, TrialFunction with count = -1, when you > take the derivative w.r.t. yet another TrialFunction in your form I > suspect you end up with something TrialFunction*TrialFunction which is > not a linear in each basis function argument. So I think you need to > use Argument(element, 0), or something to get your rank 3 tensor. > And bear in mind that DOLFIN doesn't provide any rank 3 tensors that can be assembled into. You would have to provide this yourself. Garth > Kristian > >> da = derivative(a, u, d2u) >> print assemble(da, mesh=mesh) >> >> in the hyperelasticity demo, I get the same error as in my initial >> message. >> >> In my test example above, a(v,u)=0 is a weak form. Differentiating it >> once is OK, but what is the trick to compute second derivatives? >> >> If I'm missing your point, I'm sorry but could you please explain what >> is wrong in my example? I'm expecting to obtain a tensor of order 3, or >> a collection of matrices. I may not be going about it in the right way. >> >> Thanks! >> Dominique >> >> -- >> You received this question notification because you are a member of >> DOLFIN Team, which is an answer contact for DOLFIN. >> >> _______________________________________________ >> Mailing list: https://launchpad.net/~dolfin >> Post to : dolfin@lists.launchpad.net >> Unsubscribe : https://launchpad.net/~dolfin >> More help : https://help.launchpad.net/ListHelp >> > > _______________________________________________ > Mailing list: https://launchpad.net/~dolfin > Post to : dolfin@lists.launchpad.net > Unsubscribe : https://launchpad.net/~dolfin > More help : https://help.launchpad.net/ListHelp -- You received this question notification because you are a member of DOLFIN Team, which is an answer contact for DOLFIN. _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp