org.jcae.mesh.amibe.metrics
Class Metric3D

java.lang.Object
  extended by org.jcae.mesh.amibe.metrics.Matrix3D
      extended by org.jcae.mesh.amibe.metrics.Metric3D
All Implemented Interfaces:
java.io.Serializable

public class Metric3D
extends Matrix3D

3D metrics computed on a CAD surface. This class provides 3D metrics at a point to have a unit mesh with respect to edge length and deflection criteria.

A metric M is a symmetric positive matrix. It defines a dot product <X, Y> = tX M Y. If metrics are constant, the length of the [PQ] segment in this metrics is l(M,P,Q)=sqrt(t(PQ) M (PQ)). A good presentation of meshes governed by metrics can be found in Maillage de surfaces paramétriques (in French), by Houman Borouchaki and Paul Louis George.

The metrics associated with an edge length criterion is the 3x3 matrix M=Id/(h*h), where h is the target size. Indeed the relation above clearly shows that l(M,P,Q)=1 if and only if the Euclidian distance between P and Q is h. Such a metric is computed by the iso(double) method.

An isotropic metric governed by a given defl geometric error is M=Id*(Cm*Cm)/(alpha*alpha), where Cm is the largest curvature and alpha=2*sqrt(defl*(2-defl)). Of course this geometric error can be guaranteed onlyelocally, it becomes can be larger if defl is not small enough. An anisotropic metric can also be computed along principal curvature directions, see the technical report above or these sources to find the exact computations.

Some applications require an absolute geometric error. A first order approximation is obtained by replacing defl by defl*Cm in the previous metrics.

When meshing parametrized surfaces, we need the 2D metric induced by these 3D metrics to the tangent plane. This is performed by restrict2D().

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jcae.mesh.amibe.metrics.Matrix3D
data
 
Constructor Summary
Metric3D()
          Create a Metric3D instance and set it to the identity matrix.
Metric3D(CADGeomSurface surf, Vertex pt)
          Create a Metric3D instance at a given point.
Metric3D(double[] e1, double[] e2, double[] e3)
          Create a Metric3D instance from three column vectors.
 
Method Summary
 void copy(Metric3D that)
          Copy another instance.
 boolean deflection(MeshParameters mp)
          Set the current metrics to be governed by surface deflection.
 double det()
          Compute matrix determinant.
 boolean inv()
          Replace current metrics by its inverse.
 boolean iso(double l)
          Set the current metrics to be governed by an edge length.
 double[][] restrict2D()
          Compute the matrics induced to the tangent plane.
 
Methods inherited from class org.jcae.mesh.amibe.metrics.Matrix3D
apply, computeNormal3D, computeNormal3DT, copyColumn, multL, multR, norm, prodSca, prodVect3D, reset, saxpby0, scale, setDiagonal, swap, toString, transp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Metric3D

public Metric3D(CADGeomSurface surf,
                Vertex pt)
Create a Metric3D instance at a given point.

Parameters:
surf - geometrical surface
pt - node where metrics is computed.

Metric3D

public Metric3D()
Create a Metric3D instance and set it to the identity matrix.


Metric3D

public Metric3D(double[] e1,
                double[] e2,
                double[] e3)
Create a Metric3D instance from three column vectors.

Parameters:
e1 - first column.
e2 - second column.
e3 - third column.
Method Detail

copy

public void copy(Metric3D that)
Copy another instance.

Parameters:
that - instance being copied.

det

public final double det()
Compute matrix determinant.

Returns:
the matrix determinant.

inv

public final boolean inv()
Replace current metrics by its inverse.

Returns:
true if it is not singular, false otherwise.

iso

public boolean iso(double l)
Set the current metrics to be governed by an edge length. It is thus Id/l^2.

Parameters:
l - the desired edge length.
Returns:
true if this metrics has been successfully computed, false otherwise.

deflection

public boolean deflection(MeshParameters mp)
Set the current metrics to be governed by surface deflection. Deflection is relative or absolute depending on the relDefl instance variable.

Returns:
true if this metrics has been successfully computed, false otherwise.

restrict2D

public double[][] restrict2D()
Compute the matrics induced to the tangent plane.