FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

tetgenToFoam.C File Reference

Converts .ele and .node and .face files, written by tetgen. More...


Detailed Description

Converts .ele and .node and .face files, written by tetgen.

Make sure to use add boundary attributes to the smesh file (5 fifth column in the element section) and run tetgen with -f option.

Sample smesh file:

# cube.smesh -- A 10x10x10 cube
8 3
1	0 0 0
2	0 10 0
3	10 10 0
4	10 0 0
5	0 0 10
6	0 10 10
7	10 10 10
8	10 0 10
6 1 # 1 for boundary info present
4	1 2 3 4 11  # region number 11
4	5 6 7 8 21  # region number 21
4	1 2 6 5 3
4	4 3 7 8 43
4	1 5 8 4 5
4	2 6 7 3 65
0
0

NOTE:

  • for some reason boundary faces point inwards. I just reverse them always. Might use some geometric check instead.
  • marked faces might not actually be boundary faces of mesh. This is hopefully handled now by first constructing without boundaries and then reconstructing with boundary faces.
Usage
  • tetgenToFoam [OPTIONS] <file prefix>
Parameters:
\<fileprefix>
Todo:
Detailed description of argument.
Parameters:
-noFaceFile
Ignore the face file.
-case<dir>
Case directory.
-parallel
Run in parallel.
-help
Display help message.
-doc
Display Doxygen API documentation page for this application.
-srcDoc
Display Doxygen source documentation page for this application.

Definition in file tetgenToFoam.C.

#include "src/OpenFOAM/global/argList/argList.H"
#include "src/OpenFOAM/db/Time/Time.H"
#include "src/OpenFOAM/meshes/polyMesh/polyMesh.H"
#include "src/OpenFOAM/db/IOstreams/Fstreams/IFstream.H"
#include "src/OpenFOAM/meshes/meshShapes/cellModeller/cellModeller.H"
#include "src/OpenFOAM/include/setRootCase.H"
#include "src/OpenFOAM/include/createTime.H"
Include dependency graph for tetgenToFoam.C:

Go to the source code of this file.