fhm.edu.fem.util.io
Class FEMINLoader

java.lang.Object
  extended by fhm.edu.fem.util.io.FEMINLoader

public class FEMINLoader
extends java.lang.Object

Class Description: This class takes care of loading the FEMIN file

Author:
Thomas Woellert (thomas@woellert.net), Stefan Weissbach (weissbst@gmx.de)

Field Summary
protected  BorderList borderList
           
protected  java.util.List<Calculation> calculationList
           
protected  CTabList ctabList
           
protected  ElementList elementList
           
protected  int femApproach
           
protected static Logger localLogger
           
protected  double membraneCircleCenterX
           
protected  double membraneCircleCenterY
           
protected  double membraneCircleCondition
           
protected  double membraneCircleRadius1
           
protected  double membraneCircleRadius2
           
protected  int membraneCircleSections
           
protected  NodeList nodeList
           
protected  ForceList spannerForceList
           
protected  double spannerMaterialConstantE
           
protected  double spannerMaterialConstantH
           
protected  double spannerMaterialConstantHS
           
protected  double spannerMaterialConstantV
           
 
Constructor Summary
FEMINLoader()
          Construct a new FEMINLoader
 
Method Summary
 BorderList getBorders()
          Retrieve all borders
 java.util.List<Calculation> getCalculations()
          Retrieve all calculations
 CTabList getCTabs()
          Retrieve all ctabs
 ElementList getElements()
          Retrieve all elements
 int getFEMApproach()
          Retrieve the FEM approach to use
 double getMembraneCircleCenterX()
           
 double getMembraneCircleCenterY()
           
 double getMembraneCircleCondition()
           
 double getMembraneCircleRadius1()
           
 double getMembraneCircleRadius2()
           
 int getMembraneCircleSections()
           
 NodeList getNodes()
          Retrieve all nodes
 ForceList getSpannerForceList()
           
 double getSpannerMaterialConstantE()
           
 double getSpannerMaterialConstantH()
           
 double getSpannerMaterialConstantHS()
           
 double getSpannerMaterialConstantV()
           
 boolean load(java.io.File inFile)
          Load all settings from the given file
protected  boolean loadBorders(java.io.StringReader reader)
          Loads all border information from the given string starting at the given index
protected  boolean loadCalculation(java.io.StringReader reader)
          Loads all calculation information from the given string starting at the given index
protected  boolean loadCtabs(java.io.StringReader reader)
          Loads all ctab information from the given string starting at the given index
protected  boolean loadElements(java.io.StringReader reader)
          Loads all element information from the given string starting at the given index
protected  boolean loadFEMInfo(java.io.StringReader reader)
          Loads the info if the file is in format FEM 2 (linear approach) or FEM 3 (quadratic approach)
protected  boolean loadMembraneCircleCenter(java.io.StringReader reader)
          Loads the center point of a mebrane circle
protected  boolean loadMembraneCircleCondition(java.io.StringReader reader)
          Loads the border condition of a mebrane circle
protected  boolean loadMembraneCircleRadius1(java.io.StringReader reader)
          Loads the radius1 of a mebrane circle
protected  boolean loadMembraneCircleRadius2(java.io.StringReader reader)
          Loads the radius2 of a mebrane circle
protected  boolean loadMembraneCircleSections(java.io.StringReader reader)
          Loads the number of sections for the membrane circle
protected  boolean loadNodes(java.io.StringReader reader)
          Loads all node information from the given string starting at the given index
protected  boolean loadNodesLinear(java.io.StringReader reader, int numberOfNodes)
          Submethod loading nodes from the file in case of APPROACH_LINEAR
protected  boolean loadNodesQuadratic(java.io.StringReader reader, int fullNumberOfNodes, int realNumberOfNodes)
          Submethod loading nodes from the file in case of APPROACH_QUADRATIC
protected  boolean loadSpannerForces(java.io.StringReader reader)
          Loads all spanner forces information from the given reader
protected  boolean loadSpannerMaterialConstantE(java.io.StringReader reader)
          Loads the spanner material constant E from the file
protected  boolean loadSpannerMaterialConstantH(java.io.StringReader reader)
          Loads the spanner material constant h from the file
protected  boolean loadSpannerMaterialConstantHS(java.io.StringReader reader)
          Loads the spanner material constant "Hoechstspannung" from the file
