/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.2
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package org.opensim.modeling;

/**
 * This class implements a nonlinear spring ligament model introduced by<br>
 * Blankevoort et al.\ (1991) [1] and further described in Smith et al.\ (2016)<br>
 * [2]. This model is partially based on the formulation orginally proposed by<br>
 * Wismans et al.\ (1980) [3]. The ligament is represented as a passive spring<br>
 * with the force-strain relationship described by a quadratic "toe" region at<br>
 * low strains and a linear region at high strains. The toe region represents the<br>
 * uncrimping and alignment of collagen fibers and the linear region represents<br>
 * the subsequent stretching of the aligned fibers. The ligament model also<br>
 * includes a damping force that is only applied if the ligament is stretched<br>
 * beyond the slack length and if the ligament is lengthening.<br>
 * The length of the ligament is   l .<br>
 * <br>
 * <img src=fig_Blankevoort1991Ligament.png alt=width=400px/><br>
 * <br>
 * <b>Governing Equations</b><br>
 * <br>
 * Spring %Force:<br>
 *  
    F_{\mathrm{spring}} =
    \begin{Bmatrix}
    0 & \epsilon < 0 \\
    \frac{1}{2\epsilon_t }k\epsilon^2 & 0 \leq \epsilon \leq \epsilon_t \\
     k(\epsilon - \frac{\epsilon_t}{2})& \epsilon > \epsilon_t
    \end{Bmatrix}
<br>
 * <br>
 * Damping %Force:<br>
 *  
    F_{\mathrm{damping}} = 
    \begin{Bmatrix} 
    c\cdot \dot{\epsilon} & \epsilon > 0 \: and \: \dot{\epsilon} > 0 \\
    0 & otherwise
    \end{Bmatrix}
<br>
 * <br>
 * Total %Force:<br>
 *  
    F_{\mathrm{total}} = F_{\mathrm{spring}} + F_{\mathrm{damping}}
<br>
 * <br>
 * This Force component has the following properties:<br>
 * <br>
 * - linear stiffness (k): The force/strain (e.g. N) stiffness of the linear<br>
 * region of the ligament model.<br>
 * <br>
 * - slack_length (_0 ): The resting length of the ligament (e.g. m).

- damping coefficient (c): Damping coefficient used in the damping
force calculation in units of force*time/strain (e.g. N*s/strain). 
The default value is 0.003.

- transition_strain (_t ): The strain value where the ligament
model transitions from the quadratic toe region to the linear stiffness region.
The default value is 0.06 (6%) according to Blankevoort (1991) [1].
This value is widely used in the multibody knee modeling literature [2,4,5,6]
and also agrees with some experimental studies [7]. However, other literature
suggests the transition strain of ligaments occurs at around 0.03 (3%) strain
[8,9]. In reality, the transition strain is likely dependent on the strain
rate [10,11], however this effect is not included in this implementation.

The Blankevoort1991Ligament implementation is intended to be compatible with 
common methods in the literature for parameterizing ligament properties. 
The zero-load length of the ligament is parameterized by the
slack_length property, which can be set directly, in meters, using
set_slack_length(), or using setSlackLengthFromReferenceStrain() and
setSlackLengthFromReferenceForce(). Here, reference strain and reference
force are the strain or force in the ligament at a reference pose (state). If
you want to compute the strain or force of the ligament in a given pose 
(state), you can use the getStrain() and getForce() methods. The
linear_stiffness property has units of force/strain (newton) but can 
be set and obtained in units of force/length (newton/meter) using
setLinearStiffnessForcePerLength() and getLinearStiffnessForcePerLength().

When scaling a model (using the ScaleTool) that contains a 
Blankevoort1991Ligament, the slack_length property is scaled by the ratio of 
the entire GeometryPath length in the default model pose before and after 
scaling the bone geometries. This ensures that the strain in the ligament in 
the default pose is equivilent before and after scaling. Thus, it is important 
to consider the order of scaling the model and setting the slack_length 
property for your specific application. The linear_stiffness property is not 
affected by scaling the model. 

### References

[1] Blankevoort, L. and Huiskes, R., (1991).
    Ligament-bone interaction in a three-dimensional model of the knee.
    J Biomech Eng, 113(3), 263-269

[2] Smith, C.R., Lenhart, R.L., Kaiser, J., Vignos, M.F. and Thelen, D.G.,
    (2016). Influence of ligament properties on tibiofemoral mechanics
    in walking. J Knee Surg, 29(02), 99-106.

[3] Wismans, J.A.C., Veldpaus, F., Janssen, J., Huson, A. and Struben, P.,
    (1980). A three-dimensional mathematical model of the knee-joint.
    J Biomech, 13(8), 677-685.

[4] Marra, M. A., Vanheule, V., Fluit, R., Koopman, B. H., Rasmussen, J.,
    Verdonschot, N., & Andersen, M. S. (2015). A subject-specific
    musculoskeletal modeling framework to predict in vivo mechanics of total
    knee arthroplasty. Journal of biomechanical engineering, 137(2), 020904.

[5] Guess, T. M., Razu, S., & Jahandar, H. (2016). Evaluation of knee ligament
    mechanics using computational models. The journal of knee surgery, 29(02),
    126-137.

[6] Li, G., Gil, J., Kanamori, A., & Woo, S. Y. (1999). A validated
    three-dimensional computational model of a human knee joint. Journal of
    biomechanical engineering, 121(6), 657-662.

[7] Ristaniemi, A., Stenroth, L., Mikkonen, S., & Korhonen, R. K. (2018).
    Comparison of elastic, viscoelastic and failure tensile material properties
    of knee ligaments and patellar tendon. Journal of biomechanics, 79, 31-38.

[8] Weiss, J. A., & Gardiner, J. C. (2001). Computational modeling of ligament
    mechanics. Critical Reviews in Biomedical Engineering, 29(3).

[9] Martin, R. B., Burr, D. B., Sharkey, N. A., & Fyhrie, D. P. (2015).
    Mechanical properties of ligament and tendon. In Skeletal Tissue Mechanics
    (pp. 175-225). Springer, New York, NY.

[10] Pioletti, D. P., Rakotomanana, L. R., Benvenuti, J. F., & Leyvraz, P. F.
    (1998). Viscoelastic constitutive law in large deformations: application to
     human knee ligaments and tendons. Journal of biomechanics, 31(8), 753-757.

[11] Pioletti, D. P., Rakotomanana, L. R., & Leyvraz, P. F. (1999). Strain
    rate effect on the mechanical behavior of the anterior cruciate
    ligament-bone complex. Medical Engineering & Physics, 21(2), 95-100.

[12] Galbusera, F., Freutel, M., Durselen, L., D'Aiuto, M., Croce, D.,
    Villa, T., Sansone, V. & Innocenti, B. (2014). Material models and 
    properties in the finite element analysis of knee ligaments: a literature 
    review. Frontiers in bioengineering and biotechnology, 2, 54.

@author Colin Smith



 */
