artisynth.core.femmodels
Class FemReader

java.lang.Object
  extended by artisynth.core.femmodels.FemReader

public class FemReader
extends java.lang.Object

Convenience routines for reading any FE file format

Author:
Antonio

Nested Class Summary
static class FemReader.FemFileType
           
 
Constructor Summary
FemReader()
           
 
Method Summary
static FemReader.FemFileType detectType(java.lang.String fileName)
          Currently only detects type by file extension.
static FemModel3d read(FemModel3d model, java.lang.String fileName, FemReader.FemFileType type)
          Attempts to read a FEM file, filling in the model "model".
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FemReader

public FemReader()
Method Detail

read

public static FemModel3d read(FemModel3d model,
                              java.lang.String fileName,
                              FemReader.FemFileType type)
                       throws java.io.IOException
Attempts to read a FEM file, filling in the model "model". If == null, a new model is created.

Parameters:
model - the model to assemble
fileName - the file to read. For multi-file formats like ANSYS and TETGEN, supply the element file name, or else it will try to find the corresponding ".ele" or ".elem" file to distinguish between them
type - the file format (from ABAQUS, ANSYS, TETGEN)
Returns:
The created model
Throws:
java.io.IOException - if there is a read error

detectType

public static FemReader.FemFileType detectType(java.lang.String fileName)
Currently only detects type by file extension. For Abaqus use .inp, Ansys .elem, and Tetgen .ele. If a .node is supplied, the method will try to find a corresponding .ele or .elem file.

Parameters:
fileName -
Returns:
type of the file
Throws:
java.io.IOException