protected  boolean loadSpannerMaterialConstantV(java.io.StringReader reader)
          Loads the spanner material constant V from the file
protected  double readDouble(java.io.StringReader reader)
          Read the next number from that string, no matter if it's an integer or double
protected  int readInteger(java.io.StringReader reader)
          Read the next number from that string, no matter if it's an integer or double
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

borderList

protected BorderList borderList

calculationList

protected java.util.List<Calculation> calculationList

ctabList

protected CTabList ctabList

elementList

protected ElementList elementList

femApproach

protected int femApproach

localLogger

protected static Logger localLogger

membraneCircleCenterX

protected double membraneCircleCenterX

membraneCircleCenterY

protected double membraneCircleCenterY

membraneCircleCondition

protected double membraneCircleCondition

membraneCircleRadius1

protected double membraneCircleRadius1

membraneCircleRadius2

protected double membraneCircleRadius2

membraneCircleSections

protected int membraneCircleSections

nodeList

protected NodeList nodeList

spannerForceList

protected ForceList spannerForceList

spannerMaterialConstantE

protected double spannerMaterialConstantE

spannerMaterialConstantH

protected double spannerMaterialConstantH

spannerMaterialConstantHS

protected double spannerMaterialConstantHS

spannerMaterialConstantV

protected double spannerMaterialConstantV
Constructor Detail

FEMINLoader

public FEMINLoader()
Construct a new FEMINLoader

Method Detail

getBorders

public BorderList getBorders()
Retrieve all borders

Returns:
the list of all borders

getCalculations

public java.util.List<Calculation> getCalculations()
Retrieve all calculations

Returns:
the list of all calculations

getCTabs

public CTabList getCTabs()
Retrieve all ctabs

Returns:
the list of all ctabs

getElements

public ElementList getElements()
Retrieve all elements

Returns:
the list of all elements

getFEMApproach

public int getFEMApproach()
Retrieve the FEM approach to use

Returns:
the FEM approach

getMembraneCircleCenterX

public double getMembraneCircleCenterX()
Returns:
Returns the membraneCircleCenterX.

getMembraneCircleCenterY

public double getMembraneCircleCenterY()
Returns:
Returns the membraneCircleCenterY.

getMembraneCircleCondition

public double getMembraneCircleCondition()
Returns:
Returns the membraneCircleCondition.

getMembraneCircleRadius1

public double getMembraneCircleRadius1()
Returns:
Returns the membraneCircleRadius1.

getMembraneCircleRadius2

public double getMembraneCircleRadius2()
Returns:
Returns the membraneCircleRadius2.

getMembraneCircleSections

public int getMembraneCircleSections()
Returns:
Returns the membraneCircleSections.

getNodes

public NodeList getNodes()
Retrieve all nodes

Returns:
the list of all nodes

getSpannerForceList

public ForceList getSpannerForceList()
Returns:
Returns the spannerForceList.

getSpannerMaterialConstantE

public double getSpannerMaterialConstantE()
Returns:
Returns the spannerMaterialConstant.

getSpannerMaterialConstantH

public double getSpannerMaterialConstantH()
Returns:
Returns the spannerMaterialConstant.

getSpannerMaterialConstantHS

public double getSpannerMaterialConstantHS()
Returns:
Returns the spannerMaterialConstant.

getSpannerMaterialConstantV

public double getSpannerMaterialConstantV()
Returns:
Returns the spannerMaterialConstant.

load

public boolean load(java.io.File inFile)
Load all settings from the given file

Parameters:
inFile -
Returns:
true if all went well, false otherwise

loadBorders

protected boolean loadBorders(java.io.StringReader reader)
Loads all border information from the given string starting at the given index

Parameters:
reader, - the stringreader to read from
Returns:
true if the method was successfull, false otherwise

loadCalculation

protected boolean loadCalculation(java.io.StringReader reader)
Loads all calculation information from the given string starting at the given index

Parameters:
reader, - the stringreader to read from
Returns:
true if the method was successfull, false otherwise

loadCtabs

protected boolean loadCtabs(java.io.StringReader reader)
Loads all ctab information from the given string starting at the given index

Parameters:
reader, - the stringreader to read from
Returns:
true if the method was successfull, false otherwise

loadElements

protected boolean loadElements(java.io.StringReader reader)
Loads all element information from the given string starting at the given index

