<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 2, 2015 at 6:13 AM, Justin Chang <span dir="ltr"><<a href="mailto:jychang48@gmail.com" target="_blank">jychang48@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>In FEniCS's Stokes example (example 19), one defines the Taylor-Hood function spaces with these three lines:<br><br>V = VectorFunctionSpace(mesh, "CG", 2)<br>Q = FunctionSpace(mesh, "CG", 1)<br>W = V * Q<br><br>To implement P2/(P1+P0), all we gotta do is this:<br></div><br>V = VectorFunctionSpace(mesh, "CG", 2)<br>Q = FunctionSpace(mesh, "CG", 1)<br>P = FunctionSpace(mesh, "DG", 0)<br>W = V * (Q + P)<br></div></div></div></div></div></div></blockquote><div><br></div><div>So here you would need 4 dual basis vectors, which I am assuming are:</div><div><br></div><div> ev_(-1, -1), ev_(1, -1), ev_(-1, 1), ev_(-0.5, -0.5)</div><div><br></div><div>where ev_(x, y) is the point evaluation functional at (x, y). Then you need</div><div>some basis for the primal space, which naively is</div><div><br></div><div> 1, x, y, 1</div><div><br></div><div>As you can see, this basis in linearly dependent, so the Vandermonde matrix</div><div>that FIAT constructs will be singular. The construction of a nodal basis will fail.</div><div><br></div><div>So Jed's question is, what are they actually doing internally?</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div></div>Everything else (boundary conditions, variational form, etc) remains the same. The sum of element-wise divergence (via assemble(div(u)*dx)) for the former is -0.000454806468878 whereas the latter its 3.91121126886e-14 hence ensuring (better) local mass conservation.<br><br></div>I haven't looked into the exact framework on how this is done, but attached are the UFL/FFC generated header files that implement the Taylor-Hood and Modified Taylor-Hood discretization.<br><br></div>Not sure how it's done in Deal.II, but IIRC it should be possible.<br><br></div>Thanks,<br></div>Justin<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 2, 2015 at 12:31 AM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>Justin Chang <<a href="mailto:jychang48@gmail.com" target="_blank">jychang48@gmail.com</a>> writes:<br>
> I am not quite sure what you're asking for. Are you asking for how people<br>
> actually implement this augmented TH? In other words, how the shape/basis<br>
> functions for this mixed function space would look?<br>
<br>
</span>Ciarlet's finite element definition requires a local approximation space<br>
("P1+P0" in your case -- though P0 is a subset of P1 so this is actually<br>
just P1) and a set of "nodes" (a dual basis, which will define the basis<br>
functions used for computation and the continuity between elements).<br>
The dual basis needs to be unisolvent, such that the Vandermonde matrix<br>
is invertible.<br>
<br>
Now what might that look like for "P1+P0"?<br>
<br>
And if you bypass Ciarlet's construction and just try to pick some<br>
"basis" functions, say {(1-x)/2, (1+x)/2, 1} for the 1D simplex [-1,1],<br>
then you can express the constant f(x)=1 as u=(1,1,0), v=(0,0,1), or t*u<br>
+ (1-t)*v for any real value t. Clearly it fails to be a basis because<br>
it's linearly dependent.<br>
<br>
Can you still compute with it? The answer is probably yes if you pin<br>
some cell displacement, but that causes a bunch of somewhat unattractive<br>
side-effects that I asked about in my earlier message.<br>
<br>
Now you said it was "just a few additional lines of code", so maybe you<br>
can explain how people are implementing it.<br>
<span><br>
> I have only seen in some key note lectures and presentations at<br>
> conferences briefly mentioning this P2/(P1+P0) element, as if it's the<br>
> de facto discretization for Stokes flows.<br>
<br>
</span>It's hardly "de facto".<br>
<div><div><br>
> That said, even I am not too sure how this would look.<br>
<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>