Hi Zou,
It was great seeing your presentation at the IMR23 and I am glad to see you are progressing towards implementing the NEFEM work to the Nektar++ environment. 
I haven't used the .plt Swansea converter and without the mesh file, it will be hard to debug. I suppose only Dave can comment on the details knowing your conventions in the .plt file. 

Regarding your question: I don't think it is necessary to specify the High-Order(Curvature information - FaceNodes) to the boundary faces in InputSwan.cpp. I think they are reconstructed later on in the OutputNekpp.cpp(TransferCurves) module directly from the 3D element.  However, you should specify this information in your 3D element in the first place. 

That being said, from the error message, I suspect the error comes even before this when OutputNekpp calls MakeOrder() function. 
The ASSERT error looks for the number of vertices you have given to the element and complains it's not 3(triangles) or 4(quads) when trying to populate the faces with FaceNodes. 
You can check the number of vertices for the faces in the InputSwan.cpp module and if investigate why it's not 3 or 4. 

Is it possible that you have specified the high-order curvature information in the VertexList instead of in the FaceNodes? 
This is not consistent with the NekMesh data structure conventions - Vertex -> Edge -> EdgeNodes (Edge Curvature Info)-> Face -> FaceNodes(Face Curvature Info) -> Element-> VolumeNodes (Element Curvature Info)

I hope this helps. If not, I recommend trying a smaller test mesh with <10-12 elements, where we can investigate the problem with a GDB for example.  
Kind Regards,
Kaloyan 



From: nektar-users-bounces@imperial.ac.uk <nektar-users-bounces@imperial.ac.uk> on behalf of Xi Zou <xi.zou@swansea.ac.uk>
Sent: Wednesday, March 15, 2023 3:41 PM
To: nektar-users <nektar-users@imperial.ac.uk>
Cc: Moxey, David <david.moxey@kcl.ac.uk>
Subject: [Nektar-users] Reading high-order tet mesh in Swansea format
 

This email from xi.zou@swansea.ac.uk originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list to disable email stamping for this address.

 

Dear all,

I have just started studying Nektar++ for the purpose of adding a new type of element for my research. It is my pleasure to join this great user group.

As a first step, I'm exploring the function for reading my mesh in Swansea .plt format, which is virtual void Nektar::NekMesh::InputSwan::Process() within file library/NekMesh/Module/InputModules/InputSwan.cpp. Some improvements have been made to the function so it successfully converts a linear .plt mesh in Swansea format to a Nektar++ .xml session file with boundary faces on each surface fall into an individual COMPOSITE.
However, the function seems able to read the 3rd order tetrahedral mesh (at least for the connectivity), but the boundary faces are just linear triangles. Would the subsequent processing convert the linear faces into curved ones?
In fact, the 
NekMesh main function will crash after a successful return from InputSwan::Process():

[InputSwan]   Reading Swansea mesh file 'm6.plt'
[InputSwan]   # tetrahedra : 235377
[InputSwan]   # points     : 1079083
[InputSwan]   mesh order   : 3
[InputSwan]   ND           : 20
[InputSwan]   Mesh statistics:
[InputSwan]     - Mesh dimension       : 3
[InputSwan]     - Element dimension    : 3
[InputSwan]     - Has CAD attached     : no
[InputSwan]     - Node count           : 41093
[InputSwan]     - Edge count           : 281235
[InputSwan]     - Face count           : 475520
[InputSwan]     - Elements             : 235377
[InputSwan]     - Bnd elements         : 9532
[InputSwan]     - Number of composites : 19
[InputSwan]     - Lower mesh extent    : -125 0 -125
[InputSwan]     - Upper mesh extent    : 125 124.901 125
[InputSwan]   Element counts (regular/deformed/total):
[InputSwan]     - Triangle    : 0             9532          9532        
[InputSwan]     - Tetrahedron : 0             235377        235377      
[InputSwan]   Finished reading mesh.
[InputSwan]    - Element dimension        : 3
[InputSwan]    - Space dimension          : 3
[InputSwan]    - No. of nodes             : 41093
[InputSwan]    - No. of 3D elements       : 235377
[InputSwan]    - No. of boundary elements : 9532
[InputSwan]     - Elapsed time: 156.314s.
[OutputNekpp] Writing Nektar++ file 'm6.xml'
Fatal   : Level 0 assertion violation
Where   : /lustre/xi.zou/Documents/work_folder/nektar/nektar-v5.2.0/library/NekMesh/MeshElements/Face.cpp[79]
Message : Face nodes of tensor product only supported for quadrilaterals.
terminate called after throwing an instance of 'Nektar::ErrorUtil::NekError'
  what():  Level 0 assertion violation
Where   : /lustre/xi.zou/Documents/work_folder/nektar/nektar-v5.2.0/library/NekMesh/MeshElements/Face.cpp[79]
Message : Face nodes of tensor product only supported for quadrilaterals.

I look forward to hearing from the experts on NekMesh and a further discussion.

Best regards,
Xi

 

 

Dr. Xi Zou

xi.zou@swansea.ac.uk

 

Research Assistant

Zienkiewicz Institute for Modelling, Data and AI

Faculty of Science and Engineering

Swansea University

Swansea, UK