<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-fareast-language:EN-US;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NL-BE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Dear Nicolas,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><span lang="EN-US">Thank you for your help. I followed your advice, and projected on the Lagrange basis before generating a results file for gmsh. It worked like a charm, I have been able to interface easily with gmsh and can now visualize
hp-FEM solutions up to order 10 on very coarse meshes (see some nice snapshots below). It looks awesome, thanks.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Hadrien<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="FR">A duct mode, coarse T4 mesh, p=8, visu. order 8<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:NL-BE"><img width="952" height="876" id="Picture_x0020_2" src="cid:image001.png@01D2AD73.52E35480" alt="cid:image001.png@01D2AD70.392FEBF0"></span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Diffraction of a plane wave by a sphere, coarse T10 mesh, visualization order 6, computational order 6<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:NL-BE"><img width="912" height="842" id="Picture_x0020_1" src="cid:image002.png@01D2AD73.52E35480" alt="cid:image003.png@01D2AD72.61A00640"></span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="mso-fareast-language:NL-BE">-----Original Message-----<br>
From: gmsh [mailto:gmsh-bounces@ace20.montefiore.ulg.ac.be] On Behalf Of Marsic, Nicolas<br>
Sent: samedi 1 avril 2017 12:56<br>
To: gmsh@onelab.info<br>
Subject: Re: [Gmsh] High-order visualization for hp-FEM solutions</span></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Dear Hadrien,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">The current solution to visualize higher-order fields, is to project it into a Lagrange basis (the one used by gmsh for the high-order visu).<o:p></o:p></p>
<p class="MsoPlainText">A better solution is perhaps to allow the user to enter his own basis functions, defining thus an InterpolationSheme per orientation, as you suggested.<o:p></o:p></p>
<p class="MsoPlainText">But this is not possible yet...<o:p></o:p></p>
<p class="MsoPlainText">The 'projection-on-a-Lagrange-basis' solution has the good point that only one well defined basis is used, and it is up to the user to accommodate to the interface...<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">If you want an example, you can have a look at the small_fem solver:<o:p></o:p></p>
<p class="MsoPlainText"><a href="http://gitlab.onelab.info/gmsh/small_fem"><span style="color:windowtext;text-decoration:none">http://gitlab.onelab.info/gmsh/small_fem</span></a><o:p></o:p></p>
<p class="MsoPlainText">It uses the 'projection-on-a-Lagrange-basis' solution.<o:p></o:p></p>
<p class="MsoPlainText">The class postprocessing/FEMSolution (FEMSolution.cpp; FEMSolution.h and<o:p></o:p></p>
<p class="MsoPlainText">FEMSolutionInclusion.h)<o:p></o:p></p>
<p class="MsoPlainText">could be a good starting point if you want to get some inspiration :-).<o:p></o:p></p>
<p class="MsoPlainText">By the way, I think that small_fem uses the same basis functions as hp-fem ;-).<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Regarding the CG vs DG, the gmsh Lagrange basis function are defined in a CG way.<o:p></o:p></p>
<p class="MsoPlainText">So you will end up with correct solution.<o:p></o:p></p>
<p class="MsoPlainText">And finally, if you want a high-order vector solution, you have to project the 3 components of the vector field.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I hope this helps.<o:p></o:p></p>
<p class="MsoPlainText">Best,<o:p></o:p></p>
<p class="MsoPlainText">Nicolas.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">On 28/03/17 12:15, Beriot, Hadrien wrote:<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> Hello there,<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> I have a question regarding the visualization of high-order FEM
<o:p></o:p></p>
<p class="MsoPlainText">> solutions. I would like to use this feature for visualizing highly
<o:p></o:p></p>
<p class="MsoPlainText">> oscillatory solutions arising from high-order p-FEM solutions (for
<o:p></o:p></p>
<p class="MsoPlainText">> instance used in frequency domain electromagnetics and acoustics)?<o:p></o:p></p>
<p class="MsoPlainText">> There, by contrast to high-order DG, the difficulty I see is that each
<o:p></o:p></p>
<p class="MsoPlainText">> element has a unique edge/face orientation, which results pretty much
<o:p></o:p></p>
<p class="MsoPlainText">> in a different basis definition for each element.<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> Considering the tetrahedral element for instance, there are usually 6
<o:p></o:p></p>
<p class="MsoPlainText">> different possible orientations per face, which yields a total of 1296
<o:p></o:p></p>
<p class="MsoPlainText">> different possible basis definitions. In my current understanding,
<o:p></o:p></p>
<p class="MsoPlainText">> this would require defining 6^4=1296 different “$InterpolationScheme”<o:p></o:p></p>
<p class="MsoPlainText">> entities in the input file for gmsh (for the edges shape functions, a
<o:p></o:p></p>
<p class="MsoPlainText">> workaround can be found by simply multiplying the shape function
<o:p></o:p></p>
<p class="MsoPlainText">> contribution by +1 or -1 depending on the local edge orientation).<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> Before I start the actual implementation to make some tests, I would
<o:p></o:p></p>
<p class="MsoPlainText">> like to know whether<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> 1. Has anyone tried the high-order visualization feature for<o:p></o:p></p>
<p class="MsoPlainText">> viewing 3D p-FEM solutions (integrated Legendre basis)?<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> 2. Can the current implementation cope with a very large number of<o:p></o:p></p>
<p class="MsoPlainText">> interpolation schemes (approx. one per element)? Would it still
<o:p></o:p></p>
<p class="MsoPlainText">> perform correctly on large models?<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> Thanks for your help!<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> Kind regards,<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> Hadrien<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> _______________________________________________<o:p></o:p></p>
<p class="MsoPlainText">> gmsh mailing list<o:p></o:p></p>
<p class="MsoPlainText">> <a href="mailto:gmsh@onelab.info"><span style="color:windowtext;text-decoration:none">gmsh@onelab.info</span></a><o:p></o:p></p>
<p class="MsoPlainText">> <a href="http://onelab.info/mailman/listinfo/gmsh"><span style="color:windowtext;text-decoration:none">http://onelab.info/mailman/listinfo/gmsh</span></a><o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">_______________________________________________<o:p></o:p></p>
<p class="MsoPlainText">gmsh mailing list<o:p></o:p></p>
<p class="MsoPlainText"><a href="mailto:gmsh@onelab.info"><span style="color:windowtext;text-decoration:none">gmsh@onelab.info</span></a><o:p></o:p></p>
<p class="MsoPlainText"><a href="http://onelab.info/mailman/listinfo/gmsh"><span style="color:windowtext;text-decoration:none">http://onelab.info/mailman/listinfo/gmsh</span></a><o:p></o:p></p>
</div>
</body>
</html>