public class StiffnessWarper3d
extends java.lang.Object
Note: it is important that all these methods are called from the same (simulation) thread. In particular, they should not be called by methods activated by the GUI.
Constructor and Description |
---|
StiffnessWarper3d(FemElement3dBase elem) |
Modifier and Type | Method and Description |
---|---|
void |
addInitialStiffness(FemElement3dBase e,
AuxiliaryMaterial mat,
double weight)
Adds linear stiffness contributions to an underlying cache
|
void |
addInitialStiffness(FemElement3dBase e,
FemMaterial mat,
double weight)
Adds linear stiffness contributions to an underlying cache
|
void |
addNodeForce(Vector3d f,
int i,
FemNode3d[] nodes)
Adds the total force contribution due to stiffness from all
cached linear materials for node i
|
void |
addNodeForce(Vector3d f,
Vector3d fback,
int i,
FemNode3d[] nodes) |
void |
addNodeForce0(VectorNd f,
int offset,
int i)
Adds initial force contribution due to cached stiffness
|
void |
addNodeStiffness(FemNodeNeighbor nbr,
int i,
int j) |
void |
addNodeStiffness(Matrix3d K,
int i,
int j)
Adds the total stiffness contributions between nodes i and j
from all cached linear and corotated linear materials to the given
matrix
|
static void |
computeRotation(RotationMatrix3d R,
SymmetricMatrix3d P,
Matrix3d F)
Computes a corotated rotation based on the deformation gradient
|
void |
computeWarpingRotation(FemElement3dBase elem) |
RotationMatrix3d |
getRotation()
Gets current warping rotation matrix
|
void |
initialize(FemElement3dBase elem)
Initializes the warper, clears any cached values
|
boolean |
isCacheEmpty()
Checks if warper contains any cached data
|
void |
setRotation(Matrix3dBase R)
Manually sets rotation to use for warping
|
public StiffnessWarper3d(FemElement3dBase elem)
public void initialize(FemElement3dBase elem)
elem
- element to be used by warperpublic boolean isCacheEmpty()
public void addInitialStiffness(FemElement3dBase e, FemMaterial mat, double weight)
e
- FEM elementmat
- linear materialweight
- weight to combine with integration point weightspublic void addInitialStiffness(FemElement3dBase e, AuxiliaryMaterial mat, double weight)
e
- FEM elementmat
- linear materialweight
- weight to combine with integration point weightspublic void computeWarpingRotation(FemElement3dBase elem)
public static void computeRotation(RotationMatrix3d R, SymmetricMatrix3d P, Matrix3d F)
R
- returns the rotationF
- deformation gradientP
- symmetric part of gradient after rotationpublic void setRotation(Matrix3dBase R)
R
- warping rotationpublic RotationMatrix3d getRotation()
public void addNodeStiffness(Matrix3d K, int i, int j)
K
- local stiffness matrixi
- first node indexj
- second node indexpublic void addNodeStiffness(FemNodeNeighbor nbr, int i, int j)
public void addNodeForce(Vector3d f, int i, FemNode3d[] nodes)
f
- output forcei
- node indexnodes
- element nodespublic void addNodeForce0(VectorNd f, int offset, int i)
f
- output force vectoroffset
- offset within force vector to add contributioni
- node for which to add force