<div dir="ltr"><div dir="ltr">On Fri, Apr 21, 2023 at 10:36 AM neil liu <<a href="mailto:liufield@gmail.com">liufield@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>When you say "For multicomponent spaces, we currently do not represent it as a tensor product over the scalar space, so we see 6 basis vectors."</div><div>Here, muticomponent = two dimensional ? </div></div></blockquote><div><br></div><div>If you have a vector in a two-dimensional space, it has 2 components, like our coordinate vector.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I am a little confused about the dimensions of the basis functions here. From <a href="https://petsc.org/release//src/dm/dt/fe/impls/basic/febasic.c.html#PETSCFEBASIC" target="_blank">https://petsc.org/release//src/dm/dt/fe/impls/basic/febasic.c.html#PETSCFEBASIC</a></div><div><pre width="80" style="color:rgb(0,0,0)"><a name="m_-5516434620370843559_line144">144: </a> <font color="#B22222">/* B[npoints, nodes, Nc] = tmpB[npoints, prime, Nc] * invV[prime, nodes] */</font>
</pre><pre width="80"><font color="#b22222">How do you define tmpB here (npoints =3, prime =6, Nc =2)? I can get tmpB from </font></pre><pre width="80">PetscSpaceEvaluate_Polynomial, where, tmpB (1x9) is (the prime polynomial is defined by 1 x y))</pre><pre width="80">[ 1 -0.6667 -0.6667 1 -0.6667 0.3333 1 0.3333 -0.6666]. How do you transform from this 1x9 to 3x6x2 there. </pre></div></div></blockquote><div><br></div><div>npoints is the number of quadrature points at which to evaluate</div><div><br></div><div>nodes (pdim) is the number of functions in the space</div><div><br></div><div>Nc is the number of components for each function.</div><div><br></div><div>So a P1 basis for vectors looks like</div><div><br></div><div> / 1 \ / 0 \ / x \ / 0 \ / y \ / 0 \</div><div> \ 0 / \ 1 / \ 0 / \ x / \ 0 / \ y /</div><div><br></div><div>six vectors with 2 components each.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><pre width="80">Thanks, </pre><pre width="80">Xiaodong </pre></div><div><br></div><div><br></div><div><br></div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 21, 2023 at 10:05 AM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Fri, Apr 21, 2023 at 10:02 AM neil liu <<a href="mailto:liufield@gmail.com" target="_blank">liufield@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Hello, Petsc group,<br></div><div dir="ltr"><div><br></div><div>I am learning the FE structure in Petsc by running case </div><div><a href="https://petsc.org/main/src/snes/tutorials/ex12.c.html" target="_blank">https://petsc.org/main/src/snes/tutorials/ex12.c.html</a> with <span style="color:rgb(178,34,34)">-run_type test -bc_type dirichlet -dm_plex_interpolate 0 -petscspace_degree 1 -show_initial -dm_plex_print_fem 1</span></div></div></div></div></blockquote><div><br></div><div>-dm_plex_print_fem 5 will print much more</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div>When I check the subroutine<span style="color:rgb(178,34,34)"> </span>PetscFECreateTabulation_Basic, I can not understand some parameters there. </div><div><br></div><div>For the following lines in the file (<a href="https://petsc.org/release//src/dm/dt/fe/impls/basic/febasic.c.html#PETSCFEBASIC" target="_blank">https://petsc.org/release//src/dm/dt/fe/impls/basic/febasic.c.html#PETSCFEBASIC</a>)</div><div><pre width="80" style="color:rgb(0,0,0)"><a name="m_-5516434620370843559_m_3592559787075324266_m_2405164071719226631_m_-7005950170468391748_line135">135: </a> <a href="https://petsc.org/release//manualpages/Sys/PetscCall/" target="_blank">PetscCall</a>(<a href="https://petsc.org/release//manualpages/DUALSPACE/PetscDualSpaceGetDimension/" target="_blank">PetscDualSpaceGetDimension</a>(fem->dualSpace, &pdim));
<a name="m_-5516434620370843559_m_3592559787075324266_m_2405164071719226631_m_-7005950170468391748_line136">136: </a> <a href="https://petsc.org/release//manualpages/Sys/PetscCall/" target="_blank">PetscCall</a>(<a href="https://petsc.org/release//manualpages/FE/PetscFEGetNumComponents/" target="_blank">PetscFEGetNumComponents</a>(fem, &Nc));</pre><pre width="80" style="color:rgb(0,0,0)">Here, Nc = 2, pdim =6. I am running a scalar case with degree of 1, </pre><pre width="80" style="color:rgb(0,0,0)">I expect Nc = 1 and pdim =3. Could you please explain this? In addition,</pre></div></div></div></div></blockquote><div>Sure. I am guessing that you are looking at the tabulation for the coordinate space. Here you are in 2 dimensions, so the</div><div>coordinate space has Nc = 2. For multicomponent spaces, we currently do not represent it as a tensor product over the</div><div>scalar space, so we see 6 basis vectors.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><pre width="80" style="color:rgb(0,0,0)">Thanks, </pre><pre width="80" style="color:rgb(0,0,0)">Xiaodong</pre><pre width="80" style="color:rgb(0,0,0)"><br></pre></div><div><span style="color:rgb(178,34,34)"><br></span></div></div>
</div></div>
</blockquote></div><br clear="all"><div><br></div><span>-- </span><br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>