artisynth.core.femmodels
Class IntegrationPoint3d

java.lang.Object
  extended by artisynth.core.femmodels.IntegrationPoint3d
Direct Known Subclasses:
MFreeIntegrationPoint3d

public class IntegrationPoint3d
extends java.lang.Object

This class stores readonly and transient information for each integration point within a 3D element. To avoid excessive memory requirements, this data will generally be allocated statically within the each element class. The readonly data presents no problem in this regard, while the transient data will be valid only while stiffness update computations are being performed for the element.

Data that needs to be stored and retained per-element is declared in the IntegrationData3d class.


Constructor Summary
IntegrationPoint3d(int nnodes)
           
IntegrationPoint3d(int nnodes, int npvals, double s0, double s1, double s2, double w)
           
 
Method Summary
 void computeCoordsForRender(float[] coords, FemNode3d[] nodes)
           
 void computeDevLeftCauchyGreen(SymmetricMatrix3d BD)
           
 void computeDevRightCauchyGreen(SymmetricMatrix3d CD)
           
 double computeDirectedSizeForRender(Vector3d dir, FemNode3d[] nodes)
          Compute size of an element's render coordinates along a specified direction.
 void computeGradientForRender(Matrix3d Fmat, FemNode3d[] nodes, Matrix3d invJ0)
           
 double computeInverseJacobian()
           
 void computeJacobian(FemNode3d[] nodes)
           
 void computeJacobianAndGradient(FemNode3d[] nodes, Matrix3d invJ0)
           
 void computeJacobianAndGradient(SolidDeformation def, FemNode3d[] nodes, Matrix3d invJ0)
           
 void computeLeftCauchyGreen(SymmetricMatrix3d B)
           
 void computePosition(Point3d pos, FemNode3d[] nodes)
           
 void computeRestPosition(Point3d pos, FemNode3d[] nodes)
           
 void computeRightCauchyGreen(SymmetricMatrix3d C)
           
static IntegrationPoint3d create(FemElement3d elem, double s0, double s1, double s2, double w)
          Create an integration point for a given element at a specific set of natural coordinates.
 double getAverageJ()
           
 double getAveragePressure()
           
 Vector3d getCoords()
           
 double getDetF()
           
 Matrix3d getF()
           
 Vector3d[] getGNs()
           
 Matrix3d getInvJ()
           
 Matrix3d getJ()
           
 int getNumber()
          Returns the number of this integration point.
 VectorNd getPressureWeights()
           
 Vector3d[] getShapeGradient()
          Returns the gradient dN/dx of the shape functions.
 VectorNd getShapeWeights()
           
 SymmetricMatrix3d getStress()
           
 double getWeight()
           
 void setAveragePressure(double p)
           
 void setCoords(double s0, double s1, double s2)
           
 void setF(Matrix3d F)
           
 void setPressureWeights(VectorNd vals)
           
 void setShapeGrad(int i, Vector3d dNds)
           
 void setShapeWeights(VectorNd vals)
           
 void setStress(SymmetricMatrix3d sig)
           
 void setWeight(double w)
           
 Vector3d[] updateShapeGradient(Matrix3d invJ)
          Updates and returnes the gradient dN/dx of the shape functions, given an inverse Jacobian.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegrationPoint3d

public IntegrationPoint3d(int nnodes,
                          int npvals,
                          double s0,
                          double s1,
                          double s2,
                          double w)

IntegrationPoint3d

public IntegrationPoint3d(int nnodes)
Method Detail

getNumber

public int getNumber()
Returns the number of this integration point. This will be in the range 0 to numi-1, where numi is the number of integration points for the associated elements.


create

public static IntegrationPoint3d create(FemElement3d elem,
                                        double s0,
                                        double s1,
                                        double s2,
                                        double w)
Create an integration point for a given element at a specific set of natural coordinates.

Parameters:
elem - element to create the integration point for
s0 - first coordinate value
s1 - second coordinate value
s2 - third coordinate value
w - weight
Returns:
new integration point

setCoords

public void setCoords(double s0,
                      double s1,
                      double s2)

getCoords

public Vector3d getCoords()

getWeight

public double getWeight()

setWeight

public void setWeight(double w)

setShapeWeights

public void setShapeWeights(VectorNd vals)

getShapeWeights

public VectorNd getShapeWeights()

setShapeGrad

public void setShapeGrad(int i,
                         Vector3d dNds)

setPressureWeights

public void setPressureWeights(VectorNd vals)

getPressureWeights

public VectorNd getPressureWeights()

computeJacobian

public void computeJacobian(FemNode3d[] nodes)

computeJacobianAndGradient

public void computeJacobianAndGradient(FemNode3d[] nodes,
                                       Matrix3d invJ0)

computeJacobianAndGradient

public void computeJacobianAndGradient(SolidDeformation def,
                                       FemNode3d[] nodes,
                                       Matrix3d invJ0)

computeGradientForRender

public void computeGradientForRender(Matrix3d Fmat,
                                     FemNode3d[] nodes,
                                     Matrix3d invJ0)

computeDirectedSizeForRender

public double computeDirectedSizeForRender(Vector3d dir,
                                           FemNode3d[] nodes)
Compute size of an element's render coordinates along a specified direction.


computePosition

public void computePosition(Point3d pos,
                            FemNode3d[] nodes)

computeRestPosition

public void computeRestPosition(Point3d pos,
                                FemNode3d[] nodes)

computeCoordsForRender

public void computeCoordsForRender(float[] coords,
                                   FemNode3d[] nodes)

computeInverseJacobian

public double computeInverseJacobian()

getInvJ

public Matrix3d getInvJ()

updateShapeGradient

public Vector3d[] updateShapeGradient(Matrix3d invJ)
Updates and returnes the gradient dN/dx of the shape functions, given an inverse Jacobian. The gradient is supplied as an array of 3-vectors, one for each shape function, because this is more convenient for computation.

Parameters:
invJ - inverse Jacobian
Returns:
shape function gradient (must not be modifed).

getShapeGradient

public Vector3d[] getShapeGradient()
Returns the gradient dN/dx of the shape functions. This is supplied as an array of 3-vectors, one for each shape function, because this is more convenient for computation.

Returns:
shape function gradient (must not be modifed).

getF

public Matrix3d getF()

setF

public void setF(Matrix3d F)

getAverageJ

public double getAverageJ()

getAveragePressure

public double getAveragePressure()

getDetF

public double getDetF()

getJ

public Matrix3d getJ()

getStress

public SymmetricMatrix3d getStress()

setStress

public void setStress(SymmetricMatrix3d sig)

computeRightCauchyGreen

public void computeRightCauchyGreen(SymmetricMatrix3d C)

computeLeftCauchyGreen

public void computeLeftCauchyGreen(SymmetricMatrix3d B)

computeDevRightCauchyGreen

public void computeDevRightCauchyGreen(SymmetricMatrix3d CD)

computeDevLeftCauchyGreen

public void computeDevLeftCauchyGreen(SymmetricMatrix3d BD)

getGNs

public Vector3d[] getGNs()

setAveragePressure

public void setAveragePressure(double p)