Skip to topic | Skip to bottom
Home

Start of topic | Skip to actions

Input Mesh Format for SFC

Steps to create an input shell mesh to be used in the SFC code:

(1) Use any mesher (such as gmsh) to create a triangulation of the domain of interest.

(2) Convert the triangulation into the following smf -- simple mesh format:



number of nodes number of elements
coordinates x y z
.
.
.
connectivity i j k
.
.
.


It is important that the node numbering starts with 0 and not 1.

There is already a conversion code from gmsh to smf format in sfc/shells/filters/gmsh2smf.cc available.

Example of an smf file that contains 2 triangles sharing an edge (sharing 2 nodes):

4 2
0.0 0.0 0.0
0.0 1.0 0.0
1.0 0.0 0.0
1.0 1.0 0.0
3 0 2
0 1 2

The first line has the number of nodes followed by the number of elements
The second line is the coordinates for node number 0
...
The fifth line is the coordinates for node number 3
The sixth line is the connectivity of the first element
The seventh line is the connectivity of the second element

(3) A proper input mesh for SFC needs to be (at least) once subdivided by quadrisection. There is a stand-alone subdivision code available in the sfc/shells/subdiv/ directory. This code can be easily adjusted to allow different levels and types of subdivision by modifying SampleMain?.cc driver. The AveragingLoop?<> functor implements the classical Loop subdivision scheme and the AveragingBasic?<> functor implements basic linear averaging. In practical terms modifying SampleMain?.cc involves only commenting or uncommenting the proper lines.

(4) After compiling the stand-alone subdivision code, run the executable using your mesh created in step 2 as input. For example, if the executable is called subdiv then run as follows: subdiv < input.smf > outputSubdivided.smf

(5) Now you are ready to use outputSubdivided.smf as an input for the sfc code!

-- TamerElsayed

You are here: SFC > MeshConversionWithSubdivision

to top

Copyright © 1997-2024 California Institute of Technology.