Parameters:
reader, - the stringreader to read from
Returns:
true if the method was successfull, false otherwise

loadFEMInfo

protected boolean loadFEMInfo(java.io.StringReader reader)
Loads the info if the file is in format FEM 2 (linear approach) or FEM 3 (quadratic approach)

Parameters:
reader, - the stringreader to read from
Returns:
true if the method was successfull, false otherwise

loadMembraneCircleCenter

protected boolean loadMembraneCircleCenter(java.io.StringReader reader)
Loads the center point of a mebrane circle

Parameters:
reader, - the stringreader to read from
Returns:
true if the method was successfull, false otherwise

loadMembraneCircleCondition

protected boolean loadMembraneCircleCondition(java.io.StringReader reader)
Loads the border condition of a mebrane circle

Parameters:
reader, - the stringreader to read from
Returns:
true if the method was successfull, false otherwise

loadMembraneCircleRadius1

protected boolean loadMembraneCircleRadius1(java.io.StringReader reader)
Loads the radius1 of a mebrane circle

Parameters:
reader, - the stringreader to read from
Returns:
true if the method was successfull, false otherwise

loadMembraneCircleRadius2

protected boolean loadMembraneCircleRadius2(java.io.StringReader reader)
Loads the radius2 of a mebrane circle

Parameters:
reader, - the stringreader to read from
Returns:
true if the method was successfull, false otherwise

loadMembraneCircleSections

protected boolean loadMembraneCircleSections(java.io.StringReader reader)
Loads the number of sections for the membrane circle

Parameters:
reader, - the stringreader to read from
Returns:
true if the method was successfull, false otherwise

loadNodes

protected boolean loadNodes(java.io.StringReader reader)
Loads all node information from the given string starting at the given index

Parameters:
reader, - the stringreader to read from
Returns:
true if the method was successfull, false otherwise

loadNodesLinear

protected boolean loadNodesLinear(java.io.StringReader reader,
                                  int numberOfNodes)
Submethod loading nodes from the file in case of APPROACH_LINEAR

Parameters:
reader, - the stringreader to read from
numberOfNodes, - the number of nodes to read
Returns:
true if all went well, false otherwise

loadNodesQuadratic

protected boolean loadNodesQuadratic(java.io.StringReader reader,
                                     int fullNumberOfNodes,
                                     int realNumberOfNodes)
Submethod loading nodes from the file in case of APPROACH_QUADRATIC

Parameters:
reader, - the stringreader to read from
fullNumberOfNodes, - the full number of nodes, including PSEUDO nodes
realNumberOfNodes, - the real amount of nodes which coordinates are stored in the file
Returns:
true if all went well, false otherwise

loadSpannerForces

protected boolean loadSpannerForces(java.io.StringReader reader)
Loads all spanner forces information from the given reader

Parameters:
reader, - the stringreader to read from
Returns:
true if the method was successfull, false otherwise

loadSpannerMaterialConstantE

protected boolean loadSpannerMaterialConstantE(java.io.StringReader reader)
Loads the spanner material constant E from the file

Parameters:
reader, - the stringreader to read from
Returns:
true if the method was successfull, false otherwise

loadSpannerMaterialConstantH

protected boolean loadSpannerMaterialConstantH(java.io.StringReader reader)
Loads the spanner material constant h from the file

Parameters:
reader, - the stringreader to read from
Returns:
true if the method was successfull, false otherwise

loadSpannerMaterialConstantHS

protected boolean loadSpannerMaterialConstantHS(java.io.StringReader reader)
Loads the spanner material constant "Hoechstspannung" from the file

Parameters:
reader, - the stringreader to read from
Returns:
true if the method was successfull, false otherwise

loadSpannerMaterialConstantV

protected boolean loadSpannerMaterialConstantV(java.io.StringReader reader)
Loads the spanner material constant V from the file

Parameters:
reader, - the stringreader to read from
Returns:
true if the method was successfull, false otherwise

readDouble

protected double readDouble(java.io.StringReader reader)
Read the next number from that string, no matter if it's an integer or double

Parameters:
value, - the number object where our value is stored
Returns:
the read double

readInteger

protected int readInteger(java.io.StringReader reader)
Read the next number from that string, no matter if it's an integer or double

Parameters:
value, - the number object where our value is stored
Returns:
the read integer