public class Blankevoort1991Ligament extends Force {
  private transient long swigCPtr;

  public Blankevoort1991Ligament(long cPtr, boolean cMemoryOwn) {
    super(opensimSimulationJNI.Blankevoort1991Ligament_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  public static long getCPtr(Blankevoort1991Ligament obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  @SuppressWarnings("deprecation")
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        opensimSimulationJNI.delete_Blankevoort1991Ligament(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public static Blankevoort1991Ligament safeDownCast(OpenSimObject obj) {
    long cPtr = opensimSimulationJNI.Blankevoort1991Ligament_safeDownCast(OpenSimObject.getCPtr(obj), obj);
    return (cPtr == 0) ? null : new Blankevoort1991Ligament(cPtr, false);
  }

  public void assign(OpenSimObject aObject) {
    opensimSimulationJNI.Blankevoort1991Ligament_assign(swigCPtr, this, OpenSimObject.getCPtr(aObject), aObject);
  }

  public static String getClassName() {
    return opensimSimulationJNI.Blankevoort1991Ligament_getClassName();
  }

  public OpenSimObject clone() {
    long cPtr = opensimSimulationJNI.Blankevoort1991Ligament_clone(swigCPtr, this);
    return (cPtr == 0) ? null : new Blankevoort1991Ligament(cPtr, true);
  }

  public String getConcreteClassName() {
    return opensimSimulationJNI.Blankevoort1991Ligament_getConcreteClassName(swigCPtr, this);
  }

  public void copyProperty_GeometryPath(Blankevoort1991Ligament source) {
    opensimSimulationJNI.Blankevoort1991Ligament_copyProperty_GeometryPath(swigCPtr, this, Blankevoort1991Ligament.getCPtr(source), source);
  }

  public GeometryPath get_GeometryPath(int i) {
    return new GeometryPath(opensimSimulationJNI.Blankevoort1991Ligament_get_GeometryPath__SWIG_0(swigCPtr, this, i), false);
  }

  public GeometryPath upd_GeometryPath(int i) {
    return new GeometryPath(opensimSimulationJNI.Blankevoort1991Ligament_upd_GeometryPath__SWIG_0(swigCPtr, this, i), false);
  }

  public void set_GeometryPath(int i, GeometryPath value) {
    opensimSimulationJNI.Blankevoort1991Ligament_set_GeometryPath__SWIG_0(swigCPtr, this, i, GeometryPath.getCPtr(value), value);
  }

  public int append_GeometryPath(GeometryPath value) {
    return opensimSimulationJNI.Blankevoort1991Ligament_append_GeometryPath(swigCPtr, this, GeometryPath.getCPtr(value), value);
  }

  public void constructProperty_GeometryPath(GeometryPath initValue) {
    opensimSimulationJNI.Blankevoort1991Ligament_constructProperty_GeometryPath(swigCPtr, this, GeometryPath.getCPtr(initValue), initValue);
  }

  public GeometryPath get_GeometryPath() {
    return new GeometryPath(opensimSimulationJNI.Blankevoort1991Ligament_get_GeometryPath__SWIG_1(swigCPtr, this), false);
  }

  public GeometryPath upd_GeometryPath() {
    return new GeometryPath(opensimSimulationJNI.Blankevoort1991Ligament_upd_GeometryPath__SWIG_1(swigCPtr, this), false);
  }

  public void set_GeometryPath(GeometryPath value) {
    opensimSimulationJNI.Blankevoort1991Ligament_set_GeometryPath__SWIG_1(swigCPtr, this, GeometryPath.getCPtr(value), value);
  }

  public void copyProperty_linear_stiffness(Blankevoort1991Ligament source) {
    opensimSimulationJNI.Blankevoort1991Ligament_copyProperty_linear_stiffness(swigCPtr, this, Blankevoort1991Ligament.getCPtr(source), source);
  }

  public double get_linear_stiffness(int i) {
    return opensimSimulationJNI.Blankevoort1991Ligament_get_linear_stiffness__SWIG_0(swigCPtr, this, i);
  }

  public SWIGTYPE_p_double upd_linear_stiffness(int i) {
    return new SWIGTYPE_p_double(opensimSimulationJNI.Blankevoort1991Ligament_upd_linear_stiffness__SWIG_0(swigCPtr, this, i), false);
  }

  public void set_linear_stiffness(int i, double value) {
    opensimSimulationJNI.Blankevoort1991Ligament_set_linear_stiffness__SWIG_0(swigCPtr, this, i, value);
  }

  public int append_linear_stiffness(double value) {
    return opensimSimulationJNI.Blankevoort1991Ligament_append_linear_stiffness(swigCPtr, this, value);
  }

  public void constructProperty_linear_stiffness(double initValue) {
    opensimSimulationJNI.Blankevoort1991Ligament_constructProperty_linear_stiffness(swigCPtr, this, initValue);
  }

  public double get_linear_stiffness() {
    return opensimSimulationJNI.Blankevoort1991Ligament_get_linear_stiffness__SWIG_1(swigCPtr, this);
  }

  public SWIGTYPE_p_double upd_linear_stiffness() {
    return new SWIGTYPE_p_double(opensimSimulationJNI.Blankevoort1991Ligament_upd_linear_stiffness__SWIG_1(swigCPtr, this), false);
  }

  public void set_linear_stiffness(double value) {
    opensimSimulationJNI.Blankevoort1991Ligament_set_linear_stiffness__SWIG_1(swigCPtr, this, value);
  }

  public void copyProperty_transition_strain(Blankevoort1991Ligament source) {
    opensimSimulationJNI.Blankevoort1991Ligament_copyProperty_transition_strain(swigCPtr, this, Blankevoort1991Ligament.getCPtr(source), source);
  }

  public double get_transition_strain(int i) {
    return opensimSimulationJNI.Blankevoort1991Ligament_get_transition_strain__SWIG_0(swigCPtr, this, i);
  }

  public SWIGTYPE_p_double upd_transition_strain(int i) {
    return new SWIGTYPE_p_double(opensimSimulationJNI.Blankevoort1991Ligament_upd_transition_strain__SWIG_0(swigCPtr, this, i), false);
  }

  public void set_transition_strain(int i, double value) {
    opensimSimulationJNI.Blankevoort1991Ligament_set_transition_strain__SWIG_0(swigCPtr, this, i, value);
  }

  public int append_transition_strain(double value) {
    return opensimSimulationJNI.Blankevoort1991Ligament_append_transition_strain(swigCPtr, this, value);
  }

  public void constructProperty_transition_strain(double initValue) {
    opensimSimulationJNI.Blankevoort1991Ligament_constructProperty_transition_strain(swigCPtr, this, initValue);
  }

  public double get_transition_strain() {
    return opensimSimulationJNI.Blankevoort1991Ligament_get_transition_strain__SWIG_1(swigCPtr, this);
  }

  public SWIGTYPE_p_double upd_transition_strain() {
    return new SWIGTYPE_p_double(opensimSimulationJNI.Blankevoort1991Ligament_upd_transition_strain__SWIG_1(swigCPtr, this), false);
  }

  public void set_transition_strain(double value) {
    opensimSimulationJNI.Blankevoort1991Ligament_set_transition_strain__SWIG_1(swigCPtr, this, value);
  }

  public void copyProperty_damping_coefficient(Blankevoort1991Ligament source) {
    opensimSimulationJNI.Blankevoort1991Ligament_copyProperty_damping_coefficient(swigCPtr, this, Blankevoort1991Ligament.getCPtr(source), source);
  }

  public double get_damping_coefficient(int i) {
    return opensimSimulationJNI.Blankevoort1991Ligament_get_damping_coefficient__SWIG_0(swigCPtr, this, i);
  }

  public SWIGTYPE_p_double upd_damping_coefficient(int i) {
    return new SWIGTYPE_p_double(opensimSimulationJNI.Blankevoort1991Ligament_upd_damping_coefficient__SWIG_0(swigCPtr, this, i), false);
  }

  public void set_damping_coefficient(int i, double value) {
    opensimSimulationJNI.Blankevoort1991Ligament_set_damping_coefficient__SWIG_0(swigCPtr, this, i, value);
  }

  public int append_damping_coefficient(double value) {
    return opensimSimulationJNI.Blankevoort1991Ligament_append_damping_coefficient(swigCPtr, this, value);
  }

  public void constructProperty_damping_coefficient(double initValue) {
    opensimSimulationJNI.Blankevoort1991Ligament_constructProperty_damping_coefficient(swigCPtr, this, initValue);
  }

  public double get_damping_coefficient() {
    return opensimSimulationJNI.Blankevoort1991Ligament_get_damping_coefficient__SWIG_1(swigCPtr, this);
  }

  public SWIGTYPE_p_double upd_damping_coefficient() {
    return new SWIGTYPE_p_double(opensimSimulationJNI.Blankevoort1991Ligament_upd_damping_coefficient__SWIG_1(swigCPtr, this), false);
  }

  public void set_damping_coefficient(double value) {
    opensimSimulationJNI.Blankevoort1991Ligament_set_damping_coefficient__SWIG_1(swigCPtr, this, value);
  }

  public void copyProperty_slack_length(Blankevoort1991Ligament source) {
    opensimSimulationJNI.Blankevoort1991Ligament_copyProperty_slack_length(swigCPtr, this, Blankevoort1991Ligament.getCPtr(source), source);
  }

  public double get_slack_length(int i) {
    return opensimSimulationJNI.Blankevoort1991Ligament_get_slack_length__SWIG_0(swigCPtr, this, i);
  }

  public SWIGTYPE_p_double upd_slack_length(int i) {
    return new SWIGTYPE_p_double(opensimSimulationJNI.Blankevoort1991Ligament_upd_slack_length__SWIG_0(swigCPtr, this, i), false);
  }

  public void set_slack_length(int i, double value) {
    opensimSimulationJNI.Blankevoort1991Ligament_set_slack_length__SWIG_0(swigCPtr, this, i, value);
  }

  public int append_slack_length(double value) {
    return opensimSimulationJNI.Blankevoort1991Ligament_append_slack_length(swigCPtr, this, value);
  }

  public void constructProperty_slack_length(double initValue) {
    opensimSimulationJNI.Blankevoort1991Ligament_constructProperty_slack_length(swigCPtr, this, initValue);
  }

  public double get_slack_length() {
    return opensimSimulationJNI.Blankevoort1991Ligament_get_slack_length__SWIG_1(swigCPtr, this);
  }

  public SWIGTYPE_p_double upd_slack_length() {
    return new SWIGTYPE_p_double(opensimSimulationJNI.Blankevoort1991Ligament_upd_slack_length__SWIG_1(swigCPtr, this), false);
  }

  public void set_slack_length(double value) {
    opensimSimulationJNI.Blankevoort1991Ligament_set_slack_length__SWIG_1(swigCPtr, this, value);
  }

  public void set_has_output_spring_force(boolean value) {
    opensimSimulationJNI.Blankevoort1991Ligament__has_output_spring_force_set(swigCPtr, this, value);
  }

  public boolean get_has_output_spring_force() {
    return opensimSimulationJNI.Blankevoort1991Ligament__has_output_spring_force_get(swigCPtr, this);
  }

  public void set_has_output_damping_force(boolean value) {
    opensimSimulationJNI.Blankevoort1991Ligament__has_output_damping_force_set(swigCPtr, this, value);
  }

  public boolean get_has_output_damping_force() {
    return opensimSimulationJNI.Blankevoort1991Ligament__has_output_damping_force_get(swigCPtr, this);
  }

  public void set_has_output_total_force(boolean value) {
    opensimSimulationJNI.Blankevoort1991Ligament__has_output_total_force_set(swigCPtr, this, value);
  }

  public boolean get_has_output_total_force() {
    return opensimSimulationJNI.Blankevoort1991Ligament__has_output_total_force_get(swigCPtr, this);
  }

  public void set_has_output_strain(boolean value) {
    opensimSimulationJNI.Blankevoort1991Ligament__has_output_strain_set(swigCPtr, this, value);
  }

  public boolean get_has_output_strain() {
    return opensimSimulationJNI.Blankevoort1991Ligament__has_output_strain_get(swigCPtr, this);
  }

  public void set_has_output_strain_rate(boolean value) {
    opensimSimulationJNI.Blankevoort1991Ligament__has_output_strain_rate_set(swigCPtr, this, value);
  }

  public boolean get_has_output_strain_rate() {
    return opensimSimulationJNI.Blankevoort1991Ligament__has_output_strain_rate_get(swigCPtr, this);
  }

  public void set_has_output_length(boolean value) {
    opensimSimulationJNI.Blankevoort1991Ligament__has_output_length_set(swigCPtr, this, value);
  }

  public boolean get_has_output_length() {
    return opensimSimulationJNI.Blankevoort1991Ligament__has_output_length_get(swigCPtr, this);
  }

  public void set_has_output_lengthening_speed(boolean value) {
    opensimSimulationJNI.Blankevoort1991Ligament__has_output_lengthening_speed_set(swigCPtr, this, value);
  }

  public boolean get_has_output_lengthening_speed() {
    return opensimSimulationJNI.Blankevoort1991Ligament__has_output_lengthening_speed_get(swigCPtr, this);
  }

  public Blankevoort1991Ligament() {
    this(opensimSimulationJNI.new_Blankevoort1991Ligament__SWIG_0(), true);
  }

  public Blankevoort1991Ligament(String name, PhysicalFrame frame1, Vec3 point1, PhysicalFrame frame2, Vec3 point2) {
    this(opensimSimulationJNI.new_Blankevoort1991Ligament__SWIG_1(name, PhysicalFrame.getCPtr(frame1), frame1, Vec3.getCPtr(point1), point1, PhysicalFrame.getCPtr(frame2), frame2, Vec3.getCPtr(point2), point2), true);
  }

  public Blankevoort1991Ligament(String name, PhysicalFrame frame1, Vec3 point1, PhysicalFrame frame2, Vec3 point2, double linear_stiffness, double slack_length) {
    this(opensimSimulationJNI.new_Blankevoort1991Ligament__SWIG_2(name, PhysicalFrame.getCPtr(frame1), frame1, Vec3.getCPtr(point1), point1, PhysicalFrame.getCPtr(frame2), frame2, Vec3.getCPtr(point2), point2, linear_stiffness, slack_length), true);
  }

  public Blankevoort1991Ligament(String name, double linear_stiffness, double slack_length) {
    this(opensimSimulationJNI.new_Blankevoort1991Ligament__SWIG_3(name, linear_stiffness, slack_length), true);
  }

  /**
   *  %Set the slack_length property using the strain in the ligament at a<br>
   * known pose (reference state). Note that scaling the model will adjust <br>
   *      the slack length property to hold the input reference strain constant <br>
   *      if the input reference_state is equal to the default model pose <br>
   *      (generated by initSystem()).
   */
  public void setSlackLengthFromReferenceStrain(double strain, State reference_state) {
    opensimSimulationJNI.Blankevoort1991Ligament_setSlackLengthFromReferenceStrain(swigCPtr, this, strain, State.getCPtr(reference_state), reference_state);
  }

  /**
   *  %Set the slack_length property using the absolute spring force (N) in <br>
   *     the ligament at a known pose (reference force). Note that scaling the <br>
   *     model will adjust the slack_length property, thus it is important to <br>
   *     consider the order of scaling and using this function for your application.
   */
  public void setSlackLengthFromReferenceForce(double force, State reference_state) {
    opensimSimulationJNI.Blankevoort1991Ligament_setSlackLengthFromReferenceForce(swigCPtr, this, force, State.getCPtr(reference_state), reference_state);
  }

  /**
   *  %Set the linear_stiffness property using a value in units of <br>
   *      force/length (N/m). Note that scaling the model keeps the <br>
   *      linear_stiffness property (in units of force/strain) constant, thus the<br>
   *      linear_stiffness in units of force/length input to this function will be <br>
   *      altered by scaling.
   */
  public void setLinearStiffnessForcePerLength(double linear_stiffness) {
    opensimSimulationJNI.Blankevoort1991Ligament_setLinearStiffnessForcePerLength(swigCPtr, this, linear_stiffness);
  }

  /**
   *  %Set the damping_coefficient property using a value in units of <br>
   *     force*time/length (N*s/m). Note that scaling the model keeps the <br>
   *     damping_coefficient property (in units force*time/strain) constant, thus <br>
   *     the damping_coefficient in units of force*time/length input to this <br>
   *     function will be altered by scaling.
   */
  public void setDampingCoefficientForceTimePerLength(double damping_coefficient) {
    opensimSimulationJNI.Blankevoort1991Ligament_setDampingCoefficientForceTimePerLength(swigCPtr, this, damping_coefficient);
  }

  public double getStrain(State state) {
    return opensimSimulationJNI.Blankevoort1991Ligament_getStrain(swigCPtr, this, State.getCPtr(state), state);
  }

  public double getStrainRate(State state) {
    return opensimSimulationJNI.Blankevoort1991Ligament_getStrainRate(swigCPtr, this, State.getCPtr(state), state);
  }

  public double getLength(State state) {
    return opensimSimulationJNI.Blankevoort1991Ligament_getLength(swigCPtr, this, State.getCPtr(state), state);
  }

  public double getLengtheningSpeed(State state) {
    return opensimSimulationJNI.Blankevoort1991Ligament_getLengtheningSpeed(swigCPtr, this, State.getCPtr(state), state);
  }

  public double getSpringForce(State state) {
    return opensimSimulationJNI.Blankevoort1991Ligament_getSpringForce(swigCPtr, this, State.getCPtr(state), state);
  }

  public double getDampingForce(State state) {
    return opensimSimulationJNI.Blankevoort1991Ligament_getDampingForce(swigCPtr, this, State.getCPtr(state), state);
  }

  public double getTotalForce(State state) {
    return opensimSimulationJNI.Blankevoort1991Ligament_getTotalForce(swigCPtr, this, State.getCPtr(state), state);
  }

  /**
   *  Get the linear_stiffness property in units of force/length (N/m)
   */
  public double getLinearStiffnessForcePerLength() {
    return opensimSimulationJNI.Blankevoort1991Ligament_getLinearStiffnessForcePerLength(swigCPtr, this);
  }

  /**
   *  Get the length (m) of the ligament where the model transitions from <br>
   *     the toe region to the linear region. This corresponds to the length of the <br>
   *     ligament at the transistion_strain.
   */
  public double getTransitionLength() {
    return opensimSimulationJNI.Blankevoort1991Ligament_getTransitionLength(swigCPtr, this);
  }

  /**
   *  Get the damping_coefficient in units of force*time/length (N*s/m)
   */
  public double getDampingCoefficientForceTimePerLength() {
    return opensimSimulationJNI.Blankevoort1991Ligament_getDampingCoefficientForceTimePerLength(swigCPtr, this);
  }

  public double computeMomentArm(State s, Coordinate aCoord) {
    return opensimSimulationJNI.Blankevoort1991Ligament_computeMomentArm(swigCPtr, this, State.getCPtr(s), s, Coordinate.getCPtr(aCoord), aCoord);
  }

  public void computeForce(State s, VectorOfSpatialVec bodyForces, Vector generalizedForces) {
    opensimSimulationJNI.Blankevoort1991Ligament_computeForce(swigCPtr, this, State.getCPtr(s), s, VectorOfSpatialVec.getCPtr(bodyForces), bodyForces, Vector.getCPtr(generalizedForces), generalizedForces);
  }

  public double computePotentialEnergy(State state) {
    return opensimSimulationJNI.Blankevoort1991Ligament_computePotentialEnergy(swigCPtr, this, State.getCPtr(state), state);
  }

  public void extendPostScale(State s, ScaleSet scaleSet) {
    opensimSimulationJNI.Blankevoort1991Ligament_extendPostScale(swigCPtr, this, State.getCPtr(s), s, ScaleSet.getCPtr(scaleSet), scaleSet);
  }

  public ArrayStr getRecordLabels() {
    return new ArrayStr(opensimSimulationJNI.Blankevoort1991Ligament_getRecordLabels(swigCPtr, this), true);
  }

  public ArrayDouble getRecordValues(State state) {
    return new ArrayDouble(opensimSimulationJNI.Blankevoort1991Ligament_getRecordValues(swigCPtr, this, State.getCPtr(state), state), true);
  }

}
