← Back to team overview

dolfin team mailing list archive

Re: [Question #156163]: Depth-averaged Stokes flow vector formulation

 

Question #156163 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/156163

Douglas Brinkerhoff posted a new comment:
At least with a bit of revision.  Using the as_matrix construct in
tandem with the vector space notations.  I didn't realize that you could
just index your vector trial functions, e.g. u[0] = the u component of
velocity, u[1]=the y component of velocity.  So you can make tensors
like this:

as_matrix(((u[0].dx(0)+u[1].dx(1),0),(0,u[0].dx(0)+u[1].dx(1))))

Very easy.

-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.