use of maspack.matrix.VectorNd in project artisynth_core by artisynth.
the class NumericInputProbe method createNumericList.
public void createNumericList(int vsize) {
super.createNumericList(vsize);
myTmpVec = new VectorNd(vsize);
}
use of maspack.matrix.VectorNd in project artisynth_core by artisynth.
the class NumericInputProbe method clone.
public Object clone() throws CloneNotSupportedException {
NumericInputProbe probe = (NumericInputProbe) super.clone();
probe.myTmpVec = new VectorNd(myTmpVec.size());
return probe;
}
use of maspack.matrix.VectorNd in project artisynth_core by artisynth.
the class NumericProbeBase method getData.
public VectorNd getData(double sec) {
VectorNd vals = new VectorNd(myVsize);
double t = getVirtualTime(sec);
myNumericList.interpolate(vals, t, myNumericList.getInterpolation().getOrder(), true, myNumericList.getLast());
return vals;
}
use of maspack.matrix.VectorNd in project artisynth_core by artisynth.
the class PointTracingProbe method updateBounds.
public void updateBounds(Vector3d pmin, Vector3d pmax) {
if (myNumericList == null) {
return;
}
Point3d pnt = new Point3d();
for (NumericListKnot knot : myNumericList) {
VectorNd v = knot.v;
pnt.x = v.get(0);
pnt.y = v.get(1);
pnt.z = v.get(2);
pnt.updateBounds(pmin, pmax);
}
}
use of maspack.matrix.VectorNd in project artisynth_core by artisynth.
the class FemModel3d method getLocalVolumeError.
// integrates nodal volume error using ipnts
private double getLocalVolumeError(int nidx, FemNode3d[] nodes, IntegrationPoint3d[] pt, IntegrationData3d[] dt) {
// compute based on shape weights
double vol = 0;
double volr = 0;
for (int k = 0; k < pt.length; ++k) {
pt[k].computeJacobian(nodes);
double detJ = pt[k].getJ().determinant();
VectorNd N = pt[k].getShapeWeights();
double sw = N.get(nidx);
vol += detJ * pt[k].getWeight() * sw;
volr += dt[k].getDetJ0() * pt[k].getWeight() * sw;
}
return (vol - volr);
}
Aggregations