org.jcae.mesh
Class Mesher

java.lang.Object
  extended by org.jcae.mesh.Mesher

public class Mesher
extends java.lang.Object

Main class to mesh a surface. This Mesher class takes as input a file name containing the CAD surface, mesh hypothesis (length and deflection), computes a mesh according to these hypothesis and store it onto disk. This class allows to set all explicit constraints desired by the user, and to set all implicit constraints linked to mesher requirement. The main idea of mesh generation is to sub-structure the mesh linked to the geometric shape into several sub-meshes according to specifications and geometry decomposition (see mesh.MeshMesh.initMesh()).


Field Summary
protected  double deflection
          meshing constraint: deflection
protected  double edgeLength
          meshing constraint: edge length
protected  java.lang.String geometryFile
          The geometry file to be meshed
protected  java.lang.String outputDir
          The output directory
protected  CADShape shape
          CAD shape
protected  java.lang.String unvName
          The file where to export the mesh in UNV format
 
Constructor Summary
Mesher()
           
 
Method Summary
protected  void exportMesh()
          Export the created mesh to various format
static void main(java.lang.String[] args)
          main method, reads arguments and calls mesh() method
protected  TIntArrayList mesh()
          Run the mesh
protected  MMesh1D mesh1D(java.lang.String brepFile)
          Compute 1D mesh
protected  boolean mesh2D(int iFace, CADFace face, MMesh1D mesh1D, MeshParameters mp, java.lang.String brepFile, MeshTraitsBuilder mtb)
          Read the 1D mesh and compute 2D meshes
protected  void mesh3D(java.lang.String brepFile)
          Read 2D meshes and compute 3D mesh
protected  void parseCommandLine(java.lang.String[] args)
           
protected  void readProperties()
          Read system properties which affect the meshing behavior.
protected  void report(TIntArrayList badGroups, java.lang.String startDate)
          Create a report to the file specified by the org.jcae.mesh.Mesher.reportFile system property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

edgeLength

protected double edgeLength
meshing constraint: edge length


deflection

protected double deflection
meshing constraint: deflection


geometryFile

protected java.lang.String geometryFile
The geometry file to be meshed


shape

protected CADShape shape
CAD shape


unvName

protected java.lang.String unvName
The file where to export the mesh in UNV format


outputDir

protected java.lang.String outputDir
The output directory

Constructor Detail

Mesher

public Mesher()
Method Detail

readProperties

protected void readProperties()
Read system properties which affect the meshing behavior. See package level javadoc for more information.


mesh1D

protected MMesh1D mesh1D(java.lang.String brepFile)
Compute 1D mesh

Parameters:
brepFile - basename of the BRep file

mesh2D

protected boolean mesh2D(int iFace,
                         CADFace face,
                         MMesh1D mesh1D,
                         MeshParameters mp,
                         java.lang.String brepFile,
                         MeshTraitsBuilder mtb)
Read the 1D mesh and compute 2D meshes

Parameters:
iFace - the id of the face to be meshed
face - topological face
mesh1D - the boundary mesh used to create this 2D mesh
brepFile - basename of the BRep file
mtb - container for 2D mesh traits
Returns:
true if face had been successfully meshed, false otherwise.

exportMesh

protected void exportMesh()
Export the created mesh to various format


mesh3D

protected void mesh3D(java.lang.String brepFile)
Read 2D meshes and compute 3D mesh

Parameters:
brepFile -

mesh

protected TIntArrayList mesh()
Run the mesh

Returns:
the list of face id on which the mesher failed

report

protected void report(TIntArrayList badGroups,
                      java.lang.String startDate)
Create a report to the file specified by the org.jcae.mesh.Mesher.reportFile system property.

Parameters:
badGroups - The list of face id which failed
startDate - The date when the mesher was started

parseCommandLine

protected void parseCommandLine(java.lang.String[] args)
                         throws java.io.IOException
Parameters:
args - The main function argument
Throws:
java.io.IOException - If the creation of the output directory failed

main

public static void main(java.lang.String[] args)
main method, reads arguments and calls mesh() method

Parameters:
args - an array of String, filename, algorithm type and constraint value