org.jcae.mesh.amibe.ds
Class MMesh1D

java.lang.Object
  extended by org.jcae.mesh.amibe.ds.MMesh0D
      extended by org.jcae.mesh.amibe.ds.MMesh1D

public class MMesh1D
extends MMesh0D

1D discretization of the whole shape. In order to ensure fitting in 3D space, edges are discretized only once even if they appear with several orientations.


Field Summary
 
Fields inherited from class org.jcae.mesh.amibe.ds.MMesh0D
shape
 
Constructor Summary
MMesh1D(BModel model)
           
MMesh1D(CADShape shape)
          Creates a MMesh1D instance by discretizing all edges of a given shape.
MMesh1D(java.lang.String cadFile)
          Creates a MMesh1D instance by discretizing all edges of a given shape.
 
Method Summary
 Vertex2D[] boundaryNodes(CADFace face, MeshParameters mp)
           
 void duplicateEdges()
          Duplicates edges so that boundary faces are closed.
 java.util.Set<CADFace> getAdjacentFaces(CADEdge E)
          Returns the set of faces containing this topological edge.
 java.util.Iterator<BDiscretization> getBEdgeIterator()
           
 java.util.ArrayList<MEdge1D> getEdgelistFromMap(CADEdge E)
          Returns the list of edges inserted on a given topological edge.
 CADShape getGeometry()
          Returns the topological shape.
 java.lang.String getGeometryFilename()
          Returns the file name containing the topological shape.
 java.util.ArrayList<MNode1D> getNodelistFromMap(CADEdge E)
          Returns the list of nodes inserted on a given topological edge.
 SubMesh1D getSubMesh1DFromMap(BDiscretization discrE)
          Returns the SubMesh1D instance associated with a BDiscretization.
 SubMesh1D getSubMesh1DFromMap(CADEdge E)
          Returns the SubMesh1D instance associated with a CADEdge.
 java.util.Iterator<CADEdge> getTEdgeIterator()
          Returns the list of topological edges.
 boolean isValid()
          Checks the validity of a MMesh1D instance.
 int maximalNumberOfNodes()
          Returns an upper limit of the total number of nodes
 void printInfos()
          Prints edge lengths of a MMesh1D instance.
 java.lang.String toString()
           
 void updateNodeLabels()
          Update node labels.
 
Methods inherited from class org.jcae.mesh.amibe.ds.MMesh0D
getChildDiscretization, getGeometricalVertex, getGeometricalVertex, getIndexGeometricalVertex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MMesh1D

public MMesh1D(java.lang.String cadFile)
Creates a MMesh1D instance by discretizing all edges of a given shape.

Parameters:
cadFile - file containing CAD shape

MMesh1D

public MMesh1D(CADShape shape)
Creates a MMesh1D instance by discretizing all edges of a given shape.

Parameters:
cadFile - file containing CAD shape

MMesh1D

public MMesh1D(BModel model)
Method Detail

getGeometry

public CADShape getGeometry()
Returns the topological shape.

Returns:
the topological shape.

getGeometryFilename

public java.lang.String getGeometryFilename()
Returns the file name containing the topological shape. Return null is this MMesh1D has been created from a CADShape and not from a file

Returns:
the file name containing the topological shape.

getAdjacentFaces

public java.util.Set<CADFace> getAdjacentFaces(CADEdge E)
Returns the set of faces containing this topological edge.

Returns:
the set of faces containing this topological edge.

updateNodeLabels

public void updateNodeLabels()
Update node labels.


duplicateEdges

public void duplicateEdges()
Duplicates edges so that boundary faces are closed. This method must be used after all 1D algorithms have been applied, and before any 2D meshing is performed.


getTEdgeIterator

public java.util.Iterator<CADEdge> getTEdgeIterator()
Returns the list of topological edges.

Returns:
the list of topological edges.

getBEdgeIterator

public java.util.Iterator<BDiscretization> getBEdgeIterator()

getNodelistFromMap

public java.util.ArrayList<MNode1D> getNodelistFromMap(CADEdge E)
                                                throws java.util.NoSuchElementException
Returns the list of nodes inserted on a given topological edge.

Parameters:
E - a topological edge.
Returns:
the list of nodes inserted on this edge.
Throws:
java.util.NoSuchElementException

getEdgelistFromMap

public java.util.ArrayList<MEdge1D> getEdgelistFromMap(CADEdge E)
                                                throws java.util.NoSuchElementException
Returns the list of edges inserted on a given topological edge.

Parameters:
E - a topological edge.
Returns:
the list of edges inserted on this edge.
Throws:
java.util.NoSuchElementException

maximalNumberOfNodes

public int maximalNumberOfNodes()
Returns an upper limit of the total number of nodes

Returns:
an upper limit of the total number of nodes

getSubMesh1DFromMap

public SubMesh1D getSubMesh1DFromMap(CADEdge E)
                              throws java.util.NoSuchElementException
Returns the SubMesh1D instance associated with a CADEdge.

Parameters:
E - a topological edge.
Returns:
the SubMesh1D instance associated with it.
Throws:
java.util.NoSuchElementException

getSubMesh1DFromMap

public SubMesh1D getSubMesh1DFromMap(BDiscretization discrE)
                              throws java.util.NoSuchElementException
Returns the SubMesh1D instance associated with a BDiscretization.

Parameters:
discrE - discretization of an edge.
Returns:
the SubMesh1D instance associated with it.
Throws:
java.util.NoSuchElementException

boundaryNodes

public Vertex2D[] boundaryNodes(CADFace face,
                                MeshParameters mp)

isValid

public boolean isValid()
Checks the validity of a MMesh1D instance. This method is called within assertions, this is why it returns a boolean.

Returns:
true if all checks pass.
Throws:
AssertException - if a check fails.

printInfos

public void printInfos()
Prints edge lengths of a MMesh1D instance.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object