20#ifndef _DISK_CONTACT_H_
21#define _DISK_CONTACT_H_
23#include <mbsim/links/contour_link.h>
27 class GeneralizedForceLaw;
28 class GeneralizedImpactLaw;
29 class FrictionForceLaw;
30 class FrictionImpactLaw;
46 void resetUpToDate()
override;
48 bool isSticking()
const;
50 const double& evalGeneralizedNormalForce() {
if(updlaN) updateGeneralizedNormalForce();
return lambdaN; }
51 const fmatvec::VecV& evalGeneralizedTangentialForce() {
if(updlaT) updateGeneralizedTangentialForce();
return lambdaT; }
53 double& getGeneralizedNormalForce(
bool check=
true) { assert((not check) or (not updlaN));
return lambdaN; }
55 const double& evallaN();
56 const fmatvec::Vec& evallaT();
58 const double& evalLaN();
59 const fmatvec::Vec& evalLaT();
61 const double& evalgdnN();
62 const fmatvec::Vec& evalgdnT();
64 const double& evalgddN();
65 const fmatvec::Vec& evalgddT();
68 void updateForce()
override;
69 void updateMoment()
override;
70 void updateForceDirections()
override;
71 void updateGeneralizedNormalForce() { (this->*updateGeneralizedNormalForce_)(); updlaN =
false; }
72 void updateGeneralizedTangentialForce() { (this->*updateGeneralizedTangentialForce_)(); updlaT =
false; }
73 void updateGeneralizedNormalForceS();
74 void updateGeneralizedNormalForceM();
75 void updateGeneralizedTangentialForceS();
76 void updateGeneralizedTangentialForceM();
77 void (
DiskContact::*updateGeneralizedNormalForce_)();
78 void (
DiskContact::*updateGeneralizedTangentialForce_)();
79 void updateGeneralizedForces()
override;
80 void updatePositions(Frame *frame)
override;
81 void updateGeneralizedPositions()
override;
82 void updateGeneralizedVelocities()
override;
83 void updateg()
override;
84 void updategd()
override;
85 void updateh(
int i=0)
override;
86 void updateW(
int i=0)
override;
87 void updateV(
int i=0)
override;
88 void updatewb()
override;
89 void updateStopVector()
override;
90 void updateStopVectorParameters()
override;
97 void calcSize()
override;
105 void init(
InitStage stage,
const InitConfigSet &config)
override;
108 void updateLinkStatus()
override;
109 void updateLinkStatusReg()
override;
125 void LinearImpactEstimation(
double t, fmatvec::Vec &gInActive_,fmatvec::Vec &gdInActive_,
int *IndInActive_,fmatvec::Vec &gAct_,
int *IndActive_)
override;
134 void setNormalForceLaw(GeneralizedForceLaw *fcl_);
135 GeneralizedForceLaw * getNormalForceLaw()
const {
return fcl; }
136 void setNormalImpactLaw(GeneralizedImpactLaw *fnil_);
137 void setTangentialForceLaw(FrictionForceLaw *fdf_);
138 void setTangentialImpactLaw(FrictionImpactLaw *ftil_);
141 void calccorrSize(
int j)
override;
142 void updatecorr(
int j)
override;
144 void checkRoot()
override;
146 void initializeUsingXML(xercesc::DOMElement *element)
override;
237 fmatvec::VecV lambdaT;
239 bool updlaN{
true}, updlaT{
true};
contour link
Definition: contour_link.h:34
InitStage
The stages of the initialization.
Definition: element.h:62
std::string name
name of element
Definition: element.h:260
basic friction force law on acceleration level for constraint description
Definition: friction_force_law.h:34
basic friction force law on velocity level for constraint description
Definition: friction_impact_law.h:32
basic force law on acceleration level for constraint description
Definition: generalized_force_law.h:34
basic force law on velocity level for constraint description
Definition: generalized_impact_law.h:32
namespace MBSim
Definition: bilateral_constraint.cc:30