#ifndef FORCEVISC_H
#define FORCEVISC_H

#include "force.h"

class ForceVisc : public Force
{
public:
    // constant force of g in direction d
    ForceVisc(double k) : Force(), _k(k) { }

    // Evaluate force function wrt x,v,m
    SparseVecd eval(const Vecd &x, const Vecd &v, const Vecd &m) const;
    
    // Evaluate force Jacobians
    DblSparse_t evalDx(const Vecd &x, const Vecd &v, const Vecd &m) const;
    DblSparse_t evalDv(const Vecd &x, const Vecd &v, const Vecd &m) const;

    // relative displacement of spring
    double Displacement(const Vecd &x) const;

private:
    double _k;
};

#endif
