Search in sources :

Example 96 with VectorNd

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);
}
Also used : VectorNd(maspack.matrix.VectorNd)

Example 97 with VectorNd

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;
}
Also used : VectorNd(maspack.matrix.VectorNd)

Example 98 with VectorNd

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;
}
Also used : VectorNd(maspack.matrix.VectorNd)

Example 99 with VectorNd

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);
    }
}
Also used : NumericListKnot(maspack.interpolation.NumericListKnot) Point3d(maspack.matrix.Point3d) VectorNd(maspack.matrix.VectorNd)

Example 100 with VectorNd

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);
}
Also used : VectorNd(maspack.matrix.VectorNd) Point(artisynth.core.mechmodels.Point)

Aggregations

VectorNd (maspack.matrix.VectorNd)136 Point (artisynth.core.mechmodels.Point)29 Point3d (maspack.matrix.Point3d)16 Vector3d (maspack.matrix.Vector3d)15 PointParticleAttachment (artisynth.core.mechmodels.PointParticleAttachment)11 ArrayList (java.util.ArrayList)11 ContactPoint (artisynth.core.mechmodels.ContactPoint)9 MatrixNd (maspack.matrix.MatrixNd)9 Vertex3d (maspack.geometry.Vertex3d)8 SparseMatrixNd (maspack.matrix.SparseMatrixNd)8 IntegrationPoint3d (artisynth.core.femmodels.IntegrationPoint3d)7 PointAttachment (artisynth.core.mechmodels.PointAttachment)7 PointFem3dAttachment (artisynth.core.femmodels.PointFem3dAttachment)6 FemNode (artisynth.core.femmodels.FemNode)5 PolygonalMesh (maspack.geometry.PolygonalMesh)5 ReaderTokenizer (maspack.util.ReaderTokenizer)5 FemNode3d (artisynth.core.femmodels.FemNode3d)4 IntegrationData3d (artisynth.core.femmodels.IntegrationData3d)4 StringReader (java.io.StringReader)4 HashMap (java.util.HashMap)4